1e0dac50fSopenharmony_ci/* 2e0dac50fSopenharmony_ci * Copyright (c) 2021 Huawei Device Co., Ltd. 3e0dac50fSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4e0dac50fSopenharmony_ci * you may not use this file except in compliance with the License. 5e0dac50fSopenharmony_ci * You may obtain a copy of the License at 6e0dac50fSopenharmony_ci * 7e0dac50fSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8e0dac50fSopenharmony_ci * 9e0dac50fSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10e0dac50fSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11e0dac50fSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12e0dac50fSopenharmony_ci * See the License for the specific language governing permissions and 13e0dac50fSopenharmony_ci * limitations under the License. 14e0dac50fSopenharmony_ci */ 15e0dac50fSopenharmony_ci 16e0dac50fSopenharmony_ci#ifndef OHOS_ROSEN_WINDOW_ZORDER_POLICY_H 17e0dac50fSopenharmony_ci#define OHOS_ROSEN_WINDOW_ZORDER_POLICY_H 18e0dac50fSopenharmony_ci 19e0dac50fSopenharmony_ci#include <map> 20e0dac50fSopenharmony_ci#include <refbase.h> 21e0dac50fSopenharmony_ci 22e0dac50fSopenharmony_ci#include "wm_common.h" 23e0dac50fSopenharmony_ci 24e0dac50fSopenharmony_cinamespace OHOS { 25e0dac50fSopenharmony_cinamespace Rosen { 26e0dac50fSopenharmony_ciclass WindowZorderPolicy : public RefBase { 27e0dac50fSopenharmony_cipublic: 28e0dac50fSopenharmony_ci WindowZorderPolicy() = default; 29e0dac50fSopenharmony_ci ~WindowZorderPolicy() = default; 30e0dac50fSopenharmony_ci 31e0dac50fSopenharmony_ci int32_t GetWindowPriority(WindowType type) const; 32e0dac50fSopenharmony_ci 33e0dac50fSopenharmony_ciprivate: 34e0dac50fSopenharmony_ci const std::map<WindowType, int32_t> windowPriorityMap_ { 35e0dac50fSopenharmony_ci // sub-windows types 36e0dac50fSopenharmony_ci { WindowType::WINDOW_TYPE_MEDIA, -1 }, 37e0dac50fSopenharmony_ci { WindowType::WINDOW_TYPE_APP_SUB_WINDOW, 2 }, 38e0dac50fSopenharmony_ci { WindowType::WINDOW_TYPE_SYSTEM_SUB_WINDOW, 2 }, 39e0dac50fSopenharmony_ci { WindowType::WINDOW_TYPE_APP_COMPONENT, 2 }, 40e0dac50fSopenharmony_ci 41e0dac50fSopenharmony_ci // main window 42e0dac50fSopenharmony_ci { WindowType::WINDOW_TYPE_APP_MAIN_WINDOW, 1 }, 43e0dac50fSopenharmony_ci 44e0dac50fSopenharmony_ci // system-specific window 45e0dac50fSopenharmony_ci { WindowType::WINDOW_TYPE_WALLPAPER, 0 }, 46e0dac50fSopenharmony_ci { WindowType::WINDOW_TYPE_DESKTOP, 1 }, 47e0dac50fSopenharmony_ci { WindowType::WINDOW_TYPE_DIALOG, 3 }, 48e0dac50fSopenharmony_ci { WindowType::WINDOW_TYPE_APP_LAUNCHING, 101 }, 49e0dac50fSopenharmony_ci { WindowType::WINDOW_TYPE_DOCK_SLICE, 1 }, 50e0dac50fSopenharmony_ci { WindowType::WINDOW_TYPE_PLACEHOLDER, 1 }, 51e0dac50fSopenharmony_ci { WindowType::WINDOW_TYPE_LAUNCHER_RECENT, 102 }, 52e0dac50fSopenharmony_ci { WindowType::WINDOW_TYPE_LAUNCHER_DOCK, 103 }, 53e0dac50fSopenharmony_ci { WindowType::WINDOW_TYPE_INCOMING_CALL, 104 }, 54e0dac50fSopenharmony_ci { WindowType::WINDOW_TYPE_SEARCHING_BAR, 105 }, 55e0dac50fSopenharmony_ci { WindowType::WINDOW_TYPE_SYSTEM_ALARM_WINDOW, 106 }, 56e0dac50fSopenharmony_ci { WindowType::WINDOW_TYPE_FLOAT, 107 }, 57e0dac50fSopenharmony_ci { WindowType::WINDOW_TYPE_SYSTEM_FLOAT, 107 }, 58e0dac50fSopenharmony_ci { WindowType::WINDOW_TYPE_GLOBAL_SEARCH, 107 }, 59e0dac50fSopenharmony_ci { WindowType::WINDOW_TYPE_FLOAT_CAMERA, 107 }, 60e0dac50fSopenharmony_ci { WindowType::WINDOW_TYPE_INPUT_METHOD_FLOAT, 108 }, 61e0dac50fSopenharmony_ci { WindowType::WINDOW_TYPE_TOAST, 109 }, 62e0dac50fSopenharmony_ci { WindowType::WINDOW_TYPE_STATUS_BAR, 110 }, 63e0dac50fSopenharmony_ci { WindowType::WINDOW_TYPE_PANEL, 111 }, 64e0dac50fSopenharmony_ci { WindowType::WINDOW_TYPE_VOLUME_OVERLAY, 112 }, 65e0dac50fSopenharmony_ci { WindowType::WINDOW_TYPE_NAVIGATION_BAR, 113 }, 66e0dac50fSopenharmony_ci { WindowType::WINDOW_TYPE_KEYGUARD, 114 }, 67e0dac50fSopenharmony_ci // reserve 115 for app window above keyguard, 116 for input method window above keyguard 68e0dac50fSopenharmony_ci { WindowType::WINDOW_TYPE_SCREENSHOT, 117 }, 69e0dac50fSopenharmony_ci { WindowType::WINDOW_TYPE_VOICE_INTERACTION, 117 }, 70e0dac50fSopenharmony_ci { WindowType::WINDOW_TYPE_DRAGGING_EFFECT, 118 }, 71e0dac50fSopenharmony_ci { WindowType::WINDOW_TYPE_SYSTEM_TOAST, 119 }, 72e0dac50fSopenharmony_ci { WindowType::WINDOW_TYPE_POINTER, 120 }, 73e0dac50fSopenharmony_ci { WindowType::WINDOW_TYPE_BOOT_ANIMATION, 121 }, 74e0dac50fSopenharmony_ci { WindowType::WINDOW_TYPE_FREEZE_DISPLAY, 122 }, 75e0dac50fSopenharmony_ci }; 76e0dac50fSopenharmony_ci}; 77e0dac50fSopenharmony_ci} 78e0dac50fSopenharmony_ci} 79e0dac50fSopenharmony_ci#endif // OHOS_ROSEN_WINDOW_STATE_H 80