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 ui.mojom; | 5 module ui.mojom; |
6 | 6 |
7 import "cc/ipc/frame_sink_id.mojom"; | 7 import "cc/ipc/frame_sink_id.mojom"; |
8 import "cc/ipc/local_surface_id.mojom"; | 8 import "cc/ipc/local_surface_id.mojom"; |
9 import "cc/ipc/surface_info.mojom"; | 9 import "cc/ipc/surface_info.mojom"; |
10 import "cc/ipc/mojo_compositor_frame_sink.mojom"; | 10 import "cc/ipc/mojo_compositor_frame_sink.mojom"; |
11 import "services/ui/public/interfaces/cursor.mojom"; | 11 import "services/ui/public/interfaces/cursor.mojom"; |
12 import "services/ui/public/interfaces/event_matcher.mojom"; | 12 import "services/ui/public/interfaces/event_matcher.mojom"; |
13 import "services/ui/public/interfaces/mus_constants.mojom"; | 13 import "services/ui/public/interfaces/mus_constants.mojom"; |
14 import "services/ui/public/interfaces/window_manager.mojom"; | 14 import "services/ui/public/interfaces/window_manager.mojom"; |
15 import "services/ui/public/interfaces/window_manager_constants.mojom"; | 15 import "services/ui/public/interfaces/window_manager_constants.mojom"; |
16 import "services/ui/public/interfaces/window_tree_constants.mojom"; | 16 import "services/ui/public/interfaces/window_tree_constants.mojom"; |
| 17 import "skia/public/interfaces/bitmap.mojom"; |
17 import "ui/base/mojo/ui_base_types.mojom"; | 18 import "ui/base/mojo/ui_base_types.mojom"; |
18 import "ui/events/mojo/event.mojom"; | 19 import "ui/events/mojo/event.mojom"; |
| 20 import "ui/events/mojo/event_constants.mojom"; |
19 import "ui/gfx/geometry/mojo/geometry.mojom"; | 21 import "ui/gfx/geometry/mojo/geometry.mojom"; |
20 import "ui/platform_window/mojo/text_input_state.mojom"; | 22 import "ui/platform_window/mojo/text_input_state.mojom"; |
21 | 23 |
22 // Windows are identified by a uint32. The upper 16 bits are the connection id, | 24 // Windows are identified by a uint32. The upper 16 bits are the connection id, |
23 // and the lower 16 the id assigned by the client. | 25 // and the lower 16 the id assigned by the client. |
24 // | 26 // |
25 // The root window is identified with a connection id of 0, and value of 1. | 27 // The root window is identified with a connection id of 0, and value of 1. |
26 // | 28 // |
27 // Most functions to the WindowTree take a change_id parameter. When | 29 // Most functions to the WindowTree take a change_id parameter. When |
28 // WindowTree completes processing of a function WindowTree calls | 30 // WindowTree completes processing of a function WindowTree calls |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 // when a client sends this message and when the window manager starts acting | 288 // when a client sends this message and when the window manager starts acting |
287 // on it, pass the cursor location at the start of the move. | 289 // on it, pass the cursor location at the start of the move. |
288 PerformWindowMove(uint32 change_id, uint32 window_id, MoveLoopSource source, | 290 PerformWindowMove(uint32 change_id, uint32 window_id, MoveLoopSource source, |
289 gfx.mojom.Point cursor); | 291 gfx.mojom.Point cursor); |
290 | 292 |
291 // Tells the window manager to cancel any in progress window move started with | 293 // Tells the window manager to cancel any in progress window move started with |
292 // StartWindowMove() and to revert the window bounds to how they were. | 294 // StartWindowMove() and to revert the window bounds to how they were. |
293 CancelWindowMove(uint32 window_id); | 295 CancelWindowMove(uint32 window_id); |
294 | 296 |
295 // Called by the client to start a drag operation. |source_window_id| is the | 297 // Called by the client to start a drag operation. |source_window_id| is the |
296 // source window, |drag_data| is the entire set of mime to raw data | 298 // source window, |screen_location| is what the source thinks their location |
297 // mapping. We send this during the start of the drag because most views | 299 // of the pointer which started the drag is, |drag_data| is the entire set of |
| 300 // mime to raw data mapping. |drag_image| and |drag_image_offset| describe |
| 301 // an image to hold behind the cursor which represents the data on the |
| 302 // clipboard. We send this during the start of the drag because most views |
298 // clients will try to read all this data on first entry. | 303 // clients will try to read all this data on first entry. |
| 304 // |
| 305 // TODO(erg): SkBitmap is the wrong data type for the drag image; we should |
| 306 // be passing ImageSkias once http://crbug.com/655874 is implemented. |
299 PerformDragDrop(uint32 change_id, | 307 PerformDragDrop(uint32 change_id, |
300 uint32 source_window_id, | 308 uint32 source_window_id, |
| 309 gfx.mojom.Point screen_location, |
301 map<string, array<uint8>> drag_data, | 310 map<string, array<uint8>> drag_data, |
302 uint32 drag_operation); | 311 skia.mojom.Bitmap? drag_image, |
| 312 gfx.mojom.Vector2d drag_image_offset, |
| 313 uint32 drag_operation, |
| 314 PointerKind source); |
303 | 315 |
304 // Called by the client to cancel any in progress drag drop operation. This | 316 // Called by the client to cancel any in progress drag drop operation. This |
305 // will result in a change completed for the underlying change. | 317 // will result in a change completed for the underlying change. |
306 CancelDragDrop(uint32 window_id); | 318 CancelDragDrop(uint32 window_id); |
307 }; | 319 }; |
308 | 320 |
309 // Changes to windows are not sent to the connection that originated the | 321 // Changes to windows are not sent to the connection that originated the |
310 // change. For example, if connection 1 changes the bounds of a window by | 322 // change. For example, if connection 1 changes the bounds of a window by |
311 // calling SetWindowBounds(), connection 1 does not receive | 323 // calling SetWindowBounds(), connection 1 does not receive |
312 // OnWindowBoundsChanged(). | 324 // OnWindowBoundsChanged(). |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 // See description of WindowManager for details. | 520 // See description of WindowManager for details. |
509 GetWindowManager(associated WindowManager& internal); | 521 GetWindowManager(associated WindowManager& internal); |
510 }; | 522 }; |
511 | 523 |
512 // Mus provides this interface as a way for clients to connect and obtain a | 524 // Mus provides this interface as a way for clients to connect and obtain a |
513 // WindowTree handle with a supplied WindowTreeClient handle. The | 525 // WindowTree handle with a supplied WindowTreeClient handle. The |
514 // WindowTreeClient has no roots, use NewTopLevelWindow() to create one. | 526 // WindowTreeClient has no roots, use NewTopLevelWindow() to create one. |
515 interface WindowTreeFactory { | 527 interface WindowTreeFactory { |
516 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client); | 528 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client); |
517 }; | 529 }; |
OLD | NEW |