Chromium Code Reviews| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 98 // TODO(sky): this likely needs context, maybe in |properties|. | 98 // TODO(sky): this likely needs context, maybe in |properties|. |
| 99 NewTopLevelWindow(uint32 change_id, | 99 NewTopLevelWindow(uint32 change_id, |
| 100 uint32 window_id, | 100 uint32 window_id, |
| 101 map<string, array<uint8>> properties); | 101 map<string, array<uint8>> properties); |
| 102 | 102 |
| 103 // Deletes a window. This does not recurse. No hierarchy change notifications | 103 // Deletes a window. This does not recurse. No hierarchy change notifications |
| 104 // are sent as a result of this. Only the connection that created the window | 104 // are sent as a result of this. Only the connection that created the window |
| 105 // can delete it. | 105 // can delete it. |
| 106 DeleteWindow(uint32 change_id, uint32 window_id); | 106 DeleteWindow(uint32 change_id, uint32 window_id); |
| 107 | 107 |
| 108 // Requests input event capture for the given |window_id|. Capture is only | |
| 109 // allowed if the window is processing an event. When a window gains capture, | |
| 110 // current input events are canceled. The given window will receive all | |
| 111 // subsequent input until an alternate window is set via SetCapture, or | |
| 112 // ReleaseCapture is called for |window_id|. OnLostCapture is called to notify | |
| 113 // of capture ending. | |
| 114 SetCapture(uint32 change_id, uint32 window_id); | |
| 115 | |
| 116 // Releases input event capture for the given |window_id|. | |
|
sky
2016/02/08 16:57:11
Document this does nothing if |window_id| does not
jonross
2016/02/10 15:57:56
Done.
| |
| 117 ReleaseCapture(uint32 change_id, uint32 window_id); | |
| 118 | |
| 108 // Sets the specified bounds of the specified window. | 119 // Sets the specified bounds of the specified window. |
| 109 SetWindowBounds(uint32 change_id, uint32 window_id, mojo.Rect bounds); | 120 SetWindowBounds(uint32 change_id, uint32 window_id, mojo.Rect bounds); |
| 110 | 121 |
| 111 // Sets the client area of the specified window. The client area is specified | 122 // Sets the client area of the specified window. The client area is specified |
| 112 // by way of insets. Everything outside of the insets, and not in | 123 // by way of insets. Everything outside of the insets, and not in |
| 113 // |additional_client_areas| is considered non-client area. | 124 // |additional_client_areas| is considered non-client area. |
| 114 // TODO(sky): convert additional_client_areas to a path. | 125 // TODO(sky): convert additional_client_areas to a path. |
| 115 SetClientArea(uint32 window_id, | 126 SetClientArea(uint32 window_id, |
| 116 mojo.Insets insets, | 127 mojo.Insets insets, |
| 117 array<mojo.Rect>? additional_client_areas); | 128 array<mojo.Rect>? additional_client_areas); |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 258 // Invoked when the application embedded at |window| is disconnected. In other | 269 // Invoked when the application embedded at |window| is disconnected. In other |
| 259 // words the embedded app closes the connection to the server. This is called | 270 // words the embedded app closes the connection to the server. This is called |
| 260 // on the connection that created |window| as well as any ancestors that have | 271 // on the connection that created |window| as well as any ancestors that have |
| 261 // the embed root policy. | 272 // the embed root policy. |
| 262 OnEmbeddedAppDisconnected(uint32 window); | 273 OnEmbeddedAppDisconnected(uint32 window); |
| 263 | 274 |
| 264 // Sent when another connection is embedded in the Window this connection was | 275 // Sent when another connection is embedded in the Window this connection was |
| 265 // previously embedded in. See Embed() for more information. | 276 // previously embedded in. See Embed() for more information. |
| 266 OnUnembed(uint32 window); | 277 OnUnembed(uint32 window); |
| 267 | 278 |
| 279 // Sent when a window loses capture. | |
| 280 OnLostCapture(uint32 window); | |
| 281 | |
| 268 // Called in response to NewTopLevelWindow() successfully completing. | 282 // Called in response to NewTopLevelWindow() successfully completing. |
| 269 OnTopLevelCreated(uint32 change_id, WindowData data); | 283 OnTopLevelCreated(uint32 change_id, WindowData data); |
| 270 | 284 |
| 271 // Invoked when a window's bounds have changed. | 285 // Invoked when a window's bounds have changed. |
| 272 OnWindowBoundsChanged(uint32 window, | 286 OnWindowBoundsChanged(uint32 window, |
| 273 mojo.Rect old_bounds, | 287 mojo.Rect old_bounds, |
| 274 mojo.Rect new_bounds); | 288 mojo.Rect new_bounds); |
| 275 | 289 |
| 276 OnClientAreaChanged(uint32 window_id, | 290 OnClientAreaChanged(uint32 window_id, |
| 277 mojo.Insets new_client_area, | 291 mojo.Insets new_client_area, |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 351 // client allows the change it should delete the window. | 365 // client allows the change it should delete the window. |
| 352 RequestClose(uint32 window_id); | 366 RequestClose(uint32 window_id); |
| 353 | 367 |
| 354 // See description of WindowManager for details. | 368 // See description of WindowManager for details. |
| 355 GetWindowManager(associated WindowManager& internal); | 369 GetWindowManager(associated WindowManager& internal); |
| 356 }; | 370 }; |
| 357 | 371 |
| 358 interface WindowTreeFactory { | 372 interface WindowTreeFactory { |
| 359 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client); | 373 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client); |
| 360 }; | 374 }; |
| OLD | NEW |