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/keyboard_device.h" | 12 #include "ui/events/devices/keyboard_device.h" |
13 #include "ui/events/devices/touchscreen_device.h" | 13 #include "ui/events/devices/touchscreen_device.h" |
| 14 #include "ui/events/event.h" |
14 #include "ui/events/event_constants.h" | 15 #include "ui/events/event_constants.h" |
15 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h" | 16 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h" |
16 #include "ui/gfx/geometry/point_f.h" | 17 #include "ui/gfx/geometry/point_f.h" |
17 #include "ui/gfx/geometry/vector2d.h" | 18 #include "ui/gfx/geometry/vector2d.h" |
18 #include "ui/gfx/geometry/vector2d_f.h" | 19 #include "ui/gfx/geometry/vector2d_f.h" |
19 | 20 |
20 namespace ui { | 21 namespace ui { |
21 | 22 |
22 struct EVENTS_OZONE_EVDEV_EXPORT KeyEventParams { | 23 struct EVENTS_OZONE_EVDEV_EXPORT KeyEventParams { |
23 KeyEventParams(int device_id, | 24 KeyEventParams(int device_id, |
24 unsigned int code, | 25 unsigned int code, |
25 bool down, | 26 bool down, |
26 bool suppress_auto_repeat, | 27 bool suppress_auto_repeat, |
27 base::TimeDelta timestamp); | 28 base::TimeDelta timestamp); |
28 KeyEventParams(const KeyEventParams& other); | 29 KeyEventParams(const KeyEventParams& other); |
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::TimeDelta timestamp; | 36 base::TimeDelta 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, |
40 const gfx::PointF& location, | 41 const gfx::PointF& location, |
| 42 const PointerDetails& details, |
41 base::TimeDelta timestamp); | 43 base::TimeDelta timestamp); |
42 MouseMoveEventParams(const MouseMoveEventParams& other); | 44 MouseMoveEventParams(const MouseMoveEventParams& other); |
43 ~MouseMoveEventParams(); | 45 ~MouseMoveEventParams(); |
44 | 46 |
45 int device_id; | 47 int device_id; |
46 gfx::PointF location; | 48 gfx::PointF location; |
| 49 PointerDetails pointer_details; |
47 base::TimeDelta timestamp; | 50 base::TimeDelta timestamp; |
48 }; | 51 }; |
49 | 52 |
50 struct EVENTS_OZONE_EVDEV_EXPORT MouseButtonEventParams { | 53 struct EVENTS_OZONE_EVDEV_EXPORT MouseButtonEventParams { |
51 MouseButtonEventParams(int device_id, | 54 MouseButtonEventParams(int device_id, |
52 const gfx::PointF& location, | 55 const gfx::PointF& location, |
53 unsigned int button, | 56 unsigned int button, |
54 bool down, | 57 bool down, |
55 bool allow_remap, | 58 bool allow_remap, |
| 59 const PointerDetails& details, |
56 base::TimeDelta timestamp); | 60 base::TimeDelta timestamp); |
57 MouseButtonEventParams(const MouseButtonEventParams& other); | 61 MouseButtonEventParams(const MouseButtonEventParams& other); |
58 ~MouseButtonEventParams(); | 62 ~MouseButtonEventParams(); |
59 | 63 |
60 int device_id; | 64 int device_id; |
61 gfx::PointF location; | 65 gfx::PointF location; |
62 unsigned int button; | 66 unsigned int button; |
63 bool down; | 67 bool down; |
64 bool allow_remap; | 68 bool allow_remap; |
| 69 PointerDetails pointer_details; |
65 base::TimeDelta timestamp; | 70 base::TimeDelta timestamp; |
66 }; | 71 }; |
67 | 72 |
68 struct EVENTS_OZONE_EVDEV_EXPORT MouseWheelEventParams { | 73 struct EVENTS_OZONE_EVDEV_EXPORT MouseWheelEventParams { |
69 MouseWheelEventParams(int device_id, | 74 MouseWheelEventParams(int device_id, |
70 const gfx::PointF& location, | 75 const gfx::PointF& location, |
71 const gfx::Vector2d& delta, | 76 const gfx::Vector2d& delta, |
72 base::TimeDelta timestamp); | 77 base::TimeDelta timestamp); |
73 MouseWheelEventParams(const MouseWheelEventParams& other); | 78 MouseWheelEventParams(const MouseWheelEventParams& other); |
74 ~MouseWheelEventParams(); | 79 ~MouseWheelEventParams(); |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 virtual void DispatchMouseDevicesUpdated( | 147 virtual void DispatchMouseDevicesUpdated( |
143 const std::vector<InputDevice>& devices) = 0; | 148 const std::vector<InputDevice>& devices) = 0; |
144 virtual void DispatchTouchpadDevicesUpdated( | 149 virtual void DispatchTouchpadDevicesUpdated( |
145 const std::vector<InputDevice>& devices) = 0; | 150 const std::vector<InputDevice>& devices) = 0; |
146 virtual void DispatchDeviceListsComplete() = 0; | 151 virtual void DispatchDeviceListsComplete() = 0; |
147 }; | 152 }; |
148 | 153 |
149 } // namespace ui | 154 } // namespace ui |
150 | 155 |
151 #endif // UI_EVENTS_OZONE_EVDEV_DEVICE_EVENT_DISPATCHER_H_ | 156 #endif // UI_EVENTS_OZONE_EVDEV_DEVICE_EVENT_DISPATCHER_H_ |
OLD | NEW |