1e0dac50fSopenharmony_ci/*
2e0dac50fSopenharmony_ci * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
3e0dac50fSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4e0dac50fSopenharmony_ci * you may not use this file except in compliance with the License.
5e0dac50fSopenharmony_ci * You may obtain a copy of the License at
6e0dac50fSopenharmony_ci *
7e0dac50fSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8e0dac50fSopenharmony_ci *
9e0dac50fSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10e0dac50fSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11e0dac50fSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12e0dac50fSopenharmony_ci * See the License for the specific language governing permissions and
13e0dac50fSopenharmony_ci * limitations under the License.
14e0dac50fSopenharmony_ci */
15e0dac50fSopenharmony_ci
16e0dac50fSopenharmony_ci#ifndef OHOS_ROSEN_WINDOW_MANAGER_AGENT_CONTROLLER_H
17e0dac50fSopenharmony_ci#define OHOS_ROSEN_WINDOW_MANAGER_AGENT_CONTROLLER_H
18e0dac50fSopenharmony_ci
19e0dac50fSopenharmony_ci#include <mutex>
20e0dac50fSopenharmony_ci#include "client_agent_container.h"
21e0dac50fSopenharmony_ci#include "wm_single_instance.h"
22e0dac50fSopenharmony_ci#include "zidl/window_manager_agent_interface.h"
23e0dac50fSopenharmony_ci
24e0dac50fSopenharmony_cinamespace OHOS {
25e0dac50fSopenharmony_cinamespace Rosen {
26e0dac50fSopenharmony_ciclass WindowManagerAgentController {
27e0dac50fSopenharmony_ciWM_DECLARE_SINGLE_INSTANCE_BASE(WindowManagerAgentController)
28e0dac50fSopenharmony_cipublic:
29e0dac50fSopenharmony_ci    WMError RegisterWindowManagerAgent(const sptr<IWindowManagerAgent>& windowManagerAgent,
30e0dac50fSopenharmony_ci        WindowManagerAgentType type);
31e0dac50fSopenharmony_ci    WMError UnregisterWindowManagerAgent(const sptr<IWindowManagerAgent>& windowManagerAgent,
32e0dac50fSopenharmony_ci        WindowManagerAgentType type);
33e0dac50fSopenharmony_ci
34e0dac50fSopenharmony_ci    void UpdateFocusChangeInfo(const sptr<FocusChangeInfo>& focusChangeInfo, bool focused);
35e0dac50fSopenharmony_ci    void UpdateWindowModeTypeInfo(WindowModeType type);
36e0dac50fSopenharmony_ci    void UpdateSystemBarRegionTints(DisplayId displayId, const SystemBarRegionTints& tints);
37e0dac50fSopenharmony_ci    void NotifyAccessibilityWindowInfo(const std::vector<sptr<AccessibilityWindowInfo>>& infos, WindowUpdateType type);
38e0dac50fSopenharmony_ci    void UpdateWindowVisibilityInfo(const std::vector<sptr<WindowVisibilityInfo>>& windowVisibilityInfos);
39e0dac50fSopenharmony_ci    void UpdateCameraFloatWindowStatus(uint32_t accessTokenId, bool isShowing);
40e0dac50fSopenharmony_ci    void NotifyWaterMarkFlagChangedResult(bool showWaterMark);
41e0dac50fSopenharmony_ci    void NotifyGestureNavigationEnabledResult(bool enable);
42e0dac50fSopenharmony_ci    void UpdatePiPWindowStateChanged(const std::string& bundleName, bool isForeground);
43e0dac50fSopenharmony_ci
44e0dac50fSopenharmony_ciprivate:
45e0dac50fSopenharmony_ci    WindowManagerAgentController() {}
46e0dac50fSopenharmony_ci    virtual ~WindowManagerAgentController() = default;
47e0dac50fSopenharmony_ci
48e0dac50fSopenharmony_ci    ClientAgentContainer<IWindowManagerAgent, WindowManagerAgentType> wmAgentContainer_;
49e0dac50fSopenharmony_ci};
50e0dac50fSopenharmony_ci}
51e0dac50fSopenharmony_ci}
52e0dac50fSopenharmony_ci#endif // OHOS_ROSEN_WINDOW_MANAGER_AGENT_CONTROLLER_H
53