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 mojo; | 5 module mojo; |
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 WHEEL, | |
16 }; | 15 }; |
17 | 16 |
18 // This mirrors ui::EventFlags | 17 // This mirrors ui::EventFlags |
19 // TODO(morrita): Use shift operator once it is available. | 18 // TODO(morrita): Use shift operator once it is available. |
20 enum EventFlags { | 19 enum EventFlags { |
21 NONE = 0, | 20 NONE = 0, |
22 CAPS_LOCK_DOWN = 1, | 21 CAPS_LOCK_DOWN = 1, |
23 SHIFT_DOWN = 2, | 22 SHIFT_DOWN = 2, |
24 CONTROL_DOWN = 4, | 23 CONTROL_DOWN = 4, |
25 ALT_DOWN = 8, | 24 ALT_DOWN = 8, |
26 LEFT_MOUSE_BUTTON = 16, | 25 LEFT_MOUSE_BUTTON = 16, |
27 MIDDLE_MOUSE_BUTTON = 32, | 26 MIDDLE_MOUSE_BUTTON = 32, |
28 RIGHT_MOUSE_BUTTON = 64, | 27 RIGHT_MOUSE_BUTTON = 64, |
29 COMMAND_DOWN = 128, | 28 COMMAND_DOWN = 128, |
30 EXTENDED = 256, | 29 EXTENDED = 256, |
31 IS_SYNTHESIZED = 512, | 30 IS_SYNTHESIZED = 512, |
32 ALTGR_DOWN = 1024, | 31 ALTGR_DOWN = 1024, |
33 MOD3_DOWN = 2048 | 32 MOD3_DOWN = 2048 |
34 }; | 33 }; |
35 | 34 |
36 enum MouseEventFlags { | 35 enum MouseEventFlags { |
37 IS_DOUBLE_CLICK = 65536, | 36 IS_DOUBLE_CLICK = 65536, |
38 IS_TRIPLE_CLICK = 131072, | 37 IS_TRIPLE_CLICK = 131072, |
39 IS_NON_CLIENT = 262144, | 38 IS_NON_CLIENT = 262144, |
40 | 39 |
41 // TODO(erg): Move accessibility flags and maybe synthetic touch events here. | 40 // TODO(erg): Move accessibility flags and maybe synthetic touch events here. |
42 }; | 41 }; |
43 | 42 |
44 enum PointerKind { | 43 enum PointerKind { |
| 44 TOUCH, |
45 MOUSE, | 45 MOUSE, |
46 PEN, | |
47 TOUCH, | |
48 }; | 46 }; |
49 | |
50 enum WheelMode { | |
51 PIXEL, | |
52 LINE, | |
53 PAGE, | |
54 SCALING, | |
55 }; | |
OLD | NEW |