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

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: Remove unused code (event_sender.cc) Created 5 years, 9 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 | « ui/events/event.cc ('k') | ui/events/events_stub.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/event_utils.h
diff --git a/ui/events/event_utils.h b/ui/events/event_utils.h
index 1649bd7eed5364c931f590f472896035eedf6391..0bd1aee4eca460dc4987e64aba1e0c6928aafd57 100644
--- a/ui/events/event_utils.h
+++ b/ui/events/event_utils.h
@@ -127,6 +127,15 @@ 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 NaN.
+EVENTS_EXPORT float GetTouchTilt(const base::NativeEvent& native_event);
+
+// Gets the clockwise angle from the X axis to the XY-projection of the stylus.
+// Range is [-180, 180), default is NaN.
+EVENTS_EXPORT float GetTouchTiltDirection(
+ 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);
« no previous file with comments | « ui/events/event.cc ('k') | ui/events/events_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698