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

Unified Diff: sky/engine/public/platform/WebInputEvent.h

Issue 845313011: Add blink::WebPointerEvent (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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
« no previous file with comments | « sky/engine/core/events/PointerEvent.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/public/platform/WebInputEvent.h
diff --git a/sky/engine/public/platform/WebInputEvent.h b/sky/engine/public/platform/WebInputEvent.h
index 58d15cd2679fd46732c930e09b3cce10567cc760..ea026b03df65e535d3431c0c27c7d04ee5ccaaf4 100644
--- a/sky/engine/public/platform/WebInputEvent.h
+++ b/sky/engine/public/platform/WebInputEvent.h
@@ -86,6 +86,12 @@ public:
Undefined = -1,
TypeFirst = Undefined,
+ // WebPointerEvent
+ PointerDown,
+ PointerUp,
+ PointerMove,
+ PointerCancel,
+
// WebMouseEvent
MouseDown,
MouseTypeFirst = MouseDown,
@@ -216,6 +222,39 @@ protected:
}
};
+// WebPointerEvent ------------------------------------------------------------
+
+class WebPointerEvent : public WebInputEvent {
+public:
+ enum Kind {
+ Touch,
+ Mouse,
+ Stylus,
+ };
+
+ int pointer = 0;
+ Kind kind = Touch;
+ double x = 0;
+ double y = 0;
+ double dx = 0;
+ double dy = 0;
+ int buttons = 0;
+ double pressure = 0;
+ double pressureMin = 0;
+ double pressureMax = 0;
+ double distance = 0;
+ double distanceMin = 0;
+ double distanceMax = 0;
+ double radiusMajor = 0;
+ double radiusMinor = 0;
+ double radiusMin = 0;
+ double radiusMax = 0;
+ double orientation = 0;
+ double tilt = 0;
+
+ WebPointerEvent() : WebInputEvent(sizeof(WebPointerEvent)) {}
+};
+
// WebKeyboardEvent -----------------------------------------------------------
class WebKeyboardEvent : public WebInputEvent {
« no previous file with comments | « sky/engine/core/events/PointerEvent.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698