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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 int x_velocity, | 62 int x_velocity, |
63 int y_velocity, | 63 int y_velocity, |
64 int x_velocity_ordinal, | 64 int x_velocity_ordinal, |
65 int y_velocity_ordinal, | 65 int y_velocity_ordinal, |
66 bool is_cancel); | 66 bool is_cancel); |
67 | 67 |
68 void InitTouchEvent(int deviceid, | 68 void InitTouchEvent(int deviceid, |
69 int evtype, | 69 int evtype, |
70 int tracking_id, | 70 int tracking_id, |
71 const gfx::Point& location, | 71 const gfx::Point& location, |
72 const std::vector<Valuator>& valuators); | 72 const std::vector<Valuator>& valuators, |
| 73 ::Window target); |
73 | 74 |
74 private: | 75 private: |
75 void Cleanup(); | 76 void Cleanup(); |
76 | 77 |
77 void SetUpValuators(const std::vector<Valuator>& valuators); | 78 void SetUpValuators(const std::vector<Valuator>& valuators); |
78 | 79 |
79 scoped_ptr<XEvent, XEventDeleter> event_; | 80 scoped_ptr<XEvent, XEventDeleter> event_; |
80 | 81 |
81 DISALLOW_COPY_AND_ASSIGN(ScopedXI2Event); | 82 DISALLOW_COPY_AND_ASSIGN(ScopedXI2Event); |
82 }; | 83 }; |
83 | 84 |
84 // Initializes a test touchpad device for scroll events. | 85 // Initializes a test touchpad device for scroll events. |
85 void SetUpTouchPadForTest(unsigned int deviceid); | 86 void SetUpTouchPadForTest(unsigned int deviceid); |
86 | 87 |
87 // Initializes a list of touchscreen devices for touch events. | 88 // Initializes a list of touchscreen devices for touch events. |
88 void SetUpTouchDevicesForTest(const std::vector<unsigned int>& devices); | 89 void SetUpTouchDevicesForTest(const std::vector<unsigned int>& devices); |
89 | 90 |
90 } // namespace ui | 91 } // namespace ui |
91 | 92 |
92 #endif // UI_EVENTS_TEST_EVENTS_TEST_UTILS_X11_H_ | 93 #endif // UI_EVENTS_TEST_EVENTS_TEST_UTILS_X11_H_ |
OLD | NEW |