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

Unified Diff: ui/events/event.h

Issue 2647253002: Add tangentialPressure and twist properties to PointerEvent on Windows (Closed)
Patch Set: Created 3 years, 11 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
Index: ui/events/event.h
diff --git a/ui/events/event.h b/ui/events/event.h
index 20e02626b872b087633488bf4e2e0d8c17e35cd5..f9ecf99f56869425e8d7435b745f8b1398b36f48 100644
--- a/ui/events/event.h
+++ b/ui/events/event.h
@@ -437,6 +437,8 @@ struct EVENTS_EXPORT PointerDetails {
(force == other.force ||
(std::isnan(force) && std::isnan(other.force))) &&
tilt_x == other.tilt_x && tilt_y == other.tilt_y &&
+ tangentialPressure == other.tangentialPressure &&
+ twist == other.twist &&
offset == other.offset;
}
@@ -459,6 +461,16 @@ struct EVENTS_EXPORT PointerDetails {
float tilt_x = 0.0;
float tilt_y = 0.0;
+ // The normalized tangential pressure (or barrel pressure), typically set by
+ // an additional control of the stylus, which has a range of [-1,1], where 0
+ // is the neutral position of the control. Always 0 if the device does not
+ // support it.
+ float tangentialPressure = 0.0;
+
+ // The clockwise rotation of a pen stylus around its own major axis, in
+ // degrees in the range [0,359]. Always 0 if the device does not support it.
+ int twist = 0;
+
// Only used by mouse wheel events. The amount to scroll. This is in multiples
// of kWheelDelta.
// Note: offset_.x() > 0/offset_.y() > 0 means scroll left/up.
« ui/events/blink/web_input_event.cc ('K') | « ui/events/blink/web_input_event_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698