Index: remoting/proto/event.proto |
diff --git a/remoting/proto/event.proto b/remoting/proto/event.proto |
index dd150942b771df1fab75e72512bac3d28ded5a6b..37df684ce5bee58dc599340b0c1cdcc6f3d2a97c 100644 |
--- a/remoting/proto/event.proto |
+++ b/remoting/proto/event.proto |
@@ -79,3 +79,54 @@ message ClipboardEvent { |
// The data being sent. |
optional bytes data = 2; |
} |
+ |
+message TouchEventPoint { |
+ // The ID for the touch point. |
+ optional uint32 id = 1; |
+ |
+ // The position of the touch point. |
+ // These values on-the-wire are host coordinates. |
+ optional float x = 2; |
+ optional float y = 3; |
+ |
+ // The size of the touch point, used to aid hit-testing. |
+ // Scaled to match the size on host. |
+ optional float radius_x = 4; |
+ optional float radius_y = 5; |
+ |
+ // Angle in degrees from the y-axis of the touch point. |
+ optional float angle = 6; |
+ |
+ // The pressure of the touch point. |
+ // The value should be in [0.0, 1.0]. |
+ optional float pressure = 7; |
+} |
+ |
+message TouchEvent { |
+ // A START event means that this event reports all the touch points that were |
+ // just added, e.g. a finger started touching the display. |
+ // A MOVE event means that the touch points that have been STARTed moved, |
+ // e.g. multiple fingers on the screen moved. |
+ // An END event means that the touch points that have been STARTed ended. |
+ // e.g. a finger went off the screen. |
+ // A CANCEL event means that the touch points that have been STARTed were |
+ // canceled, e.g. a finger went off the screen. |
+ // Cancel event is simlar to END but slighly different. For example, Android |
+ // MotionEvent's ACTION_CANCEL documentation mentions that a cancel should be |
+ // treated as an ACTION_UP (END) event but might not perform the exact same |
+ // actions as a normal ACTION_UP event. |
+ enum TouchEventType { |
+ TOUCH_POINT_START = 1; |
+ TOUCH_POINT_MOVE = 2; |
+ TOUCH_POINT_END = 3; |
+ TOUCH_POINT_CANCEL = 4; |
+ }; |
+ |
+ optional TouchEventType event_type = 1; |
+ |
+ // Only the changed touch points are added to this field. |
+ // Given the existing touch point APIs (e.g. Android and PPAPI) |
+ // for START, END, and CANCEL events the size of this field will typically be |
+ // 1, but for MOVE events it is likely to have multiple points. |
+ repeated TouchEventPoint touch_points = 2; |
+} |