OLD | NEW |
| (Empty) |
1 // Copyright (c) 2012 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 ASH_WM_PROPERTY_UTIL_H_ | |
6 #define ASH_WM_PROPERTY_UTIL_H_ | |
7 | |
8 #include "ash/ash_export.h" | |
9 | |
10 namespace aura { | |
11 class Window; | |
12 } | |
13 | |
14 namespace gfx { | |
15 class Rect; | |
16 } | |
17 | |
18 namespace ash { | |
19 | |
20 // Sets the restore bounds property on |window| in the virtual screen | |
21 // coordinates. Deletes existing bounds value if exists. | |
22 ASH_EXPORT void SetRestoreBoundsInScreen(aura::Window* window, | |
23 const gfx::Rect& screen_bounds); | |
24 // Same as |SetRestoreBoundsInScreen| except that the bounds is in the | |
25 // parent's coordinates. | |
26 ASH_EXPORT void SetRestoreBoundsInParent(aura::Window* window, | |
27 const gfx::Rect& parent_bounds); | |
28 | |
29 // Returns the restore bounds property on |window| in the virtual screen | |
30 // coordinates. The bounds can be NULL if the bounds property does not | |
31 // exist for |window|. |window| owns the bounds object. | |
32 ASH_EXPORT const gfx::Rect* GetRestoreBoundsInScreen(aura::Window* window); | |
33 // Same as |GetRestoreBoundsInScreen| except that it returns the | |
34 // bounds in the parent's coordinates. | |
35 ASH_EXPORT gfx::Rect GetRestoreBoundsInParent(aura::Window* window); | |
36 | |
37 // Deletes and clears the restore bounds property on |window|. | |
38 ASH_EXPORT void ClearRestoreBounds(aura::Window* window); | |
39 | |
40 // Sets whether |window| should always be restored to the restore bounds | |
41 // (sometimes the workspace layout manager restores the window to its original | |
42 // bounds instead of the restore bounds. Setting this key overrides that | |
43 // behaviour). The flag is reset to the default value after the window is | |
44 // restored. | |
45 ASH_EXPORT void SetWindowAlwaysRestoresToRestoreBounds(aura::Window* window, | |
46 bool value); | |
47 ASH_EXPORT bool GetWindowAlwaysRestoresToRestoreBounds( | |
48 const aura::Window* window); | |
49 } // namespace ash | |
50 | |
51 #endif // ASH_WM_PROPERTY_UTIL_H_ | |
OLD | NEW |