• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_INTERFACE_H
17 #define FOUNDATION_ACE_INTERFACE_INNERKITS_FORM_RENDERER_DISPATCHER_INTERFACE_H
18 
19 #include <ipc_types.h>
20 #include <iremote_broker.h>
21 
22 #include "pointer_event.h"
23 
24 #include "base/utils/macros.h"
25 
26 namespace OHOS {
27 namespace Ace {
28 /**
29  * @class IFormRendererDispatcher
30  * IFormRendererDispatcher interface is used to form render dispatcher.
31  */
32 class ACE_EXPORT IFormRendererDispatcher : public OHOS::IRemoteBroker {
33 public:
34     DECLARE_INTERFACE_DESCRIPTOR(u"ohos.ace.FormRendererDispatcher")
35 
36     IFormRendererDispatcher() = default;
37     ~IFormRendererDispatcher() override = default;
38     /**
39      * @brief Dispatcher pointer event.
40      * @param pointerEvent The pointer event info.
41      */
42     virtual void DispatchPointerEvent(
43         const std::shared_ptr<OHOS::MMI::PointerEvent>& pointerEvent) = 0;
44     /**
45      * @brief Set AllowUpdate.
46      * @param allowUpdate The allowUpdate.
47      */
48     virtual void SetAllowUpdate(bool allowUpdate) = 0;
49 
50     virtual void DispatchSurfaceChangeEvent(float width, float height) = 0;
51 
52     enum Message : uint32_t {
53         DISPATCH_POINTER_EVENT = 1,
54         SET_ALLOW_UPDATE,
55         DISPATCH_SURFACE_CHANGE_EVENT,
56     };
57 };
58 }  // namespace Ace
59 }  // namespace OHOS
60 #endif  // FOUNDATION_ACE_INTERFACE_INNERKITS_FORM_RENDERER_DISPATCHER_INTERFACE_H
61