OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_OZONE_EVDEV_DEVICE_EVENT_DISPATCHER_H_ | 5 #ifndef UI_EVENTS_OZONE_EVDEV_DEVICE_EVENT_DISPATCHER_H_ |
6 #define UI_EVENTS_OZONE_EVDEV_DEVICE_EVENT_DISPATCHER_H_ | 6 #define UI_EVENTS_OZONE_EVDEV_DEVICE_EVENT_DISPATCHER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
11 #include "ui/events/devices/input_device.h" | 11 #include "ui/events/devices/input_device.h" |
12 #include "ui/events/devices/touchscreen_device.h" | 12 #include "ui/events/devices/touchscreen_device.h" |
13 #include "ui/events/event.h" | 13 #include "ui/events/event.h" |
14 #include "ui/events/event_constants.h" | 14 #include "ui/events/event_constants.h" |
15 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h" | 15 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h" |
16 #include "ui/gfx/geometry/point_f.h" | 16 #include "ui/gfx/geometry/point_f.h" |
17 #include "ui/gfx/geometry/vector2d.h" | 17 #include "ui/gfx/geometry/vector2d.h" |
18 #include "ui/gfx/geometry/vector2d_f.h" | 18 #include "ui/gfx/geometry/vector2d_f.h" |
19 | 19 |
20 namespace ui { | 20 namespace ui { |
21 | 21 |
22 struct EVENTS_OZONE_EVDEV_EXPORT KeyEventParams { | 22 struct EVENTS_OZONE_EVDEV_EXPORT KeyEventParams { |
23 KeyEventParams(int device_id, | 23 KeyEventParams(int device_id, |
24 unsigned int code, | 24 unsigned int code, |
25 bool down, | 25 bool down, |
26 bool suppress_auto_repeat, | 26 bool suppress_auto_repeat, |
27 base::TimeTicks timestamp); | 27 base::TimeTicks timestamp); |
28 KeyEventParams(const KeyEventParams& other); | 28 KeyEventParams(const KeyEventParams& other); |
| 29 KeyEventParams() {} |
29 ~KeyEventParams(); | 30 ~KeyEventParams(); |
30 | 31 |
31 int device_id; | 32 int device_id; |
32 unsigned int code; | 33 unsigned int code; |
33 bool down; | 34 bool down; |
34 bool suppress_auto_repeat; | 35 bool suppress_auto_repeat; |
35 base::TimeTicks timestamp; | 36 base::TimeTicks timestamp; |
36 }; | 37 }; |
37 | 38 |
38 struct EVENTS_OZONE_EVDEV_EXPORT MouseMoveEventParams { | 39 struct EVENTS_OZONE_EVDEV_EXPORT MouseMoveEventParams { |
39 MouseMoveEventParams(int device_id, | 40 MouseMoveEventParams(int device_id, |
| 41 int flags, |
40 const gfx::PointF& location, | 42 const gfx::PointF& location, |
41 const PointerDetails& details, | 43 const PointerDetails& details, |
42 base::TimeTicks timestamp); | 44 base::TimeTicks timestamp); |
43 MouseMoveEventParams(const MouseMoveEventParams& other); | 45 MouseMoveEventParams(const MouseMoveEventParams& other); |
| 46 MouseMoveEventParams() {} |
44 ~MouseMoveEventParams(); | 47 ~MouseMoveEventParams(); |
45 | 48 |
46 int device_id; | 49 int device_id; |
| 50 int flags; |
47 gfx::PointF location; | 51 gfx::PointF location; |
48 PointerDetails pointer_details; | 52 PointerDetails pointer_details; |
49 base::TimeTicks timestamp; | 53 base::TimeTicks timestamp; |
50 }; | 54 }; |
51 | 55 |
52 struct EVENTS_OZONE_EVDEV_EXPORT MouseButtonEventParams { | 56 struct EVENTS_OZONE_EVDEV_EXPORT MouseButtonEventParams { |
53 MouseButtonEventParams(int device_id, | 57 MouseButtonEventParams(int device_id, |
| 58 int flags, |
54 const gfx::PointF& location, | 59 const gfx::PointF& location, |
55 unsigned int button, | 60 unsigned int button, |
56 bool down, | 61 bool down, |
57 bool allow_remap, | 62 bool allow_remap, |
58 const PointerDetails& details, | 63 const PointerDetails& details, |
59 base::TimeTicks timestamp); | 64 base::TimeTicks timestamp); |
60 MouseButtonEventParams(const MouseButtonEventParams& other); | 65 MouseButtonEventParams(const MouseButtonEventParams& other); |
| 66 MouseButtonEventParams() {} |
61 ~MouseButtonEventParams(); | 67 ~MouseButtonEventParams(); |
62 | 68 |
63 int device_id; | 69 int device_id; |
| 70 int flags; |
64 gfx::PointF location; | 71 gfx::PointF location; |
65 unsigned int button; | 72 unsigned int button; |
66 bool down; | 73 bool down; |
67 bool allow_remap; | 74 bool allow_remap; |
68 PointerDetails pointer_details; | 75 PointerDetails pointer_details; |
69 base::TimeTicks timestamp; | 76 base::TimeTicks timestamp; |
70 }; | 77 }; |
71 | 78 |
72 struct EVENTS_OZONE_EVDEV_EXPORT MouseWheelEventParams { | 79 struct EVENTS_OZONE_EVDEV_EXPORT MouseWheelEventParams { |
73 MouseWheelEventParams(int device_id, | 80 MouseWheelEventParams(int device_id, |
74 const gfx::PointF& location, | 81 const gfx::PointF& location, |
75 const gfx::Vector2d& delta, | 82 const gfx::Vector2d& delta, |
76 base::TimeTicks timestamp); | 83 base::TimeTicks timestamp); |
77 MouseWheelEventParams(const MouseWheelEventParams& other); | 84 MouseWheelEventParams(const MouseWheelEventParams& other); |
| 85 MouseWheelEventParams() {} |
78 ~MouseWheelEventParams(); | 86 ~MouseWheelEventParams(); |
79 | 87 |
80 int device_id; | 88 int device_id; |
81 gfx::PointF location; | 89 gfx::PointF location; |
82 gfx::Vector2d delta; | 90 gfx::Vector2d delta; |
83 base::TimeTicks timestamp; | 91 base::TimeTicks timestamp; |
84 }; | 92 }; |
85 | 93 |
86 struct EVENTS_OZONE_EVDEV_EXPORT PinchEventParams { | 94 struct EVENTS_OZONE_EVDEV_EXPORT PinchEventParams { |
87 PinchEventParams(int device_id, | 95 PinchEventParams(int device_id, |
88 EventType type, | 96 EventType type, |
89 const gfx::PointF location, | 97 const gfx::PointF location, |
90 float scale, | 98 float scale, |
91 const base::TimeTicks timestamp); | 99 const base::TimeTicks timestamp); |
92 PinchEventParams(const PinchEventParams& other); | 100 PinchEventParams(const PinchEventParams& other); |
| 101 PinchEventParams() {} |
93 ~PinchEventParams(); | 102 ~PinchEventParams(); |
94 | 103 |
95 int device_id; | 104 int device_id; |
96 EventType type; | 105 EventType type; |
97 const gfx::PointF location; | 106 const gfx::PointF location; |
98 float scale; | 107 float scale; |
99 const base::TimeTicks timestamp; | 108 const base::TimeTicks timestamp; |
100 }; | 109 }; |
101 | 110 |
102 struct EVENTS_OZONE_EVDEV_EXPORT ScrollEventParams { | 111 struct EVENTS_OZONE_EVDEV_EXPORT ScrollEventParams { |
103 ScrollEventParams(int device_id, | 112 ScrollEventParams(int device_id, |
104 EventType type, | 113 EventType type, |
105 const gfx::PointF location, | 114 const gfx::PointF location, |
106 const gfx::Vector2dF& delta, | 115 const gfx::Vector2dF& delta, |
107 const gfx::Vector2dF& ordinal_delta, | 116 const gfx::Vector2dF& ordinal_delta, |
108 int finger_count, | 117 int finger_count, |
109 const base::TimeTicks timestamp); | 118 const base::TimeTicks timestamp); |
110 ScrollEventParams(const ScrollEventParams& other); | 119 ScrollEventParams(const ScrollEventParams& other); |
| 120 ScrollEventParams() {} |
111 ~ScrollEventParams(); | 121 ~ScrollEventParams(); |
112 | 122 |
113 int device_id; | 123 int device_id; |
114 EventType type; | 124 EventType type; |
115 const gfx::PointF location; | 125 const gfx::PointF location; |
116 const gfx::Vector2dF delta; | 126 const gfx::Vector2dF delta; |
117 const gfx::Vector2dF ordinal_delta; | 127 const gfx::Vector2dF ordinal_delta; |
118 int finger_count; | 128 int finger_count; |
119 const base::TimeTicks timestamp; | 129 const base::TimeTicks timestamp; |
120 }; | 130 }; |
121 | 131 |
122 struct EVENTS_OZONE_EVDEV_EXPORT TouchEventParams { | 132 struct EVENTS_OZONE_EVDEV_EXPORT TouchEventParams { |
123 TouchEventParams(int device_id, | 133 TouchEventParams(int device_id, |
124 int slot, | 134 int slot, |
125 EventType type, | 135 EventType type, |
126 const gfx::PointF& location, | 136 const gfx::PointF& location, |
127 const PointerDetails& pointer_details, | 137 const PointerDetails& pointer_details, |
128 const base::TimeTicks& timestamp); | 138 const base::TimeTicks& timestamp); |
129 TouchEventParams(const TouchEventParams& other); | 139 TouchEventParams(const TouchEventParams& other); |
| 140 TouchEventParams() {} |
130 ~TouchEventParams(); | 141 ~TouchEventParams(); |
131 | 142 |
132 int device_id; | 143 int device_id; |
133 int slot; | 144 int slot; |
134 EventType type; | 145 EventType type; |
135 gfx::PointF location; | 146 gfx::PointF location; |
136 PointerDetails pointer_details; | 147 PointerDetails pointer_details; |
137 base::TimeTicks timestamp; | 148 base::TimeTicks timestamp; |
138 }; | 149 }; |
139 | 150 |
(...skipping 21 matching lines...) Expand all Loading... |
161 virtual void DispatchMouseDevicesUpdated( | 172 virtual void DispatchMouseDevicesUpdated( |
162 const std::vector<InputDevice>& devices) = 0; | 173 const std::vector<InputDevice>& devices) = 0; |
163 virtual void DispatchTouchpadDevicesUpdated( | 174 virtual void DispatchTouchpadDevicesUpdated( |
164 const std::vector<InputDevice>& devices) = 0; | 175 const std::vector<InputDevice>& devices) = 0; |
165 virtual void DispatchDeviceListsComplete() = 0; | 176 virtual void DispatchDeviceListsComplete() = 0; |
166 }; | 177 }; |
167 | 178 |
168 } // namespace ui | 179 } // namespace ui |
169 | 180 |
170 #endif // UI_EVENTS_OZONE_EVDEV_DEVICE_EVENT_DISPATCHER_H_ | 181 #endif // UI_EVENTS_OZONE_EVDEV_DEVICE_EVENT_DISPATCHER_H_ |
OLD | NEW |