| 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"; |
| 11 import "components/mus/public/interfaces/mus_constants.mojom"; | 11 import "components/mus/public/interfaces/mus_constants.mojom"; |
| 12 import "components/mus/public/interfaces/window_manager.mojom"; | 12 import "components/mus/public/interfaces/window_manager.mojom"; |
| 13 import "components/mus/public/interfaces/window_manager_constants.mojom"; | 13 import "components/mus/public/interfaces/window_manager_constants.mojom"; |
| 14 import "components/mus/public/interfaces/window_tree_constants.mojom"; |
| 14 import "ui/events/mojo/event.mojom"; | 15 import "ui/events/mojo/event.mojom"; |
| 15 import "ui/gfx/geometry/mojo/geometry.mojom"; | 16 import "ui/gfx/geometry/mojo/geometry.mojom"; |
| 16 import "ui/platform_window/mojo/text_input_state.mojom"; | 17 import "ui/platform_window/mojo/text_input_state.mojom"; |
| 17 | 18 |
| 18 struct WindowData { | |
| 19 uint32 parent_id; | |
| 20 uint32 window_id; | |
| 21 gfx.mojom.Rect bounds; | |
| 22 map<string, array<uint8>> properties; | |
| 23 // True if this window is visible. The window may not be drawn on screen (see | |
| 24 // OnWindowParentDrawnStateChanged() for details). | |
| 25 bool visible; | |
| 26 }; | |
| 27 | |
| 28 enum ErrorCode { | |
| 29 NONE, | |
| 30 VALUE_IN_USE, | |
| 31 ILLEGAL_ARGUMENT, | |
| 32 }; | |
| 33 | |
| 34 // Each Window has support for two surfaces. Generally the |DEFAULT| surface | |
| 35 // is used. The |UNDERLAY| surface is useful if the owner of a window wants to | |
| 36 // to Embed() another client and at the same time draw something under the | |
| 37 // embedded apps representation. | |
| 38 enum SurfaceType { | |
| 39 // Only the owner of a window may obtain this surface. | |
| 40 // The window manager can change the offset of this by way of | |
| 41 // SetUnderlaySurfaceOffsetAndExtendedHitArea(). | |
| 42 UNDERLAY, | |
| 43 | |
| 44 // Only the embedded app may obtain this surface. If an app is not embedded | |
| 45 // in the Window than the owner may also render to this surface as well. | |
| 46 DEFAULT, | |
| 47 }; | |
| 48 | |
| 49 // The result of an input event sent to a client app. | |
| 50 enum EventResult { | |
| 51 HANDLED, | |
| 52 UNHANDLED, | |
| 53 }; | |
| 54 | |
| 55 // Windows are identified by a uint32. The upper 16 bits are the connection id, | 19 // Windows are identified by a uint32. The upper 16 bits are the connection id, |
| 56 // and the lower 16 the id assigned by the client. | 20 // and the lower 16 the id assigned by the client. |
| 57 // | 21 // |
| 58 // The root window is identified with a connection id of 0, and value of 1. | 22 // The root window is identified with a connection id of 0, and value of 1. |
| 59 // | 23 // |
| 60 // Most functions to the WindowTree take a change_id parameter. When | 24 // Most functions to the WindowTree take a change_id parameter. When |
| 61 // WindowTree completes processing of a function WindowTree calls | 25 // WindowTree completes processing of a function WindowTree calls |
| 62 // WindowTreeClient::OnChangeCompleted() with the change_id supplied by the | 26 // WindowTreeClient::OnChangeCompleted() with the change_id supplied by the |
| 63 // client and the result of the function. This allows the client to track | 27 // client and the result of the function. This allows the client to track |
| 64 // whether the call succeeded or not. Calls are done via the client interface | 28 // whether the call succeeded or not. Calls are done via the client interface |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 // See description of WindowManager for details. | 365 // See description of WindowManager for details. |
| 402 GetWindowManager(associated WindowManager& internal); | 366 GetWindowManager(associated WindowManager& internal); |
| 403 }; | 367 }; |
| 404 | 368 |
| 405 // Mus provides this interface as a way for clients to connect and obtain a | 369 // Mus provides this interface as a way for clients to connect and obtain a |
| 406 // WindowTree handle with a supplied WindowTreeClient handle. The | 370 // WindowTree handle with a supplied WindowTreeClient handle. The |
| 407 // WindowTreeClient has no roots, use NewTopLevelWindow() to create one. | 371 // WindowTreeClient has no roots, use NewTopLevelWindow() to create one. |
| 408 interface WindowTreeFactory { | 372 interface WindowTreeFactory { |
| 409 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client); | 373 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client); |
| 410 }; | 374 }; |
| OLD | NEW |