1 /* 2 * Copyright (c) 2023 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_SCENE_SESSION_STAGE_RPOXY_H 17 #define OHOS_WINDOW_SCENE_SESSION_STAGE_RPOXY_H 18 19 #include <iremote_proxy.h> 20 #include <transaction/rs_transaction.h> 21 22 #include "interfaces/include/ws_common.h" 23 #include "session/container/include/zidl/session_stage_interface.h" 24 #include "ws_common.h" 25 26 namespace OHOS::Rosen { 27 class SessionStageProxy : public IRemoteProxy<ISessionStage> { 28 public: SessionStageProxy(const sptr<IRemoteObject> & impl)29 explicit SessionStageProxy(const sptr<IRemoteObject>& impl) : IRemoteProxy<ISessionStage>(impl) {}; 30 ~SessionStageProxy()31 ~SessionStageProxy() {}; 32 33 WSError SetActive(bool active) override; 34 WSError UpdateRect(const WSRect& rect, SizeChangeReason reason, 35 const SceneAnimationConfig& config = { nullptr, ROTATE_ANIMATION_DURATION }) override; 36 void UpdateDensity() override; 37 WSError UpdateOrientation() override; 38 WSError HandleBackEvent() override; 39 WSError MarkProcessed(int32_t eventId) override; 40 WSError UpdateFocus(bool isFocused) override; 41 WSError NotifyDestroy() override; 42 WSError NotifyCloseExistPipWindow() override; 43 WSError NotifyTransferComponentData(const AAFwk::WantParams& wantParams) override; 44 WSErrorCode NotifyTransferComponentDataSync(const AAFwk::WantParams& wantParams, 45 AAFwk::WantParams& reWantParams) override; 46 void NotifyOccupiedAreaChangeInfo(sptr<OccupiedAreaChangeInfo> info, 47 const std::shared_ptr<RSTransaction>& rsTransaction = nullptr) override; 48 WSError UpdateAvoidArea(const sptr<AvoidArea>& avoidArea, AvoidAreaType type) override; 49 void NotifyScreenshot() override; 50 void DumpSessionElementInfo(const std::vector<std::string>& params) override; 51 WSError NotifyTouchOutside() override; 52 WSError NotifyWindowVisibility(bool isVisible) override; 53 WSError UpdateWindowMode(WindowMode mode) override; 54 void NotifyForegroundInteractiveStatus(bool interactive) override; 55 WSError UpdateMaximizeMode(MaximizeMode mode) override; 56 void NotifySessionForeground(uint32_t reason, bool withAnimation) override; 57 void NotifySessionBackground(uint32_t reason, bool withAnimation, bool isFromInnerkits) override; 58 WSError NotifyDensityFollowHost(bool isFollowHost, float densityValue) override; 59 WSError UpdateTitleInTargetPos(bool isShow, int32_t height) override; 60 void NotifyTransformChange(const Transform& transform) override; 61 WSError NotifyDialogStateChange(bool isForeground) override; 62 WSError SetPipActionEvent(const std::string& action, int32_t status) override; 63 WSError SetPiPControlEvent(WsPiPControlType controlType, WsPiPControlStatus status) override; 64 WSError UpdateDisplayId(uint64_t displayId) override; 65 void NotifyDisplayMove(DisplayId from, DisplayId to) override; 66 WSError SwitchFreeMultiWindow(bool enable) override; 67 WSError GetUIContentRemoteObj(sptr<IRemoteObject>& uiContentRemoteObj) override; 68 void NotifyKeyboardPanelInfoChange(const KeyboardPanelInfo& keyboardPanelInfo) override; 69 WSError NotifyCompatibleModeEnableInPad(bool enable) override; 70 void SetUniqueVirtualPixelRatio(bool useUniqueDensity, float virtualPixelRatio) override; 71 void NotifySessionFullScreen(bool fullScreen) override; 72 WSError NotifyDumpInfo(const std::vector<std::string>& params, std::vector<std::string>& info) override; 73 WSError SetEnableDragBySystem(bool dragEnable) override; 74 75 private: 76 static inline BrokerDelegator<SessionStageProxy> delegator_; 77 }; 78 } // namespace OHOS::Rosen 79 #endif // OHOS_WINDOW_SCENE_SESSION_STAGE_RPOXY_H 80