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_INTERFACE_H 17 #define OHOS_WINDOW_MANAGER_INTERFACE_H 18 19 #include <iremote_broker.h> 20 #include <rs_iwindow_animation_finished_callback.h> 21 22 #include "common/include/window_session_property.h" 23 #include "interfaces/include/ws_common_inner.h" 24 #include "pixel_map.h" 25 #include "session/container/include/zidl/session_stage_interface.h" 26 #include "session/container/include/zidl/window_event_channel_interface.h" 27 #include "window_property.h" 28 #include "window_transition_info.h" 29 #include "mission_snapshot.h" 30 #include "zidl/window_interface.h" 31 #include "zidl/window_manager_agent_interface.h" 32 #include "interfaces/include/ws_common.h" 33 34 namespace OHOS { 35 namespace Rosen { 36 class RSIWindowAnimationController; 37 class RSSurfaceNode; 38 class IUIEffectController; 39 class IUIEffectControllerClient; 40 41 class IWindowManager : public IRemoteBroker { 42 public: 43 DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.IWindowManager"); 44 45 enum class WindowManagerMessage : uint32_t { 46 TRANS_ID_CREATE_WINDOW, 47 TRANS_ID_ADD_WINDOW, 48 TRANS_ID_REMOVE_WINDOW, 49 TRANS_ID_DESTROY_WINDOW, 50 TRANS_ID_REQUEST_FOCUS, 51 TRANS_ID_REGISTER_FOCUS_CHANGED_LISTENER, 52 TRANS_ID_UNREGISTER_FOCUS_CHANGED_LISTENER, 53 TRANS_ID_REGISTER_WINDOW_MANAGER_AGENT, 54 TRANS_ID_UNREGISTER_WINDOW_MANAGER_AGENT, 55 TRANS_ID_GET_AVOID_AREA, 56 TRANS_ID_GET_TOP_WINDOW_ID, 57 TRANS_ID_PROCESS_POINT_DOWN, 58 TRANS_ID_PROCESS_POINT_UP, 59 TRANS_ID_MINIMIZE_ALL_APP_WINDOWS, 60 TRANS_ID_TOGGLE_SHOWN_STATE_FOR_ALL_APP_WINDOWS, 61 TRANS_ID_SET_BACKGROUND_BLUR, 62 TRANS_ID_SET_ALPHA, 63 TRANS_ID_UPDATE_LAYOUT_MODE, 64 TRANS_ID_NOTIFY_SCREEN_SHOT_EVENT, 65 TRANS_ID_UPDATE_PROPERTY, 66 TRANS_ID_GET_ACCESSIBILITY_WINDOW_INFO_ID, 67 TRANS_ID_LIST_WINDOW_INFO, 68 TRANS_ID_GET_WINDOW_LAYOUT_INFO, 69 TRANS_ID_GET_GLOBAL_WINDOW_MODE, 70 TRANS_ID_GET_TOP_NAV_DEST_NAME, 71 TRANS_ID_GET_VISIBILITY_WINDOW_INFO_ID, 72 TRANS_ID_ANIMATION_SET_CONTROLLER, 73 TRANS_ID_GET_SYSTEM_CONFIG, 74 TRANS_ID_NOTIFY_WINDOW_TRANSITION, 75 TRANS_ID_GET_FULLSCREEN_AND_SPLIT_HOT_ZONE, 76 TRANS_ID_GET_ANIMATION_CALLBACK, 77 TRANS_ID_UPDATE_AVOIDAREA_LISTENER, 78 TRANS_ID_UPDATE_RS_TREE, 79 TRANS_ID_BIND_DIALOG_TARGET, 80 TRANS_ID_NOTIFY_READY_MOVE_OR_DRAG, 81 TRANS_ID_SET_ANCHOR_AND_SCALE, 82 TRANS_ID_SET_ANCHOR_OFFSET, 83 TRANS_ID_OFF_WINDOW_ZOOM, 84 TRANS_ID_RAISE_WINDOW_Z_ORDER, 85 TRANS_ID_GET_SNAPSHOT, 86 TRANS_ID_GESTURE_NAVIGATION_ENABLED, 87 TRANS_ID_SET_WINDOW_GRAVITY, 88 TRANS_ID_DISPATCH_KEY_EVENT, 89 TRANS_ID_NOTIFY_DUMP_INFO_RESULT, 90 TRANS_ID_GET_WINDOW_ANIMATION_TARGETS, 91 TRANS_ID_SET_MAXIMIZE_MODE, 92 TRANS_ID_GET_MAXIMIZE_MODE, 93 TRANS_ID_GET_FOCUS_WINDOW_INFO, 94 TRANS_ID_ADD_EXTENSION_WINDOW_STAGE_TO_SCB, 95 TRANS_ID_UPDATE_MODALEXTENSION_RECT_TO_SCB, 96 TRANS_ID_PROCESS_MODALEXTENSION_POINTDOWN_TO_SCB, 97 TRANS_ID_UPDATE_EXTENSION_WINDOW_FLAGS, 98 TRANS_ID_GET_HOST_WINDOW_RECT, 99 TRANS_ID_GET_UNRELIABLE_WINDOW_INFO_ID, 100 TRANS_ID_GET_FREE_MULTI_WINDOW_ENABLE_STATE, 101 TRANS_ID_SET_IMAGE_FOR_RECENT, 102 }; 103 virtual WMError CreateWindow(sptr<IWindow>& window, sptr<WindowProperty>& property, 104 const std::shared_ptr<RSSurfaceNode>& surfaceNode, 105 uint32_t& windowId, sptr<IRemoteObject> token) = 0; 106 virtual WMError AddWindow(sptr<WindowProperty>& property) = 0; 107 virtual WMError RemoveWindow(uint32_t windowId, bool isFromInnerkits) = 0; 108 virtual WMError DestroyWindow(uint32_t windowId, bool onlySelf = false) = 0; 109 virtual WMError RequestFocus(uint32_t windowId) = 0; 110 virtual AvoidArea GetAvoidAreaByType(uint32_t windowId, AvoidAreaType type, 111 const Rect& rect = Rect::EMPTY_RECT) = 0; 112 virtual WMError GetTopWindowId(uint32_t mainWinId, uint32_t& topWinId) = 0; 113 virtual void NotifyServerReadyToMoveOrDrag(uint32_t windowId, sptr<WindowProperty>& windowProperty, 114 sptr<MoveDragProperty>& moveDragProperty) = 0; 115 virtual void ProcessPointDown(uint32_t windowId, bool isPointDown) = 0; 116 virtual void ProcessPointUp(uint32_t windowId) = 0; 117 virtual WMError MinimizeAllAppWindows(DisplayId displayId) = 0; 118 virtual WMError ToggleShownStateForAllAppWindows() = 0; 119 virtual WMError SetWindowLayoutMode(WindowLayoutMode mode) = 0; 120 virtual WMError NotifyScreenshotEvent(ScreenshotEventType type) = 0; 121 virtual WMError UpdateProperty(sptr<WindowProperty>& windowProperty, PropertyChangeAction action, 122 bool isAsyncTask = false) = 0; 123 virtual WMError SetWindowGravity(uint32_t windowId, WindowGravity gravity, uint32_t percent) = 0; 124 virtual WMError RegisterWindowManagerAgent(WindowManagerAgentType type, 125 const sptr<IWindowManagerAgent>& windowManagerAgent) = 0; 126 virtual WMError UnregisterWindowManagerAgent(WindowManagerAgentType type, 127 const sptr<IWindowManagerAgent>& windowManagerAgent) = 0; RegisterWindowPropertyChangeAgent(WindowInfoKey windowInfoKey,uint32_t interestInfo,const sptr<IWindowManagerAgent> & windowManagerAgent)128 virtual WMError RegisterWindowPropertyChangeAgent(WindowInfoKey windowInfoKey, uint32_t interestInfo, 129 const sptr<IWindowManagerAgent>& windowManagerAgent) { return WMError::WM_ERROR_DEVICE_NOT_SUPPORT; } UnregisterWindowPropertyChangeAgent(WindowInfoKey windowInfoKey,uint32_t interestInfo,const sptr<IWindowManagerAgent> & windowManagerAgent)130 virtual WMError UnregisterWindowPropertyChangeAgent(WindowInfoKey windowInfoKey, uint32_t interestInfo, 131 const sptr<IWindowManagerAgent>& windowManagerAgent) { return WMError::WM_ERROR_DEVICE_NOT_SUPPORT; } RecoverWindowPropertyChangeFlag(uint32_t observedFlags,uint32_t interestedFlags)132 virtual WMError RecoverWindowPropertyChangeFlag(uint32_t observedFlags, uint32_t interestedFlags) 133 { 134 return WMError::WM_ERROR_DEVICE_NOT_SUPPORT; 135 } 136 virtual WMError GetAccessibilityWindowInfo(std::vector<sptr<AccessibilityWindowInfo>>& infos) = 0; 137 virtual WMError GetUnreliableWindowInfo(int32_t windowId, std::vector<sptr<UnreliableWindowInfo>>& infos) = 0; ListWindowInfo(const WindowInfoOption & windowInfoOption,std::vector<sptr<WindowInfo>> & infos)138 virtual WMError ListWindowInfo(const WindowInfoOption& windowInfoOption, 139 std::vector<sptr<WindowInfo>>& infos) { return WMError::WM_ERROR_DEVICE_NOT_SUPPORT; } UpdateWindowModeByIdForUITest(int32_t windowId,int32_t updateMode)140 virtual WMError UpdateWindowModeByIdForUITest(int32_t windowId, int32_t updateMode) { return WMError::WM_OK; } GetAllWindowLayoutInfo(DisplayId displayId,std::vector<sptr<WindowLayoutInfo>> & infos)141 virtual WMError GetAllWindowLayoutInfo(DisplayId displayId, 142 std::vector<sptr<WindowLayoutInfo>>& infos) { return WMError::WM_ERROR_DEVICE_NOT_SUPPORT; } GetGlobalWindowMode(DisplayId displayId,GlobalWindowMode & globalWinMode)143 virtual WMError GetGlobalWindowMode(DisplayId displayId, GlobalWindowMode& globalWinMode) 144 { 145 return WMError::WM_ERROR_DEVICE_NOT_SUPPORT; 146 } GetTopNavDestinationName(int32_t windowId,std::string & topNavDestName)147 virtual WMError GetTopNavDestinationName(int32_t windowId, 148 std::string& topNavDestName) { return WMError::WM_ERROR_DEVICE_NOT_SUPPORT; } 149 virtual WMError GetVisibilityWindowInfo(std::vector<sptr<WindowVisibilityInfo>>& infos) = 0; 150 virtual WMError SetWindowAnimationController(const sptr<RSIWindowAnimationController>& controller) = 0; 151 virtual WMError GetSystemConfig(SystemConfig& systemConfig) = 0; 152 virtual WMError NotifyWindowTransition(sptr<WindowTransitionInfo>& from, sptr<WindowTransitionInfo>& to, 153 bool isFromClient = false) = 0; 154 virtual WMError GetModeChangeHotZones(DisplayId displayId, ModeChangeHotZones& hotZones) = 0; 155 virtual void MinimizeWindowsByLauncher(std::vector<uint32_t> windowIds, bool isAnimated, 156 sptr<RSIWindowAnimationFinishedCallback>& finishCallback) = 0; 157 virtual WMError UpdateAvoidAreaListener(uint32_t windowId, bool haveListener) = 0; 158 virtual WMError UpdateRsTree(uint32_t windowId, bool isAdd) = 0; 159 virtual WMError BindDialogTarget(uint32_t& windowId, sptr<IRemoteObject> targetToken) = 0; 160 virtual void SetAnchorAndScale(int32_t x, int32_t y, float scale) = 0; 161 virtual void SetAnchorOffset(int32_t deltaX, int32_t deltaY) = 0; 162 virtual void OffWindowZoom() = 0; 163 virtual WMError RaiseToAppTop(uint32_t windowId) = 0; 164 virtual std::shared_ptr<Media::PixelMap> GetSnapshot(int32_t windowId) = 0; 165 virtual WMError SetGestureNavigationEnabled(bool enable) = 0; 166 virtual void DispatchKeyEvent(uint32_t windowId, std::shared_ptr<MMI::KeyEvent> event) = 0; NotifyDumpInfoResult(const std::vector<std::string> & info)167 virtual void NotifyDumpInfoResult(const std::vector<std::string>& info) {}; DumpSessionAll(std::vector<std::string> & infos)168 virtual WSError DumpSessionAll(std::vector<std::string>& infos) { return WSError::WS_OK; } DumpSessionWithId(int32_t persistentId,std::vector<std::string> & infos)169 virtual WSError DumpSessionWithId(int32_t persistentId, std::vector<std::string>& infos) { return WSError::WS_OK; } GetUIContentRemoteObj(int32_t persistentId,sptr<IRemoteObject> & uiContentRemoteObj)170 virtual WSError GetUIContentRemoteObj(int32_t persistentId, sptr<IRemoteObject>& uiContentRemoteObj) 171 { 172 return WSError::WS_OK; 173 } 174 virtual WMError GetWindowAnimationTargets(std::vector<uint32_t> missionIds, 175 std::vector<sptr<RSWindowAnimationTarget>>& targets) = 0; 176 virtual void SetMaximizeMode(MaximizeMode maximizeMode) = 0; 177 virtual MaximizeMode GetMaximizeMode() = 0; 178 virtual void GetFocusWindowInfo(FocusChangeInfo& focusInfo, DisplayId displayId = DEFAULT_DISPLAY_ID) = 0; CheckWindowId(int32_t windowId,int32_t & pid)179 virtual WMError CheckWindowId(int32_t windowId, int32_t& pid) { return WMError::WM_OK; } UpdateSessionAvoidAreaListener(int32_t persistentId,bool haveListener)180 virtual WSError UpdateSessionAvoidAreaListener(int32_t persistentId, bool haveListener) { return WSError::WS_OK; } UpdateSessionTouchOutsideListener(int32_t & persistentId,bool haveListener)181 virtual WSError UpdateSessionTouchOutsideListener(int32_t& persistentId, bool haveListener) 182 { 183 return WSError::WS_OK; 184 } NotifyWindowExtensionVisibilityChange(int32_t pid,int32_t uid,bool visible)185 virtual WSError NotifyWindowExtensionVisibilityChange(int32_t pid, int32_t uid, bool visible) 186 { 187 return WSError::WS_OK; 188 } RaiseWindowToTop(int32_t persistentId)189 virtual WSError RaiseWindowToTop(int32_t persistentId) { return WSError::WS_OK; } UpdateSessionWindowVisibilityListener(int32_t persistentId,bool haveListener)190 virtual WSError UpdateSessionWindowVisibilityListener(int32_t persistentId, bool haveListener) 191 { 192 return WSError::WS_OK; 193 } ShiftAppWindowFocus(int32_t sourcePersistentId,int32_t targetPersistentId)194 virtual WSError ShiftAppWindowFocus(int32_t sourcePersistentId, int32_t targetPersistentId) 195 { 196 return WSError::WS_ERROR_DEVICE_NOT_SUPPORT; 197 } 198 virtual WSError CreateAndConnectSpecificSession(const sptr<ISessionStage>& sessionStage, 199 const sptr<IWindowEventChannel>& eventChannel, const std::shared_ptr<RSSurfaceNode>& surfaceNode, 200 sptr<WindowSessionProperty> property, int32_t& persistentId, sptr<ISession>& session, 201 SystemSessionConfig& systemConfig, sptr<IRemoteObject> token = nullptr) { return WSError::WS_OK; } 202 virtual WSError RecoverAndConnectSpecificSession(const sptr<ISessionStage>& sessionStage, 203 const sptr<IWindowEventChannel>& eventChannel, const std::shared_ptr<RSSurfaceNode>& surfaceNode, 204 sptr<WindowSessionProperty> property, sptr<ISession>& session, sptr<IRemoteObject> token = nullptr) 205 { 206 return WSError::WS_OK; 207 } DestroyAndDisconnectSpecificSession(const int32_t persistentId)208 virtual WSError DestroyAndDisconnectSpecificSession(const int32_t persistentId) { return WSError::WS_OK; } DestroyAndDisconnectSpecificSessionWithDetachCallback(const int32_t persistentId,const sptr<IRemoteObject> & callback)209 virtual WSError DestroyAndDisconnectSpecificSessionWithDetachCallback(const int32_t persistentId, 210 const sptr<IRemoteObject>& callback) { return WSError::WS_OK; } 211 virtual WSError RecoverAndReconnectSceneSession(const sptr<ISessionStage>& sessionStage, 212 const sptr<IWindowEventChannel>& eventChannel, const std::shared_ptr<RSSurfaceNode>& surfaceNode, 213 sptr<ISession>& session, sptr<WindowSessionProperty> property, sptr<IRemoteObject> token = nullptr) 214 { 215 return WSError::WS_OK; 216 } BindDialogSessionTarget(uint64_t persistentId,sptr<IRemoteObject> targetToken)217 virtual WSError BindDialogSessionTarget(uint64_t persistentId, sptr<IRemoteObject> targetToken) 218 { 219 return WSError::WS_OK; 220 } SetSessionGravity(int32_t persistentId,SessionGravity gravity,uint32_t percent)221 virtual WSError SetSessionGravity(int32_t persistentId, SessionGravity gravity, uint32_t percent) 222 { 223 return WSError::WS_OK; 224 } 225 virtual WMError RequestFocusStatus(int32_t persistentId, bool isFocused, bool byForeground = true, 226 FocusChangeReason reason = FocusChangeReason::DEFAULT) 227 { 228 return WMError::WM_OK; 229 } 230 virtual WMError RequestFocusStatusBySA(int32_t persistentId, bool isFocused = true, 231 bool byForeground = true, FocusChangeReason reason = FocusChangeReason::SA_REQUEST) 232 { 233 return WMError::WM_ERROR_DEVICE_NOT_SUPPORT; 234 } GetSnapshotByWindowId(int32_t persistentId,std::shared_ptr<Media::PixelMap> & pixelMap)235 virtual WMError GetSnapshotByWindowId(int32_t persistentId, std::shared_ptr<Media::PixelMap>& pixelMap) 236 { 237 return WMError::WM_OK; 238 } 239 virtual void AddExtensionWindowStageToSCB(const sptr<ISessionStage>& sessionStage, 240 const sptr<IRemoteObject>& token, uint64_t surfaceNodeId, bool isConstrainedModal = false) {} 241 virtual void RemoveExtensionWindowStageFromSCB(const sptr<ISessionStage>& sessionStage, 242 const sptr<IRemoteObject>& token, bool isConstrainedModal = false) {} UpdateModalExtensionRect(const sptr<IRemoteObject> & token,Rect rect)243 virtual void UpdateModalExtensionRect(const sptr<IRemoteObject>& token, Rect rect) {} ProcessModalExtensionPointDown(const sptr<IRemoteObject> & token,int32_t posX,int32_t posY)244 virtual void ProcessModalExtensionPointDown(const sptr<IRemoteObject>& token, int32_t posX, int32_t posY) {} AddOrRemoveSecureSession(int32_t persistentId,bool shouldHide)245 virtual WSError AddOrRemoveSecureSession(int32_t persistentId, bool shouldHide) 246 { 247 return WSError::WS_OK; 248 } UpdateExtWindowFlags(const sptr<IRemoteObject> & token,uint32_t extWindowFlags,uint32_t extWindowActions)249 virtual WSError UpdateExtWindowFlags(const sptr<IRemoteObject>& token, uint32_t extWindowFlags, 250 uint32_t extWindowActions) 251 { 252 return WSError::WS_OK; 253 } GetHostWindowRect(int32_t hostWindowId,Rect & rect)254 virtual WSError GetHostWindowRect(int32_t hostWindowId, Rect& rect) 255 { 256 return WSError::WS_OK; 257 } GetHostGlobalScaledRect(int32_t hostWindowId,Rect & globalScaledRect)258 virtual WSError GetHostGlobalScaledRect(int32_t hostWindowId, Rect& globalScaledRect) 259 { 260 return WSError::WS_OK; 261 } GetFreeMultiWindowEnableState(bool & enable)262 virtual WSError GetFreeMultiWindowEnableState(bool& enable) { return WSError::WS_OK; } GetCallingWindowWindowStatus(int32_t persistentId,WindowStatus & windowStatus)263 virtual WMError GetCallingWindowWindowStatus(int32_t persistentId, WindowStatus& windowStatus) 264 { 265 return WMError::WM_OK; 266 } GetCallingWindowRect(int32_t persistentId,Rect & rect)267 virtual WMError GetCallingWindowRect(int32_t persistentId, Rect& rect) 268 { 269 return WMError::WM_OK; 270 } GetWindowModeType(WindowModeType & windowModeType)271 virtual WMError GetWindowModeType(WindowModeType& windowModeType) 272 { 273 return WMError::WM_OK; 274 }; GetWindowStyleType(WindowStyleType & windowStyleType)275 virtual WMError GetWindowStyleType(WindowStyleType& windowStyleType) 276 { 277 return WMError::WM_OK; 278 }; SkipSnapshotForAppProcess(int32_t pid,bool skip)279 virtual WMError SkipSnapshotForAppProcess(int32_t pid, bool skip) { return WMError::WM_OK; } SetProcessWatermark(int32_t pid,const std::string & watermarkName,bool isEnabled)280 virtual WMError SetProcessWatermark(int32_t pid, const std::string& watermarkName, 281 bool isEnabled) { return WMError::WM_OK; } GetWindowIdsByCoordinate(DisplayId displayId,int32_t windowNumber,int32_t x,int32_t y,std::vector<int32_t> & windowIds)282 virtual WMError GetWindowIdsByCoordinate(DisplayId displayId, int32_t windowNumber, 283 int32_t x, int32_t y, std::vector<int32_t>& windowIds) { return WMError::WM_ERROR_DEVICE_NOT_SUPPORT; } GetParentMainWindowId(int32_t windowId,int32_t & mainWindowId)284 virtual WMError GetParentMainWindowId(int32_t windowId, int32_t& mainWindowId) { return WMError::WM_OK; } UpdateScreenLockStatusForApp(const std::string & bundleName,bool isRelease)285 virtual WMError UpdateScreenLockStatusForApp( 286 const std::string& bundleName, bool isRelease) { return WMError::WM_OK; } IsPcWindow(bool & isPcWindow)287 virtual WMError IsPcWindow(bool& isPcWindow) { return WMError::WM_OK; } IsFreeMultiWindow(bool & isFreeMultiWindow)288 virtual WMError IsFreeMultiWindow(bool& isFreeMultiWindow) { return WMError::WM_OK; } IsPcOrPadFreeMultiWindowMode(bool & isPcOrPadFreeMultiWindowMode)289 virtual WMError IsPcOrPadFreeMultiWindowMode(bool& isPcOrPadFreeMultiWindowMode) { return WMError::WM_OK; } IsWindowRectAutoSave(const std::string & key,bool & enabled,int persistentId)290 virtual WMError IsWindowRectAutoSave(const std::string& key, bool& enabled, 291 int persistentId) { return WMError::WM_OK; } SetImageForRecent(uint32_t imgResourceId,ImageFit imageFit,int32_t persistentId)292 virtual WMError SetImageForRecent(uint32_t imgResourceId, ImageFit imageFit, 293 int32_t persistentId) { return WMError::WM_OK; } GetDisplayIdByWindowId(const std::vector<uint64_t> & windowIds,std::unordered_map<uint64_t,DisplayId> & windowDisplayIdMap)294 virtual WMError GetDisplayIdByWindowId(const std::vector<uint64_t>& windowIds, 295 std::unordered_map<uint64_t, DisplayId>& windowDisplayIdMap) { return WMError::WM_OK; } SetGlobalDragResizeType(DragResizeType dragResizeType)296 virtual WMError SetGlobalDragResizeType(DragResizeType dragResizeType) { return WMError::WM_OK; } GetGlobalDragResizeType(DragResizeType & dragResizeType)297 virtual WMError GetGlobalDragResizeType(DragResizeType& dragResizeType) { return WMError::WM_OK; } SetAppDragResizeType(const std::string & bundleName,DragResizeType dragResizeType)298 virtual WMError SetAppDragResizeType(const std::string& bundleName, 299 DragResizeType dragResizeType) { return WMError::WM_OK; } GetAppDragResizeType(const std::string & bundleName,DragResizeType & dragResizeType)300 virtual WMError GetAppDragResizeType(const std::string& bundleName, 301 DragResizeType& dragResizeType) { return WMError::WM_OK; } SetAppKeyFramePolicy(const std::string & bundleName,const KeyFramePolicy & keyFramePolicy)302 virtual WMError SetAppKeyFramePolicy(const std::string& bundleName, 303 const KeyFramePolicy& keyFramePolicy) { return WMError::WM_OK; } NotifyWatchGestureConsumeResult(int32_t keyCode,bool isConsumed)304 virtual WMError NotifyWatchGestureConsumeResult(int32_t keyCode, 305 bool isConsumed) { return WMError::WM_OK; } NotifyWatchFocusActiveChange(bool isActive)306 virtual WMError NotifyWatchFocusActiveChange(bool isActive) { return WMError::WM_OK; } ShiftAppWindowPointerEvent(int32_t sourcePersistentId,int32_t targetPersistentId,int32_t fingerId)307 virtual WMError ShiftAppWindowPointerEvent(int32_t sourcePersistentId, int32_t targetPersistentId, 308 int32_t fingerId) { return WMError::WM_ERROR_DEVICE_NOT_SUPPORT; } SetStartWindowBackgroundColor(const std::string & moduleName,const std::string & abilityName,uint32_t color,int32_t uid)309 virtual WMError SetStartWindowBackgroundColor(const std::string& moduleName, const std::string& abilityName, 310 uint32_t color, int32_t uid) { return WMError::WM_ERROR_DEVICE_NOT_SUPPORT; } HasFloatingWindowForeground(const sptr<IRemoteObject> & abilityToken,bool & hasOrNot)311 virtual WMError HasFloatingWindowForeground(const sptr<IRemoteObject>& abilityToken, 312 bool& hasOrNot) { return WMError::WM_OK; } MinimizeByWindowId(const std::vector<int32_t> & windowIds)313 virtual WMError MinimizeByWindowId(const std::vector<int32_t>& windowIds) { return WMError::WM_OK; } SetForegroundWindowNum(uint32_t windowNum)314 virtual WMError SetForegroundWindowNum(uint32_t windowNum) { return WMError::WM_OK; } UseImplicitAnimation(int32_t hostWindowId,bool useImplicit)315 virtual WSError UseImplicitAnimation(int32_t hostWindowId, bool useImplicit) { return WSError::WS_OK; } AnimateTo(int32_t windowId,const WindowAnimationProperty & animationProperty,const WindowAnimationOption & animationOption)316 virtual WMError AnimateTo(int32_t windowId, const WindowAnimationProperty& animationProperty, 317 const WindowAnimationOption& animationOption) { return WMError::WM_ERROR_DEVICE_NOT_SUPPORT; } AddSessionBlackList(const std::unordered_set<std::string> & bundleNames,const std::unordered_set<std::string> & privacyWindowTags)318 virtual WMError AddSessionBlackList(const std::unordered_set<std::string>& bundleNames, 319 const std::unordered_set<std::string>& privacyWindowTags) { return WMError::WM_ERROR_DEVICE_NOT_SUPPORT; } RemoveSessionBlackList(const std::unordered_set<std::string> & bundleNames,const std::unordered_set<std::string> & privacyWindowTags)320 virtual WMError RemoveSessionBlackList(const std::unordered_set<std::string>& bundleNames, 321 const std::unordered_set<std::string>& privacyWindowTags) { return WMError::WM_ERROR_DEVICE_NOT_SUPPORT; } 322 323 /* 324 * Sub Window 325 */ SetParentWindow(int32_t subWindowId,int32_t newParentWindowId)326 virtual WMError SetParentWindow(int32_t subWindowId, int32_t newParentWindowId) { return WMError::WM_OK; } 327 328 /* 329 * Window Animation 330 */ CreateUIEffectController(const sptr<IUIEffectControllerClient> & controllerClient,sptr<IUIEffectController> & controller,int32_t & controllerId)331 virtual WMError CreateUIEffectController(const sptr<IUIEffectControllerClient>& controllerClient, 332 sptr<IUIEffectController>& controller, int32_t& controllerId) { return WMError::WM_OK; }; 333 334 /* 335 * PiP Window 336 */ GetPiPSettingSwitchStatus(bool & switchStatus)337 virtual WMError GetPiPSettingSwitchStatus(bool& switchStatus) { return WMError::WM_OK; } 338 }; 339 } 340 } 341 #endif // OHOS_WINDOW_MANAGER_INTERFACE_H 342