diff --git a/bundle.json b/bundle.json new file mode 100644 index 0000000000000000000000000000000000000000..48f8a822744ce91fdd62fd8ae99b0e5b0261d153 --- /dev/null +++ b/bundle.json @@ -0,0 +1,67 @@ +{ + "name": "@openharmony/window_manager", + "version": "3.1.0", + "description": "window_manager", + "author": {}, + "repository": "", + "license": "Apache License 2.0", + "component": { + "name": "window_manager", + "subsystem": "window", + "adapted_system_type": [ "standard" ], + "deps": { + "components": [ + ], + "third_party": [ + ] + }, + "build": { + "sub_component": [ + "//foundation/windowmanager/interfaces/kits/js/declaration:window", + "//foundation/windowmanager/sa_profile:wms_sa_profile", + "//foundation/windowmanager/adapter:libwmadapter", + "//foundation/windowmanager/dm:libdm", + "//foundation/windowmanager/wm:libwm", + "//foundation/windowmanager/wmserver:libwms", + "//foundation/windowmanager/wm:libwmutil", + "//foundation/windowmanager/interfaces/kits/napi:windowstage", + "//foundation/windowmanager/interfaces/kits/napi:napi_packages" + ], + "inner_kits": [ + { + "type": "so", + "name": "//foundation/windowmanager/wm:libwm", + "header": { + "header_files": [ + "window.h", + "window_life_cycle_interface.h", + "window_manager.h", + "window_option.h", + "window_scene.h", + "wm_common.h" + ], + "header_base": "//foundation/windowmanager/interfaces/innerkits/wm" + } + }, + { + "type": "so", + "name": "//foundation/windowmanager/dm:libdm", + "header": { + "header_files": [ + "display.h", + "display_manager.h", + "display_property.h", + "dm_common.h", + "screen.h", + "screen_group.h", + "screen_manager.h" + ], + "header_base": "//foundation/windowmanager/interfaces/innerkits/dm" + } + } + ], + "test": [ + ] + } + } + } diff --git a/dm/BUILD.gn b/dm/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..844da8ae4a61c1506b0d8bfb35f47511b3f8b469 --- /dev/null +++ b/dm/BUILD.gn @@ -0,0 +1,62 @@ +# Copyright (c) 2021 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/ohos.gni") + +config("libdm_private_config") { + visibility = [ ":*" ] + + include_dirs = [ + "include", + "../dmserver/include", + ] +} + +config("libdm_public_config") { + include_dirs = [ "../interfaces/innerkits/dm" ] +} + +## Build libdm.so +ohos_shared_library("libdm") { + sources = [ + "../dmserver/src/display_manager_proxy.cpp", + "src/display.cpp", + "src/display_manager.cpp", + "src/display_manager_adapter.cpp", + "src/screen.cpp", + "src/screen_group.cpp", + ] + + configs = [ ":libdm_private_config" ] + + public_configs = [ ":libdm_public_config" ] + + deps = [ + # RSSurface + "//foundation/distributedschedule/safwk/interfaces/innerkits/safwk:system_ability_fwk", + "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", + "//foundation/graphic/standard/rosen/modules/render_service_base:librender_service_base", + "//foundation/graphic/standard/rosen/modules/render_service_client:librender_service_client", + "//foundation/multimedia/image_standard/interfaces/innerkits:image_native", + "//foundation/windowmanager/wm:libwmutil", + "//utils/native/base:utils", + ] + + external_deps = [ + "hilog_native:libhilog", + "ipc:ipc_core", + ] + + part_name = "window_manager" + subsystem_name = "window" +} diff --git a/dm/include/display_manager_adapter.h b/dm/include/display_manager_adapter.h index eae13dbe5cb39d48872e58444ef068858e8958ae..a1e7490f110095e37649e6d1117e8e32db04e89c 100644 --- a/dm/include/display_manager_adapter.h +++ b/dm/include/display_manager_adapter.h @@ -21,7 +21,6 @@ #include "display.h" #include "display_manager_interface.h" -#include "single_instance.h" #include "singleton_delegator.h" namespace OHOS::Rosen { @@ -31,7 +30,7 @@ public: }; class DisplayManagerAdapter { -DECLARE_SINGLE_INSTANCE_BASE(DisplayManagerAdapter); +WM_DECLARE_SINGLE_INSTANCE_BASE(DisplayManagerAdapter); public: DisplayId GetDefaultDisplayId(); sptr GetDisplayById(DisplayId displayId); diff --git a/dm/src/display_manager_adapter.cpp b/dm/src/display_manager_adapter.cpp index 29cef8d7229ede3d32fc6f7623283450996e7ba9..28e246abf139e352386f29f0e6b6f71934f0af95 100644 --- a/dm/src/display_manager_adapter.cpp +++ b/dm/src/display_manager_adapter.cpp @@ -20,7 +20,6 @@ #include #include "window_manager_hilog.h" -#include "wm_common.h" namespace OHOS::Rosen { namespace { diff --git a/dm/src/screen_group.cpp b/dm/src/screen_group.cpp index e127d4c2bddf7d68301063b2f3497c73ff8d83e5..6b8ee375f32029ae14f6793c0fa03f6ada4f7018 100644 --- a/dm/src/screen_group.cpp +++ b/dm/src/screen_group.cpp @@ -15,8 +15,6 @@ #include "screen_group.h" -#include "wm_common.h" - namespace OHOS::Rosen { class ScreenGroup::Impl : public RefBase { friend class ScreenGroup; diff --git a/dmserver/include/abstract_display_controller.h b/dmserver/include/abstract_display_controller.h index f921657660d47be0dc2110ee2e00cb06ae28d982..67c8e535121347370ac74969ee2d681fb8089af6 100644 --- a/dmserver/include/abstract_display_controller.h +++ b/dmserver/include/abstract_display_controller.h @@ -21,13 +21,13 @@ #include #include "abstract_display.h" -#include "single_instance.h" +#include "wm_single_instance.h" #include "transaction/rs_interfaces.h" #include "virtual_display_info.h" namespace OHOS::Rosen { class AbstractDisplayController { -DECLARE_SINGLE_INSTANCE_BASE(AbstractDisplayController); +WM_DECLARE_SINGLE_INSTANCE_BASE(AbstractDisplayController); public: std::map> abstractDisplayMap_; diff --git a/dmserver/include/display_manager_service.h b/dmserver/include/display_manager_service.h index c8d652a9460b2a3165893ad77a81d18527bfcf2d..f1c17fa5f418d1c2c40982816b6aeced85c17af0 100644 --- a/dmserver/include/display_manager_service.h +++ b/dmserver/include/display_manager_service.h @@ -27,14 +27,14 @@ #include "abstract_screen_controller.h" #include "display_manager_stub.h" #include "display_power_controller.h" -#include "single_instance.h" +#include "wm_single_instance.h" #include "singleton_delegator.h" namespace OHOS::Rosen { class DisplayManagerService : public SystemAbility, public DisplayManagerStub { DECLARE_SYSTEM_ABILITY(DisplayManagerService); -DECLARE_SINGLE_INSTANCE_BASE(DisplayManagerService); +WM_DECLARE_SINGLE_INSTANCE_BASE(DisplayManagerService); public: void OnStart() override; diff --git a/dmserver/include/display_manager_service_inner.h b/dmserver/include/display_manager_service_inner.h index 9be2dbfbd9e852ec64f785572829961f711e05fc..092631c0b915c8a8413ca106752d096bce75d44d 100644 --- a/dmserver/include/display_manager_service_inner.h +++ b/dmserver/include/display_manager_service_inner.h @@ -20,12 +20,12 @@ #include #include "abstract_display.h" -#include "single_instance.h" +#include "wm_single_instance.h" #include "singleton_delegator.h" namespace OHOS::Rosen { class DisplayManagerServiceInner { -DECLARE_SINGLE_INSTANCE(DisplayManagerServiceInner); +WM_DECLARE_SINGLE_INSTANCE(DisplayManagerServiceInner); public: std::vector> GetAllDisplays(); diff --git a/dmserver/include/rs_adapter.h b/dmserver/include/rs_adapter.h index 9f19e344c929afbdb13a1e3f866dfb29d07ecf13..307d054dbbc3ef891de72a8cadc11b37d02ca474 100644 --- a/dmserver/include/rs_adapter.h +++ b/dmserver/include/rs_adapter.h @@ -21,7 +21,7 @@ #include -#include "single_instance.h" +#include "wm_single_instance.h" namespace OHOS::Rosen { class DMSDeathRecipient : public IRemoteObject::DeathRecipient { @@ -32,7 +32,7 @@ private: }; class RsAdapter : public RefBase { - DECLARE_SINGLE_INSTANCE_BASE(RsAdapter); + WM_DECLARE_SINGLE_INSTANCE_BASE(RsAdapter); public: void Clear(); private: diff --git a/interfaces/innerkits/dm/display_manager.h b/interfaces/innerkits/dm/display_manager.h index 97ed134f2f99f1d7ea8393a9f31839bbfe968cbb..7ad77df09c7f6303cc6425f7e76bef4c448938fd 100644 --- a/interfaces/innerkits/dm/display_manager.h +++ b/interfaces/innerkits/dm/display_manager.h @@ -22,7 +22,7 @@ #include "display.h" #include "dm_common.h" -#include "single_instance.h" +#include "wm_single_instance.h" #include "virtual_display_info.h" // #include "wm_common.h" @@ -31,7 +31,7 @@ namespace OHOS::Rosen { class DisplayManagerAdapter; class DisplayManager { -DECLARE_SINGLE_INSTANCE(DisplayManager); +WM_DECLARE_SINGLE_INSTANCE(DisplayManager); public: std::vector> GetAllDisplays(); diff --git a/interfaces/innerkits/dm/screen_manager.h b/interfaces/innerkits/dm/screen_manager.h index e6302b5d3a39b7da0254b68d1f0bf1c66678609b..ece342b83658a400dd390667b421ae8393a60481 100644 --- a/interfaces/innerkits/dm/screen_manager.h +++ b/interfaces/innerkits/dm/screen_manager.h @@ -19,7 +19,7 @@ #include #include "screen.h" #include "screen_group.h" -#include "single_instance.h" +#include "wm_single_instance.h" namespace OHOS::Rosen { class IScreenChangeListener : public RefBase { @@ -30,7 +30,7 @@ public: }; class ScreenManager : public RefBase { -DECLARE_SINGLE_INSTANCE_BASE(ScreenManager); +WM_DECLARE_SINGLE_INSTANCE_BASE(ScreenManager); public: sptr GetScreenById(ScreenId id); std::vector> GetAllScreens(); diff --git a/interfaces/innerkits/wm/window_manager.h b/interfaces/innerkits/wm/window_manager.h index ed99cd5a9813c03676d407bd5464f82d0630f324..8572d2fb64cbc1cf38fb664e58956937b3b4237d 100644 --- a/interfaces/innerkits/wm/window_manager.h +++ b/interfaces/innerkits/wm/window_manager.h @@ -20,7 +20,7 @@ #include #include #include -#include "singleton_delegator.h" +#include "wm_single_instance.h" #include "wm_common.h" namespace OHOS { @@ -35,7 +35,7 @@ public: }; class WindowManager : public RefBase { -DECLARE_SINGLE_INSTANCE_BASE(WindowManager); +WM_DECLARE_SINGLE_INSTANCE_BASE(WindowManager); friend class WindowManagerAgent; public: void RegisterFocusChangedListener(const sptr& listener); diff --git a/ohos.build b/ohos.build deleted file mode 100644 index 0887e15a4f8e0fc97abaf62048a9b953a55edb95..0000000000000000000000000000000000000000 --- a/ohos.build +++ /dev/null @@ -1,21 +0,0 @@ -{ - "subsystem": "window", - "parts": { - "window_manager": { - "module_list": [ - "//foundation/windowmanager/interfaces/kits/js/declaration:window", - "//foundation/windowmanager/sa_profile:wms_sa_profile", - "//foundation/windowmanager/adapter:libwmadapter", - "//foundation/windowmanager/wm:libwm", - "//foundation/windowmanager/wmserver:libwms", - "//foundation/windowmanager/wm:libwmutil", - - "//foundation/windowmanager/interfaces/kits/napi:windowstage", - "//foundation/windowmanager/interfaces/kits/napi:napi_packages" - ], - - "test_list": [ - ] - } - } -} diff --git a/utils/include/singleton_container.h b/utils/include/singleton_container.h index 106ebd3033ccb41b10a4e9d2e27946c01194cc05..e0888b6eb97b33908e7019f7793d603d32856acf 100644 --- a/utils/include/singleton_container.h +++ b/utils/include/singleton_container.h @@ -22,11 +22,11 @@ #include #include -#include "single_instance.h" +#include "wm_single_instance.h" namespace OHOS { namespace Rosen { class SingletonContainer { -DECLARE_SINGLE_INSTANCE_BASE(SingletonContainer); +WM_DECLARE_SINGLE_INSTANCE_BASE(SingletonContainer); public: void AddSingleton(const std::string& name, void* instance); diff --git a/utils/include/single_instance.h b/utils/include/wm_single_instance.h similarity index 79% rename from utils/include/single_instance.h rename to utils/include/wm_single_instance.h index 9c675b66db62c2e370c79018ca1955ab7db75eed..d5f0e3abdc4f4e71e8050883e776662bbafe2fbd 100644 --- a/utils/include/single_instance.h +++ b/utils/include/wm_single_instance.h @@ -13,11 +13,11 @@ * limitations under the License. */ -#ifndef OHOS_SINGLE_INSTANCE_H -#define OHOS_SINGLE_INSTANCE_H +#ifndef OHOS_WM_SINGLE_INSTANCE_H +#define OHOS_WM_SINGLE_INSTANCE_H namespace OHOS { namespace Rosen { -#define DECLARE_SINGLE_INSTANCE_BASE(className) \ +#define WM_DECLARE_SINGLE_INSTANCE_BASE(className) \ public: \ static className& GetInstance() \ { \ @@ -27,13 +27,14 @@ public: \ className(const className&) = delete; \ className& operator= (const className&) = delete; \ className(className&&) = delete; \ - className& operator= (className&&) = delete; + className& operator= (className&&) = delete; \ -#define DECLARE_SINGLE_INSTANCE(className) \ - DECLARE_SINGLE_INSTANCE_BASE(className) \ +#define WM_DECLARE_SINGLE_INSTANCE(className) \ + WM_DECLARE_SINGLE_INSTANCE_BASE(className) \ protected: \ className() = default; \ - virtual ~className() = default; + virtual ~className() = default; \ + } // namespace OHOS } #endif // OHOS_SINGLE_INSTANCE_H diff --git a/wm/BUILD.gn b/wm/BUILD.gn index ea06f26e4c1d5e1a040eccff1b817e03b080ae42..140ec1acfc082179d15265c8bc6d9530c12931e2 100644 --- a/wm/BUILD.gn +++ b/wm/BUILD.gn @@ -59,39 +59,42 @@ config("libwm_public_config") { ] } +config("libwm_public_config_test") { + include_dirs = [ "//foundation/windowmanager/interfaces/innerkits" ] +} + +config("libwmutil_private_config") { + include_dirs = [ + "include", + "//foundation/windowmanager/dmserver/include", + "../interfaces/innerkits/dm", + "../interfaces/innerkits/wm", + ] +} + +config("libwmutil_public_config") { + include_dirs = [ "//foundation/windowmanager/utils/include" ] +} + ## Build libwmutil.so ohos_shared_library("libwmutil") { sources = [ "../dmserver/src/display_info.cpp", "../dmserver/src/virtual_display_info.cpp", + "../utils/src/singleton_container.cpp", "../utils/src/wm_trace.cpp", - "//foundation/windowmanager/dmserver/src/display_manager_proxy.cpp", - "//foundation/windowmanager/utils/src/singleton_container.cpp", - "//foundation/windowmanager/wm/src/window_proxy.cpp", - "//foundation/windowmanager/wmserver/src/window_manager_proxy.cpp", "src/window_property.cpp", ] - configs = [ ":libwm_config" ] + configs = [ ":libwmutil_private_config" ] - public_configs = [ ":libwm_public_config" ] + public_configs = [ ":libwmutil_public_config" ] - deps = [ - "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", - "//utils/native/base:utils", - ] - - public_deps = [ - # RSSurface - "//foundation/appexecfwk/standard/interfaces/innerkits/appexecfwk_core:appexecfwk_core", - "//foundation/graphic/standard:libsurface", - "//foundation/graphic/standard/rosen/modules/render_service_base:librender_service_base", - "//foundation/graphic/standard/rosen/modules/render_service_client:librender_service_client", - "//foundation/multimedia/image_standard/interfaces/innerkits:image_native", - ] + deps = [ "//utils/native/base:utils" ] external_deps = [ "bytrace_standard:bytrace_core", + "hilog_native:libhilog", "ipc:ipc_core", ] @@ -106,8 +109,10 @@ ohos_shared_library("libwm") { "../dm/src/display_manager.cpp", "../dm/src/display_manager_adapter.cpp", "../dm/src/screen.cpp", - "../utils/src/static_call.cpp", + "../dmserver/src/display_manager_proxy.cpp", + "../wmserver/src/window_manager_proxy.cpp", "src/input_transfer_station.cpp", + "src/static_call.cpp", "src/vsync_station.cpp", "src/window.cpp", "src/window_adapter.cpp", @@ -131,6 +136,7 @@ ohos_shared_library("libwm") { "//foundation/distributedschedule/safwk/interfaces/innerkits/safwk:system_ability_fwk", "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy", "//foundation/multimedia/image_standard/interfaces/innerkits:image_native", + "//foundation/windowmanager/wm:libwmutil", "//utils/native/base:utils", # weston adapter @@ -138,6 +144,9 @@ ohos_shared_library("libwm") { # ace "//foundation/ace/ace_engine/interfaces/innerkits/ace:ace_uicontent", + "//foundation/appexecfwk/standard/interfaces/innerkits/appexecfwk_core:appexecfwk_core", + "//foundation/graphic/standard:libsurface", + "//foundation/multimedia/image_standard/interfaces/innerkits:image_native", ] public_deps = [ @@ -157,7 +166,6 @@ ohos_shared_library("libwm") { # weston adapter "//foundation/windowmanager/adapter:libwmadapter", - "//foundation/windowmanager/wm:libwmutil", ] external_deps = [ diff --git a/wm/include/input_transfer_station.h b/wm/include/input_transfer_station.h index 2e1335c3019ace1a56efbc1d28a9e6b987f1f537..a5255ece00907bf35ea68d0c694c1a9e81d2c1fe 100644 --- a/wm/include/input_transfer_station.h +++ b/wm/include/input_transfer_station.h @@ -16,12 +16,11 @@ #ifndef OHOS_INPUT_TRANSFER_STATION #define OHOS_INPUT_TRANSFER_STATION - -#include #include "input_manager.h" #include "pointer_event.h" #include "window.h" #include "window_input_channel.h" +#include "wm_single_instance.h" #include "vsync_station.h" namespace OHOS { @@ -29,7 +28,7 @@ namespace Rosen { class InputEventListener; class InputTransferStation { -DECLARE_SINGLE_INSTANCE(InputTransferStation); +WM_DECLARE_SINGLE_INSTANCE(InputTransferStation); friend class InputEventListener; public: void AddInputWindow(const sptr& window); diff --git a/utils/include/static_call.h b/wm/include/static_call.h similarity index 91% rename from utils/include/static_call.h rename to wm/include/static_call.h index adf68eefb231f20a8945e5596a3639565e46b01b..fae17a46e097a76129fc4a99ace90ecafdba8794 100644 --- a/utils/include/static_call.h +++ b/wm/include/static_call.h @@ -18,13 +18,13 @@ #include #include "singleton_delegator.h" -#include "single_instance.h" +#include "wm_single_instance.h" #include "window.h" #include "window_option.h" namespace OHOS { namespace Rosen { class StaticCall { -DECLARE_SINGLE_INSTANCE_BASE(StaticCall); +WM_DECLARE_SINGLE_INSTANCE_BASE(StaticCall); public: virtual sptr CreateWindow(const std::string& windowName, sptr& option, std::shared_ptr abilityContext = nullptr); diff --git a/wm/include/vsync_station.h b/wm/include/vsync_station.h index 4fe4720771ec6edd6dfb1137b20f88706b7e76f5..9bbe01285c03db1b6748abcc8fb3d7d3a372fa0d 100644 --- a/wm/include/vsync_station.h +++ b/wm/include/vsync_station.h @@ -25,12 +25,12 @@ #include #include -#include "single_instance.h" +#include "wm_single_instance.h" namespace OHOS { namespace Rosen { class VsyncStation { -DECLARE_SINGLE_INSTANCE_BASE(VsyncStation); +WM_DECLARE_SINGLE_INSTANCE_BASE(VsyncStation); using OnCallback = std::function; public: enum class CallbackType { diff --git a/wm/include/window_adapter.h b/wm/include/window_adapter.h index d92b87806bb5ddf433aff1ae05c9f2f9284de2d4..836a7cae21d76a50661ac6110193ae23dc531555 100644 --- a/wm/include/window_adapter.h +++ b/wm/include/window_adapter.h @@ -20,8 +20,8 @@ #include #include "window.h" -#include "window_proxy.h" -#include "single_instance.h" +#include "window_interface.h" +#include "wm_single_instance.h" #include "singleton_delegator.h" #include "window_property.h" #include "window_manager_interface.h" @@ -33,7 +33,7 @@ public: }; class WindowAdapter { -DECLARE_SINGLE_INSTANCE(WindowAdapter); +WM_DECLARE_SINGLE_INSTANCE(WindowAdapter); public: virtual WMError CreateWindow(sptr& window, sptr& windowProperty, std::shared_ptr surfaceNode, uint32_t& windowId); diff --git a/utils/src/static_call.cpp b/wm/src/static_call.cpp similarity index 100% rename from utils/src/static_call.cpp rename to wm/src/static_call.cpp diff --git a/wmserver/BUILD.gn b/wmserver/BUILD.gn index bc675b2b31a165ef16a78ceb7918a86fc74827ff..8ab932dfd2c752c3a10040ac160b36045309d787 100644 --- a/wmserver/BUILD.gn +++ b/wmserver/BUILD.gn @@ -40,6 +40,7 @@ ohos_shared_library("libwms") { "../dmserver/src/display_manager_stub.cpp", "../dmserver/src/display_node_control.cpp", "../dmserver/src/display_power_controller.cpp", + "../wm/src/window_proxy.cpp", "../wm/src/zidl/window_manager_agent_proxy.cpp", "src/input_window_monitor.cpp", "src/window_controller.cpp", diff --git a/wmserver/include/window_manager_service.h b/wmserver/include/window_manager_service.h index 2cee42de12eaa89f08936248270da22edce82eea..5e4dcf79bd8c2879878cbf23dfa45e32d2df0c21 100644 --- a/wmserver/include/window_manager_service.h +++ b/wmserver/include/window_manager_service.h @@ -23,7 +23,7 @@ #include #include #include "singleton_delegator.h" -#include "single_instance.h" +#include "wm_single_instance.h" #include "window_controller.h" #include "window_manager_stub.h" #include "window_root.h" @@ -33,7 +33,7 @@ namespace Rosen { class WindowManagerService : public SystemAbility, public WindowManagerStub { DECLARE_SYSTEM_ABILITY(WindowManagerService); -DECLARE_SINGLE_INSTANCE_BASE(WindowManagerService); +WM_DECLARE_SINGLE_INSTANCE_BASE(WindowManagerService); public: void OnStart() override; diff --git a/wmserver/include/window_manager_service_inner.h b/wmserver/include/window_manager_service_inner.h index 8eab81f7c7df509d39cd84baf5bca65c849759f4..f1050ab155cc1d5164541e15b513ebfe2f937f66 100644 --- a/wmserver/include/window_manager_service_inner.h +++ b/wmserver/include/window_manager_service_inner.h @@ -16,12 +16,12 @@ #ifndef OHOS_WINDOW_MANAGER_SERVICE_INNER_H #define OHOS_WINDOW_MANAGER_SERVICE_INNER_H -#include "single_instance.h" +#include "wm_single_instance.h" namespace OHOS { namespace Rosen { class WindowManagerServiceInner { -DECLARE_SINGLE_INSTANCE(WindowManagerServiceInner) +WM_DECLARE_SINGLE_INSTANCE(WindowManagerServiceInner) public: bool NotifyDisplaySuspend(); void RestoreSuspendedWindows();