OLD | NEW |
---|---|
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 module mus.mojom; | 5 module mus.mojom; |
6 | 6 |
7 import "components/mus/public/interfaces/compositor_frame.mojom"; | 7 import "components/mus/public/interfaces/compositor_frame.mojom"; |
8 import "components/mus/public/interfaces/cursor.mojom"; | |
8 import "components/mus/public/interfaces/input_events.mojom"; | 9 import "components/mus/public/interfaces/input_events.mojom"; |
9 import "components/mus/public/interfaces/mus_constants.mojom"; | 10 import "components/mus/public/interfaces/mus_constants.mojom"; |
10 import "components/mus/public/interfaces/surface_id.mojom"; | 11 import "components/mus/public/interfaces/surface_id.mojom"; |
11 import "components/mus/public/interfaces/window_manager_constants.mojom"; | 12 import "components/mus/public/interfaces/window_manager_constants.mojom"; |
12 import "ui/mojo/geometry/geometry.mojom"; | 13 import "ui/mojo/geometry/geometry.mojom"; |
13 import "ui/mojo/ime/text_input_state.mojom"; | 14 import "ui/mojo/ime/text_input_state.mojom"; |
14 | 15 |
15 struct ViewportMetrics { | 16 struct ViewportMetrics { |
16 mojo.Size size_in_pixels; | 17 mojo.Size size_in_pixels; |
17 // A value of 0 indicates the real value is not yet available. | 18 // A value of 0 indicates the real value is not yet available. |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
197 // | 198 // |
198 // policy_bitmask is a bitmask of the kAccessPolicy constants. See them for | 199 // policy_bitmask is a bitmask of the kAccessPolicy constants. See them for |
199 // details. | 200 // details. |
200 Embed(uint32 window_id, | 201 Embed(uint32 window_id, |
201 WindowTreeClient client, | 202 WindowTreeClient client, |
202 uint32 policy_bitmask) => (bool success, uint16 connection_id); | 203 uint32 policy_bitmask) => (bool success, uint16 connection_id); |
203 | 204 |
204 SetFocus(uint32 window_id); | 205 SetFocus(uint32 window_id); |
205 SetCanFocus(uint32 window_id, bool can_focus); | 206 SetCanFocus(uint32 window_id, bool can_focus); |
206 | 207 |
208 // Sets the cursor when the pointer is inside |window_id| to a system standard | |
209 // cursor provided by the window manager. | |
210 SetPredefinedCursor(uint32 change_id, uint32 window_id, Cursor cursor_id); | |
211 | |
212 // TODO(erg): Additional cursor methods. Image based cursors, visibility, | |
213 // and cursor locking. | |
214 | |
207 // Set text input state for the given window. | 215 // Set text input state for the given window. |
208 SetWindowTextInputState(uint32 window_id, mojo.TextInputState state); | 216 SetWindowTextInputState(uint32 window_id, mojo.TextInputState state); |
209 | 217 |
210 // Set the input method editor UI (software keyboard, etc) visibility. | 218 // Set the input method editor UI (software keyboard, etc) visibility. |
211 // If state is non-null, the specified window's text input state is updated. | 219 // If state is non-null, the specified window's text input state is updated. |
212 // Otherwise the existing state is used. | 220 // Otherwise the existing state is used. |
213 SetImeVisibility(uint32 window_id, bool visible, mojo.TextInputState? state); | 221 SetImeVisibility(uint32 window_id, bool visible, mojo.TextInputState? state); |
214 | 222 |
215 // See documentation for WindowTreeClient::OnWindowInputEvent(). | 223 // See documentation for WindowTreeClient::OnWindowInputEvent(). |
216 OnWindowInputEventAck(uint32 event_id); | 224 OnWindowInputEventAck(uint32 event_id); |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
309 array<uint8>? new_data); | 317 array<uint8>? new_data); |
310 | 318 |
311 // Invoked when an event is targeted at the specified window. The client must | 319 // Invoked when an event is targeted at the specified window. The client must |
312 // call WindowTree::OnWindowInputEventAck() with the same |event_id| to notify | 320 // call WindowTree::OnWindowInputEventAck() with the same |event_id| to notify |
313 // that the event has been processed. The client will not receive farther | 321 // that the event has been processed. The client will not receive farther |
314 // events until the event is ack'ed. | 322 // events until the event is ack'ed. |
315 OnWindowInputEvent(uint32 event_id, uint32 window, Event event); | 323 OnWindowInputEvent(uint32 event_id, uint32 window, Event event); |
316 | 324 |
317 OnWindowFocused(uint32 focused_window_id); | 325 OnWindowFocused(uint32 focused_window_id); |
318 | 326 |
327 OnWindowSetPredefinedCursor(uint32 window_id, Cursor cursor_id); | |
sky
2015/12/02 21:42:35
OnWindowPredefinedCursorChanged.
| |
328 | |
319 // A change initiated from the client has completed. See description of | 329 // A change initiated from the client has completed. See description of |
320 // change ids for details. | 330 // change ids for details. |
321 OnChangeCompleted(uint32 change_id, bool success); | 331 OnChangeCompleted(uint32 change_id, bool success); |
322 | 332 |
323 // -------------------------------------------------------------------------- | 333 // -------------------------------------------------------------------------- |
324 // This section is for functions that are expected to be pulled into the | 334 // This section is for functions that are expected to be pulled into the |
325 // WindowManager interface once we get associated interfaces. | 335 // WindowManager interface once we get associated interfaces. |
326 | 336 |
327 // Calls to SetWindowBounds() for windows owned by the window manager end up | 337 // Calls to SetWindowBounds() for windows owned by the window manager end up |
328 // here. The window manager should reply with WmResponse() as appropriate. | 338 // here. The window manager should reply with WmResponse() as appropriate. |
329 WmSetBounds(uint32 change_id, uint32 window_id, mojo.Rect bounds); | 339 WmSetBounds(uint32 change_id, uint32 window_id, mojo.Rect bounds); |
330 WmSetProperty(uint32 change_id, | 340 WmSetProperty(uint32 change_id, |
331 uint32 window_id, | 341 uint32 window_id, |
332 string name, | 342 string name, |
333 array<uint8>? value); | 343 array<uint8>? value); |
334 }; | 344 }; |
OLD | NEW |