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