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

Side by Side Diff: ui/events/x/events_x.cc

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/win/events_win.cc ('k') | ui/views/cocoa/bridged_content_view.mm » ('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 #include "ui/events/event_utils.h" 5 #include "ui/events/event_utils.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <string.h> 8 #include <string.h>
9 #include <X11/extensions/XInput.h> 9 #include <X11/extensions/XInput.h>
10 #include <X11/extensions/XInput2.h> 10 #include <X11/extensions/XInput2.h>
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 GetTouchForceFromXEvent(*native_event), 161 GetTouchForceFromXEvent(*native_event),
162 /* tilt_x */ 0.f, 162 /* tilt_x */ 0.f,
163 /* tilt_y */ 0.f); 163 /* tilt_y */ 0.f);
164 } 164 }
165 165
166 bool GetScrollOffsets(const base::NativeEvent& native_event, 166 bool GetScrollOffsets(const base::NativeEvent& native_event,
167 float* x_offset, 167 float* x_offset,
168 float* y_offset, 168 float* y_offset,
169 float* x_offset_ordinal, 169 float* x_offset_ordinal,
170 float* y_offset_ordinal, 170 float* y_offset_ordinal,
171 int* finger_count) { 171 int* finger_count,
172 EventMomentumPhase* momentum_phase) {
172 return GetScrollOffsetsFromXEvent(*native_event, x_offset, y_offset, 173 return GetScrollOffsetsFromXEvent(*native_event, x_offset, y_offset,
173 x_offset_ordinal, y_offset_ordinal, 174 x_offset_ordinal, y_offset_ordinal,
174 finger_count); 175 finger_count);
175 } 176 }
176 177
177 bool GetFlingData(const base::NativeEvent& native_event, 178 bool GetFlingData(const base::NativeEvent& native_event,
178 float* vx, 179 float* vx,
179 float* vy, 180 float* vy,
180 float* vx_ordinal, 181 float* vx_ordinal,
181 float* vy_ordinal, 182 float* vy_ordinal,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 xievent->detail = 228 xievent->detail =
228 UpdateX11EventButton(event->changed_button_flags(), xievent->detail); 229 UpdateX11EventButton(event->changed_button_flags(), xievent->detail);
229 break; 230 break;
230 } 231 }
231 default: 232 default:
232 break; 233 break;
233 } 234 }
234 } 235 }
235 236
236 } // namespace ui 237 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/win/events_win.cc ('k') | ui/views/cocoa/bridged_content_view.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698