| 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 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/event_types.h" | 10 #include "base/event_types.h" |
| (...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 730 bool should_remove_native_touch_id_mapping_; | 730 bool should_remove_native_touch_id_mapping_; |
| 731 | 731 |
| 732 // Structure for holding pointer details for implementing PointerEvents API. | 732 // Structure for holding pointer details for implementing PointerEvents API. |
| 733 PointerDetails pointer_details_; | 733 PointerDetails pointer_details_; |
| 734 }; | 734 }; |
| 735 | 735 |
| 736 class EVENTS_EXPORT PointerEvent : public LocatedEvent { | 736 class EVENTS_EXPORT PointerEvent : public LocatedEvent { |
| 737 public: | 737 public: |
| 738 static const int32_t kMousePointerId; | 738 static const int32_t kMousePointerId; |
| 739 | 739 |
| 740 // Returns true if a PointerEvent can be constructed from the given mouse or |
| 741 // touch event. For example, PointerEvent does not support ET_MOUSEWHEEL or |
| 742 // ET_MOUSE_CAPTURE_CHANGED. |
| 743 static bool CanConvertFrom(const Event& event); |
| 744 |
| 740 PointerEvent(const PointerEvent& pointer_event); | 745 PointerEvent(const PointerEvent& pointer_event); |
| 741 explicit PointerEvent(const MouseEvent& mouse_event); | 746 explicit PointerEvent(const MouseEvent& mouse_event); |
| 742 explicit PointerEvent(const TouchEvent& touch_event); | 747 explicit PointerEvent(const TouchEvent& touch_event); |
| 743 | 748 |
| 744 PointerEvent(EventType type, | 749 PointerEvent(EventType type, |
| 745 EventPointerType pointer_type, | 750 EventPointerType pointer_type, |
| 746 const gfx::Point& location, | 751 const gfx::Point& location, |
| 747 const gfx::Point& root_location, | 752 const gfx::Point& root_location, |
| 748 int flags, | 753 int flags, |
| 749 int pointer_id, | 754 int pointer_id, |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1055 : LocatedEvent(type, time_stamp, flags) {} | 1060 : LocatedEvent(type, time_stamp, flags) {} |
| 1056 friend struct IPC::ParamTraits<ui::ScopedEvent>; | 1061 friend struct IPC::ParamTraits<ui::ScopedEvent>; |
| 1057 friend struct IPC::ParamTraits<ui::GestureEvent>; | 1062 friend struct IPC::ParamTraits<ui::GestureEvent>; |
| 1058 | 1063 |
| 1059 GestureEventDetails details_; | 1064 GestureEventDetails details_; |
| 1060 }; | 1065 }; |
| 1061 | 1066 |
| 1062 } // namespace ui | 1067 } // namespace ui |
| 1063 | 1068 |
| 1064 #endif // UI_EVENTS_EVENT_H_ | 1069 #endif // UI_EVENTS_EVENT_H_ |
| OLD | NEW |