OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Protocol for event messages. | 5 // Protocol for event messages. |
6 | 6 |
7 syntax = "proto2"; | 7 syntax = "proto2"; |
8 | 8 |
9 option optimize_for = LITE_RUNTIME; | 9 option optimize_for = LITE_RUNTIME; |
10 | 10 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
72 | 72 |
73 // Defines an event that sends clipboard data between peers. | 73 // Defines an event that sends clipboard data between peers. |
74 message ClipboardEvent { | 74 message ClipboardEvent { |
75 | 75 |
76 // The MIME type of the data being sent. | 76 // The MIME type of the data being sent. |
77 optional string mime_type = 1; | 77 optional string mime_type = 1; |
78 | 78 |
79 // The data being sent. | 79 // The data being sent. |
80 optional bytes data = 2; | 80 optional bytes data = 2; |
81 } | 81 } |
82 | |
83 message TouchEvent { | |
84 | |
85 message Point { | |
Wez
2015/01/21 03:08:37
If you define this as TouchPoint or TouchEventPoin
Rintaro Kuroiwa
2015/01/28 01:12:29
Done.
| |
86 enum TouchPointEventType { | |
87 // The types map to event types in PP_InputEvent_Type. | |
88 TOUCH_POINT_START = 1; | |
89 TOUCH_POINT_MOVE = 2; | |
90 TOUCH_POINT_END = 3; | |
91 // Cancel event is different from END. For example on Android, | |
92 // CANCEL should be treated as up (END) but might not perform some | |
93 // actions. | |
Wez
2015/01/21 03:08:37
This is confusingly worded; I think what you mean
Rintaro Kuroiwa
2015/01/28 01:12:29
If I understood you correctly, you mean CANCEL can
| |
94 TOUCH_POINT_CANCEL = 4; | |
95 }; | |
96 | |
97 optional TouchPointEventType event_type = 1; | |
Wez
2015/01/21 03:08:37
Doesn't this belong in the TouchEvent, rather than
Rintaro Kuroiwa
2015/01/28 01:12:29
Yes.
Initially I thought I would need an event tha
| |
98 | |
99 // The ID for the point. | |
100 optional uint32 id = 2; | |
101 | |
102 // The position of the point. | |
103 // If the client is scaling the view (shrink or zoom), these will be scaled | |
104 // as well. | |
Wez
2015/01/21 03:08:37
This comment is not relevant to the protocol; at t
Rintaro Kuroiwa
2015/01/28 01:12:29
Done.
| |
105 // These values on-the-wire are host coordinates. | |
106 optional float x = 3; | |
107 optional float y = 4; | |
108 | |
109 // x and y values that define the ellipse of the touch region. | |
110 // This determines the size of the touch region. | |
Wez
2015/01/21 03:08:37
Suggest combining these to something like:
The si
Rintaro Kuroiwa
2015/01/28 01:12:29
Done.
| |
111 // Unlike x,y coordinates, these will not be scaled. | |
Wez
2015/01/21 03:08:37
Why not?
Rintaro Kuroiwa
2015/01/28 01:12:29
I actually don't have a good reason for or against
Rintaro Kuroiwa
2015/01/29 07:37:46
After giving it some more thought, scaling the siz
| |
112 optional float radius_x = 5; | |
113 optional float radius_y = 6; | |
114 } | |
115 | |
116 repeated Point touch_points = 1; | |
117 } | |
OLD | NEW |