| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 module mus.mojom; | |
| 6 | |
| 7 // Denotes during which phase of event targeting that an accelerator will be | |
| 8 // notified of an event. PRE_TARGET will be notified instead of the target | |
| 9 // window. POST_TARGET will be notified after the target window, and only if the | |
| 10 // event was not consumed by the target. | |
| 11 enum AcceleratorPhase { | |
| 12 PRE_TARGET, | |
| 13 POST_TARGET, | |
| 14 }; | |
| 15 | |
| 16 enum EventType { | |
| 17 UNKNOWN, | |
| 18 KEY_PRESSED, | |
| 19 KEY_RELEASED, | |
| 20 POINTER_CANCEL, | |
| 21 POINTER_DOWN, | |
| 22 POINTER_MOVE, | |
| 23 POINTER_UP, | |
| 24 MOUSE_EXIT, | |
| 25 WHEEL, | |
| 26 }; | |
| 27 | |
| 28 // This mirrors ui::EventFlags | |
| 29 // TODO(morrita): Use shift operator once it is available. | |
| 30 const int32 kEventFlagNone = 0x00000; | |
| 31 const int32 kEventFlagIsSynthesized = 0x00001; | |
| 32 const int32 kEventFlagShiftDown = 0x00002; | |
| 33 const int32 kEventFlagControlDown = 0x00004; | |
| 34 const int32 kEventFlagAltDown = 0x00008; | |
| 35 const int32 kEventFlagCommandDown = 0x00010; | |
| 36 const int32 kEventFlagAltgrDown = 0x00020; | |
| 37 const int32 kEventFlagMod3Down = 0x00040; | |
| 38 const int32 kEventFlagNumLockOn = 0x00080; | |
| 39 const int32 kEventFlagCapsLockOn = 0x00100; | |
| 40 const int32 kEventFlagScrollLockOn = 0x00200; | |
| 41 const int32 kEventFlagLeftMouseButton = 0x00400; | |
| 42 const int32 kEventFlagMiddleMouseButton = 0x00800; | |
| 43 const int32 kEventFlagRightMouseButton = 0x01000; | |
| 44 const int32 kEventFlagBackMouseButton = 0x02000; | |
| 45 const int32 kEventFlagForwardMouseButton = 0x04000; | |
| 46 | |
| 47 const int32 kMouseEventFlagIsDoubleClick = 0x08000; | |
| 48 const int32 kMouseEventFlagIsTripleClick = 0x10000; | |
| 49 const int32 kMouseEventFlagIsNonClient = 0x20000; | |
| 50 | |
| 51 // TODO(erg): Move accessibility flags and maybe synthetic touch events here. | |
| 52 | |
| 53 enum PointerKind { | |
| 54 MOUSE, | |
| 55 PEN, | |
| 56 TOUCH, | |
| 57 }; | |
| 58 | |
| 59 enum WheelMode { | |
| 60 PIXEL, | |
| 61 LINE, | |
| 62 PAGE, | |
| 63 SCALING, | |
| 64 }; | |
| OLD | NEW |