1 /*
2  * Copyright (c) 2024 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 ARK_WEB_QUICK_MENU_PARAMS_WRAPPER_H_
17 #define ARK_WEB_QUICK_MENU_PARAMS_WRAPPER_H_
18 #pragma once
19 
20 #include "include/nweb_context_menu_params.h"
21 #include "ohos_nweb/bridge/ark_web_touch_handle_state_wrapper.h"
22 #include "ohos_nweb/include/ark_web_quick_menu_params.h"
23 
24 namespace OHOS::ArkWeb {
25 
26 class ArkWebQuickMenuParamsWrapper : public OHOS::NWeb::NWebQuickMenuParams {
27 public:
28     ArkWebQuickMenuParamsWrapper(ArkWebRefPtr<ArkWebQuickMenuParams> ark_web_quick_menu_params);
29     ~ArkWebQuickMenuParamsWrapper() = default;
30 
31     int32_t GetXCoord() override;
32 
33     int32_t GetYCoord() override;
34 
35     int32_t GetWidth() override;
36 
37     int32_t GetHeight() override;
38 
39     int32_t GetEditStateFlags() override;
40 
41     int32_t GetSelectX() override;
42 
43     int32_t GetSelectY() override;
44 
45     int32_t GetSelectWidth() override;
46 
47     int32_t GetSelectXHeight() override;
48 
49     std::shared_ptr<OHOS::NWeb::NWebTouchHandleState> GetTouchHandleState(ArkWebTouchHandleType type) override;
50 
51     bool GetIsLongPressActived() override;
52 
53 private:
54     ArkWebRefPtr<ArkWebQuickMenuParams> ark_web_quick_menu_params_;
55 };
56 
57 } // namespace OHOS::ArkWeb
58 
59 #endif // ARK_WEB_QUICK_MENU_PARAMS_WRAPPER_H_
60