| // Copyright (c) 2011 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. |
| |
| // Protocol for event messages. |
| |
| syntax = "proto2"; |
| |
| option optimize_for = LITE_RUNTIME; |
| |
| package remoting.protocol; |
| |
| // Defines a keyboard event. |
| message KeyEvent { |
| // The POSIX key code. |
| required int32 keycode = 1; |
| required bool pressed = 2; |
| } |
| |
| // Defines a mouse event message on the event channel. |
| message MouseEvent { |
| |
| enum MouseButton { |
| BUTTON_UNDEFINED = 0; |
| BUTTON_LEFT = 1; |
| BUTTON_MIDDLE = 2; |
| BUTTON_RIGHT = 3; |
| BUTTON_MAX = 4; |
| } |
| |
| // Mouse position information. |
| optional int32 x = 1; |
| optional int32 y = 2; |
| |
| // Mouse wheel information. |
| // These values encode the number of wheel 'ticks' (sometimes called |
| // 'clicks' although 'ticks' is the most common cross-platform term). |
| // Additional fields may be added later to support high-resolution devices. |
| optional int32 wheel_offset_x = 3; |
| optional int32 wheel_offset_y = 4; |
| |
| // Mouse button event. |
| optional MouseButton button = 5; |
| optional bool button_down = 6; |
| } |