Chromium Code Reviews| Index: remoting/proto/event.proto |
| diff --git a/remoting/proto/event.proto b/remoting/proto/event.proto |
| index dd150942b771df1fab75e72512bac3d28ded5a6b..28fd80b8221746d178fdc2c72dfe578e45c94ed8 100644 |
| --- a/remoting/proto/event.proto |
| +++ b/remoting/proto/event.proto |
| @@ -1,4 +1,4 @@ |
| -// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| + // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| @@ -79,3 +79,56 @@ 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; |
|
Wez
2015/02/05 02:09:07
nit: Do these need to be floats? Chromoting works
Rintaro Kuroiwa
2015/02/06 23:35:01
As discussed offline.
Some touch event APIs mentio
|
| + |
| + // 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; |
| +} |