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
UpdateCameraFloatWindowStatus(uint32_t accessTokenId,bool isShowing)44 void WindowManagerAgent::UpdateCameraFloatWindowStatus(uint32_t accessTokenId, bool isShowing)
45 {
46 SingletonContainer::Get<WindowManager>().UpdateCameraFloatWindowStatus(accessTokenId, isShowing);
47 }
48
NotifyWaterMarkFlagChangedResult(bool showWaterMark)49 void WindowManagerAgent::NotifyWaterMarkFlagChangedResult(bool showWaterMark)
50 {
51 SingletonContainer::Get<WindowManager>().NotifyWaterMarkFlagChangedResult(showWaterMark);
52 }
53
NotifyGestureNavigationEnabledResult(bool enable)54 void WindowManagerAgent::NotifyGestureNavigationEnabledResult(bool enable)
55 {
56 SingletonContainer::Get<WindowManager>().NotifyGestureNavigationEnabledResult(enable);
57 }
58 } // namespace Rosen
59 } // namespace OHOS
60