OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 module mus.mojom; | 5 module mus.mojom; |
6 | 6 |
7 enum EventType { | 7 enum EventType { |
8 UNKNOWN, | 8 UNKNOWN, |
9 KEY_PRESSED, | 9 KEY_PRESSED, |
10 KEY_RELEASED, | 10 KEY_RELEASED, |
11 POINTER_CANCEL, | 11 POINTER_CANCEL, |
12 POINTER_DOWN, | 12 POINTER_DOWN, |
13 POINTER_MOVE, | 13 POINTER_MOVE, |
14 POINTER_UP, | 14 POINTER_UP, |
15 MOUSE_EXIT, | 15 MOUSE_EXIT, |
16 WHEEL, | 16 WHEEL, |
17 }; | 17 }; |
18 | 18 |
19 // This mirrors ui::EventFlags | 19 // This mirrors ui::EventFlags |
20 // TODO(morrita): Use shift operator once it is available. | 20 // TODO(morrita): Use shift operator once it is available. |
21 enum EventFlags { | 21 const int32 kEventFlagNone = 0x00000; |
22 NONE = 0, | 22 const int32 kEventFlagIsSynthesized = 0x00001; |
23 IS_SYNTHESIZED = 1, | 23 const int32 kEventFlagShiftDown = 0x00002; |
24 SHIFT_DOWN = 2, | 24 const int32 kEventFlagControlDown = 0x00004; |
25 CONTROL_DOWN = 4, | 25 const int32 kEventFlagAltDown = 0x00008; |
26 ALT_DOWN = 8, | 26 const int32 kEventFlagCommandDown = 0x00010; |
27 COMMAND_DOWN = 16, | 27 const int32 kEventFlagAltgrDown = 0x00020; |
28 ALTGR_DOWN = 32, | 28 const int32 kEventFlagMod3Down = 0x00040; |
29 MOD3_DOWN = 64, | 29 const int32 kEventFlagNumLockOn = 0x00080; |
30 NUM_LOCK_ON = 128, | 30 const int32 kEventFlagCapsLockOn = 0x00100; |
31 CAPS_LOCK_ON = 256, | 31 const int32 kEventFlagScrollLockOn = 0x00200; |
32 SCROLL_LOCK_ON = 512, | 32 const int32 kEventFlagLeftMouseButton = 0x00400; |
33 LEFT_MOUSE_BUTTON = 1024, | 33 const int32 kEventFlagMiddleMouseButton = 0x00800; |
34 MIDDLE_MOUSE_BUTTON = 2048, | 34 const int32 kEventFlagRightMouseButton = 0x01000; |
35 RIGHT_MOUSE_BUTTON = 4096, | 35 const int32 kEventFlagBackMouseButton = 0x02000; |
36 BACK_MOUSE_BUTTON = 8192, | 36 const int32 kEventFlagForwardMouseButton = 0x04000; |
37 FORWARD_MOUSE_BUTTON = 16384, | |
38 }; | |
39 | 37 |
40 enum MouseEventFlags { | 38 const int32 kMouseEventFlagIsDoubleClick = 0x08000; |
41 IS_DOUBLE_CLICK = 32768, | 39 const int32 kMouseEventFlagIsTripleClick = 0x10000; |
42 IS_TRIPLE_CLICK = 65536, | 40 const int32 kMouseEventFlagIsNonClient = 0x20000; |
43 IS_NON_CLIENT = 131072, | |
44 | 41 |
45 // TODO(erg): Move accessibility flags and maybe synthetic touch events here. | 42 // TODO(erg): Move accessibility flags and maybe synthetic touch events here. |
46 }; | |
47 | 43 |
48 enum PointerKind { | 44 enum PointerKind { |
49 MOUSE, | 45 MOUSE, |
50 PEN, | 46 PEN, |
51 TOUCH, | 47 TOUCH, |
52 }; | 48 }; |
53 | 49 |
54 enum WheelMode { | 50 enum WheelMode { |
55 PIXEL, | 51 PIXEL, |
56 LINE, | 52 LINE, |
57 PAGE, | 53 PAGE, |
58 SCALING, | 54 SCALING, |
59 }; | 55 }; |
OLD | NEW |