| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 | 156 |
| 157 EVENTS_EXPORT void ComputeEventLatencyOS(const base::NativeEvent& native_event); | 157 EVENTS_EXPORT void ComputeEventLatencyOS(const base::NativeEvent& native_event); |
| 158 | 158 |
| 159 #if defined(OS_WIN) | 159 #if defined(OS_WIN) |
| 160 EVENTS_EXPORT int GetModifiersFromKeyState(); | 160 EVENTS_EXPORT int GetModifiersFromKeyState(); |
| 161 | 161 |
| 162 // Returns true if |message| identifies a mouse event that was generated as the | 162 // Returns true if |message| identifies a mouse event that was generated as the |
| 163 // result of a touch event. | 163 // result of a touch event. |
| 164 EVENTS_EXPORT bool IsMouseEventFromTouch(UINT message); | 164 EVENTS_EXPORT bool IsMouseEventFromTouch(UINT message); |
| 165 | 165 |
| 166 EVENTS_EXPORT bool IsWindowsCursorHidden(); |
| 167 |
| 166 // Converts scan code and lParam each other. The scan code | 168 // Converts scan code and lParam each other. The scan code |
| 167 // representing an extended key contains 0xE000 bits. | 169 // representing an extended key contains 0xE000 bits. |
| 168 EVENTS_EXPORT uint16_t GetScanCodeFromLParam(LPARAM lParam); | 170 EVENTS_EXPORT uint16_t GetScanCodeFromLParam(LPARAM lParam); |
| 169 EVENTS_EXPORT LPARAM GetLParamFromScanCode(uint16_t scan_code); | 171 EVENTS_EXPORT LPARAM GetLParamFromScanCode(uint16_t scan_code); |
| 170 | 172 |
| 171 #endif | 173 #endif |
| 172 | 174 |
| 173 #if defined(USE_X11) | 175 #if defined(USE_X11) |
| 174 // Update the native X11 event to correspond to the new flags. | 176 // Update the native X11 event to correspond to the new flags. |
| 175 EVENTS_EXPORT void UpdateX11EventForFlags(Event* event); | 177 EVENTS_EXPORT void UpdateX11EventForFlags(Event* event); |
| 176 // Update the native X11 event to correspond to the new button flags. | 178 // Update the native X11 event to correspond to the new button flags. |
| 177 EVENTS_EXPORT void UpdateX11EventForChangedButtonFlags(MouseEvent* event); | 179 EVENTS_EXPORT void UpdateX11EventForChangedButtonFlags(MouseEvent* event); |
| 178 #endif | 180 #endif |
| 179 | 181 |
| 180 // Registers a custom event type. | 182 // Registers a custom event type. |
| 181 EVENTS_EXPORT int RegisterCustomEventType(); | 183 EVENTS_EXPORT int RegisterCustomEventType(); |
| 182 | 184 |
| 183 } // namespace ui | 185 } // namespace ui |
| 184 | 186 |
| 185 #endif // UI_EVENTS_EVENT_UTILS_H_ | 187 #endif // UI_EVENTS_EVENT_UTILS_H_ |
| OLD | NEW |