blob: 32ae278ca9ff7e5b107e00730bdf524727891bb4 [file] [log] [blame]
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001// 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
10namespace aura {
11class RootWindow;
12class Window;
13}
14
15namespace gfx {
16class Rect;
17}
18
19namespace ash {
20namespace internal {
21class RootWindowController;
22}
23
24// Sets the restore bounds property on |window| in the virtual screen
25// coordinates. Deletes existing bounds value if exists.
26ASH_EXPORT void SetRestoreBoundsInScreen(aura::Window* window,
Ben Murdochbb1529c2013-08-08 10:24:53 +010027 const gfx::Rect& screen_bounds);
Torne (Richard Coles)58218062012-11-14 11:43:16 +000028// Same as |SetRestoreBoundsInScreen| except that the bounds is in the
29// parent's coordinates.
30ASH_EXPORT void SetRestoreBoundsInParent(aura::Window* window,
31 const gfx::Rect& parent_bounds);
32
33// Returns the restore bounds property on |window| in the virtual screen
34// coordinates. The bounds can be NULL if the bounds property does not
35// exist for |window|. |window| owns the bounds object.
36ASH_EXPORT const gfx::Rect* GetRestoreBoundsInScreen(aura::Window* window);
37// Same as |GetRestoreBoundsInScreen| except that it returns the
38// bounds in the parent's coordinates.
39ASH_EXPORT gfx::Rect GetRestoreBoundsInParent(aura::Window* window);
40
41// Deletes and clears the restore bounds property on |window|.
42ASH_EXPORT void ClearRestoreBounds(aura::Window* window);
43
Torne (Richard Coles)58218062012-11-14 11:43:16 +000044// Sets whether |window| is ignored when determining whether the shelf should
45// be darkened when overlapped.
46ASH_EXPORT void SetIgnoredByShelf(aura::Window* window, bool value);
47ASH_EXPORT bool GetIgnoredByShelf(const aura::Window* window);
48
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000049// Sets whether |window| should always be restored to the restore bounds
50// (sometimes the workspace layout manager restores the window to its original
51// bounds instead of the restore bounds. Setting this key overrides that
52// behaviour). The flag is reset to the default value after the window is
53// restored.
54ASH_EXPORT void SetWindowAlwaysRestoresToRestoreBounds(aura::Window* window,
55 bool value);
56ASH_EXPORT bool GetWindowAlwaysRestoresToRestoreBounds(
57 const aura::Window* window);
58
Torne (Richard Coles)58218062012-11-14 11:43:16 +000059// Sets whether the specified window is tracked by workspace code. Default is
60// true. If set to false the workspace does not switch the current workspace,
61// nor does it attempt to impose constraints on the bounds of the window. This
62// is intended for tab dragging.
63ASH_EXPORT void SetTrackedByWorkspace(aura::Window* window, bool value);
64ASH_EXPORT bool GetTrackedByWorkspace(const aura::Window* window);
65
Torne (Richard Coles)58218062012-11-14 11:43:16 +000066// Sets the default value for whether windows persist across all workspaces.
67// The default is false.
68ASH_EXPORT void SetDefaultPersistsAcrossAllWorkspaces(bool value);
69
70// Sets/Gets the RootWindowController for |root_window|.
71ASH_EXPORT void SetRootWindowController(
72 aura::RootWindow* root_window,
73 internal::RootWindowController* controller);
74ASH_EXPORT internal::RootWindowController* GetRootWindowController(
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000075 const aura::RootWindow* root_window);
Torne (Richard Coles)58218062012-11-14 11:43:16 +000076
77}
78
79#endif // ASH_WM_PROPERTY_UTIL_H_