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

Unified 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, 4 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 | « no previous file | remoting/client/chromoting_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/base/protocol/chromotocol.proto
diff --git a/remoting/base/protocol/chromotocol.proto b/remoting/base/protocol/chromotocol.proto
index f2752d9409e2966b2501e3f0ef31da3590b7c319..fb13330af1cf1f5656d0b695913f73e3a4ec8182 100644
--- a/remoting/base/protocol/chromotocol.proto
+++ b/remoting/base/protocol/chromotocol.proto
@@ -114,13 +114,17 @@ message KeyEvent {
required bool pressed = 2;
}
-// Sets the position of the mouse cursor.
-// The coordinate value is between [0 .. 1] which is relative to the
+// Sets the absolute position of the mouse cursor.
// dimension of the screen area.
// NEXT ID: 3
message MouseSetPositionEvent {
- required float x = 1;
- required float y = 2;
+ required int32 x = 1;
+ required int32 y = 2;
+
+ // Windows sets absolute mouse pointer positions as a relative value to
+ // the screen size. So pass the screen size to make this calculation easier.
+ optional int32 width = 3;
+ optional int32 height = 4;
}
// Adjust the position of the mouse cursor by an offset.
@@ -131,32 +135,31 @@ message MouseMoveEvent {
}
// Motion of the mouse wheel.
+// TODO(garykac): What are units here? How many units correspond to a single
+// wheel click? On Windows, one click (WHEEL_DELTA) is 120 wheel units.
// NEXT ID: 3
message MouseWheelEvent {
required int32 offset_x = 1;
required int32 offset_y = 2;
}
+enum MouseButton {
+ MouseButtonUndefined = 0;
+ MouseButtonLeft = 1;
+ MouseButtonMiddle = 2;
+ MouseButtonRight = 3;
+}
+
// Mouse button is pressed down.
// NEXT ID: 2
message MouseDownEvent {
- enum Button {
- LEFT = 0;
- MIDDLE = 1;
- RIGHT = 2;
- }
- required Button button = 1;
+ required MouseButton button = 1;
}
// Mouse button is released.
// NEXT ID: 2
message MouseUpEvent {
- enum Button {
- LEFT = 0;
- MIDDLE = 1;
- RIGHT = 2;
- }
- required Button button = 1;
+ required MouseButton button = 1;
}
// Defines the message that is sent from the client to the host.
« 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