OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_EVENT_DISPATCH_CALLBACK_H_ | 5 #ifndef UI_EVENTS_OZONE_EVDEV_EVENT_DISPATCH_CALLBACK_H_ |
6 #define UI_EVENTS_OZONE_EVDEV_EVENT_DISPATCH_CALLBACK_H_ | 6 #define UI_EVENTS_OZONE_EVDEV_EVENT_DISPATCH_CALLBACK_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "ui/events/event_constants.h" | 10 #include "ui/events/event_constants.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 ~KeyEventParams(); | 33 ~KeyEventParams(); |
34 | 34 |
35 int device_id; | 35 int device_id; |
36 unsigned int code; | 36 unsigned int code; |
37 bool down; | 37 bool down; |
38 }; | 38 }; |
39 | 39 |
40 typedef base::Callback<void(const KeyEventParams& params)> | 40 typedef base::Callback<void(const KeyEventParams& params)> |
41 KeyEventDispatchCallback; | 41 KeyEventDispatchCallback; |
42 | 42 |
| 43 struct EVENTS_OZONE_EVDEV_EXPORT MouseMoveEventParams { |
| 44 MouseMoveEventParams(int device_id, const gfx::PointF& location); |
| 45 MouseMoveEventParams(const MouseMoveEventParams& other); |
| 46 ~MouseMoveEventParams(); |
| 47 |
| 48 int device_id; |
| 49 gfx::PointF location; |
| 50 }; |
| 51 |
| 52 typedef base::Callback<void(const MouseMoveEventParams& params)> |
| 53 MouseMoveEventDispatchCallback; |
| 54 |
| 55 struct EVENTS_OZONE_EVDEV_EXPORT MouseButtonEventParams { |
| 56 MouseButtonEventParams(int device_id, |
| 57 const gfx::PointF& location, |
| 58 unsigned int button, |
| 59 bool down, |
| 60 bool allow_remap); |
| 61 MouseButtonEventParams(const MouseButtonEventParams& other); |
| 62 ~MouseButtonEventParams(); |
| 63 |
| 64 int device_id; |
| 65 gfx::PointF location; |
| 66 unsigned int button; |
| 67 bool down; |
| 68 bool allow_remap; |
| 69 }; |
| 70 |
| 71 typedef base::Callback<void(const MouseButtonEventParams& params)> |
| 72 MouseButtonEventDispatchCallback; |
| 73 |
43 struct EVENTS_OZONE_EVDEV_EXPORT TouchEventParams { | 74 struct EVENTS_OZONE_EVDEV_EXPORT TouchEventParams { |
44 TouchEventParams(int device_id, | 75 TouchEventParams(int device_id, |
45 int touch_id, | 76 int touch_id, |
46 EventType type, | 77 EventType type, |
47 const gfx::PointF& location, | 78 const gfx::PointF& location, |
48 const gfx::Vector2dF& radii, | 79 const gfx::Vector2dF& radii, |
49 float pressure, | 80 float pressure, |
50 const base::TimeDelta& timestamp); | 81 const base::TimeDelta& timestamp); |
51 TouchEventParams(const TouchEventParams& other); | 82 TouchEventParams(const TouchEventParams& other); |
52 ~TouchEventParams(); | 83 ~TouchEventParams(); |
53 | 84 |
54 int device_id; | 85 int device_id; |
55 int touch_id; | 86 int touch_id; |
56 EventType type; | 87 EventType type; |
57 gfx::PointF location; | 88 gfx::PointF location; |
58 gfx::Vector2dF radii; | 89 gfx::Vector2dF radii; |
59 float pressure; | 90 float pressure; |
60 base::TimeDelta timestamp; | 91 base::TimeDelta timestamp; |
61 }; | 92 }; |
62 | 93 |
63 typedef base::Callback<void(const TouchEventParams& params)> | 94 typedef base::Callback<void(const TouchEventParams& params)> |
64 TouchEventDispatchCallback; | 95 TouchEventDispatchCallback; |
65 | 96 |
66 } // namspace ui | 97 } // namspace ui |
67 | 98 |
68 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_DISPATCH_CALLBACK_H_ | 99 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_DISPATCH_CALLBACK_H_ |
OLD | NEW |