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

Unified Diff: public/platform/WebPointerProperties.h

Issue 1253183005: Extend WebPointerProperties with tilt and pointer type fields. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/WebInputEvent.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebPointerProperties.h
diff --git a/public/platform/WebPointerProperties.h b/public/platform/WebPointerProperties.h
index d75bdc8eef918eb064728d55632dba838c8f9f6b..a8c168089cb8d570a08f12f68e556054caebedba 100644
--- a/public/platform/WebPointerProperties.h
+++ b/public/platform/WebPointerProperties.h
@@ -18,6 +18,9 @@ public:
: button(ButtonNone)
, id(0)
, force(0.f)
+ , tiltX(0)
+ , tiltY(0)
+ , pointerType(PointerTypeUnknown)
{
}
@@ -28,10 +31,25 @@ public:
ButtonRight
};
+ enum PointerType {
+ PointerTypeUnknown,
+ PointerTypeMouse,
+ PointerTypePen,
+ PointerTypeTouch
+ };
+
Button button;
int id;
float force;
+
+ // Tilt of a pen stylus from surface normal as plane angles in degrees,
+ // Values lie in [-90,90]. A positive tiltX is to the right and a positive
+ // tiltY is towards the user.
+ int tiltX;
+ int tiltY;
+
+ PointerType pointerType;
};
} // namespace blink
« no previous file with comments | « Source/web/WebInputEvent.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698