| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 126 |
| 127 // Enable/disable natural scrolling for touchpads. | 127 // Enable/disable natural scrolling for touchpads. |
| 128 EVENTS_EXPORT void SetNaturalScroll(bool enabled); | 128 EVENTS_EXPORT void SetNaturalScroll(bool enabled); |
| 129 | 129 |
| 130 // In natural scrolling enabled for touchpads? | 130 // In natural scrolling enabled for touchpads? |
| 131 EVENTS_EXPORT bool IsNaturalScrollEnabled(); | 131 EVENTS_EXPORT bool IsNaturalScrollEnabled(); |
| 132 | 132 |
| 133 // Returns whether natural scrolling should be used for touchpad. | 133 // Returns whether natural scrolling should be used for touchpad. |
| 134 EVENTS_EXPORT bool ShouldDefaultToNaturalScroll(); | 134 EVENTS_EXPORT bool ShouldDefaultToNaturalScroll(); |
| 135 | 135 |
| 136 // Returns whether or not the internal display produces touch events. |
| 137 EVENTS_EXPORT bool InternalDisplaySupportsTouch(); |
| 138 |
| 136 // Was this event generated by a touchpad device? | 139 // Was this event generated by a touchpad device? |
| 137 // The caller is responsible for ensuring that this is a mouse/touchpad event | 140 // The caller is responsible for ensuring that this is a mouse/touchpad event |
| 138 // before calling this function. | 141 // before calling this function. |
| 139 EVENTS_EXPORT bool IsTouchpadEvent(const base::NativeEvent& event); | 142 EVENTS_EXPORT bool IsTouchpadEvent(const base::NativeEvent& event); |
| 140 | 143 |
| 141 // Returns true if event is noop. | 144 // Returns true if event is noop. |
| 142 EVENTS_EXPORT bool IsNoopEvent(const base::NativeEvent& event); | 145 EVENTS_EXPORT bool IsNoopEvent(const base::NativeEvent& event); |
| 143 | 146 |
| 144 // Creates and returns no-op event. | 147 // Creates and returns no-op event. |
| 145 EVENTS_EXPORT base::NativeEvent CreateNoopEvent(); | 148 EVENTS_EXPORT base::NativeEvent CreateNoopEvent(); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 161 // Returns true if default post-target handling was canceled for |event| after | 164 // Returns true if default post-target handling was canceled for |event| after |
| 162 // its dispatch to its target. | 165 // its dispatch to its target. |
| 163 EVENTS_EXPORT bool EventCanceledDefaultHandling(const Event& event); | 166 EVENTS_EXPORT bool EventCanceledDefaultHandling(const Event& event); |
| 164 | 167 |
| 165 // Registers a custom event type. | 168 // Registers a custom event type. |
| 166 EVENTS_EXPORT int RegisterCustomEventType(); | 169 EVENTS_EXPORT int RegisterCustomEventType(); |
| 167 | 170 |
| 168 } // namespace ui | 171 } // namespace ui |
| 169 | 172 |
| 170 #endif // UI_EVENTS_EVENT_UTILS_H_ | 173 #endif // UI_EVENTS_EVENT_UTILS_H_ |
| OLD | NEW |