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 20 matching lines...) Expand all Loading... |
31 NoButton = -1, | 31 NoButton = -1, |
32 Left, | 32 Left, |
33 Middle, | 33 Middle, |
34 Right | 34 Right |
35 }; | 35 }; |
36 | 36 |
37 enum class PointerType { | 37 enum class PointerType { |
38 Unknown, | 38 Unknown, |
39 Mouse, | 39 Mouse, |
40 Pen, | 40 Pen, |
| 41 Eraser, |
41 Touch, | 42 Touch, |
42 LastEntry = Touch // Must be the last entry in the list | 43 LastEntry = Touch // Must be the last entry in the list |
43 }; | 44 }; |
44 | 45 |
45 int id; | 46 int id; |
46 | 47 |
47 // The valid range is [0,1], with NaN meaning pressure is not supported by | 48 // The valid range is [0,1], with NaN meaning pressure is not supported by |
48 // the input device. | 49 // the input device. |
49 float force; | 50 float force; |
50 | 51 |
51 // Tilt of a pen stylus from surface normal as plane angles in degrees, | 52 // Tilt of a pen stylus from surface normal as plane angles in degrees, |
52 // Values lie in [-90,90]. A positive tiltX is to the right and a positive | 53 // Values lie in [-90,90]. A positive tiltX is to the right and a positive |
53 // tiltY is towards the user. | 54 // tiltY is towards the user. |
54 int tiltX; | 55 int tiltX; |
55 int tiltY; | 56 int tiltY; |
56 | 57 |
57 Button button; | 58 Button button; |
58 PointerType pointerType; | 59 PointerType pointerType; |
59 }; | 60 }; |
60 | 61 |
61 } // namespace blink | 62 } // namespace blink |
62 | 63 |
63 #endif | 64 #endif |
OLD | NEW |