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