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

Side by Side Diff: remoting/base/protocol/chromotocol.proto

Issue 3175028: Add mouse event support to Chromoting client (Pepper and X11). (Closed)
Patch Set: Remove win float/int conversion Created 10 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | remoting/client/chromoting_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 communication between chromoting client and host. 5 // Protocol for communication between chromoting client and host.
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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } 107 }
108 108
109 // Defines a keyboard event. 109 // Defines a keyboard event.
110 // NEXT ID: 3 110 // NEXT ID: 3
111 message KeyEvent { 111 message KeyEvent {
112 // The POSIX key code. 112 // The POSIX key code.
113 required int32 key = 1; 113 required int32 key = 1;
114 required bool pressed = 2; 114 required bool pressed = 2;
115 } 115 }
116 116
117 // Sets the position of the mouse cursor. 117 // Sets the absolute position of the mouse cursor.
118 // The coordinate value is between [0 .. 1] which is relative to the
119 // dimension of the screen area. 118 // dimension of the screen area.
120 // NEXT ID: 3 119 // NEXT ID: 3
121 message MouseSetPositionEvent { 120 message MouseSetPositionEvent {
122 required float x = 1; 121 required int32 x = 1;
123 required float y = 2; 122 required int32 y = 2;
123
124 // Windows sets absolute mouse pointer positions as a relative value to
125 // the screen size. So pass the screen size to make this calculation easier.
126 optional int32 width = 3;
127 optional int32 height = 4;
124 } 128 }
125 129
126 // Adjust the position of the mouse cursor by an offset. 130 // Adjust the position of the mouse cursor by an offset.
127 // NEXT ID: 3 131 // NEXT ID: 3
128 message MouseMoveEvent { 132 message MouseMoveEvent {
129 required int32 offset_x = 1; 133 required int32 offset_x = 1;
130 required int32 offset_y = 2; 134 required int32 offset_y = 2;
131 } 135 }
132 136
133 // Motion of the mouse wheel. 137 // Motion of the mouse wheel.
138 // TODO(garykac): What are units here? How many units correspond to a single
139 // wheel click? On Windows, one click (WHEEL_DELTA) is 120 wheel units.
134 // NEXT ID: 3 140 // NEXT ID: 3
135 message MouseWheelEvent { 141 message MouseWheelEvent {
136 required int32 offset_x = 1; 142 required int32 offset_x = 1;
137 required int32 offset_y = 2; 143 required int32 offset_y = 2;
138 } 144 }
139 145
146 enum MouseButton {
147 MouseButtonUndefined = 0;
148 MouseButtonLeft = 1;
149 MouseButtonMiddle = 2;
150 MouseButtonRight = 3;
151 }
152
140 // Mouse button is pressed down. 153 // Mouse button is pressed down.
141 // NEXT ID: 2 154 // NEXT ID: 2
142 message MouseDownEvent { 155 message MouseDownEvent {
143 enum Button { 156 required MouseButton button = 1;
144 LEFT = 0;
145 MIDDLE = 1;
146 RIGHT = 2;
147 }
148 required Button button = 1;
149 } 157 }
150 158
151 // Mouse button is released. 159 // Mouse button is released.
152 // NEXT ID: 2 160 // NEXT ID: 2
153 message MouseUpEvent { 161 message MouseUpEvent {
154 enum Button { 162 required MouseButton button = 1;
155 LEFT = 0;
156 MIDDLE = 1;
157 RIGHT = 2;
158 }
159 required Button button = 1;
160 } 163 }
161 164
162 // Defines the message that is sent from the client to the host. 165 // Defines the message that is sent from the client to the host.
163 // Only one of the optional messages should be present. 166 // Only one of the optional messages should be present.
164 // NEXT ID: 7 167 // NEXT ID: 7
165 message ChromotingClientMessage { 168 message ChromotingClientMessage {
166 optional KeyEvent key_event = 1; 169 optional KeyEvent key_event = 1;
167 optional MouseSetPositionEvent mouse_set_position_event = 2; 170 optional MouseSetPositionEvent mouse_set_position_event = 2;
168 optional MouseMoveEvent mouse_move_event = 3; 171 optional MouseMoveEvent mouse_move_event = 3;
169 optional MouseWheelEvent mouse_wheel_event = 4; 172 optional MouseWheelEvent mouse_wheel_event = 4;
170 optional MouseDownEvent mouse_down_event = 5; 173 optional MouseDownEvent mouse_down_event = 5;
171 optional MouseUpEvent mouse_up_event = 6; 174 optional MouseUpEvent mouse_up_event = 6;
172 } 175 }
OLDNEW
« no previous file with comments | « no previous file | remoting/client/chromoting_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698