OLD | NEW |
| (Empty) |
1 // Copyright (c) 2016 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 | |
6 #include "components/mus/common/mus_common_export.h" | |
7 #include "ipc/ipc_message_utils.h" | |
8 #include "ipc/param_traits_macros.h" | |
9 #include "ui/events/event.h" | |
10 #include "ui/events/event_constants.h" | |
11 | |
12 #undef IPC_MESSAGE_EXPORT | |
13 #define IPC_MESSAGE_EXPORT MUS_COMMON_EXPORT | |
14 | |
15 IPC_ENUM_TRAITS_MIN_MAX_VALUE(ui::EventType, | |
16 ui::EventType::ET_UNKNOWN, | |
17 ui::EventType::ET_LAST) | |
18 | |
19 IPC_ENUM_TRAITS_MIN_MAX_VALUE(ui::EventResult, | |
20 ui::EventResult::ER_UNHANDLED, | |
21 ui::EventResult::ER_DISABLE_SYNC_HANDLING) | |
22 | |
23 IPC_ENUM_TRAITS_MIN_MAX_VALUE(ui::EventPhase, | |
24 ui::EventPhase::EP_PREDISPATCH, | |
25 ui::EventPhase::EP_POSTDISPATCH) | |
26 | |
27 IPC_ENUM_TRAITS_MIN_MAX_VALUE(ui::EventPointerType, | |
28 ui::EventPointerType::POINTER_TYPE_UNKNOWN, | |
29 ui::EventPointerType::POINTER_TYPE_TOUCH) | |
30 | |
31 IPC_ENUM_TRAITS_MIN_MAX_VALUE(ui::GestureDeviceType, | |
32 ui::GestureDeviceType::DEVICE_UNKNOWN, | |
33 ui::GestureDeviceType::DEVICE_TOUCHSCREEN) | |
34 | |
35 IPC_ENUM_TRAITS_MIN_MAX_VALUE(ui::KeyboardCode, | |
36 ui::KeyboardCode::VKEY_UNKNOWN, /* 0x00 */ | |
37 ui::KeyboardCode::VKEY_OEM_CLEAR /* 0xFE */) | |
38 | |
39 IPC_ENUM_TRAITS_MIN_MAX_VALUE(ui::DomCode, 0, 0x0c028c) | |
40 | |
41 IPC_STRUCT_TRAITS_BEGIN(ui::PointerDetails) | |
42 IPC_STRUCT_TRAITS_MEMBER(pointer_type) | |
43 IPC_STRUCT_TRAITS_MEMBER(radius_x) | |
44 IPC_STRUCT_TRAITS_MEMBER(radius_y) | |
45 IPC_STRUCT_TRAITS_MEMBER(force) | |
46 IPC_STRUCT_TRAITS_MEMBER(tilt_x) | |
47 IPC_STRUCT_TRAITS_MEMBER(tilt_y) | |
48 IPC_STRUCT_TRAITS_END() | |
49 | |
50 IPC_STRUCT_TRAITS_BEGIN(ui::LocatedEvent) | |
51 IPC_STRUCT_TRAITS_MEMBER(location_) | |
52 IPC_STRUCT_TRAITS_MEMBER(root_location_) | |
53 IPC_STRUCT_TRAITS_END() | |
54 | |
55 IPC_STRUCT_TRAITS_BEGIN(ui::MouseEvent) | |
56 IPC_STRUCT_TRAITS_PARENT(ui::LocatedEvent) | |
57 IPC_STRUCT_TRAITS_MEMBER(changed_button_flags_) | |
58 IPC_STRUCT_TRAITS_MEMBER(pointer_details_) | |
59 IPC_STRUCT_TRAITS_END() | |
60 | |
61 IPC_STRUCT_TRAITS_BEGIN(ui::MouseWheelEvent) | |
62 IPC_STRUCT_TRAITS_PARENT(ui::MouseEvent) | |
63 IPC_STRUCT_TRAITS_MEMBER(offset_) | |
64 IPC_STRUCT_TRAITS_END() | |
65 | |
66 IPC_STRUCT_TRAITS_BEGIN(ui::TouchEvent) | |
67 IPC_STRUCT_TRAITS_PARENT(ui::LocatedEvent) | |
68 IPC_STRUCT_TRAITS_MEMBER(touch_id_) | |
69 IPC_STRUCT_TRAITS_MEMBER(unique_event_id_) | |
70 IPC_STRUCT_TRAITS_MEMBER(rotation_angle_) | |
71 IPC_STRUCT_TRAITS_MEMBER(may_cause_scrolling_) | |
72 IPC_STRUCT_TRAITS_MEMBER(pointer_details_) | |
73 IPC_STRUCT_TRAITS_END() | |
74 | |
75 IPC_STRUCT_TRAITS_BEGIN(ui::PointerEvent) | |
76 IPC_STRUCT_TRAITS_PARENT(ui::LocatedEvent) | |
77 IPC_STRUCT_TRAITS_MEMBER(pointer_id_) | |
78 IPC_STRUCT_TRAITS_MEMBER(details_) | |
79 IPC_STRUCT_TRAITS_END() | |
80 | |
81 IPC_STRUCT_TRAITS_BEGIN(ui::DomKey) | |
82 IPC_STRUCT_TRAITS_MEMBER(value_) | |
83 IPC_STRUCT_TRAITS_END() | |
84 | |
85 IPC_STRUCT_TRAITS_BEGIN(ui::KeyEvent) | |
86 IPC_STRUCT_TRAITS_MEMBER(is_char_) | |
87 IPC_STRUCT_TRAITS_MEMBER(key_code_) | |
88 IPC_STRUCT_TRAITS_MEMBER(code_) | |
89 IPC_STRUCT_TRAITS_MEMBER(key_) | |
90 IPC_STRUCT_TRAITS_END() | |
91 | |
92 IPC_STRUCT_TRAITS_BEGIN(ui::ScrollEvent) | |
93 IPC_STRUCT_TRAITS_PARENT(ui::MouseEvent) | |
94 IPC_STRUCT_TRAITS_MEMBER(x_offset_) | |
95 IPC_STRUCT_TRAITS_MEMBER(y_offset_) | |
96 IPC_STRUCT_TRAITS_MEMBER(x_offset_ordinal_) | |
97 IPC_STRUCT_TRAITS_MEMBER(y_offset_ordinal_) | |
98 IPC_STRUCT_TRAITS_MEMBER(finger_count_) | |
99 IPC_STRUCT_TRAITS_END() | |
100 | |
101 IPC_STRUCT_TRAITS_BEGIN(ui::GestureEventDetails) | |
102 IPC_STRUCT_TRAITS_MEMBER(type_) | |
103 IPC_STRUCT_TRAITS_MEMBER(data_) | |
104 IPC_STRUCT_TRAITS_MEMBER(device_type_) | |
105 IPC_STRUCT_TRAITS_MEMBER(touch_points_) | |
106 IPC_STRUCT_TRAITS_MEMBER(bounding_box_) | |
107 IPC_STRUCT_TRAITS_END() | |
108 | |
109 IPC_STRUCT_TRAITS_BEGIN(ui::GestureEvent) | |
110 IPC_STRUCT_TRAITS_PARENT(ui::LocatedEvent) | |
111 IPC_STRUCT_TRAITS_MEMBER(details_) | |
112 IPC_STRUCT_TRAITS_END() | |
OLD | NEW |