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/input_events.mojom"; | 8 import "components/mus/public/interfaces/input_events.mojom"; |
9 import "components/mus/public/interfaces/mus_constants.mojom"; | 9 import "components/mus/public/interfaces/mus_constants.mojom"; |
10 import "components/mus/public/interfaces/surface_id.mojom"; | 10 import "components/mus/public/interfaces/surface_id.mojom"; |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 NewWindow(uint32 window_id) => (ErrorCode error_code); | 83 NewWindow(uint32 window_id) => (ErrorCode error_code); |
84 | 84 |
85 // Deletes a window. This does not recurse. No hierarchy change notifications | 85 // Deletes a window. This does not recurse. No hierarchy change notifications |
86 // are sent as a result of this. Only the connection that created the window | 86 // are sent as a result of this. Only the connection that created the window |
87 // can delete it. | 87 // can delete it. |
88 DeleteWindow(uint32 window_id) => (bool success); | 88 DeleteWindow(uint32 window_id) => (bool success); |
89 | 89 |
90 // Sets the specified bounds of the specified window. | 90 // Sets the specified bounds of the specified window. |
91 SetWindowBounds(uint32 window_id, mojo.Rect bounds) => (bool success); | 91 SetWindowBounds(uint32 window_id, mojo.Rect bounds) => (bool success); |
92 | 92 |
93 // Sets the client area of the specified window. Areas outside the client | 93 // Sets the insets of the client area of the specified window. |
94 // area are treated specially. | 94 SetClientArea(uint32 window_id, mojo.Insets insets); |
95 SetClientArea(uint32 window_id, mojo.Rect rect); | |
96 | 95 |
97 // Sets the visibility of the specified window to |visible|. Connections are | 96 // Sets the visibility of the specified window to |visible|. Connections are |
98 // allowed to change the visibility of any window they have created, as well | 97 // allowed to change the visibility of any window they have created, as well |
99 // as any of their roots. | 98 // as any of their roots. |
100 SetWindowVisibility(uint32 window_id, bool visible) => (bool success); | 99 SetWindowVisibility(uint32 window_id, bool visible) => (bool success); |
101 | 100 |
102 // Sets an individual named property. Setting an individual property to null | 101 // Sets an individual named property. Setting an individual property to null |
103 // deletes the property. | 102 // deletes the property. |
104 SetWindowProperty(uint32 window_id, | 103 SetWindowProperty(uint32 window_id, |
105 string name, | 104 string name, |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 // This section is for functions that call through directly to the | 191 // This section is for functions that call through directly to the |
193 // WindowManager. It is expected this will move into an associated interface. | 192 // WindowManager. It is expected this will move into an associated interface. |
194 // See window_manager.mojom for details of these functions. | 193 // See window_manager.mojom for details of these functions. |
195 // OpenWindow(WindowTreeClient client); | 194 // OpenWindow(WindowTreeClient client); |
196 SetPreferredSize(uint32 window_id, mojo.Size size) => | 195 SetPreferredSize(uint32 window_id, mojo.Size size) => |
197 (WindowManagerErrorCode result); | 196 (WindowManagerErrorCode result); |
198 SetBounds(uint32 window_id, mojo.Rect bounds) => | 197 SetBounds(uint32 window_id, mojo.Rect bounds) => |
199 (WindowManagerErrorCode result); | 198 (WindowManagerErrorCode result); |
200 SetShowState(uint32 window_id, ShowState show_state) => | 199 SetShowState(uint32 window_id, ShowState show_state) => |
201 (WindowManagerErrorCode result); | 200 (WindowManagerErrorCode result); |
202 GetDisplays() => (array<Display> displays); | |
203 }; | 201 }; |
204 | 202 |
205 // Changes to windows are not sent to the connection that originated the | 203 // Changes to windows are not sent to the connection that originated the |
206 // change. For example, if connection 1 changes the bounds of a window by | 204 // change. For example, if connection 1 changes the bounds of a window by |
207 // calling SetBounds(), connection 1 does not receive OnWindowBoundsChanged(). | 205 // calling SetBounds(), connection 1 does not receive OnWindowBoundsChanged(). |
208 interface WindowTreeClient { | 206 interface WindowTreeClient { |
209 // Invoked when the client application has been embedded at |root|. | 207 // Invoked when the client application has been embedded at |root|. |
210 // See Embed() on WindowTree for more details. |tree| will be a handle back to | 208 // See Embed() on WindowTree for more details. |tree| will be a handle back to |
211 // the window manager service, unless the connection is to the root connection | 209 // the window manager service, unless the connection is to the root connection |
212 // in which case it will be null. | 210 // in which case it will be null. |
(...skipping 12 matching lines...) Expand all Loading... |
225 // Sent when another connection is embedded in the Window this connection was | 223 // Sent when another connection is embedded in the Window this connection was |
226 // previously embedded in. See Embed() for more information. | 224 // previously embedded in. See Embed() for more information. |
227 OnUnembed(); | 225 OnUnembed(); |
228 | 226 |
229 // Invoked when a window's bounds have changed. | 227 // Invoked when a window's bounds have changed. |
230 OnWindowBoundsChanged(uint32 window, | 228 OnWindowBoundsChanged(uint32 window, |
231 mojo.Rect old_bounds, | 229 mojo.Rect old_bounds, |
232 mojo.Rect new_bounds); | 230 mojo.Rect new_bounds); |
233 | 231 |
234 OnClientAreaChanged(uint32 window_id, | 232 OnClientAreaChanged(uint32 window_id, |
235 mojo.Rect old_client_area, | 233 mojo.Insets old_client_area, |
236 mojo.Rect new_client_area); | 234 mojo.Insets new_client_area); |
237 | 235 |
238 // Invoked when the viewport metrics for the window have changed. | 236 // Invoked when the viewport metrics for the window have changed. |
239 // Clients are expected to propagate this to the window tree. | 237 // Clients are expected to propagate this to the window tree. |
240 OnWindowViewportMetricsChanged(ViewportMetrics old_metrics, | 238 OnWindowViewportMetricsChanged(ViewportMetrics old_metrics, |
241 ViewportMetrics new_metrics); | 239 ViewportMetrics new_metrics); |
242 | 240 |
243 // Invoked when a change is done to the hierarchy. A value of 0 is used to | 241 // Invoked when a change is done to the hierarchy. A value of 0 is used to |
244 // identify a null window. For example, if the old_parent is NULL, 0 is | 242 // identify a null window. For example, if the old_parent is NULL, 0 is |
245 // supplied. | 243 // supplied. |
246 // |windows| contains any windows that are that the client has not been told | 244 // |windows| contains any windows that are that the client has not been told |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 // |new_data| is null. | 276 // |new_data| is null. |
279 OnWindowSharedPropertyChanged(uint32 window, | 277 OnWindowSharedPropertyChanged(uint32 window, |
280 string name, | 278 string name, |
281 array<uint8>? new_data); | 279 array<uint8>? new_data); |
282 | 280 |
283 // Invoked when an event is targeted at the specified window. | 281 // Invoked when an event is targeted at the specified window. |
284 OnWindowInputEvent(uint32 window, Event event) => (); | 282 OnWindowInputEvent(uint32 window, Event event) => (); |
285 | 283 |
286 OnWindowFocused(uint32 focused_window_id); | 284 OnWindowFocused(uint32 focused_window_id); |
287 }; | 285 }; |
OLD | NEW |