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"; |
19 import "ui/gfx/geometry/mojo/geometry.mojom"; | 20 import "ui/gfx/geometry/mojo/geometry.mojom"; |
20 import "ui/platform_window/mojo/text_input_state.mojom"; | 21 import "ui/platform_window/mojo/text_input_state.mojom"; |
21 | 22 |
22 // Windows are identified by a uint32. The upper 16 bits are the connection id, | 23 // 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. | 24 // and the lower 16 the id assigned by the client. |
24 // | 25 // |
25 // The root window is identified with a connection id of 0, and value of 1. | 26 // The root window is identified with a connection id of 0, and value of 1. |
26 // | 27 // |
(...skipping 259 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 | 287 // 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. | 288 // on it, pass the cursor location at the start of the move. |
288 PerformWindowMove(uint32 change_id, uint32 window_id, MoveLoopSource source, | 289 PerformWindowMove(uint32 change_id, uint32 window_id, MoveLoopSource source, |
289 gfx.mojom.Point cursor); | 290 gfx.mojom.Point cursor); |
290 | 291 |
291 // Tells the window manager to cancel any in progress window move started with | 292 // 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. | 293 // StartWindowMove() and to revert the window bounds to how they were. |
293 CancelWindowMove(uint32 window_id); | 294 CancelWindowMove(uint32 window_id); |
294 | 295 |
295 // Called by the client to start a drag operation. |source_window_id| is the | 296 // 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 | 297 // 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 | 298 // of the pointer which started the drag is, |drag_data| is the entire set of |
| 299 // mime to raw data mapping. |drag_image| and |drag_image_offset| describe |
| 300 // an image to hold behind the cursor which represents the data on the |
| 301 // 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. | 302 // clients will try to read all this data on first entry. |
| 303 // |
| 304 // TODO(erg): SkBitmap is the wrong data type for the drag image; we should |
| 305 // be passing ImageSkias once http://crbug.com/655874 is implemented. |
299 PerformDragDrop(uint32 change_id, | 306 PerformDragDrop(uint32 change_id, |
300 uint32 source_window_id, | 307 uint32 source_window_id, |
| 308 gfx.mojom.Point screen_location, |
301 map<string, array<uint8>> drag_data, | 309 map<string, array<uint8>> drag_data, |
302 uint32 drag_operation); | 310 skia.mojom.Bitmap? drag_image, |
| 311 gfx.mojom.Vector2d drag_image_offset, |
| 312 uint32 drag_operation, |
| 313 DragEventSource source); |
303 | 314 |
304 // Called by the client to cancel any in progress drag drop operation. This | 315 // Called by the client to cancel any in progress drag drop operation. This |
305 // will result in a change completed for the underlying change. | 316 // will result in a change completed for the underlying change. |
306 CancelDragDrop(uint32 window_id); | 317 CancelDragDrop(uint32 window_id); |
307 }; | 318 }; |
308 | 319 |
309 // Changes to windows are not sent to the connection that originated the | 320 // 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 | 321 // change. For example, if connection 1 changes the bounds of a window by |
311 // calling SetWindowBounds(), connection 1 does not receive | 322 // calling SetWindowBounds(), connection 1 does not receive |
312 // OnWindowBoundsChanged(). | 323 // OnWindowBoundsChanged(). |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 // See description of WindowManager for details. | 519 // See description of WindowManager for details. |
509 GetWindowManager(associated WindowManager& internal); | 520 GetWindowManager(associated WindowManager& internal); |
510 }; | 521 }; |
511 | 522 |
512 // Mus provides this interface as a way for clients to connect and obtain a | 523 // Mus provides this interface as a way for clients to connect and obtain a |
513 // WindowTree handle with a supplied WindowTreeClient handle. The | 524 // WindowTree handle with a supplied WindowTreeClient handle. The |
514 // WindowTreeClient has no roots, use NewTopLevelWindow() to create one. | 525 // WindowTreeClient has no roots, use NewTopLevelWindow() to create one. |
515 interface WindowTreeFactory { | 526 interface WindowTreeFactory { |
516 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client); | 527 CreateWindowTree(WindowTree& tree_request, WindowTreeClient client); |
517 }; | 528 }; |
OLD | NEW |