cygprofile: increase timeouts to allow showing web contents
[chromium-blink-merge.git] / ui / events / ozone / evdev / device_event_dispatcher_evdev.h
blob919ac44952a11fc53ea7aa7e7dd27ce7aeae84a3
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
3 // found in the LICENSE file.
5 #ifndef UI_EVENTS_OZONE_EVDEV_DEVICE_EVENT_DISPATCHER_H_
6 #define UI_EVENTS_OZONE_EVDEV_DEVICE_EVENT_DISPATCHER_H_
8 #include <vector>
10 #include "base/time/time.h"
11 #include "ui/events/devices/input_device.h"
12 #include "ui/events/devices/keyboard_device.h"
13 #include "ui/events/devices/touchscreen_device.h"
14 #include "ui/events/event.h"
15 #include "ui/events/event_constants.h"
16 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h"
17 #include "ui/gfx/geometry/point_f.h"
18 #include "ui/gfx/geometry/vector2d.h"
19 #include "ui/gfx/geometry/vector2d_f.h"
21 namespace ui {
23 struct EVENTS_OZONE_EVDEV_EXPORT KeyEventParams {
24 KeyEventParams(int device_id,
25 unsigned int code,
26 bool down,
27 bool suppress_auto_repeat,
28 base::TimeDelta timestamp);
29 KeyEventParams(const KeyEventParams& other);
30 ~KeyEventParams();
32 int device_id;
33 unsigned int code;
34 bool down;
35 bool suppress_auto_repeat;
36 base::TimeDelta timestamp;
39 struct EVENTS_OZONE_EVDEV_EXPORT MouseMoveEventParams {
40 MouseMoveEventParams(int device_id,
41 const gfx::PointF& location,
42 const PointerDetails& details,
43 base::TimeDelta timestamp);
44 MouseMoveEventParams(const MouseMoveEventParams& other);
45 ~MouseMoveEventParams();
47 int device_id;
48 gfx::PointF location;
49 PointerDetails pointer_details;
50 base::TimeDelta timestamp;
53 struct EVENTS_OZONE_EVDEV_EXPORT MouseButtonEventParams {
54 MouseButtonEventParams(int device_id,
55 const gfx::PointF& location,
56 unsigned int button,
57 bool down,
58 bool allow_remap,
59 const PointerDetails& details,
60 base::TimeDelta timestamp);
61 MouseButtonEventParams(const MouseButtonEventParams& other);
62 ~MouseButtonEventParams();
64 int device_id;
65 gfx::PointF location;
66 unsigned int button;
67 bool down;
68 bool allow_remap;
69 PointerDetails pointer_details;
70 base::TimeDelta timestamp;
73 struct EVENTS_OZONE_EVDEV_EXPORT MouseWheelEventParams {
74 MouseWheelEventParams(int device_id,
75 const gfx::PointF& location,
76 const gfx::Vector2d& delta,
77 base::TimeDelta timestamp);
78 MouseWheelEventParams(const MouseWheelEventParams& other);
79 ~MouseWheelEventParams();
81 int device_id;
82 gfx::PointF location;
83 gfx::Vector2d delta;
84 base::TimeDelta timestamp;
87 struct EVENTS_OZONE_EVDEV_EXPORT ScrollEventParams {
88 ScrollEventParams(int device_id,
89 EventType type,
90 const gfx::PointF location,
91 const gfx::Vector2dF& delta,
92 const gfx::Vector2dF& ordinal_delta,
93 int finger_count,
94 const base::TimeDelta timestamp);
95 ScrollEventParams(const ScrollEventParams& other);
96 ~ScrollEventParams();
98 int device_id;
99 EventType type;
100 const gfx::PointF location;
101 const gfx::Vector2dF delta;
102 const gfx::Vector2dF ordinal_delta;
103 int finger_count;
104 const base::TimeDelta timestamp;
107 struct EVENTS_OZONE_EVDEV_EXPORT TouchEventParams {
108 TouchEventParams(int device_id,
109 int slot,
110 EventType type,
111 const gfx::PointF& location,
112 const gfx::Vector2dF& radii,
113 float pressure,
114 const base::TimeDelta& timestamp);
115 TouchEventParams(const TouchEventParams& other);
116 ~TouchEventParams();
118 int device_id;
119 int slot;
120 EventType type;
121 gfx::PointF location;
122 gfx::Vector2dF radii;
123 float pressure;
124 base::TimeDelta timestamp;
127 // Interface used by device objects for event dispatch.
128 class EVENTS_OZONE_EVDEV_EXPORT DeviceEventDispatcherEvdev {
129 public:
130 DeviceEventDispatcherEvdev() {}
131 virtual ~DeviceEventDispatcherEvdev() {}
133 // User input events.
134 virtual void DispatchKeyEvent(const KeyEventParams& params) = 0;
135 virtual void DispatchMouseMoveEvent(const MouseMoveEventParams& params) = 0;
136 virtual void DispatchMouseButtonEvent(
137 const MouseButtonEventParams& params) = 0;
138 virtual void DispatchMouseWheelEvent(const MouseWheelEventParams& params) = 0;
139 virtual void DispatchScrollEvent(const ScrollEventParams& params) = 0;
140 virtual void DispatchTouchEvent(const TouchEventParams& params) = 0;
142 // Device lifecycle events.
143 virtual void DispatchKeyboardDevicesUpdated(
144 const std::vector<KeyboardDevice>& devices) = 0;
145 virtual void DispatchTouchscreenDevicesUpdated(
146 const std::vector<TouchscreenDevice>& devices) = 0;
147 virtual void DispatchMouseDevicesUpdated(
148 const std::vector<InputDevice>& devices) = 0;
149 virtual void DispatchTouchpadDevicesUpdated(
150 const std::vector<InputDevice>& devices) = 0;
151 virtual void DispatchDeviceListsComplete() = 0;
154 } // namespace ui
156 #endif // UI_EVENTS_OZONE_EVDEV_DEVICE_EVENT_DISPATCHER_H_