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 FOUNDATION_ACE_INTERFACE_INNERKITS_FORM_RENDERER_DISPATCHER_PROXY_H 17 #define FOUNDATION_ACE_INTERFACE_INNERKITS_FORM_RENDERER_DISPATCHER_PROXY_H 18 19 #include "form_renderer_dispatcher_interface.h" 20 #include "iremote_proxy.h" 21 22 #include "base/utils/macros.h" 23 24 namespace OHOS { 25 namespace Ace { 26 /** 27 * @class FormRendererDispatcherProxy 28 * FormRendererDispatcherProxy is used to access form render dispatcher. 29 */ 30 class ACE_EXPORT FormRendererDispatcherProxy : public IRemoteProxy<IFormRendererDispatcher> { 31 public: 32 explicit FormRendererDispatcherProxy(const sptr<IRemoteObject>& impl); 33 virtual ~FormRendererDispatcherProxy() = default; 34 35 void DispatchPointerEvent( 36 const std::shared_ptr<OHOS::MMI::PointerEvent>& pointerEvent) override; 37 38 void SetAllowUpdate(bool allowUpdate) override; 39 40 void DispatchSurfaceChangeEvent(float width, float height) override; 41 42 private: 43 template<typename T> 44 int32_t GetParcelableInfos(MessageParcel &reply, std::vector<T> &parcelableInfos); 45 static bool WriteInterfaceToken(MessageParcel &data); 46 47 static inline BrokerDelegator<FormRendererDispatcherProxy> delegator_; 48 }; 49 } // namespace Ace 50 } // namespace OHOS 51 #endif // FOUNDATION_ACE_INTERFACE_INNERKITS_FORM_RENDERER_DISPATCHER_PROXY_H 52