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 "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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 float* x_offset, | 116 float* x_offset, |
117 float* y_offset, | 117 float* y_offset, |
118 float* x_offset_ordinal, | 118 float* x_offset_ordinal, |
119 float* y_offset_ordinal, | 119 float* y_offset_ordinal, |
120 int* finger_count); | 120 int* finger_count); |
121 | 121 |
122 EVENTS_EXPORT bool GetGestureTimes(const base::NativeEvent& native_event, | 122 EVENTS_EXPORT bool GetGestureTimes(const base::NativeEvent& native_event, |
123 double* start_time, | 123 double* start_time, |
124 double* end_time); | 124 double* end_time); |
125 | 125 |
126 // Enable/disable natural scrolling for touchpads. | |
127 EVENTS_EXPORT void SetNaturalScroll(bool enabled); | |
128 | |
129 // In natural scrolling enabled for touchpads? | |
130 EVENTS_EXPORT bool IsNaturalScrollEnabled(); | |
131 | |
132 // Returns whether natural scrolling should be used for touchpad. | 126 // Returns whether natural scrolling should be used for touchpad. |
133 EVENTS_EXPORT bool ShouldDefaultToNaturalScroll(); | 127 EVENTS_EXPORT bool ShouldDefaultToNaturalScroll(); |
134 | 128 |
135 // Returns whether or not the internal display produces touch events. | 129 // Returns whether or not the internal display produces touch events. |
136 EVENTS_EXPORT gfx::Display::TouchSupport GetInternalDisplayTouchSupport(); | 130 EVENTS_EXPORT gfx::Display::TouchSupport GetInternalDisplayTouchSupport(); |
137 | 131 |
138 // Was this event generated by a touchpad device? | 132 // Was this event generated by a touchpad device? |
139 // The caller is responsible for ensuring that this is a mouse/touchpad event | 133 // The caller is responsible for ensuring that this is a mouse/touchpad event |
140 // before calling this function. | 134 // before calling this function. |
141 EVENTS_EXPORT bool IsTouchpadEvent(const base::NativeEvent& event); | 135 EVENTS_EXPORT bool IsTouchpadEvent(const base::NativeEvent& event); |
(...skipping 11 matching lines...) Expand all Loading... |
153 EVENTS_EXPORT uint16 GetScanCodeFromLParam(LPARAM lParam); | 147 EVENTS_EXPORT uint16 GetScanCodeFromLParam(LPARAM lParam); |
154 EVENTS_EXPORT LPARAM GetLParamFromScanCode(uint16 scan_code); | 148 EVENTS_EXPORT LPARAM GetLParamFromScanCode(uint16 scan_code); |
155 #endif | 149 #endif |
156 | 150 |
157 // Registers a custom event type. | 151 // Registers a custom event type. |
158 EVENTS_EXPORT int RegisterCustomEventType(); | 152 EVENTS_EXPORT int RegisterCustomEventType(); |
159 | 153 |
160 } // namespace ui | 154 } // namespace ui |
161 | 155 |
162 #endif // UI_EVENTS_EVENT_UTILS_H_ | 156 #endif // UI_EVENTS_EVENT_UTILS_H_ |
OLD | NEW |