OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef ASH_PUBLIC_CPP_SHELL_WINDOW_IDS_H_ | 5 #ifndef ASH_PUBLIC_CPP_SHELL_WINDOW_IDS_H_ |
6 #define ASH_PUBLIC_CPP_SHELL_WINDOW_IDS_H_ | 6 #define ASH_PUBLIC_CPP_SHELL_WINDOW_IDS_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include "ash/public/cpp/ash_public_export.h" | 11 #include "ash/public/cpp/ash_public_export.h" |
12 | 12 |
13 // Declarations of ids of special shell windows. | 13 // Declarations of ids of special shell windows. |
14 | 14 |
15 namespace ash { | 15 namespace ash { |
16 | 16 |
17 // Used to indicate no shell window id. | 17 enum ShellWindowId { |
18 const int32_t kShellWindowId_Invalid = -1; | 18 // Used to indicate no shell window id. |
| 19 kShellWindowId_Invalid = -1, |
19 | 20 |
20 // A higher-level container that holds all of the containers stacked below | 21 // A higher-level container that holds all of the containers stacked below |
21 // kShellWindowId_LockScreenContainer. Only used by PowerButtonController for | 22 // kShellWindowId_LockScreenContainer. Only used by PowerButtonController for |
22 // animating lower-level containers. | 23 // animating lower-level containers. |
23 const int32_t kShellWindowId_NonLockScreenContainersContainer = 0; | 24 kShellWindowId_NonLockScreenContainersContainer = 0, |
24 | 25 |
25 // A higher-level container that holds containers that hold lock-screen | 26 // A higher-level container that holds containers that hold lock-screen |
26 // windows. Only used by PowerButtonController for animating lower-level | 27 // windows. Only used by PowerButtonController for animating lower-level |
27 // containers. | 28 // containers. |
28 const int32_t kShellWindowId_LockScreenContainersContainer = 1; | 29 kShellWindowId_LockScreenContainersContainer, |
29 | 30 |
30 // A higher-level container that holds containers that hold lock-screen-related | 31 // A higher-level container that holds containers that hold |
31 // windows (which we want to display while the screen is locked; effectively | 32 // lock-screen-related |
32 // containers stacked above kShellWindowId_LockSystemModalContainer). Only used | 33 // windows (which we want to display while the screen is locked, effectively |
33 // by PowerButtonController for animating lower-level containers. | 34 // containers stacked above kShellWindowId_LockSystemModalContainer). Only |
34 const int32_t kShellWindowId_LockScreenRelatedContainersContainer = 2; | 35 // used by PowerButtonController for animating lower-level containers. |
| 36 kShellWindowId_LockScreenRelatedContainersContainer, |
35 | 37 |
36 // A container used for windows of WINDOW_TYPE_CONTROL that have no parent. | 38 // A container used for windows of WINDOW_TYPE_CONTROL that have no parent. |
37 // This container is not visible. | 39 // This container is not visible. |
38 const int32_t kShellWindowId_UnparentedControlContainer = 3; | 40 kShellWindowId_UnparentedControlContainer, |
39 | 41 |
40 // The wallpaper (desktop background) window. | 42 // The wallpaper (desktop background) window. |
41 const int32_t kShellWindowId_WallpaperContainer = 4; | 43 kShellWindowId_WallpaperContainer, |
42 | 44 |
43 // The virtual keyboard container. | 45 // The virtual keyboard container. |
44 // NOTE: this is lazily created. | 46 // NOTE: this is lazily created. |
45 const int32_t kShellWindowId_VirtualKeyboardContainer = 5; | 47 kShellWindowId_VirtualKeyboardContainer, |
46 | 48 |
47 // The container for standard top-level windows. | 49 // The container for standard top-level windows. |
48 const int32_t kShellWindowId_DefaultContainer = 6; | 50 kShellWindowId_DefaultContainer, |
49 | 51 |
50 // The container for top-level windows with the 'always-on-top' flag set. | 52 // The container for top-level windows with the 'always-on-top' flag set. |
51 const int32_t kShellWindowId_AlwaysOnTopContainer = 7; | 53 kShellWindowId_AlwaysOnTopContainer, |
52 | 54 |
53 // The container for the shelf. | 55 // The container for the shelf. |
54 const int32_t kShellWindowId_ShelfContainer = 8; | 56 kShellWindowId_ShelfContainer, |
55 | 57 |
56 // The container for bubbles which float over the shelf. | 58 // The container for bubbles which float over the shelf. |
57 const int32_t kShellWindowId_ShelfBubbleContainer = 9; | 59 kShellWindowId_ShelfBubbleContainer, |
58 | 60 |
59 // The container for panel windows. | 61 // The container for panel windows. |
60 const int32_t kShellWindowId_PanelContainer = 10; | 62 kShellWindowId_PanelContainer, |
61 | 63 |
62 // The container for the app list. | 64 // The container for the app list. |
63 const int32_t kShellWindowId_AppListContainer = 11; | 65 kShellWindowId_AppListContainer, |
64 | 66 |
65 // The container for user-specific modal windows. | 67 // The container for user-specific modal windows. |
66 const int32_t kShellWindowId_SystemModalContainer = 12; | 68 kShellWindowId_SystemModalContainer, |
67 | 69 |
68 // The container for the lock screen wallpaper (lock screen background). | 70 // The container for the lock screen wallpaper (lock screen background). |
69 const int32_t kShellWindowId_LockScreenWallpaperContainer = 13; | 71 kShellWindowId_LockScreenWallpaperContainer, |
70 | 72 |
71 // The container for the lock screen. | 73 // The container for the lock screen. |
72 const int32_t kShellWindowId_LockScreenContainer = 14; | 74 kShellWindowId_LockScreenContainer, |
73 | 75 |
74 // The container for the lock screen modal windows. | 76 // The container for the lock screen modal windows. |
75 const int32_t kShellWindowId_LockSystemModalContainer = 15; | 77 kShellWindowId_LockSystemModalContainer, |
76 | 78 |
77 // The container for the status area. | 79 // The container for the status area. |
78 const int32_t kShellWindowId_StatusContainer = 16; | 80 kShellWindowId_StatusContainer, |
79 | 81 |
80 // A parent container that holds the virtual keyboard container and ime windows | 82 // A parent container that holds the virtual keyboard container and ime |
81 // if any. This is to ensure that the virtual keyboard or ime window is stacked | 83 // windows if any. This is to ensure that the virtual keyboard or ime window |
82 // above most containers but below the mouse cursor and the power off animation. | 84 // is stacked above most containers but below the mouse cursor and the power |
83 const int32_t kShellWindowId_ImeWindowParentContainer = 17; | 85 // off animation. |
| 86 kShellWindowId_ImeWindowParentContainer, |
84 | 87 |
85 // The container for menus. | 88 // The container for menus. |
86 const int32_t kShellWindowId_MenuContainer = 18; | 89 kShellWindowId_MenuContainer, |
87 | 90 |
88 // The container for drag/drop images and tooltips. | 91 // The container for drag/drop images and tooltips. |
89 const int32_t kShellWindowId_DragImageAndTooltipContainer = 19; | 92 kShellWindowId_DragImageAndTooltipContainer, |
90 | 93 |
91 // The container for bubbles briefly overlaid onscreen to show settings changes | 94 // The container for bubbles briefly overlaid onscreen to show settings |
92 // (volume, brightness, input method bubbles, etc.). | 95 // changes (volume, brightness, input method bubbles, etc.). |
93 const int32_t kShellWindowId_SettingBubbleContainer = 20; | 96 kShellWindowId_SettingBubbleContainer, |
94 | 97 |
95 // The container for special components overlaid onscreen, such as the | 98 // The container for special components overlaid onscreen, such as the |
96 // region selector for partial screenshots. | 99 // region selector for partial screenshots. |
97 const int32_t kShellWindowId_OverlayContainer = 21; | 100 kShellWindowId_OverlayContainer, |
98 | 101 |
99 // ID of the window created by PhantomWindowController or DragWindowController. | 102 // ID of the window created by PhantomWindowController or |
100 const int32_t kShellWindowId_PhantomWindow = 22; | 103 // DragWindowController. |
| 104 kShellWindowId_PhantomWindow, |
101 | 105 |
102 // The container for mouse cursor. | 106 // The container for mouse cursor. |
103 const int32_t kShellWindowId_MouseCursorContainer = 23; | 107 kShellWindowId_MouseCursorContainer, |
104 | 108 |
105 // The topmost container, used for power off animation. | 109 // The topmost container, used for power off animation. |
106 const int32_t kShellWindowId_PowerButtonAnimationContainer = 24; | 110 kShellWindowId_PowerButtonAnimationContainer, |
107 | 111 |
108 const int32_t kShellWindowId_Min = 0; | 112 kShellWindowId_Min = kShellWindowId_NonLockScreenContainersContainer, |
109 const int32_t kShellWindowId_Max = kShellWindowId_PowerButtonAnimationContainer; | 113 kShellWindowId_Max = kShellWindowId_PowerButtonAnimationContainer, |
| 114 }; |
110 | 115 |
111 // A list of all the above valid container IDs. Add any new ID to this list. | 116 // A list of all the above valid container IDs. Add any new ID to this list. |
112 // This list is needed to validate we have no duplicate IDs. | 117 // This list is needed to validate we have no duplicate IDs. |
113 const int32_t kAllShellContainerIds[] = { | 118 const int32_t kAllShellContainerIds[] = { |
114 kShellWindowId_NonLockScreenContainersContainer, | 119 kShellWindowId_NonLockScreenContainersContainer, |
115 kShellWindowId_LockScreenContainersContainer, | 120 kShellWindowId_LockScreenContainersContainer, |
116 kShellWindowId_LockScreenRelatedContainersContainer, | 121 kShellWindowId_LockScreenRelatedContainersContainer, |
117 kShellWindowId_UnparentedControlContainer, | 122 kShellWindowId_UnparentedControlContainer, |
118 kShellWindowId_WallpaperContainer, | 123 kShellWindowId_WallpaperContainer, |
119 kShellWindowId_VirtualKeyboardContainer, | 124 kShellWindowId_VirtualKeyboardContainer, |
(...skipping 22 matching lines...) Expand all Loading... |
142 // that need to be activated. | 147 // that need to be activated. |
143 ASH_PUBLIC_EXPORT extern const int32_t kActivatableShellWindowIds[]; | 148 ASH_PUBLIC_EXPORT extern const int32_t kActivatableShellWindowIds[]; |
144 ASH_PUBLIC_EXPORT extern const size_t kNumActivatableShellWindowIds; | 149 ASH_PUBLIC_EXPORT extern const size_t kNumActivatableShellWindowIds; |
145 | 150 |
146 // Returns true if |id| is in |kActivatableShellWindowIds|. | 151 // Returns true if |id| is in |kActivatableShellWindowIds|. |
147 ASH_PUBLIC_EXPORT bool IsActivatableShellWindowId(int32_t id); | 152 ASH_PUBLIC_EXPORT bool IsActivatableShellWindowId(int32_t id); |
148 | 153 |
149 } // namespace ash | 154 } // namespace ash |
150 | 155 |
151 #endif // ASH_PUBLIC_CPP_SHELL_WINDOW_IDS_H_ | 156 #endif // ASH_PUBLIC_CPP_SHELL_WINDOW_IDS_H_ |
OLD | NEW |