Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(589)

Side by Side Diff: ui/base/events/event_utils.h

Issue 11411247: Support 3f swipe for tab scrubbing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_BASE_EVENTS_EVENT_UTILS_H_ 5 #ifndef UI_BASE_EVENTS_EVENT_UTILS_H_
6 #define UI_BASE_EVENTS_EVENT_UTILS_H_ 6 #define UI_BASE_EVENTS_EVENT_UTILS_H_
7 7
8 #include "base/event_types.h" 8 #include "base/event_types.h"
9 #include "ui/base/events/event_constants.h" 9 #include "ui/base/events/event_constants.h"
10 #include "ui/base/keycodes/keyboard_codes.h" 10 #include "ui/base/keycodes/keyboard_codes.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 UI_EXPORT float GetTouchForce(const base::NativeEvent& native_event); 85 UI_EXPORT float GetTouchForce(const base::NativeEvent& native_event);
86 86
87 // Gets the fling velocity from a native event. is_cancel is set to true if 87 // Gets the fling velocity from a native event. is_cancel is set to true if
88 // this was a tap down, intended to stop an ongoing fling. 88 // this was a tap down, intended to stop an ongoing fling.
89 UI_EXPORT bool GetFlingData(const base::NativeEvent& native_event, 89 UI_EXPORT bool GetFlingData(const base::NativeEvent& native_event,
90 float* vx, 90 float* vx,
91 float* vy, 91 float* vy,
92 bool* is_cancel); 92 bool* is_cancel);
93 93
94 // Returns whether this is a scroll event and optionally gets the amount to be 94 // Returns whether this is a scroll event and optionally gets the amount to be
95 // scrolled. |x_offset| and |y_offset| can be NULL. 95 // scrolled. |x_offset|, |y_offset| and |finger_count| can be NULL.
96 UI_EXPORT bool GetScrollOffsets(const base::NativeEvent& native_event, 96 UI_EXPORT bool GetScrollOffsets(const base::NativeEvent& native_event,
97 float* x_offset, 97 float* x_offset,
98 float* y_offset); 98 float* y_offset,
99 int* finger_count);
99 100
100 UI_EXPORT bool GetGestureTimes(const base::NativeEvent& native_event, 101 UI_EXPORT bool GetGestureTimes(const base::NativeEvent& native_event,
101 double* start_time, 102 double* start_time,
102 double* end_time); 103 double* end_time);
103 104
104 // Enable/disable natural scrolling for touchpads. 105 // Enable/disable natural scrolling for touchpads.
105 UI_EXPORT void SetNaturalScroll(bool enabled); 106 UI_EXPORT void SetNaturalScroll(bool enabled);
106 107
107 // In natural scrolling enabled for touchpads? 108 // In natural scrolling enabled for touchpads?
108 UI_EXPORT bool IsNaturalScrollEnabled(); 109 UI_EXPORT bool IsNaturalScrollEnabled();
(...skipping 21 matching lines...) Expand all
130 // Returns true if default post-target handling was canceled for |event| after 131 // Returns true if default post-target handling was canceled for |event| after
131 // its dispatch to its target. 132 // its dispatch to its target.
132 UI_EXPORT bool EventCanceledDefaultHandling(const Event& event); 133 UI_EXPORT bool EventCanceledDefaultHandling(const Event& event);
133 134
134 // Registers a custom event type. 135 // Registers a custom event type.
135 UI_EXPORT int RegisterCustomEventType(); 136 UI_EXPORT int RegisterCustomEventType();
136 137
137 } // namespace ui 138 } // namespace ui
138 139
139 #endif // UI_BASE_EVENTS_EVENT_UTILS_H_ 140 #endif // UI_BASE_EVENTS_EVENT_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698