| 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 ui.mojom; | 5 module ui.mojom; |
| 6 | 6 |
| 7 import "cc/ipc/frame_sink_id.mojom"; | 7 import "cc/ipc/frame_sink_id.mojom"; |
| 8 import "cc/ipc/local_surface_id.mojom"; | 8 import "cc/ipc/local_surface_id.mojom"; |
| 9 import "cc/ipc/surface_id.mojom"; | 9 import "cc/ipc/surface_id.mojom"; |
| 10 import "cc/ipc/surface_info.mojom"; | 10 import "cc/ipc/surface_info.mojom"; |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 // Sets focus to the specified window, use 0 to clear focus. For a window to | 237 // Sets focus to the specified window, use 0 to clear focus. For a window to |
| 238 // get focus the following has to happen: the window is drawn, the window has | 238 // get focus the following has to happen: the window is drawn, the window has |
| 239 // been marked as focusable (see SetCanFocus()) and the window is in a | 239 // been marked as focusable (see SetCanFocus()) and the window is in a |
| 240 // container the WindowManager has identified as allowing activation | 240 // container the WindowManager has identified as allowing activation |
| 241 // (see WindowManagerClient::AddActivationParent()). | 241 // (see WindowManagerClient::AddActivationParent()). |
| 242 SetFocus(uint32 change_id, uint32 window_id); | 242 SetFocus(uint32 change_id, uint32 window_id); |
| 243 | 243 |
| 244 // Marks the specified window as being able to receive focus. | 244 // Marks the specified window as being able to receive focus. |
| 245 SetCanFocus(uint32 window_id, bool can_focus); | 245 SetCanFocus(uint32 window_id, bool can_focus); |
| 246 | 246 |
| 247 // Sets the cursor when the pointer is inside |window_id| to a system standard | 247 // Sets the cursor when the pointer is inside |window_id|. |
| 248 // cursor provided by the window manager. | 248 SetCursor(uint32 change_id, uint32 window_id, CursorData cursor); |
| 249 SetPredefinedCursor(uint32 change_id, uint32 window_id, CursorType cursor_id); | |
| 250 | 249 |
| 251 // TODO(erg): Additional cursor methods. Image based cursors, visibility, | 250 // TODO(erg): Additional cursor methods. Visibility, and cursor locking. |
| 252 // and cursor locking. | |
| 253 | 251 |
| 254 // Set text input state for the given window. | 252 // Set text input state for the given window. |
| 255 SetWindowTextInputState(uint32 window_id, mojo.TextInputState state); | 253 SetWindowTextInputState(uint32 window_id, mojo.TextInputState state); |
| 256 | 254 |
| 257 // Set the input method editor UI (software keyboard, etc) visibility. | 255 // Set the input method editor UI (software keyboard, etc) visibility. |
| 258 // If state is non-null, the specified window's text input state is updated. | 256 // If state is non-null, the specified window's text input state is updated. |
| 259 // Otherwise the existing state is used. | 257 // Otherwise the existing state is used. |
| 260 SetImeVisibility(uint32 window_id, bool visible, mojo.TextInputState? state); | 258 SetImeVisibility(uint32 window_id, bool visible, mojo.TextInputState? state); |
| 261 | 259 |
| 262 // Sets the EventTargetingPolicy. See EventTargetingPolicy for details. | 260 // Sets the EventTargetingPolicy. See EventTargetingPolicy for details. |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 uint32 window_id, | 458 uint32 window_id, |
| 461 int64 display_id); | 459 int64 display_id); |
| 462 | 460 |
| 463 // Called in two distinct cases: when a window known to the connection gains | 461 // Called in two distinct cases: when a window known to the connection gains |
| 464 // focus, or when focus moves from a window known to the connection to a | 462 // focus, or when focus moves from a window known to the connection to a |
| 465 // window not known to the connection. In the later case |focused_window_id| | 463 // window not known to the connection. In the later case |focused_window_id| |
| 466 // is 0. As with other functions this is only called if the client did not | 464 // is 0. As with other functions this is only called if the client did not |
| 467 // initiate the change. | 465 // initiate the change. |
| 468 OnWindowFocused(uint32 focused_window_id); | 466 OnWindowFocused(uint32 focused_window_id); |
| 469 | 467 |
| 470 OnWindowPredefinedCursorChanged(uint32 window_id, CursorType cursor_id); | 468 OnWindowCursorChanged(uint32 window_id, CursorData cursor); |
| 471 | 469 |
| 472 // Invoked when a client window submits a new surface ID. The surface ID and | 470 // Invoked when a client window submits a new surface ID. The surface ID and |
| 473 // associated information is propagated to the parent connection. The parent | 471 // associated information is propagated to the parent connection. The parent |
| 474 // compositor can take ownership of this surface ID and embed it along with | 472 // compositor can take ownership of this surface ID and embed it along with |
| 475 // frame_size and device_scale_factor in a layer. | 473 // frame_size and device_scale_factor in a layer. |
| 476 // TODO(fsamuel): Surface IDs should be passed to parents directly instead of | 474 // TODO(fsamuel): Surface IDs should be passed to parents directly instead of |
| 477 // going through the window server. http://crbug.com/655231 | 475 // going through the window server. http://crbug.com/655231 |
| 478 OnWindowSurfaceChanged(uint32 window_id, | 476 OnWindowSurfaceChanged(uint32 window_id, |
| 479 cc.mojom.SurfaceInfo surface_info); | 477 cc.mojom.SurfaceInfo surface_info); |
| 480 | 478 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 // See description of WindowManager for details. | 530 // See description of WindowManager for details. |
| 533 GetWindowManager(associated WindowManager& internal); | 531 GetWindowManager(associated WindowManager& internal); |
| 534 }; | 532 }; |
| 535 | 533 |
| 536 // Mus provides this interface as a way for clients to connect and obtain a | 534 // Mus provides this interface as a way for clients to connect and obtain a |
| 537 // WindowTree handle with a supplied WindowTreeClient handle. The | 535 // WindowTree handle with a supplied WindowTreeClient handle. The |
| 538 // WindowTreeClient has no roots, use NewTopLevelWindow() to create one. | 536 // WindowTreeClient has no roots, use NewTopLevelWindow() to create one. |
| 539 interface WindowTreeFactory { | 537 interface WindowTreeFactory { |
| 540 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client); | 538 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client); |
| 541 }; | 539 }; |
| OLD | NEW |