Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(586)

Side by Side Diff: components/mus/public/interfaces/window_tree.mojom

Issue 1677513002: mus Window Server: implement event capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/mus/public/cpp/tests/test_window_tree.cc ('k') | components/mus/ws/access_policy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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|. This does nothing
117 // if |window_id| does not currently have capture.
118 ReleaseCapture(uint32 change_id, uint32 window_id);
119
108 // Sets the specified bounds of the specified window. 120 // Sets the specified bounds of the specified window.
109 SetWindowBounds(uint32 change_id, uint32 window_id, mojo.Rect bounds); 121 SetWindowBounds(uint32 change_id, uint32 window_id, mojo.Rect bounds);
110 122
111 // Sets the client area of the specified window. The client area is specified 123 // 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 124 // by way of insets. Everything outside of the insets, and not in
113 // |additional_client_areas| is considered non-client area. 125 // |additional_client_areas| is considered non-client area.
114 // TODO(sky): convert additional_client_areas to a path. 126 // TODO(sky): convert additional_client_areas to a path.
115 SetClientArea(uint32 window_id, 127 SetClientArea(uint32 window_id,
116 mojo.Insets insets, 128 mojo.Insets insets,
117 array<mojo.Rect>? additional_client_areas); 129 array<mojo.Rect>? additional_client_areas);
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 // Invoked when the application embedded at |window| is disconnected. In other 270 // 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 271 // 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 272 // on the connection that created |window| as well as any ancestors that have
261 // the embed root policy. 273 // the embed root policy.
262 OnEmbeddedAppDisconnected(uint32 window); 274 OnEmbeddedAppDisconnected(uint32 window);
263 275
264 // Sent when another connection is embedded in the Window this connection was 276 // Sent when another connection is embedded in the Window this connection was
265 // previously embedded in. See Embed() for more information. 277 // previously embedded in. See Embed() for more information.
266 OnUnembed(uint32 window); 278 OnUnembed(uint32 window);
267 279
280 // Sent when a window loses capture.
281 OnLostCapture(uint32 window);
282
268 // Called in response to NewTopLevelWindow() successfully completing. 283 // Called in response to NewTopLevelWindow() successfully completing.
269 OnTopLevelCreated(uint32 change_id, WindowData data); 284 OnTopLevelCreated(uint32 change_id, WindowData data);
270 285
271 // Invoked when a window's bounds have changed. 286 // Invoked when a window's bounds have changed.
272 OnWindowBoundsChanged(uint32 window, 287 OnWindowBoundsChanged(uint32 window,
273 mojo.Rect old_bounds, 288 mojo.Rect old_bounds,
274 mojo.Rect new_bounds); 289 mojo.Rect new_bounds);
275 290
276 OnClientAreaChanged(uint32 window_id, 291 OnClientAreaChanged(uint32 window_id,
277 mojo.Insets new_client_area, 292 mojo.Insets new_client_area,
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 // See description of WindowManager for details. 369 // See description of WindowManager for details.
355 GetWindowManager(associated WindowManager& internal); 370 GetWindowManager(associated WindowManager& internal);
356 }; 371 };
357 372
358 // Mus provides this interface as a way for clients to connect and obtain a 373 // Mus provides this interface as a way for clients to connect and obtain a
359 // WindowTree handle with a supplied WindowTreeClient handle. The 374 // WindowTree handle with a supplied WindowTreeClient handle. The
360 // WindowTreeClient has no roots, use NewTopLevelWindow() to create one. 375 // WindowTreeClient has no roots, use NewTopLevelWindow() to create one.
361 interface WindowTreeFactory { 376 interface WindowTreeFactory {
362 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client); 377 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client);
363 }; 378 };
OLDNEW
« no previous file with comments | « components/mus/public/cpp/tests/test_window_tree.cc ('k') | components/mus/ws/access_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698