| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 WebPointerProperties_h | 5 #ifndef WebPointerProperties_h |
| 6 #define WebPointerProperties_h | 6 #define WebPointerProperties_h |
| 7 | 7 |
| 8 #include <cstdint> | 8 #include <cstdint> |
| 9 #include <limits> | 9 #include <limits> |
| 10 | 10 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 WebPointerProperties() | 41 WebPointerProperties() |
| 42 : id(0), | 42 : id(0), |
| 43 force(std::numeric_limits<float>::quiet_NaN()), | 43 force(std::numeric_limits<float>::quiet_NaN()), |
| 44 tiltX(0), | 44 tiltX(0), |
| 45 tiltY(0), | 45 tiltY(0), |
| 46 tangentialPressure(0.0f), | 46 tangentialPressure(0.0f), |
| 47 twist(0), | 47 twist(0), |
| 48 button(Button::NoButton), | 48 button(Button::NoButton), |
| 49 pointerType(PointerType::Unknown) {} | 49 pointerType(PointerType::Unknown), |
| 50 movementX(0), |
| 51 movementY(0) {} |
| 50 | 52 |
| 51 WebPointerProperties(Button buttonParam, PointerType pointerTypeParam) | 53 WebPointerProperties(Button buttonParam, PointerType pointerTypeParam) |
| 52 : id(0), | 54 : id(0), |
| 53 force(std::numeric_limits<float>::quiet_NaN()), | 55 force(std::numeric_limits<float>::quiet_NaN()), |
| 54 tiltX(0), | 56 tiltX(0), |
| 55 tiltY(0), | 57 tiltY(0), |
| 56 tangentialPressure(0.0f), | 58 tangentialPressure(0.0f), |
| 57 twist(0), | 59 twist(0), |
| 58 button(buttonParam), | 60 button(buttonParam), |
| 59 pointerType(pointerTypeParam) {} | 61 pointerType(pointerTypeParam), |
| 62 movementX(0), |
| 63 movementY(0) {} |
| 60 | 64 |
| 61 int id; | 65 int id; |
| 62 | 66 |
| 63 // The valid range is [0,1], with NaN meaning pressure is not supported by | 67 // The valid range is [0,1], with NaN meaning pressure is not supported by |
| 64 // the input device. | 68 // the input device. |
| 65 float force; | 69 float force; |
| 66 | 70 |
| 67 // Tilt of a pen stylus from surface normal as plane angles in degrees, | 71 // Tilt of a pen stylus from surface normal as plane angles in degrees, |
| 68 // Values lie in [-90,90]. A positive tiltX is to the right and a positive | 72 // Values lie in [-90,90]. A positive tiltX is to the right and a positive |
| 69 // tiltY is towards the user. | 73 // tiltY is towards the user. |
| (...skipping 19 matching lines...) Expand all Loading... |
| 89 | 93 |
| 90 PointerType pointerType; | 94 PointerType pointerType; |
| 91 | 95 |
| 92 int movementX; | 96 int movementX; |
| 93 int movementY; | 97 int movementY; |
| 94 }; | 98 }; |
| 95 | 99 |
| 96 } // namespace blink | 100 } // namespace blink |
| 97 | 101 |
| 98 #endif | 102 #endif |
| OLD | NEW |