/* * Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef OHOS_WINDOW_MANAGER_PROXY_H #define OHOS_WINDOW_MANAGER_PROXY_H #include #include "window_manager_interface.h" #include #include namespace OHOS { namespace Rosen { class WindowManagerProxy : public IRemoteProxy { public: explicit WindowManagerProxy(const sptr& impl) : IRemoteProxy(impl) {}; ~WindowManagerProxy() {}; WMError CreateWindow(sptr& window, sptr& property, const std::shared_ptr& surfaceNode, uint32_t& windowId, sptr token) override; WMError AddWindow(sptr& property) override; WMError RemoveWindow(uint32_t windowId, bool isFromInnerkits) override; WMError NotifyWindowTransition(sptr& from, sptr& to, bool isFromClient = false) override; WMError DestroyWindow(uint32_t windowId, bool onlySelf = false) override; WMError RequestFocus(uint32_t windowId) override; AvoidArea GetAvoidAreaByType(uint32_t windowId, AvoidAreaType type) override; WMError GetTopWindowId(uint32_t mainWinId, uint32_t& topWinId) override; void NotifyServerReadyToMoveOrDrag(uint32_t windowId, sptr& windowProperty, sptr& moveDragProperty) override; void ProcessPointDown(uint32_t windowId, bool isPointDown) override; void ProcessPointUp(uint32_t windowId) override; WMError MinimizeAllAppWindows(DisplayId displayId) override; WMError ToggleShownStateForAllAppWindows() override; WMError SetWindowLayoutMode(WindowLayoutMode mode) override; WMError UpdateProperty(sptr& windowProperty, PropertyChangeAction action, bool isAsyncTask = false) override; WMError SetWindowGravity(uint32_t windowId, WindowGravity gravity, uint32_t percent) override; WMError RegisterWindowManagerAgent(WindowManagerAgentType type, const sptr& windowManagerAgent) override; WMError UnregisterWindowManagerAgent(WindowManagerAgentType type, const sptr& windowManagerAgent) override; WMError SetWindowAnimationController(const sptr& controller) override; WMError GetAccessibilityWindowInfo(std::vector>& infos) override; WMError GetUnreliableWindowInfo(int32_t windowId, std::vector>& infos) override; WMError GetVisibilityWindowInfo(std::vector>& infos) override; WMError GetSystemConfig(SystemConfig& systemConfig) override; WMError GetModeChangeHotZones(DisplayId displayId, ModeChangeHotZones& hotZones) override; void MinimizeWindowsByLauncher(std::vector windowIds, bool isAnimated, sptr& finishCallback) override; WMError UpdateAvoidAreaListener(uint32_t windowId, bool haveListener) override; WMError UpdateRsTree(uint32_t windowId, bool isAdd) override; WMError BindDialogTarget(uint32_t& windowId, sptr targetToken) override; WMError GetSnapshotByWindowId(int32_t persistentId, std::shared_ptr& pixelMap) override; void SetAnchorAndScale(int32_t x, int32_t y, float scale) override; void SetAnchorOffset(int32_t deltaX, int32_t deltaY) override; void OffWindowZoom() override; WMError RaiseToAppTop(uint32_t windowId) override; std::shared_ptr GetSnapshot(int32_t windowId) override; WMError SetGestureNavigaionEnabled(bool enable) override; void DispatchKeyEvent(uint32_t windowId, std::shared_ptr event) override; void NotifyDumpInfoResult(const std::vector& info) override; WMError GetWindowAnimationTargets(std::vector missionIds, std::vector>& targets) override; void SetMaximizeMode(MaximizeMode maximizeMode) override; MaximizeMode GetMaximizeMode() override; void GetFocusWindowInfo(FocusChangeInfo& focusInfo) override; private: static inline BrokerDelegator delegator_; }; } } #endif // OHOS_WINDOW_MANAGER_PROXY_H