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 #include <transaction/rs_transaction.h> 23 24 namespace OHOS { 25 namespace Rosen { 26 class WindowProxy : public IRemoteProxy<IWindow> { 27 public: WindowProxy(const sptr<IRemoteObject> & impl)28 explicit WindowProxy(const sptr<IRemoteObject>& impl) : IRemoteProxy<IWindow>(impl) {}; 29 ~WindowProxy()30 ~WindowProxy() {}; 31 32 WMError UpdateWindowRect(const struct Rect& rect, bool decoStatus, WindowSizeChangeReason reason, 33 const std::shared_ptr<RSTransaction>& rsTransaction = nullptr) override; 34 WMError UpdateWindowMode(WindowMode mode) override; 35 WMError UpdateWindowModeSupportType(uint32_t windowModeSupportType) override; 36 WMError UpdateFocusStatus(bool focused) override; 37 WMError UpdateAvoidArea(const sptr<AvoidArea>& avoidArea, AvoidAreaType type) override; 38 WMError UpdateWindowState(WindowState state) override; 39 WMError UpdateWindowDragInfo(const PointInfo& point, DragEvent event) override; 40 WMError UpdateDisplayId(DisplayId from, DisplayId to) override; 41 WMError UpdateOccupiedAreaChangeInfo(const sptr<OccupiedAreaChangeInfo>& info, 42 const std::shared_ptr<RSTransaction>& rsTransaction = nullptr) override; 43 WMError UpdateOccupiedAreaAndRect(const sptr<OccupiedAreaChangeInfo>& info, const Rect& rect, 44 const std::shared_ptr<RSTransaction>& rsTransaction = nullptr) override; 45 WMError UpdateActiveStatus(bool isActive) override; 46 sptr<WindowProperty> GetWindowProperty() override; 47 WMError NotifyTouchOutside() override; 48 WMError NotifyScreenshot() override; 49 WMError DumpInfo(const std::vector<std::string>& params) override; 50 WMError NotifyDestroy(void) override; 51 WMError NotifyForeground(void) override; 52 WMError NotifyBackground(void) override; 53 WMError NotifyWindowClientPointUp(const std::shared_ptr<MMI::PointerEvent>& pointerEvent) override; 54 WMError UpdateZoomTransform(const Transform& trans, bool isDisplayZoomOn) override; 55 WMError RestoreSplitWindowMode(uint32_t mode) override; 56 void ConsumeKeyEvent(std::shared_ptr<MMI::KeyEvent> event) override; 57 void NotifyForegroundInteractiveStatus(bool interactive) override; 58 59 private: 60 static inline BrokerDelegator<WindowProxy> delegator_; 61 }; 62 } // namespace Rosen 63 } // namespace OHOS 64 #endif // OHOS_WINDOW_PROXY_H 65