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