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 #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 WINDOW_MANAGER_AGENT_TYPE_CAMERA_FLOAT, 31 }; 32 33 class IWindowManagerAgent : public IRemoteBroker { 34 public: 35 DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.IWindowManagerAgent"); 36 37 enum class WindowManagerAgentMsg : uint32_t { 38 TRANS_ID_UPDATE_FOCUS = 1, 39 TRANS_ID_UPDATE_SYSTEM_BAR_PROPS, 40 TRANS_ID_UPDATE_WINDOW_STATUS, 41 TRANS_ID_UPDATE_WINDOW_VISIBILITY, 42 TRANS_ID_UPDATE_CAMERA_FLOAT, 43 }; 44 45 virtual void UpdateFocusChangeInfo(const sptr<FocusChangeInfo>& focusChangeInfo, bool focused) = 0; 46 virtual void UpdateSystemBarRegionTints(DisplayId displayId, const SystemBarRegionTints& tints) = 0; 47 virtual void NotifyAccessibilityWindowInfo(const std::vector<sptr<AccessibilityWindowInfo>>& infos, 48 WindowUpdateType type) = 0; 49 virtual void UpdateWindowVisibilityInfo(const std::vector<sptr<WindowVisibilityInfo>>& visibilityInfos) = 0; 50 virtual void UpdateCameraFloatWindowStatus(uint32_t accessTokenId, bool isShowing) = 0; 51 }; 52 } // namespace Rosen 53 } // namespace OHOS 54 #endif // OHOS_WINDOW_MANAGER_AGENT_INTERFACE_H 55