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" |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 operator XEvent*() { return event_.get(); } | 36 operator XEvent*() { return event_.get(); } |
37 | 37 |
38 // Initializes a XEvent with for the appropriate type with the specified data. | 38 // Initializes a XEvent with for the appropriate type with the specified data. |
39 // Note that ui::EF_ flags should be passed as |flags|, not the native ones in | 39 // Note that ui::EF_ flags should be passed as |flags|, not the native ones in |
40 // <X11/X.h>. | 40 // <X11/X.h>. |
41 void InitKeyEvent(EventType type, | 41 void InitKeyEvent(EventType type, |
42 KeyboardCode key_code, | 42 KeyboardCode key_code, |
43 int flags); | 43 int flags); |
44 | 44 |
| 45 // Initializes an Xinput2 key event. |
| 46 // |deviceid| is the master, and |sourceid| is the slave device. |
45 void InitGenericKeyEvent(int deviceid, | 47 void InitGenericKeyEvent(int deviceid, |
| 48 int sourceid, |
46 EventType type, | 49 EventType type, |
47 KeyboardCode key_code, | 50 KeyboardCode key_code, |
48 int flags); | 51 int flags); |
49 | 52 |
50 void InitGenericButtonEvent(int deviceid, | 53 void InitGenericButtonEvent(int deviceid, |
51 EventType type, | 54 EventType type, |
52 const gfx::Point& location, | 55 const gfx::Point& location, |
53 int flags); | 56 int flags); |
54 | 57 |
55 void InitGenericMouseWheelEvent(int deviceid, | 58 void InitGenericMouseWheelEvent(int deviceid, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 | 91 |
89 // Initializes a test touchpad device for scroll events. | 92 // Initializes a test touchpad device for scroll events. |
90 void SetUpTouchPadForTest(unsigned int deviceid); | 93 void SetUpTouchPadForTest(unsigned int deviceid); |
91 | 94 |
92 // Initializes a list of touchscreen devices for touch events. | 95 // Initializes a list of touchscreen devices for touch events. |
93 void SetUpTouchDevicesForTest(const std::vector<unsigned int>& devices); | 96 void SetUpTouchDevicesForTest(const std::vector<unsigned int>& devices); |
94 | 97 |
95 } // namespace ui | 98 } // namespace ui |
96 | 99 |
97 #endif // UI_EVENTS_TEST_EVENTS_TEST_UTILS_X11_H_ | 100 #endif // UI_EVENTS_TEST_EVENTS_TEST_UTILS_X11_H_ |
OLD | NEW |