OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BASE_EVENTS_H_ | 5 #ifndef UI_BASE_EVENTS_H_ |
6 #define UI_BASE_EVENTS_H_ | 6 #define UI_BASE_EVENTS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/event_types.h" | 9 #include "base/event_types.h" |
10 #include "ui/base/keycodes/keyboard_codes.h" | 10 #include "ui/base/keycodes/keyboard_codes.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 ET_KEY_PRESSED, | 28 ET_KEY_PRESSED, |
29 ET_KEY_RELEASED, | 29 ET_KEY_RELEASED, |
30 ET_MOUSEWHEEL, | 30 ET_MOUSEWHEEL, |
31 ET_TOUCH_RELEASED, | 31 ET_TOUCH_RELEASED, |
32 ET_TOUCH_PRESSED, | 32 ET_TOUCH_PRESSED, |
33 ET_TOUCH_MOVED, | 33 ET_TOUCH_MOVED, |
34 ET_TOUCH_STATIONARY, | 34 ET_TOUCH_STATIONARY, |
35 ET_TOUCH_CANCELLED, | 35 ET_TOUCH_CANCELLED, |
36 ET_DROP_TARGET_EVENT, | 36 ET_DROP_TARGET_EVENT, |
37 ET_FOCUS_CHANGE, | 37 ET_FOCUS_CHANGE, |
| 38 ET_TRANSLATED_KEY_PRESS, |
| 39 ET_TRANSLATED_KEY_RELEASE, |
38 }; | 40 }; |
39 | 41 |
40 // Event flags currently supported | 42 // Event flags currently supported |
41 enum EventFlags { | 43 enum EventFlags { |
42 EF_CAPS_LOCK_DOWN = 1 << 0, | 44 EF_CAPS_LOCK_DOWN = 1 << 0, |
43 EF_SHIFT_DOWN = 1 << 1, | 45 EF_SHIFT_DOWN = 1 << 1, |
44 EF_CONTROL_DOWN = 1 << 2, | 46 EF_CONTROL_DOWN = 1 << 2, |
45 EF_ALT_DOWN = 1 << 3, | 47 EF_ALT_DOWN = 1 << 3, |
46 EF_LEFT_BUTTON_DOWN = 1 << 4, | 48 EF_LEFT_BUTTON_DOWN = 1 << 4, |
47 EF_MIDDLE_BUTTON_DOWN = 1 << 5, | 49 EF_MIDDLE_BUTTON_DOWN = 1 << 5, |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 | 112 |
111 // Gets the force from a native_event. Normalized to be [0, 1]. Default is 0.0. | 113 // Gets the force from a native_event. Normalized to be [0, 1]. Default is 0.0. |
112 UI_EXPORT float GetTouchForce(const base::NativeEvent& native_event); | 114 UI_EXPORT float GetTouchForce(const base::NativeEvent& native_event); |
113 | 115 |
114 // Creates and returns no-op event. | 116 // Creates and returns no-op event. |
115 UI_EXPORT base::NativeEvent CreateNoopEvent(); | 117 UI_EXPORT base::NativeEvent CreateNoopEvent(); |
116 | 118 |
117 } // namespace ui | 119 } // namespace ui |
118 | 120 |
119 #endif // UI_BASE_EVENTS_H_ | 121 #endif // UI_BASE_EVENTS_H_ |
OLD | NEW |