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

Side by Side Diff: mojo/services/public/interfaces/input_events/input_event_constants.mojom

Issue 478523002: mojo events: Add |screen_location| to LocationData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix crash observed locally because of synthesized aura events. Created 6 years, 4 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 | Annotate | Revision Log
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 import "mojo/services/public/interfaces/geometry/geometry.mojom"
6
7 module mojo { 5 module mojo {
8 6
9 struct KeyData {
10 int32 key_code;
11 bool is_char;
12 };
13
14 struct TouchData {
15 int32 pointer_id;
16 };
17
18 struct MouseWheelData {
19 int32 x_offset;
20 int32 y_offset;
21 };
22
23 // This mirrors ui::EventType 7 // This mirrors ui::EventType
24 enum EventType { 8 enum EventType {
25 UNKNOWN , 9 UNKNOWN ,
26 MOUSE_PRESSED, 10 MOUSE_PRESSED,
27 MOUSE_DRAGGED, 11 MOUSE_DRAGGED,
28 MOUSE_RELEASED, 12 MOUSE_RELEASED,
29 MOUSE_MOVED, 13 MOUSE_MOVED,
30 MOUSE_ENTERED, 14 MOUSE_ENTERED,
31 MOUSE_EXITED, 15 MOUSE_EXITED,
32 KEY_PRESSED, 16 KEY_PRESSED,
(...skipping 29 matching lines...) Expand all
62 SCROLL, 46 SCROLL,
63 SCROLL_FLING_START, 47 SCROLL_FLING_START,
64 SCROLL_FLING_CANCEL, 48 SCROLL_FLING_CANCEL,
65 CANCEL_MODE, 49 CANCEL_MODE,
66 UMA_DATA 50 UMA_DATA
67 }; 51 };
68 52
69 // This mirrors ui::EventFlags 53 // This mirrors ui::EventFlags
70 // TODO(morrita): Use shift operator once it is available. 54 // TODO(morrita): Use shift operator once it is available.
71 enum EventFlags { 55 enum EventFlags {
72 NONE = 0, 56 NONE = 0,
73 CAPS_LOCK_DOWN = 1, 57 CAPS_LOCK_DOWN = 1,
74 SHIFT_DOWN = 2, 58 SHIFT_DOWN = 2,
75 CONTROL_DOWN = 4, 59 CONTROL_DOWN = 4,
76 ALT_DOWN = 8, 60 ALT_DOWN = 8,
77 LEFT_MOUSE_BUTTON = 16, 61 LEFT_MOUSE_BUTTON = 16,
78 MIDDLE_MOUSE_BUTTON = 32, 62 MIDDLE_MOUSE_BUTTON = 32,
79 RIGHT_MOUSE_BUTTON = 64, 63 RIGHT_MOUSE_BUTTON = 64,
80 COMMAND_DOWN = 128, 64 COMMAND_DOWN = 128,
81 EXTENDED = 256, 65 EXTENDED = 256,
82 IS_SYNTHESIZED = 512, 66 IS_SYNTHESIZED = 512,
83 ALTGR_DOWN = 1024, 67 ALTGR_DOWN = 1024,
84 MOD3_DOWN = 2048 68 MOD3_DOWN = 2048
85 }; 69 };
86 70
87 struct Event { 71 enum MouseEventFlags {
88 EventType action; 72 IS_DOUBLE_CLICK = 65536,
89 EventFlags flags; 73 IS_TRIPLE_CLICK = 131072,
90 int64 time_stamp; 74 IS_NON_CLIENT = 262144,
91 Point location; 75
92 KeyData key_data; 76 // TODO(erg): Move accessibility flags and maybe synthetic touch events here.
93 TouchData touch_data;
94 MouseWheelData wheel_data;
95 }; 77 };
96 78
97 } 79 } // module mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698