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

Side by Side Diff: ui/events/win/events_win.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/test/cocoa_test_event_utils.mm ('k') | ui/events/x/events_x.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 #include <stdint.h> 5 #include <stdint.h>
6 #include <windowsx.h> 6 #include <windowsx.h>
7 7
8 #include "ui/events/event_constants.h" 8 #include "ui/events/event_constants.h"
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 /* force */ 0.f, 342 /* force */ 0.f,
343 /* tilt_x */ 0.f, 343 /* tilt_x */ 0.f,
344 /* tilt_y */ 0.f); 344 /* tilt_y */ 0.f);
345 } 345 }
346 346
347 bool GetScrollOffsets(const base::NativeEvent& native_event, 347 bool GetScrollOffsets(const base::NativeEvent& native_event,
348 float* x_offset, 348 float* x_offset,
349 float* y_offset, 349 float* y_offset,
350 float* x_offset_ordinal, 350 float* x_offset_ordinal,
351 float* y_offset_ordinal, 351 float* y_offset_ordinal,
352 int* finger_count) { 352 int* finger_count,
353 EventMomentumPhase* momentum_phase) {
353 // TODO(ananta) 354 // TODO(ananta)
354 // Support retrieving the scroll offsets from the scroll event. 355 // Support retrieving the scroll offsets from the scroll event.
355 if (native_event.message == WM_VSCROLL || native_event.message == WM_HSCROLL) 356 if (native_event.message == WM_VSCROLL || native_event.message == WM_HSCROLL)
356 return true; 357 return true;
357 return false; 358 return false;
358 } 359 }
359 360
360 bool GetFlingData(const base::NativeEvent& native_event, 361 bool GetFlingData(const base::NativeEvent& native_event,
361 float* vx, 362 float* vx,
362 float* vy, 363 float* vy,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 } 415 }
415 416
416 LPARAM GetLParamFromScanCode(uint16_t scan_code) { 417 LPARAM GetLParamFromScanCode(uint16_t scan_code) {
417 LPARAM l_param = static_cast<LPARAM>(scan_code & 0x00FF) << 16; 418 LPARAM l_param = static_cast<LPARAM>(scan_code & 0x00FF) << 16;
418 if ((scan_code & 0xE000) == 0xE000) 419 if ((scan_code & 0xE000) == 0xE000)
419 l_param |= (1 << 24); 420 l_param |= (1 << 24);
420 return l_param; 421 return l_param;
421 } 422 }
422 423
423 } // namespace ui 424 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/test/cocoa_test_event_utils.mm ('k') | ui/events/x/events_x.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698