[M108 Migration] Support standard build for armv7hl architecture
[platform/framework/web/chromium-efl.git] / ash / screen_util.h
1 // Copyright 2014 The Chromium Authors
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_SCREEN_UTIL_H_
6 #define ASH_SCREEN_UTIL_H_
7
8 #include "ash/ash_export.h"
9
10 namespace aura {
11 class Window;
12 }  // namespace aura
13
14 namespace gfx {
15 class Rect;
16 }  // namespace gfx
17
18 namespace ash {
19
20 namespace screen_util {
21
22 // Returns the bounds for maximized windows in parent coordinates.
23 // Maximized windows trigger auto-hiding the shelf.
24 ASH_EXPORT gfx::Rect GetMaximizedWindowBoundsInParent(aura::Window* window);
25
26 // Returns the display bounds in parent coordinates.
27 ASH_EXPORT gfx::Rect GetDisplayBoundsInParent(aura::Window* window);
28
29 // Returns the bounds of fullscreened windows in the parent coordinates of
30 // |window| taking into account the height of the Docked Magnifier and Chromevox
31 // panel (if they are enabled).
32 ASH_EXPORT gfx::Rect GetFullscreenWindowBoundsInParent(aura::Window* window);
33
34 // Returns the display's work area bounds in parent coordinates.
35 ASH_EXPORT gfx::Rect GetDisplayWorkAreaBoundsInParent(aura::Window* window);
36
37 // Returns the display's work area bounds in parent coordinates on lock
38 // screen, i.e. for work area with forced bottom alignment.
39 // Note that unlike |GetDisplayWorkAreaBoundsInParent|, this method uses
40 // work area bounds that are updated when the screen is locked. For example
41 // if shelf alignment is set to right before screen lock,
42 // |GetDisplayWorkAreaBoundsInParent| will return work are bounds for right
43 // shelf alignment - this method will return work area for bottom shelf
44 // alignment (which is always used on lock screen).
45 ASH_EXPORT gfx::Rect GetDisplayWorkAreaBoundsInParentForLockScreen(
46     aura::Window* window);
47
48 // Returns the display's work area bounds on the active desk container.
49 ASH_EXPORT gfx::Rect GetDisplayWorkAreaBoundsInParentForActiveDeskContainer(
50     aura::Window* window);
51 ASH_EXPORT gfx::Rect GetDisplayWorkAreaBoundsInScreenForActiveDeskContainer(
52     aura::Window* window);
53
54 // Returns the bounds of the physical display containing the shelf for
55 // |window|. Physical displays can differ from logical displays in unified
56 // desktop mode.
57 // TODO(oshima): Consider using physical displays in window layout, instead of
58 // root windows, and only use logical display in display management code.
59 ASH_EXPORT gfx::Rect GetDisplayBoundsWithShelf(aura::Window* window);
60
61 // Returns an adjusted bounds for the given |bounds| by false snapping it to the
62 // edge of the display in pixel space. It will snap the bounds to the display
63 // that contains |window|. This will prevent any 1px gaps that you might see at
64 // the edges of the display. We achieve this by increasing the height and/or the
65 // width of |bounds| so that in pixel space, they cover the edge of the dispaly.
66 // |bounds| should be in screen space.
67 ASH_EXPORT gfx::Rect SnapBoundsToDisplayEdge(const gfx::Rect& bounds,
68                                              const aura::Window* window);
69
70 // Returns the ideal bounds for the maximized/fullscreen/pinned state,
71 // takig the shelf behavior into account. The maximized window state should
72 // not be affected by the shelf bhavior change by fullscreen, but should
73 // use the fullscreen bounds if the shelf is set to auto hide mode by a user.
74 ASH_EXPORT gfx::Rect GetIdealBoundsForMaximizedOrFullscreenOrPinnedState(
75     aura::Window* window);
76
77 }  // namespace screen_util
78
79 }  // namespace ash
80
81 #endif  // ASH_SCREEN_UTIL_H_