| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_EVENTS_EVENT_H_ | 5 #ifndef UI_EVENTS_EVENT_H_ |
| 6 #define UI_EVENTS_EVENT_H_ | 6 #define UI_EVENTS_EVENT_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 720 | 720 |
| 721 PointerEvent(const PointerEvent& pointer_event); | 721 PointerEvent(const PointerEvent& pointer_event); |
| 722 explicit PointerEvent(const MouseEvent& mouse_event); | 722 explicit PointerEvent(const MouseEvent& mouse_event); |
| 723 explicit PointerEvent(const TouchEvent& touch_event); | 723 explicit PointerEvent(const TouchEvent& touch_event); |
| 724 | 724 |
| 725 PointerEvent(EventType type, | 725 PointerEvent(EventType type, |
| 726 const gfx::Point& location, | 726 const gfx::Point& location, |
| 727 const gfx::Point& root_location, | 727 const gfx::Point& root_location, |
| 728 int flags, | 728 int flags, |
| 729 int pointer_id, | 729 int pointer_id, |
| 730 int changed_button_flags, |
| 730 const PointerDetails& pointer_details, | 731 const PointerDetails& pointer_details, |
| 731 base::TimeTicks time_stamp); | 732 base::TimeTicks time_stamp); |
| 732 | 733 |
| 733 int32_t pointer_id() const { return pointer_id_; } | 734 int32_t pointer_id() const { return pointer_id_; } |
| 735 int changed_button_flags() const { return changed_button_flags_; } |
| 736 void set_changed_button_flags(int flags) { changed_button_flags_ = flags; } |
| 734 const PointerDetails& pointer_details() const { return details_; } | 737 const PointerDetails& pointer_details() const { return details_; } |
| 735 | 738 |
| 736 private: | 739 private: |
| 737 int32_t pointer_id_; | 740 int32_t pointer_id_; |
| 741 int changed_button_flags_; |
| 738 PointerDetails details_; | 742 PointerDetails details_; |
| 739 }; | 743 }; |
| 740 | 744 |
| 741 // A KeyEvent is really two distinct classes, melded together due to the | 745 // A KeyEvent is really two distinct classes, melded together due to the |
| 742 // DOM legacy of Windows key events: a keystroke event (is_char_ == false), | 746 // DOM legacy of Windows key events: a keystroke event (is_char_ == false), |
| 743 // or a character event (is_char_ == true). | 747 // or a character event (is_char_ == true). |
| 744 // | 748 // |
| 745 // For a keystroke event, | 749 // For a keystroke event, |
| 746 // -- |bool is_char_| is false. | 750 // -- |bool is_char_| is false. |
| 747 // -- |EventType Event::type()| can be ET_KEY_PRESSED or ET_KEY_RELEASED. | 751 // -- |EventType Event::type()| can be ET_KEY_PRESSED or ET_KEY_RELEASED. |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1002 // dispatched. This field gets a non-zero value only for gestures that are | 1006 // dispatched. This field gets a non-zero value only for gestures that are |
| 1003 // released through TouchDispositionGestureFilter::SendGesture. The gesture | 1007 // released through TouchDispositionGestureFilter::SendGesture. The gesture |
| 1004 // events that aren't fired directly in response to processing a touch-event | 1008 // events that aren't fired directly in response to processing a touch-event |
| 1005 // (e.g. timer fired ones), this id is zero. See crbug.com/618738. | 1009 // (e.g. timer fired ones), this id is zero. See crbug.com/618738. |
| 1006 uint32_t unique_touch_event_id_; | 1010 uint32_t unique_touch_event_id_; |
| 1007 }; | 1011 }; |
| 1008 | 1012 |
| 1009 } // namespace ui | 1013 } // namespace ui |
| 1010 | 1014 |
| 1011 #endif // UI_EVENTS_EVENT_H_ | 1015 #endif // UI_EVENTS_EVENT_H_ |
| OLD | NEW |