• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 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 #ifndef OHOS_WINDOW_MANAGER_AGENT_INTERFACE_H
17 #define OHOS_WINDOW_MANAGER_AGENT_INTERFACE_H
18 
19 #include <iremote_broker.h>
20 #include "wm_common.h"
21 #include "window_manager.h"
22 
23 namespace OHOS {
24 namespace Rosen {
25 enum class WindowManagerAgentType : uint32_t {
26     WINDOW_MANAGER_AGENT_TYPE_FOCUS,
27     WINDOW_MANAGER_AGENT_TYPE_SYSTEM_BAR,
28     WINDOW_MANAGER_AGENT_TYPE_WINDOW_UPDATE,
29     WINDOW_MANAGER_AGENT_TYPE_WINDOW_VISIBILITY,
30 };
31 
32 class IWindowManagerAgent : public IRemoteBroker {
33 public:
34     DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.IWindowManagerAgent");
35 
36     enum {
37         TRANS_ID_UPDATE_FOCUS  = 1,
38         TRANS_ID_UPDATE_SYSTEM_BAR_PROPS,
39         TRANS_ID_UPDATE_WINDOW_STATUS,
40         TRANS_ID_UPDATE_WINDOW_VISIBILITY,
41     };
42 
43     virtual void UpdateFocusChangeInfo(const sptr<FocusChangeInfo>& focusChangeInfo, bool focused) = 0;
44     virtual void UpdateSystemBarRegionTints(DisplayId displayId, const SystemBarRegionTints& tints) = 0;
45     virtual void NotifyAccessibilityWindowInfo(const sptr<AccessibilityWindowInfo>& windowInfo,
46         WindowUpdateType type) = 0;
47     virtual void UpdateWindowVisibilityInfo(const std::vector<sptr<WindowVisibilityInfo>>& visibilityInfos) = 0;
48 };
49 } // namespace Rosen
50 } // namespace OHOS
51 #endif // OHOS_WINDOW_MANAGER_AGENT_INTERFACE_H
52