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

Side by Side Diff: components/mus/public/interfaces/input_event_constants.mojom

Issue 1527183003: Change mojo enums to be scoped enums in the generated C++ bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-binding-equals
Patch Set: Created 4 years, 11 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 unified diff | Download patch
OLDNEW
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 WHEEL, 15 WHEEL,
16 }; 16 };
17 17
18 // This mirrors ui::EventFlags 18 // This mirrors ui::EventFlags
19 // TODO(morrita): Use shift operator once it is available. 19 // TODO(morrita): Use shift operator once it is available.
20 enum EventFlags { 20 const int32 kEventFlagNone = 0;
21 NONE = 0, 21 const int32 kEventFlagCapsLockDown = 1;
22 CAPS_LOCK_DOWN = 1, 22 const int32 kEventFlagShiftDown = 2;
23 SHIFT_DOWN = 2, 23 const int32 kEventFlagControlDown = 4;
24 CONTROL_DOWN = 4, 24 const int32 kEventFlagAltDown = 8;
25 ALT_DOWN = 8, 25 const int32 kEventFlagLeftMouseButton = 16;
yzshen1 2016/01/07 19:24:52 Ah, this is because we don't support shift operato
Sam McNally 2016/01/08 05:12:51 Done.
26 LEFT_MOUSE_BUTTON = 16, 26 const int32 kEventFlagMiddleMouseButton = 32;
27 MIDDLE_MOUSE_BUTTON = 32, 27 const int32 kEventFlagRightMouseButton = 64;
28 RIGHT_MOUSE_BUTTON = 64, 28 const int32 kEventFlagCommandDown = 128;
29 COMMAND_DOWN = 128, 29 const int32 kEventFlagExtended = 256;
30 EXTENDED = 256, 30 const int32 kEventFlagIsSynthesized = 512;
31 IS_SYNTHESIZED = 512, 31 const int32 kEventFlagAltgrDown = 1024;
32 ALTGR_DOWN = 1024, 32 const int32 kEventFlagMod3Down = 2048;
33 MOD3_DOWN = 2048, 33 const int32 kEventFlagBackMouseButton = 4096;
34 BACK_MOUSE_BUTTON = 4096, 34 const int32 kEventFlagForwardMouseButton = 8192;
35 FORWARD_MOUSE_BUTTON = 8192, 35 const int32 kEventFlagNumLockDown = 16384;
36 NUM_LOCK_DOWN = 16384, 36 const int32 kEventFlagScrollLockDown = 32768;
37 SCROLL_LOCK_DOWN = 32768,
38 };
39 37
40 enum MouseEventFlags { 38 const int32 kMouseEventFlagIsDoubleClick = 65536;
41 IS_DOUBLE_CLICK = 65536, 39 const int32 kMouseEventFlagIsTripleClick = 131072;
42 IS_TRIPLE_CLICK = 131072, 40 const int32 kMouseEventFlagIsNonClient = 262144;
43 IS_NON_CLIENT = 262144,
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 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698