| 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 "cc/ipc/surface_id.mojom"; | 7 import "cc/ipc/surface_id.mojom"; |
| 8 import "components/mus/public/interfaces/compositor_frame.mojom"; | 8 import "components/mus/public/interfaces/compositor_frame.mojom"; |
| 9 import "components/mus/public/interfaces/cursor.mojom"; | 9 import "components/mus/public/interfaces/cursor.mojom"; |
| 10 import "components/mus/public/interfaces/event_matcher.mojom"; | 10 import "components/mus/public/interfaces/event_matcher.mojom"; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 }; | 22 }; |
| 23 | 23 |
| 24 struct WindowData { | 24 struct WindowData { |
| 25 uint32 parent_id; | 25 uint32 parent_id; |
| 26 uint32 window_id; | 26 uint32 window_id; |
| 27 mojo.Rect bounds; | 27 mojo.Rect bounds; |
| 28 map<string, array<uint8>> properties; | 28 map<string, array<uint8>> properties; |
| 29 // True if this window is visible. The window may not be drawn on screen (see | 29 // True if this window is visible. The window may not be drawn on screen (see |
| 30 // OnWindowParentDrawnStateChanged() for details). | 30 // OnWindowParentDrawnStateChanged() for details). |
| 31 bool visible; | 31 bool visible; |
| 32 int64 display_id; | |
| 33 }; | 32 }; |
| 34 | 33 |
| 35 enum ErrorCode { | 34 enum ErrorCode { |
| 36 NONE, | 35 NONE, |
| 37 VALUE_IN_USE, | 36 VALUE_IN_USE, |
| 38 ILLEGAL_ARGUMENT, | 37 ILLEGAL_ARGUMENT, |
| 39 }; | 38 }; |
| 40 | 39 |
| 41 // Each Window has support for two surfaces. Generally the |DEFAULT| surface | 40 // Each Window has support for two surfaces. Generally the |DEFAULT| surface |
| 42 // is used. The |UNDERLAY| surface is useful if the owner of a window wants to | 41 // is used. The |UNDERLAY| surface is useful if the owner of a window wants to |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 | 275 |
| 277 // Changes to windows are not sent to the connection that originated the | 276 // Changes to windows are not sent to the connection that originated the |
| 278 // change. For example, if connection 1 changes the bounds of a window by | 277 // change. For example, if connection 1 changes the bounds of a window by |
| 279 // calling SetWindowBounds(), connection 1 does not receive | 278 // calling SetWindowBounds(), connection 1 does not receive |
| 280 // OnWindowBoundsChanged(). | 279 // OnWindowBoundsChanged(). |
| 281 interface WindowTreeClient { | 280 interface WindowTreeClient { |
| 282 // Invoked when the client application has been embedded at |root|. | 281 // Invoked when the client application has been embedded at |root|. |
| 283 // See Embed() on WindowTree for more details. |tree| will be a handle back to | 282 // See Embed() on WindowTree for more details. |tree| will be a handle back to |
| 284 // the window manager service, unless the connection is to the root connection | 283 // the window manager service, unless the connection is to the root connection |
| 285 // in which case it will be null. |parent_drawn| is true if roots parent is | 284 // in which case it will be null. |parent_drawn| is true if roots parent is |
| 286 // drawn, see OnParentDrawnStateChanged() for details. | 285 // drawn, see OnParentDrawnStateChanged() for details. |display_id| identifies |
| 286 // the display this root window is on. |
| 287 OnEmbed(uint16 connection_id, | 287 OnEmbed(uint16 connection_id, |
| 288 WindowData root, | 288 WindowData root, |
| 289 WindowTree? tree, | 289 WindowTree? tree, |
| 290 int64 display_id, |
| 290 uint32 focused_window, | 291 uint32 focused_window, |
| 291 bool parent_drawn); | 292 bool parent_drawn); |
| 292 | 293 |
| 293 // Invoked when the application embedded at |window| is disconnected. In other | 294 // Invoked when the application embedded at |window| is disconnected. In other |
| 294 // words the embedded app closes the connection to the server. This is called | 295 // words the embedded app closes the connection to the server. This is called |
| 295 // on the connection that created |window| as well as any ancestors that have | 296 // on the connection that created |window| as well as any ancestors that have |
| 296 // the embed root policy. | 297 // the embed root policy. |
| 297 OnEmbeddedAppDisconnected(uint32 window); | 298 OnEmbeddedAppDisconnected(uint32 window); |
| 298 | 299 |
| 299 // Sent when another connection is embedded in the Window this connection was | 300 // Sent when another connection is embedded in the Window this connection was |
| 300 // previously embedded in. See Embed() for more information. | 301 // previously embedded in. See Embed() for more information. |
| 301 OnUnembed(uint32 window); | 302 OnUnembed(uint32 window); |
| 302 | 303 |
| 303 // Sent when a window loses capture. | 304 // Sent when a window loses capture. |
| 304 OnLostCapture(uint32 window); | 305 OnLostCapture(uint32 window); |
| 305 | 306 |
| 306 // Called in response to NewTopLevelWindow() successfully completing. | 307 // Called in response to NewTopLevelWindow() successfully completing. |
| 307 // |parent_drawn| is true if the parent of the window is drawn, see | 308 // |parent_drawn| is true if the parent of the window is drawn, see |
| 308 // OnDrawnStateChanged() for details. | 309 // OnDrawnStateChanged() for details. |display_id| identifies the display this |
| 309 OnTopLevelCreated(uint32 change_id, WindowData data, bool parent_drawn); | 310 // window is on. |
| 311 OnTopLevelCreated(uint32 change_id, |
| 312 WindowData data, |
| 313 int64 display_id, |
| 314 bool parent_drawn); |
| 310 | 315 |
| 311 // Invoked when a window's bounds have changed. | 316 // Invoked when a window's bounds have changed. |
| 312 OnWindowBoundsChanged(uint32 window, | 317 OnWindowBoundsChanged(uint32 window, |
| 313 mojo.Rect old_bounds, | 318 mojo.Rect old_bounds, |
| 314 mojo.Rect new_bounds); | 319 mojo.Rect new_bounds); |
| 315 | 320 |
| 316 OnClientAreaChanged(uint32 window_id, | 321 OnClientAreaChanged(uint32 window_id, |
| 317 mojo.Insets new_client_area, | 322 mojo.Insets new_client_area, |
| 318 array<mojo.Rect> new_additional_client_areas); | 323 array<mojo.Rect> new_additional_client_areas); |
| 319 | 324 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 // See description of WindowManager for details. | 407 // See description of WindowManager for details. |
| 403 GetWindowManager(associated WindowManager& internal); | 408 GetWindowManager(associated WindowManager& internal); |
| 404 }; | 409 }; |
| 405 | 410 |
| 406 // Mus provides this interface as a way for clients to connect and obtain a | 411 // Mus provides this interface as a way for clients to connect and obtain a |
| 407 // WindowTree handle with a supplied WindowTreeClient handle. The | 412 // WindowTree handle with a supplied WindowTreeClient handle. The |
| 408 // WindowTreeClient has no roots, use NewTopLevelWindow() to create one. | 413 // WindowTreeClient has no roots, use NewTopLevelWindow() to create one. |
| 409 interface WindowTreeFactory { | 414 interface WindowTreeFactory { |
| 410 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client); | 415 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client); |
| 411 }; | 416 }; |
| OLD | NEW |