OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/window_manager_constants.mojom"; | 7 import "components/mus/public/interfaces/window_manager_constants.mojom"; |
8 import "components/mus/public/interfaces/window_tree.mojom"; | 8 import "components/mus/public/interfaces/window_tree.mojom"; |
9 import "ui/mojo/geometry/geometry.mojom"; | 9 import "ui/mojo/geometry/geometry.mojom"; |
10 | 10 |
11 struct WindowManagerConfig { | |
12 array<Display> displays; | |
13 mojo.Insets normal_client_area_insets; | |
14 mojo.Insets maximized_client_area_insets; | |
15 // Max width needed to display the buttons on the title bar. The buttons are | |
16 // aligned to the trailing edge of the titlebar. | |
17 // TODO(sky): this API is very narrow, and assumes a particular config. | |
18 uint32 max_title_bar_button_width; | |
19 }; | |
20 | |
21 // Represents a core interface that should be implemented by any window manager | 11 // Represents a core interface that should be implemented by any window manager |
22 // built on top of Mus. | 12 // built on top of Mus. |
23 interface WindowManager { | 13 interface WindowManager { |
24 // The window's preferred size as defined by its content. Type: gfx::Size. | 14 // The window's preferred size as defined by its content. Type: gfx::Size. |
25 const string kPreferredSize_Property = "prop:preferred-size"; | 15 const string kPreferredSize_Property = "prop:preferred-size"; |
26 // The window's resize behavior. Type: ResizeBehavior. | 16 // The window's resize behavior. Type: ResizeBehavior. |
27 const string kResizeBehavior_Property = "prop:resize-behavior"; | 17 const string kResizeBehavior_Property = "prop:resize-behavior"; |
28 // Bounds the window is restored to. Type: gfx::Rect. | 18 // Bounds the window is restored to. Type: gfx::Rect. |
29 const string kRestoreBounds_Property = "prop:restore-bounds"; | 19 const string kRestoreBounds_Property = "prop:restore-bounds"; |
30 // Shadow style for the window. Type: mojom::ShadowStyle. | 20 // Shadow style for the window. Type: mojom::ShadowStyle. |
31 const string kShadowStyle_Property = "prop:shadow-style"; | 21 const string kShadowStyle_Property = "prop:shadow-style"; |
32 // The window's show state. Type: ShowState. | 22 // The window's show state. Type: ShowState. |
33 const string kShowState_Property = "prop:show-state"; | 23 const string kShowState_Property = "prop:show-state"; |
34 // The window bounds as set by user input. Type: gfx::Rect. | 24 // The window bounds as set by user input. Type: gfx::Rect. |
35 const string kUserSetBounds_Property = "prop:user-set-bounds"; | 25 const string kUserSetBounds_Property = "prop:user-set-bounds"; |
36 const string kWindowType_Property = "prop:window-type"; | 26 const string kWindowType_Property = "prop:window-type"; |
37 // The window's title. Type: mojom::String | 27 // The window's title. Type: mojom::String |
38 const string kWindowTitle_Property = "prop:window-title"; | 28 const string kWindowTitle_Property = "prop:window-title"; |
39 | 29 |
40 OpenWindow(WindowTreeClient client, map<string, array<uint8>> properties); | 30 OpenWindow(WindowTreeClient client, map<string, array<uint8>> properties); |
41 | |
42 GetConfig() => (WindowManagerConfig config); | |
43 }; | 31 }; |
OLD | NEW |