| 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 float* vy_ordinal, | 139 float* vy_ordinal, |
| 140 bool* is_cancel); | 140 bool* is_cancel); |
| 141 | 141 |
| 142 // Returns whether this is a scroll event and optionally gets the amount to be | 142 // Returns whether this is a scroll event and optionally gets the amount to be |
| 143 // scrolled. |x_offset|, |y_offset| and |finger_count| can be NULL. | 143 // scrolled. |x_offset|, |y_offset| and |finger_count| can be NULL. |
| 144 EVENTS_EXPORT bool GetScrollOffsets(const base::NativeEvent& native_event, | 144 EVENTS_EXPORT bool GetScrollOffsets(const base::NativeEvent& native_event, |
| 145 float* x_offset, | 145 float* x_offset, |
| 146 float* y_offset, | 146 float* y_offset, |
| 147 float* x_offset_ordinal, | 147 float* x_offset_ordinal, |
| 148 float* y_offset_ordinal, | 148 float* y_offset_ordinal, |
| 149 int* finger_count); | 149 int* finger_count, |
| 150 int* momentum_phase); |
| 150 | 151 |
| 151 // Returns whether natural scrolling should be used for touchpad. | 152 // Returns whether natural scrolling should be used for touchpad. |
| 152 EVENTS_EXPORT bool ShouldDefaultToNaturalScroll(); | 153 EVENTS_EXPORT bool ShouldDefaultToNaturalScroll(); |
| 153 | 154 |
| 154 // Returns whether or not the internal display produces touch events. | 155 // Returns whether or not the internal display produces touch events. |
| 155 EVENTS_EXPORT display::Display::TouchSupport GetInternalDisplayTouchSupport(); | 156 EVENTS_EXPORT display::Display::TouchSupport GetInternalDisplayTouchSupport(); |
| 156 | 157 |
| 157 EVENTS_EXPORT void ComputeEventLatencyOS(const base::NativeEvent& native_event); | 158 EVENTS_EXPORT void ComputeEventLatencyOS(const base::NativeEvent& native_event); |
| 158 | 159 |
| 159 #if defined(OS_WIN) | 160 #if defined(OS_WIN) |
| (...skipping 16 matching lines...) Expand all Loading... |
| 176 // Update the native X11 event to correspond to the new button flags. | 177 // Update the native X11 event to correspond to the new button flags. |
| 177 EVENTS_EXPORT void UpdateX11EventForChangedButtonFlags(MouseEvent* event); | 178 EVENTS_EXPORT void UpdateX11EventForChangedButtonFlags(MouseEvent* event); |
| 178 #endif | 179 #endif |
| 179 | 180 |
| 180 // Registers a custom event type. | 181 // Registers a custom event type. |
| 181 EVENTS_EXPORT int RegisterCustomEventType(); | 182 EVENTS_EXPORT int RegisterCustomEventType(); |
| 182 | 183 |
| 183 } // namespace ui | 184 } // namespace ui |
| 184 | 185 |
| 185 #endif // UI_EVENTS_EVENT_UTILS_H_ | 186 #endif // UI_EVENTS_EVENT_UTILS_H_ |
| OLD | NEW |