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

Side by Side Diff: third_party/WebKit/public/platform/WebPointerProperties.h

Issue 2314093002: Revert of Make a pen in eraser mode visible thru PointerEvent.buttons (Closed)
Patch Set: Created 4 years, 3 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 | « third_party/WebKit/Source/core/events/PointerEventFactory.cpp ('k') | no next file » | 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) 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 13 matching lines...) Expand all
24 , tiltY(0) 24 , tiltY(0)
25 , button(Button::NoButton) 25 , button(Button::NoButton)
26 , pointerType(PointerType::Unknown) 26 , pointerType(PointerType::Unknown)
27 { 27 {
28 } 28 }
29 29
30 enum class Button { 30 enum class Button {
31 NoButton = -1, 31 NoButton = -1,
32 Left, 32 Left,
33 Middle, 33 Middle,
34 Right, 34 Right
35 X1,
36 X2,
37 Eraser
38 };
39
40 enum class Buttons : unsigned {
41 NoButton = 0,
42 Left = 1 << 0,
43 Right = 1 << 1,
44 Middle = 1 << 2,
45 X1 = 1 << 3,
46 X2 = 1 << 4,
47 Eraser = 1 << 5
48 }; 35 };
49 36
50 enum class PointerType { 37 enum class PointerType {
51 Unknown, 38 Unknown,
52 Mouse, 39 Mouse,
53 Pen, 40 Pen,
54 Touch, 41 Touch,
55 LastEntry = Touch // Must be the last entry in the list 42 LastEntry = Touch // Must be the last entry in the list
56 }; 43 };
57 44
58 int id; 45 int id;
59 46
60 // The valid range is [0,1], with NaN meaning pressure is not supported by 47 // The valid range is [0,1], with NaN meaning pressure is not supported by
61 // the input device. 48 // the input device.
62 float force; 49 float force;
63 50
64 // Tilt of a pen stylus from surface normal as plane angles in degrees, 51 // Tilt of a pen stylus from surface normal as plane angles in degrees,
65 // Values lie in [-90,90]. A positive tiltX is to the right and a positive 52 // Values lie in [-90,90]. A positive tiltX is to the right and a positive
66 // tiltY is towards the user. 53 // tiltY is towards the user.
67 int tiltX; 54 int tiltX;
68 int tiltY; 55 int tiltY;
69 56
70 Button button; 57 Button button;
71 PointerType pointerType; 58 PointerType pointerType;
72 }; 59 };
73 60
74 } // namespace blink 61 } // namespace blink
75 62
76 #endif 63 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/PointerEventFactory.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698