add new window type WINDOW_TYPE_BOOT_ANIMATION

Signed-off-by: maojiangping <maojiangping@huawei.com>
Change-Id: Ie53a6198c95094df2766643ee5b92dbc109f409e
Signed-off-by: maojiangping <maojiangping@huawei.com>
This commit is contained in:
maojiangping
2022-02-23 16:25:32 +08:00
parent b499f89f4d
commit c7aadfcf03
4 changed files with 12 additions and 9 deletions
+6 -4
View File
@@ -23,19 +23,19 @@ enum class WindowType : uint32_t {
APP_WINDOW_BASE = 1,
APP_MAIN_WINDOW_BASE = APP_WINDOW_BASE,
WINDOW_TYPE_APP_MAIN_WINDOW = APP_MAIN_WINDOW_BASE,
APP_MAIN_WINDOW_END = WINDOW_TYPE_APP_MAIN_WINDOW, // equals last window type
APP_MAIN_WINDOW_END,
APP_SUB_WINDOW_BASE = 1000,
WINDOW_TYPE_MEDIA = APP_SUB_WINDOW_BASE,
WINDOW_TYPE_APP_SUB_WINDOW,
APP_SUB_WINDOW_END = WINDOW_TYPE_APP_SUB_WINDOW, // equals last window type
APP_SUB_WINDOW_END,
APP_WINDOW_END = APP_SUB_WINDOW_END,
SYSTEM_WINDOW_BASE = 2000,
BELOW_APP_SYSTEM_WINDOW_BASE = SYSTEM_WINDOW_BASE,
WINDOW_TYPE_WALLPAPER = SYSTEM_WINDOW_BASE,
WINDOW_TYPE_DESKTOP,
BELOW_APP_SYSTEM_WINDOW_END = WINDOW_TYPE_DESKTOP, // equals last window type
BELOW_APP_SYSTEM_WINDOW_END,
ABOVE_APP_SYSTEM_WINDOW_BASE = 2100,
WINDOW_TYPE_APP_LAUNCHING = ABOVE_APP_SYSTEM_WINDOW_BASE,
@@ -55,7 +55,9 @@ enum class WindowType : uint32_t {
WINDOW_TYPE_POINTER,
WINDOW_TYPE_LAUNCHER_RECENT,
WINDOW_TYPE_LAUNCHER_DOCK,
ABOVE_APP_SYSTEM_WINDOW_END = WINDOW_TYPE_LAUNCHER_DOCK, // equals last window type
WINDOW_TYPE_BOOT_ANIMATION,
ABOVE_APP_SYSTEM_WINDOW_END,
SYSTEM_WINDOW_END = ABOVE_APP_SYSTEM_WINDOW_END,
};
+4 -4
View File
@@ -25,12 +25,12 @@ class WindowHelper {
public:
static inline bool IsMainWindow(WindowType type)
{
return (type >= WindowType::APP_MAIN_WINDOW_BASE && type <= WindowType::APP_MAIN_WINDOW_END);
return (type >= WindowType::APP_MAIN_WINDOW_BASE && type < WindowType::APP_MAIN_WINDOW_END);
}
static inline bool IsSubWindow(WindowType type)
{
return (type >= WindowType::APP_SUB_WINDOW_BASE && type <= WindowType::APP_SUB_WINDOW_END);
return (type >= WindowType::APP_SUB_WINDOW_BASE && type < WindowType::APP_SUB_WINDOW_END);
}
static inline bool IsAppWindow(WindowType type)
@@ -40,12 +40,12 @@ public:
static inline bool IsBelowSystemWindow(WindowType type)
{
return (type >= WindowType::BELOW_APP_SYSTEM_WINDOW_BASE && type <= WindowType::BELOW_APP_SYSTEM_WINDOW_END);
return (type >= WindowType::BELOW_APP_SYSTEM_WINDOW_BASE && type < WindowType::BELOW_APP_SYSTEM_WINDOW_END);
}
static inline bool IsAboveSystemWindow(WindowType type)
{
return (type >= WindowType::ABOVE_APP_SYSTEM_WINDOW_BASE && type <= WindowType::ABOVE_APP_SYSTEM_WINDOW_END);
return (type >= WindowType::ABOVE_APP_SYSTEM_WINDOW_BASE && type < WindowType::ABOVE_APP_SYSTEM_WINDOW_END);
}
static inline bool IsSystemWindow(WindowType type)
+1 -1
View File
@@ -1212,7 +1212,7 @@ void WindowImpl::SetDefaultOption()
property_->SetWindowMode(WindowMode::WINDOW_MODE_FLOATING);
break;
}
case WindowType::SYSTEM_WINDOW_END: // SYSTEM_WINDOW_END is for boot animation, is unfocusable.
case WindowType::WINDOW_TYPE_BOOT_ANIMATION:
case WindowType::WINDOW_TYPE_POINTER: {
property_->SetFocusable(false);
break;
+1
View File
@@ -59,6 +59,7 @@ private:
{ WindowType::WINDOW_TYPE_KEYGUARD, 114 },
{ WindowType::WINDOW_TYPE_DRAGGING_EFFECT, 115 },
{ WindowType::WINDOW_TYPE_POINTER, 116 },
{ WindowType::WINDOW_TYPE_BOOT_ANIMATION, 117 },
};
};
}