OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef MASH_WM_PROPERTY_UTIL_H_ | |
6 #define MASH_WM_PROPERTY_UTIL_H_ | |
7 | |
8 #include "ash/public/interfaces/ash_window_type.mojom.h" | |
9 #include "ash/public/interfaces/container.mojom.h" | |
10 #include "components/mus/public/cpp/window.h" | |
11 #include "components/mus/public/interfaces/window_manager_constants.mojom.h" | |
12 #include "ui/wm/public/window_types.h" | |
13 | |
14 namespace gfx { | |
15 class Rect; | |
16 class Size; | |
17 } | |
18 | |
19 namespace mus { | |
20 class Window; | |
21 } | |
22 | |
23 namespace mash { | |
24 namespace wm { | |
25 | |
26 class Shadow; | |
27 | |
28 // Utility functions to read values from properties & convert them to the | |
29 // appropriate types. | |
30 | |
31 void SetWindowShowState(mus::Window* window, mus::mojom::ShowState show_state); | |
32 mus::mojom::ShowState GetWindowShowState(const mus::Window* window); | |
33 | |
34 void SetWindowUserSetBounds(mus::Window* window, const gfx::Rect& bounds); | |
35 gfx::Rect GetWindowUserSetBounds(const mus::Window* window); | |
36 | |
37 void SetWindowPreferredSize(mus::Window* window, const gfx::Size& size); | |
38 gfx::Size GetWindowPreferredSize(const mus::Window* window); | |
39 | |
40 ash::mojom::Container GetRequestedContainer(const mus::Window* window); | |
41 | |
42 // Returns a bitfield of kResizeBehavior* values from | |
43 // window_manager_constants.mojom. | |
44 int32_t GetResizeBehavior(const mus::Window* window); | |
45 | |
46 void SetRestoreBounds(mus::Window* window, const gfx::Rect& bounds); | |
47 gfx::Rect GetRestoreBounds(const mus::Window* window); | |
48 | |
49 void SetShadow(mus::Window* window, Shadow* shadow); | |
50 Shadow* GetShadow(const mus::Window* window); | |
51 | |
52 mus::mojom::WindowType GetWindowType(const mus::Window* window); | |
53 mus::mojom::WindowType GetWindowType( | |
54 const mus::Window::SharedProperties& window); | |
55 | |
56 ui::wm::WindowType GetWmWindowType(const mus::Window* window); | |
57 | |
58 ash::mojom::AshWindowType GetAshWindowType(const mus::Window* window); | |
59 | |
60 base::string16 GetWindowTitle(const mus::Window* window); | |
61 | |
62 mojo::Array<uint8_t> GetWindowAppIcon(const mus::Window* window); | |
63 | |
64 void SetAppID(mus::Window* window, const base::string16& app_id); | |
65 base::string16 GetAppID(const mus::Window* window); | |
66 | |
67 bool GetWindowIgnoredByShelf(mus::Window* window); | |
68 | |
69 void SetWindowIsJanky(mus::Window* window, bool janky); | |
70 bool IsWindowJanky(mus::Window* window); | |
71 bool IsWindowJankyProperty(const void* key); | |
72 | |
73 void SetAlwaysOnTop(mus::Window* window, bool value); | |
74 bool IsAlwaysOnTop(mus::Window* window); | |
75 | |
76 } // namespace wm | |
77 } // namespace mash | |
78 | |
79 #endif // MASH_WM_PROPERTY_UTIL_H_ | |
OLD | NEW |