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

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

Issue 2193153002: MacViews: Send Mac scrollWheel NSEvents as ui::ET_SCROLL (ui::ScrollEvent). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20160728-MacViews-ScrollLayers
Patch Set: NSDictionary subscripting Created 4 years, 2 months 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
« no previous file with comments | « ui/events/event_constants.h ('k') | ui/events/event_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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
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 EventMomentumPhase* 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
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_
OLDNEW
« no previous file with comments | « ui/events/event_constants.h ('k') | ui/events/event_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698