forked from crosswalk-project/chromium-crosswalk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
metro_viewer_messages.h
228 lines (183 loc) · 9.03 KB
/
metro_viewer_messages.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Multiply-included message file, no include guard.
#include <stdint.h>
#include <vector>
#include "ipc/ipc_message_macros.h"
#include "ui/events/event_constants.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/metro_viewer/ime_types.h"
#define IPC_MESSAGE_START MetroViewerMsgStart
IPC_ENUM_TRAITS(ui::EventType)
IPC_ENUM_TRAITS(ui::EventFlags)
// Contains the parameters sent for a mousebutton message.
IPC_STRUCT_BEGIN(MetroViewerHostMsg_MouseButtonParams)
IPC_STRUCT_MEMBER(int32_t, x)
IPC_STRUCT_MEMBER(int32_t, y)
IPC_STRUCT_MEMBER(int32_t, extra)
IPC_STRUCT_MEMBER(ui::EventType, event_type)
IPC_STRUCT_MEMBER(uint32_t, flags)
IPC_STRUCT_MEMBER(ui::EventFlags, changed_button)
IPC_STRUCT_MEMBER(bool, is_horizontal_wheel)
IPC_STRUCT_END()
// Messages sent from the viewer to the browser:
// Inform the browser of the surface to target for compositing.
IPC_MESSAGE_CONTROL2(MetroViewerHostMsg_SetTargetSurface,
gfx::NativeViewId /* target hwnd */,
float /* device scale */)
// Informs the browser that the mouse moved.
IPC_MESSAGE_CONTROL3(MetroViewerHostMsg_MouseMoved,
int32_t, /* x-coordinate */
int32_t, /* y-coordinate */
int32_t /* flags */)
// Informs the brower that a mouse button was pressed.
IPC_MESSAGE_CONTROL1(MetroViewerHostMsg_MouseButton,
MetroViewerHostMsg_MouseButtonParams)
// Informs the browser that a key was pressed.
IPC_MESSAGE_CONTROL4(MetroViewerHostMsg_KeyDown,
uint32_t, /* virtual key */
uint32_t, /* repeat count */
uint32_t, /* scan code */
uint32_t /* key state */)
// Informs the browser that a key was released.
IPC_MESSAGE_CONTROL4(MetroViewerHostMsg_KeyUp,
uint32_t, /* virtual key */
uint32_t, /* repeat count */
uint32_t, /* scan code */
uint32_t /* key state */)
IPC_MESSAGE_CONTROL4(MetroViewerHostMsg_Character,
uint32_t, /* virtual key */
uint32_t, /* repeat count */
uint32_t, /* scan code */
uint32_t /* key state */)
// Informs the browser that the Metro window has been activated.
IPC_MESSAGE_CONTROL1(MetroViewerHostMsg_WindowActivated,
bool /* Whether the window should be repainted */)
// Informs the browser that the user has completed an edge gesture.
IPC_MESSAGE_CONTROL0(MetroViewerHostMsg_EdgeGesture)
IPC_MESSAGE_CONTROL4(MetroViewerHostMsg_TouchDown,
int32_t, /* x-coordinate */
int32_t, /* y-coordinate */
uint64_t, /* timestamp */
uint32_t) /* pointer_id */
IPC_MESSAGE_CONTROL4(MetroViewerHostMsg_TouchUp,
int32_t, /* x-coordinate */
int32_t, /* y-coordinate */
uint64_t, /* timestamp */
uint32_t) /* pointer_id */
IPC_MESSAGE_CONTROL4(MetroViewerHostMsg_TouchMoved,
int32_t, /* x-coordinate */
int32_t, /* y-coordinate */
uint64_t, /* timestamp */
uint32_t) /* pointer_id */
// Informs the browser of the result of a file save as operation.
IPC_MESSAGE_CONTROL3(MetroViewerHostMsg_FileSaveAsDone,
bool, /* success */
base::FilePath, /* filename */
int) /* filter_index */
// Informs the browser of the result of a file open operation.
IPC_MESSAGE_CONTROL2(MetroViewerHostMsg_FileOpenDone,
bool, /* success */
base::FilePath) /* filename */
IPC_MESSAGE_CONTROL2(MetroViewerHostMsg_MultiFileOpenDone,
bool, /* success */
std::vector<base::FilePath>) /* filenames */
// Informs the browser of the result of a select folder operation.
IPC_MESSAGE_CONTROL2(MetroViewerHostMsg_SelectFolderDone,
bool, /* success */
base::FilePath) /* filepath*/
// Messages sent from the browser to the viewer:
// Requests the viewer to activate desktop mode.
IPC_MESSAGE_CONTROL2(MetroViewerHostMsg_ActivateDesktop,
base::FilePath /* shortcut */,
bool /* ash exit */)
// Request the viewer to close itself gracefully.
IPC_MESSAGE_CONTROL0(MetroViewerHostMsg_MetroExit)
// Requests the viewer to open a URL in desktop mode.
IPC_MESSAGE_CONTROL2(MetroViewerHostMsg_OpenURLOnDesktop,
base::FilePath /* shortcut */,
base::string16 /* url */)
// Requests the viewer to change the pointer to a new cursor.
IPC_MESSAGE_CONTROL1(MetroViewerHostMsg_SetCursor, int64_t /* cursor */)
// This structure contains the parameters sent to the viewer process to display
// the file save dialog.
IPC_STRUCT_BEGIN(MetroViewerHostMsg_SaveAsDialogParams)
// The title of the file save dialog if any.
IPC_STRUCT_MEMBER(base::string16, title)
// The suggested file name.
IPC_STRUCT_MEMBER(base::FilePath, suggested_name)
// The save as filter to be used.
IPC_STRUCT_MEMBER(base::string16, filter)
// The filter index.
IPC_STRUCT_MEMBER(uint32_t, filter_index)
// The default extension.
IPC_STRUCT_MEMBER(base::string16, default_extension)
IPC_STRUCT_END()
// Requests the viewer to display the file save dialog.
IPC_MESSAGE_CONTROL1(MetroViewerHostMsg_DisplayFileSaveAs,
MetroViewerHostMsg_SaveAsDialogParams)
// Requests the viewer to display the file open dialog.
IPC_MESSAGE_CONTROL4(MetroViewerHostMsg_DisplayFileOpen,
base::string16, /* title */
base::string16, /* filter */
base::FilePath, /* Default path */
bool) /* allow_multi_select */
// Requests the viewer to display the select folder dialog.
IPC_MESSAGE_CONTROL1(MetroViewerHostMsg_DisplaySelectFolder,
base::string16) /* title */
// Sent to the viewer process to set the cursor position.
IPC_MESSAGE_CONTROL2(MetroViewerHostMsg_SetCursorPos,
int, /* x */
int) /* y */
// Ack sent by the viewer process indicating that the SetCursorPos operation
// was completed.
IPC_MESSAGE_CONTROL0(MetroViewerHostMsg_SetCursorPosAck)
IPC_MESSAGE_CONTROL1(MetroViewerHostMsg_OpenURL,
base::string16) /* url */
IPC_MESSAGE_CONTROL1(MetroViewerHostMsg_SearchRequest,
base::string16) /* search_string */
// Sent from the metro viewer process to the browser process to indicate that
// the viewer window size has changed.
IPC_MESSAGE_CONTROL2(MetroViewerHostMsg_WindowSizeChanged,
uint32_t, /* width */
uint32_t) /* height */
IPC_STRUCT_TRAITS_BEGIN(metro_viewer::UnderlineInfo)
IPC_STRUCT_TRAITS_MEMBER(start_offset)
IPC_STRUCT_TRAITS_MEMBER(end_offset)
IPC_STRUCT_TRAITS_MEMBER(thick)
IPC_STRUCT_TRAITS_END()
// Sent from the metro viewer process to the browser process to update the
// composition string.
IPC_MESSAGE_CONTROL4(MetroViewerHostMsg_ImeCompositionChanged,
base::string16, /* text */
int32_t, /* selection_start */
int32_t, /* selection_end */
std::vector<metro_viewer::UnderlineInfo>) /* underlines */
// Sent from the metro viewer process to the browser process to update the
// status of popup window that is managed by an IME.
IPC_MESSAGE_CONTROL1(
MetroViewerHostMsg_ImeCandidatePopupChanged,
bool) /* UI visibility */
// Sent from the metro viewer process to the browser process to commit strings.
IPC_MESSAGE_CONTROL1(MetroViewerHostMsg_ImeTextCommitted,
base::string16) /* text */
// Sent from the metro viewer process to the browser process to notify that the
// active text input source is changed.
IPC_MESSAGE_CONTROL2(MetroViewerHostMsg_ImeInputSourceChanged,
uint16_t, /* Win32 LangID */
bool) /* is IME or not */
// Requests the viewer to cancel the on-going composition.
IPC_MESSAGE_CONTROL0(MetroViewerHostMsg_ImeCancelComposition)
IPC_STRUCT_TRAITS_BEGIN(metro_viewer::CharacterBounds)
IPC_STRUCT_TRAITS_MEMBER(left)
IPC_STRUCT_TRAITS_MEMBER(top)
IPC_STRUCT_TRAITS_MEMBER(right)
IPC_STRUCT_TRAITS_MEMBER(bottom)
IPC_STRUCT_TRAITS_END()
// Requests the viewer to update the document context such as attached
// InputScopes and character bounds.
IPC_MESSAGE_CONTROL2(
MetroViewerHostMsg_ImeTextInputClientUpdated,
std::vector<int32_t>, /* InputScope enums */
std::vector<metro_viewer::CharacterBounds>) /* character bounds */