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