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 |
126 // Returns whether natural scrolling should be used for touchpad. | 132 // Returns whether natural scrolling should be used for touchpad. |
127 EVENTS_EXPORT bool ShouldDefaultToNaturalScroll(); | 133 EVENTS_EXPORT bool ShouldDefaultToNaturalScroll(); |
128 | 134 |
129 // Returns whether or not the internal display produces touch events. | 135 // Returns whether or not the internal display produces touch events. |
130 EVENTS_EXPORT gfx::Display::TouchSupport GetInternalDisplayTouchSupport(); | 136 EVENTS_EXPORT gfx::Display::TouchSupport GetInternalDisplayTouchSupport(); |
131 | 137 |
132 // Was this event generated by a touchpad device? | 138 // Was this event generated by a touchpad device? |
133 // The caller is responsible for ensuring that this is a mouse/touchpad event | 139 // The caller is responsible for ensuring that this is a mouse/touchpad event |
134 // before calling this function. | 140 // before calling this function. |
135 EVENTS_EXPORT bool IsTouchpadEvent(const base::NativeEvent& event); | 141 EVENTS_EXPORT bool IsTouchpadEvent(const base::NativeEvent& event); |
(...skipping 11 matching lines...) Expand all Loading... |
147 EVENTS_EXPORT uint16 GetScanCodeFromLParam(LPARAM lParam); | 153 EVENTS_EXPORT uint16 GetScanCodeFromLParam(LPARAM lParam); |
148 EVENTS_EXPORT LPARAM GetLParamFromScanCode(uint16 scan_code); | 154 EVENTS_EXPORT LPARAM GetLParamFromScanCode(uint16 scan_code); |
149 #endif | 155 #endif |
150 | 156 |
151 // Registers a custom event type. | 157 // Registers a custom event type. |
152 EVENTS_EXPORT int RegisterCustomEventType(); | 158 EVENTS_EXPORT int RegisterCustomEventType(); |
153 | 159 |
154 } // namespace ui | 160 } // namespace ui |
155 | 161 |
156 #endif // UI_EVENTS_EVENT_UTILS_H_ | 162 #endif // UI_EVENTS_EVENT_UTILS_H_ |
OLD | NEW |