OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_EVENT_UTILS_H_ | 5 #ifndef UI_EVENTS_EVENT_UTILS_H_ |
6 #define UI_EVENTS_EVENT_UTILS_H_ | 6 #define UI_EVENTS_EVENT_UTILS_H_ |
7 | 7 |
8 #include "base/event_types.h" | 8 #include "base/event_types.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "ui/events/event_constants.h" | 10 #include "ui/events/event_constants.h" |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 155 |
156 // Returns true if |message| identifies a mouse event that was generated as the | 156 // Returns true if |message| identifies a mouse event that was generated as the |
157 // result of a touch event. | 157 // result of a touch event. |
158 EVENTS_EXPORT bool IsMouseEventFromTouch(UINT message); | 158 EVENTS_EXPORT bool IsMouseEventFromTouch(UINT message); |
159 | 159 |
160 // Converts scan code and lParam each other. The scan code | 160 // Converts scan code and lParam each other. The scan code |
161 // representing an extended key contains 0xE000 bits. | 161 // representing an extended key contains 0xE000 bits. |
162 EVENTS_EXPORT uint16 GetScanCodeFromLParam(LPARAM lParam); | 162 EVENTS_EXPORT uint16 GetScanCodeFromLParam(LPARAM lParam); |
163 EVENTS_EXPORT LPARAM GetLParamFromScanCode(uint16 scan_code); | 163 EVENTS_EXPORT LPARAM GetLParamFromScanCode(uint16 scan_code); |
164 | 164 |
165 // Overrides the ui::KeyEvent's flags for test. | |
166 // They're not exported to prevent it from leaking into production code. | |
167 void SetKeyEventFlagsForTest(int flags); | |
168 void ResetKeyEventFlagsForTest(); | |
169 | |
170 #endif | 165 #endif |
171 | 166 |
172 // Registers a custom event type. | 167 // Registers a custom event type. |
173 EVENTS_EXPORT int RegisterCustomEventType(); | 168 EVENTS_EXPORT int RegisterCustomEventType(); |
174 | 169 |
175 } // namespace ui | 170 } // namespace ui |
176 | 171 |
177 #endif // UI_EVENTS_EVENT_UTILS_H_ | 172 #endif // UI_EVENTS_EVENT_UTILS_H_ |
OLD | NEW |