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

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

Issue 2313653004: 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
35 }; 48 };
36 49
37 enum class PointerType { 50 enum class PointerType {
38 Unknown, 51 Unknown,
39 Mouse, 52 Mouse,
40 Pen, 53 Pen,
41 Touch, 54 Touch,
42 LastEntry = Touch // Must be the last entry in the list 55 LastEntry = Touch // Must be the last entry in the list
43 }; 56 };
44 57
45 int id; 58 int id;
46 59
47 // The valid range is [0,1], with NaN meaning pressure is not supported by 60 // The valid range is [0,1], with NaN meaning pressure is not supported by
48 // the input device. 61 // the input device.
49 float force; 62 float force;
50 63
51 // Tilt of a pen stylus from surface normal as plane angles in degrees, 64 // 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 65 // Values lie in [-90,90]. A positive tiltX is to the right and a positive
53 // tiltY is towards the user. 66 // tiltY is towards the user.
54 int tiltX; 67 int tiltX;
55 int tiltY; 68 int tiltY;
56 69
57 Button button; 70 Button button;
58 PointerType pointerType; 71 PointerType pointerType;
59 }; 72 };
60 73
61 } // namespace blink 74 } // namespace blink
62 75
63 #endif 76 #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