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

Unified Diff: ui/events/event_constants.h

Issue 1559163002: Clean up event flags a bit: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comment 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/events/event.cc ('k') | ui/events/event_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/event_constants.h
diff --git a/ui/events/event_constants.h b/ui/events/event_constants.h
index 70fdb7283f6fcd4a1491dc6fb626b1466eb4b897..623f5a5c8853f2a8ce4515a7c46ad63a24c1f3e6 100644
--- a/ui/events/event_constants.h
+++ b/ui/events/event_constants.h
@@ -73,49 +73,58 @@ enum EventType {
ET_LAST
};
-// Event flags currently supported
+// Event flags currently supported. It is OK to add values to the middle of
+// this list and/or reorder it, but make sure you also touch the various other
+// enums/constants that want to stay in sync with this.
enum EventFlags {
EF_NONE = 0, // Used to denote no flags explicitly
- EF_CAPS_LOCK_DOWN = 1 << 0,
+
+ // Universally applicable status bits.
+ EF_IS_SYNTHESIZED = 1 << 0,
+
+ // Modifier key state.
EF_SHIFT_DOWN = 1 << 1,
EF_CONTROL_DOWN = 1 << 2,
EF_ALT_DOWN = 1 << 3,
- EF_LEFT_MOUSE_BUTTON = 1 << 4,
- EF_MIDDLE_MOUSE_BUTTON = 1 << 5,
- EF_RIGHT_MOUSE_BUTTON = 1 << 6,
- EF_COMMAND_DOWN = 1 << 7, // GUI Key (e.g. Command on OS X
+ EF_COMMAND_DOWN = 1 << 4, // GUI Key (e.g. Command on OS X
// keyboards, Search on Chromebook
// keyboards, Windows on MS-oriented
// keyboards)
- EF_EXTENDED = 1 << 8, // Windows extended key (see WM_KEYDOWN
- // doc)
- EF_IS_SYNTHESIZED = 1 << 9,
- EF_ALTGR_DOWN = 1 << 10,
- EF_MOD3_DOWN = 1 << 11,
- EF_BACK_MOUSE_BUTTON = 1 << 12,
- EF_FORWARD_MOUSE_BUTTON = 1 << 13,
- EF_NUM_LOCK_DOWN = 1 << 14,
- EF_SCROLL_LOCK_DOWN = 1 << 15,
+ EF_ALTGR_DOWN = 1 << 5,
+ EF_MOD3_DOWN = 1 << 6,
+
+ // Other keyboard state.
+ EF_NUM_LOCK_ON = 1 << 7,
+ EF_CAPS_LOCK_ON = 1 << 8,
+ EF_SCROLL_LOCK_ON = 1 << 9,
+
+ // Mouse buttons.
+ EF_LEFT_MOUSE_BUTTON = 1 << 10,
+ EF_MIDDLE_MOUSE_BUTTON = 1 << 11,
+ EF_RIGHT_MOUSE_BUTTON = 1 << 12,
+ EF_BACK_MOUSE_BUTTON = 1 << 13,
+ EF_FORWARD_MOUSE_BUTTON = 1 << 14,
};
// Flags specific to key events
enum KeyEventFlags {
- EF_IME_FABRICATED_KEY = 1 << 16, // Key event fabricated by the underlying
+ EF_IME_FABRICATED_KEY = 1 << 15, // Key event fabricated by the underlying
// IME without a user action.
// (Linux X11 only)
- EF_IS_REPEAT = 1 << 17,
- EF_FINAL = 1 << 18, // Do not remap; the event was created with
+ EF_IS_REPEAT = 1 << 16,
+ EF_FINAL = 1 << 17, // Do not remap; the event was created with
// the desired final values.
+ EF_IS_EXTENDED_KEY = 1 << 18, // Windows extended key (see WM_KEYDOWN doc)
};
// Flags specific to mouse events
enum MouseEventFlags {
- EF_IS_DOUBLE_CLICK = 1 << 16,
- EF_IS_TRIPLE_CLICK = 1 << 17,
- EF_IS_NON_CLIENT = 1 << 18,
- EF_FROM_TOUCH = 1 << 19, // Indicates this mouse event is generated
+ EF_IS_DOUBLE_CLICK = 1 << 15,
+ EF_IS_TRIPLE_CLICK = 1 << 16,
+ EF_IS_NON_CLIENT = 1 << 17,
+ EF_FROM_TOUCH = 1 << 18, // Indicates this mouse event is generated
// from an unconsumed touch/gesture event.
- EF_TOUCH_ACCESSIBILITY = 1 << 20, // Indicates this event was generated from
+ EF_TOUCH_ACCESSIBILITY = 1 << 19, // Indicates this event was generated from
// touch accessibility mode.
};
« no previous file with comments | « ui/events/event.cc ('k') | ui/events/event_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698