| 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/cursor.mojom"; |
| 9 import "components/mus/public/interfaces/input_events.mojom"; | 9 import "components/mus/public/interfaces/input_events.mojom"; |
| 10 import "components/mus/public/interfaces/mus_constants.mojom"; | 10 import "components/mus/public/interfaces/mus_constants.mojom"; |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 | 239 |
| 240 // Set text input state for the given window. | 240 // Set text input state for the given window. |
| 241 SetWindowTextInputState(uint32 window_id, mojo.TextInputState state); | 241 SetWindowTextInputState(uint32 window_id, mojo.TextInputState state); |
| 242 | 242 |
| 243 // Set the input method editor UI (software keyboard, etc) visibility. | 243 // Set the input method editor UI (software keyboard, etc) visibility. |
| 244 // If state is non-null, the specified window's text input state is updated. | 244 // If state is non-null, the specified window's text input state is updated. |
| 245 // Otherwise the existing state is used. | 245 // Otherwise the existing state is used. |
| 246 SetImeVisibility(uint32 window_id, bool visible, mojo.TextInputState? state); | 246 SetImeVisibility(uint32 window_id, bool visible, mojo.TextInputState? state); |
| 247 | 247 |
| 248 // See documentation for WindowTreeClient::OnWindowInputEvent(). | 248 // See documentation for WindowTreeClient::OnWindowInputEvent(). |
| 249 OnWindowInputEventAck(uint32 event_id); | 249 OnWindowInputEventAck(uint32 event_id, bool handled); |
| 250 | 250 |
| 251 // See description of WindowManager for details. | 251 // See description of WindowManager for details. |
| 252 GetWindowManagerClient(associated WindowManagerClient& internal); | 252 GetWindowManagerClient(associated WindowManagerClient& internal); |
| 253 }; | 253 }; |
| 254 | 254 |
| 255 // Changes to windows are not sent to the connection that originated the | 255 // Changes to windows are not sent to the connection that originated the |
| 256 // change. For example, if connection 1 changes the bounds of a window by | 256 // change. For example, if connection 1 changes the bounds of a window by |
| 257 // calling SetWindowBounds(), connection 1 does not receive | 257 // calling SetWindowBounds(), connection 1 does not receive |
| 258 // OnWindowBoundsChanged(). | 258 // OnWindowBoundsChanged(). |
| 259 interface WindowTreeClient { | 259 interface WindowTreeClient { |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 OnWindowDrawnStateChanged(uint32 window, bool drawn); | 343 OnWindowDrawnStateChanged(uint32 window, bool drawn); |
| 344 | 344 |
| 345 // Invoked when a window property is changed. If this change is a removal, | 345 // Invoked when a window property is changed. If this change is a removal, |
| 346 // |new_data| is null. | 346 // |new_data| is null. |
| 347 OnWindowSharedPropertyChanged(uint32 window, | 347 OnWindowSharedPropertyChanged(uint32 window, |
| 348 string name, | 348 string name, |
| 349 array<uint8>? new_data); | 349 array<uint8>? new_data); |
| 350 | 350 |
| 351 // Invoked when an event is targeted at the specified window. The client must | 351 // Invoked when an event is targeted at the specified window. The client must |
| 352 // call WindowTree::OnWindowInputEventAck() with the same |event_id| to notify | 352 // call WindowTree::OnWindowInputEventAck() with the same |event_id| to notify |
| 353 // that the event has been processed. The client will not receive farther | 353 // that the event has been processed, and with a boolean |handled| to notify |
| 354 // events until the event is ack'ed. | 354 // if the event was consumed. The client will not receive farther events until |
| 355 // the event is ack'ed. |
| 355 OnWindowInputEvent(uint32 event_id, uint32 window, Event event); | 356 OnWindowInputEvent(uint32 event_id, uint32 window, Event event); |
| 356 | 357 |
| 357 OnWindowFocused(uint32 focused_window_id); | 358 OnWindowFocused(uint32 focused_window_id); |
| 358 | 359 |
| 359 OnWindowPredefinedCursorChanged(uint32 window_id, Cursor cursor_id); | 360 OnWindowPredefinedCursorChanged(uint32 window_id, Cursor cursor_id); |
| 360 | 361 |
| 361 // A change initiated from the client has completed. See description of | 362 // A change initiated from the client has completed. See description of |
| 362 // change ids for details. | 363 // change ids for details. |
| 363 OnChangeCompleted(uint32 change_id, bool success); | 364 OnChangeCompleted(uint32 change_id, bool success); |
| 364 | 365 |
| 365 // The WindowManager is requesting the specified window to close. If the | 366 // The WindowManager is requesting the specified window to close. If the |
| 366 // client allows the change it should delete the window. | 367 // client allows the change it should delete the window. |
| 367 RequestClose(uint32 window_id); | 368 RequestClose(uint32 window_id); |
| 368 | 369 |
| 369 // See description of WindowManager for details. | 370 // See description of WindowManager for details. |
| 370 GetWindowManager(associated WindowManager& internal); | 371 GetWindowManager(associated WindowManager& internal); |
| 371 }; | 372 }; |
| 372 | 373 |
| 373 // Mus provides this interface as a way for clients to connect and obtain a | 374 // Mus provides this interface as a way for clients to connect and obtain a |
| 374 // WindowTree handle with a supplied WindowTreeClient handle. The | 375 // WindowTree handle with a supplied WindowTreeClient handle. The |
| 375 // WindowTreeClient has no roots, use NewTopLevelWindow() to create one. | 376 // WindowTreeClient has no roots, use NewTopLevelWindow() to create one. |
| 376 interface WindowTreeFactory { | 377 interface WindowTreeFactory { |
| 377 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client); | 378 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client); |
| 378 }; | 379 }; |
| OLD | NEW |