| 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 #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 Loading... |
| 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 int* 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 Loading... |
| 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 |
| OLD | NEW |