| 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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 | 315 |
| 316 void ClearTouchIdIfReleased(const base::NativeEvent& xev) { | 316 void ClearTouchIdIfReleased(const base::NativeEvent& xev) { |
| 317 NOTIMPLEMENTED(); | 317 NOTIMPLEMENTED(); |
| 318 } | 318 } |
| 319 | 319 |
| 320 int GetTouchId(const base::NativeEvent& xev) { | 320 int GetTouchId(const base::NativeEvent& xev) { |
| 321 NOTIMPLEMENTED(); | 321 NOTIMPLEMENTED(); |
| 322 return 0; | 322 return 0; |
| 323 } | 323 } |
| 324 | 324 |
| 325 float GetTouchRadiusX(const base::NativeEvent& native_event) { | |
| 326 NOTIMPLEMENTED(); | |
| 327 return 1.0; | |
| 328 } | |
| 329 | |
| 330 float GetTouchRadiusY(const base::NativeEvent& native_event) { | |
| 331 NOTIMPLEMENTED(); | |
| 332 return 1.0; | |
| 333 } | |
| 334 | |
| 335 float GetTouchAngle(const base::NativeEvent& native_event) { | 325 float GetTouchAngle(const base::NativeEvent& native_event) { |
| 336 NOTIMPLEMENTED(); | 326 NOTIMPLEMENTED(); |
| 337 return 0.0; | 327 return 0.0; |
| 338 } | 328 } |
| 339 | 329 |
| 340 float GetTouchForce(const base::NativeEvent& native_event) { | 330 PointerDetails GetTouchPointerDetailsFromNative( |
| 331 const base::NativeEvent& native_event) { |
| 341 NOTIMPLEMENTED(); | 332 NOTIMPLEMENTED(); |
| 342 return 0.0; | 333 return PointerDetails(EventPointerType::POINTER_TYPE_TOUCH, |
| 334 /* radius_x */ 1.0, |
| 335 /* radius_y */ 1.0, |
| 336 /* force */ 0.f, |
| 337 /* tilt_x */ 0.f, |
| 338 /* tilt_y */ 0.f); |
| 343 } | 339 } |
| 344 | 340 |
| 345 bool GetScrollOffsets(const base::NativeEvent& native_event, | 341 bool GetScrollOffsets(const base::NativeEvent& native_event, |
| 346 float* x_offset, | 342 float* x_offset, |
| 347 float* y_offset, | 343 float* y_offset, |
| 348 float* x_offset_ordinal, | 344 float* x_offset_ordinal, |
| 349 float* y_offset_ordinal, | 345 float* y_offset_ordinal, |
| 350 int* finger_count) { | 346 int* finger_count) { |
| 351 // TODO(ananta) | 347 // TODO(ananta) |
| 352 // Support retrieving the scroll offsets from the scroll event. | 348 // Support retrieving the scroll offsets from the scroll event. |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 } | 408 } |
| 413 | 409 |
| 414 LPARAM GetLParamFromScanCode(uint16_t scan_code) { | 410 LPARAM GetLParamFromScanCode(uint16_t scan_code) { |
| 415 LPARAM l_param = static_cast<LPARAM>(scan_code & 0x00FF) << 16; | 411 LPARAM l_param = static_cast<LPARAM>(scan_code & 0x00FF) << 16; |
| 416 if ((scan_code & 0xE000) == 0xE000) | 412 if ((scan_code & 0xE000) == 0xE000) |
| 417 l_param |= (1 << 24); | 413 l_param |= (1 << 24); |
| 418 return l_param; | 414 return l_param; |
| 419 } | 415 } |
| 420 | 416 |
| 421 } // namespace ui | 417 } // namespace ui |
| OLD | NEW |