1
2 /*
3 * Copyright (c) 2024 Huawei Device Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 #include "window_manager_agent_lite.h"
18 #include "foundation/window/window_manager/interfaces/innerkits/wm/window_manager_lite.h"
19 #include "singleton_container.h"
20 #include "wm_common.h"
21
22 namespace OHOS {
23 namespace Rosen {
UpdateFocusChangeInfo(const sptr<FocusChangeInfo> & focusChangeInfo,bool focused)24 void WindowManagerAgentLite::UpdateFocusChangeInfo(const sptr<FocusChangeInfo>& focusChangeInfo, bool focused)
25 {
26 SingletonContainer::Get<WindowManagerLite>().UpdateFocusChangeInfo(focusChangeInfo, focused);
27 }
28
UpdateWindowVisibilityInfo(const std::vector<sptr<WindowVisibilityInfo>> & visibilityInfos)29 void WindowManagerAgentLite::UpdateWindowVisibilityInfo(const std::vector<sptr<WindowVisibilityInfo>>& visibilityInfos)
30 {
31 SingletonContainer::Get<WindowManagerLite>().UpdateWindowVisibilityInfo(visibilityInfos);
32 }
33
UpdateWindowDrawingContentInfo(const std::vector<sptr<WindowDrawingContentInfo>> & windowDrawingContentInfos)34 void WindowManagerAgentLite::UpdateWindowDrawingContentInfo(
35 const std::vector<sptr<WindowDrawingContentInfo>>& windowDrawingContentInfos)
36 {
37 SingletonContainer::Get<WindowManagerLite>().UpdateWindowDrawingContentInfo(windowDrawingContentInfos);
38 }
39
UpdateWindowModeTypeInfo(WindowModeType type)40 void WindowManagerAgentLite::UpdateWindowModeTypeInfo(WindowModeType type)
41 {
42 SingletonContainer::Get<WindowManagerLite>().UpdateWindowModeTypeInfo(type);
43 }
44
UpdateCameraWindowStatus(uint32_t accessTokenId,bool isShowing)45 void WindowManagerAgentLite::UpdateCameraWindowStatus(uint32_t accessTokenId, bool isShowing)
46 {
47 SingletonContainer::Get<WindowManagerLite>().UpdateCameraWindowStatus(accessTokenId, isShowing);
48 }
49
NotifyWindowStyleChange(WindowStyleType type)50 void WindowManagerAgentLite::NotifyWindowStyleChange(WindowStyleType type)
51 {
52 SingletonContainer::Get<WindowManagerLite>().NotifyWindowStyleChange(type);
53 }
54
NotifyAccessibilityWindowInfo(const std::vector<sptr<AccessibilityWindowInfo>> & infos,WindowUpdateType type)55 void WindowManagerAgentLite::NotifyAccessibilityWindowInfo(const std::vector<sptr<AccessibilityWindowInfo>>& infos,
56 WindowUpdateType type)
57 {
58 SingletonContainer::Get<WindowManagerLite>().NotifyAccessibilityWindowInfo(infos, type);
59 }
60
UpdatePiPWindowStateChanged(const std::string & bundleName,bool isForeground)61 void WindowManagerAgentLite::UpdatePiPWindowStateChanged(const std::string& bundleName, bool isForeground)
62 {
63 SingletonContainer::Get<WindowManagerLite>().UpdatePiPWindowStateChanged(bundleName, isForeground);
64 }
65 } // namespace Rosen
66 } // namespace OHOS
67