OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_TEST_EVENTS_TEST_UTILS_X11_H_ | 5 #ifndef UI_EVENTS_TEST_EVENTS_TEST_UTILS_X11_H_ |
6 #define UI_EVENTS_TEST_EVENTS_TEST_UTILS_X11_H_ | 6 #define UI_EVENTS_TEST_EVENTS_TEST_UTILS_X11_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "ui/events/event_constants.h" | 9 #include "ui/events/event_constants.h" |
10 #include "ui/events/keycodes/keyboard_codes.h" | 10 #include "ui/events/keycodes/keyboard_codes.h" |
11 #include "ui/events/x/device_data_manager.h" | 11 #include "ui/events/x/device_data_manager_x11.h" |
12 #include "ui/gfx/point.h" | 12 #include "ui/gfx/point.h" |
13 #include "ui/gfx/x/x11_types.h" | 13 #include "ui/gfx/x/x11_types.h" |
14 | 14 |
15 typedef union _XEvent XEvent; | 15 typedef union _XEvent XEvent; |
16 | 16 |
17 namespace ui { | 17 namespace ui { |
18 | 18 |
19 struct Valuator { | 19 struct Valuator { |
20 Valuator(DeviceDataManager::DataType type, double v) | 20 Valuator(DeviceDataManagerX11::DataType type, double v) |
21 : data_type(type), value(v) {} | 21 : data_type(type), value(v) {} |
22 | 22 |
23 DeviceDataManager::DataType data_type; | 23 DeviceDataManagerX11::DataType data_type; |
24 double value; | 24 double value; |
25 }; | 25 }; |
26 | 26 |
27 struct XEventDeleter { | 27 struct XEventDeleter { |
28 void operator()(XEvent* event); | 28 void operator()(XEvent* event); |
29 }; | 29 }; |
30 | 30 |
31 class ScopedXI2Event { | 31 class ScopedXI2Event { |
32 public: | 32 public: |
33 ScopedXI2Event(); | 33 ScopedXI2Event(); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 83 |
84 // Initializes a test touchpad device for scroll events. | 84 // Initializes a test touchpad device for scroll events. |
85 void SetUpTouchPadForTest(unsigned int deviceid); | 85 void SetUpTouchPadForTest(unsigned int deviceid); |
86 | 86 |
87 // Initializes a list of touchscreen devices for touch events. | 87 // Initializes a list of touchscreen devices for touch events. |
88 void SetUpTouchDevicesForTest(const std::vector<unsigned int>& devices); | 88 void SetUpTouchDevicesForTest(const std::vector<unsigned int>& devices); |
89 | 89 |
90 } // namespace ui | 90 } // namespace ui |
91 | 91 |
92 #endif // UI_EVENTS_TEST_EVENTS_TEST_UTILS_X11_H_ | 92 #endif // UI_EVENTS_TEST_EVENTS_TEST_UTILS_X11_H_ |
OLD | NEW |