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

Unified Diff: ui/events/event_utils.h

Issue 755403006: Added experimental Touch.tilt, Touch.tiltDirection support for Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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_utils.h
diff --git a/ui/events/event_utils.h b/ui/events/event_utils.h
index f1f5f34d2754a3567268a7a8580abdfd2246431a..667621276db6c75102221460a6e2e9bb5e13486d 100644
--- a/ui/events/event_utils.h
+++ b/ui/events/event_utils.h
@@ -133,6 +133,10 @@ EVENTS_EXPORT float GetTouchRadiusY(const base::NativeEvent& native_event);
// Gets the angle of the major axis away from the X axis. Default is 0.0.
EVENTS_EXPORT float GetTouchAngle(const base::NativeEvent& native_event);
+// Gets the tilt angle of the stylus away from the perpendicular to the screen
+// Default is 0.0.
+EVENTS_EXPORT float GetTouchTilt(const base::NativeEvent& native_event);
+
// Gets the force from a native_event. Normalized to be [0, 1]. Default is 0.0.
EVENTS_EXPORT float GetTouchForce(const base::NativeEvent& native_event);

Powered by Google App Engine
This is Rietveld 408576698