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_PROXY_H 17 #define OHOS_WINDOW_PROXY_H 18 19 #include "window_interface.h" 20 #include "iremote_proxy.h" 21 #include "wm_common.h" 22 23 namespace OHOS { 24 namespace Rosen { 25 class WindowProxy : public IRemoteProxy<IWindow> { 26 public: WindowProxy(const sptr<IRemoteObject> & impl)27 explicit WindowProxy(const sptr<IRemoteObject>& impl) : IRemoteProxy<IWindow>(impl) {}; 28 ~WindowProxy()29 ~WindowProxy() {}; 30 31 WMError UpdateWindowRect(const struct Rect& rect, bool decoStatus, WindowSizeChangeReason reason) override; 32 WMError UpdateWindowMode(WindowMode mode) override; 33 WMError UpdateWindowModeSupportInfo(uint32_t modeSupportInfo) override; 34 WMError UpdateFocusStatus(bool focused) override; 35 WMError UpdateAvoidArea(const sptr<AvoidArea>& avoidArea, AvoidAreaType type) override; 36 WMError UpdateWindowState(WindowState state) override; 37 WMError UpdateWindowDragInfo(const PointInfo& point, DragEvent event) override; 38 WMError UpdateDisplayId(DisplayId from, DisplayId to) override; 39 WMError UpdateOccupiedAreaChangeInfo(const sptr<OccupiedAreaChangeInfo>& info) override; 40 WMError UpdateActiveStatus(bool isActive) override; 41 sptr<WindowProperty> GetWindowProperty() override; 42 WMError NotifyTouchOutside() override; 43 WMError NotifyScreenshot() override; 44 WMError DumpInfo(const std::vector<std::string>& params) override; 45 WMError NotifyDestroy(void) override; 46 WMError NotifyForeground(void) override; 47 WMError NotifyBackground(void) override; 48 WMError NotifyWindowClientPointUp(const std::shared_ptr<MMI::PointerEvent>& pointerEvent) override; 49 WMError UpdateZoomTransform(const Transform& trans, bool isDisplayZoomOn) override; 50 WMError RestoreSplitWindowMode(uint32_t mode) override; 51 private: 52 static inline BrokerDelegator<WindowProxy> delegator_; 53 }; 54 } // namespace Rosen 55 } // namespace OHOS 56 #endif // OHOS_WINDOW_PROXY_H 57