123b3eb3cSopenharmony_ci/*
223b3eb3cSopenharmony_ci * Copyright (c) 2024 Huawei Device Co., Ltd.
323b3eb3cSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
423b3eb3cSopenharmony_ci * you may not use this file except in compliance with the License.
523b3eb3cSopenharmony_ci * You may obtain a copy of the License at
623b3eb3cSopenharmony_ci *
723b3eb3cSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
823b3eb3cSopenharmony_ci *
923b3eb3cSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1023b3eb3cSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1123b3eb3cSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1223b3eb3cSopenharmony_ci * See the License for the specific language governing permissions and
1323b3eb3cSopenharmony_ci * limitations under the License.
1423b3eb3cSopenharmony_ci */
1523b3eb3cSopenharmony_ci
1623b3eb3cSopenharmony_ci/**
1723b3eb3cSopenharmony_ci * @addtogroup ArkUI_EventModule
1823b3eb3cSopenharmony_ci * @{
1923b3eb3cSopenharmony_ci *
2023b3eb3cSopenharmony_ci * @brief Declares the UI input event capabilities provided by ArkUI on the native side.
2123b3eb3cSopenharmony_ci *
2223b3eb3cSopenharmony_ci * @since 12
2323b3eb3cSopenharmony_ci */
2423b3eb3cSopenharmony_ci
2523b3eb3cSopenharmony_ci/**
2623b3eb3cSopenharmony_ci * @file ui_input_event.h
2723b3eb3cSopenharmony_ci *
2823b3eb3cSopenharmony_ci * @brief Provides ArkUI event definitions on the native side.
2923b3eb3cSopenharmony_ci *
3023b3eb3cSopenharmony_ci * @library libace_ndk.z.so
3123b3eb3cSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full
3223b3eb3cSopenharmony_ci * @since 12
3323b3eb3cSopenharmony_ci */
3423b3eb3cSopenharmony_ci
3523b3eb3cSopenharmony_ci#ifndef _ARKUI_UI_INPUT_EVENT_H_
3623b3eb3cSopenharmony_ci#define _ARKUI_UI_INPUT_EVENT_H_
3723b3eb3cSopenharmony_ci
3823b3eb3cSopenharmony_ci#include <cstdint>
3923b3eb3cSopenharmony_ci
4023b3eb3cSopenharmony_ci#ifdef __cplusplus
4123b3eb3cSopenharmony_ciextern "C" {
4223b3eb3cSopenharmony_ci#endif
4323b3eb3cSopenharmony_ci
4423b3eb3cSopenharmony_ci/**
4523b3eb3cSopenharmony_ci * @brief Defines the UI input event.
4623b3eb3cSopenharmony_ci *
4723b3eb3cSopenharmony_ci * @since 12
4823b3eb3cSopenharmony_ci */
4923b3eb3cSopenharmony_citypedef struct ArkUI_UIInputEvent ArkUI_UIInputEvent;
5023b3eb3cSopenharmony_ci
5123b3eb3cSopenharmony_ci/**
5223b3eb3cSopenharmony_ci * @brief Enumerates the UI input event types.
5323b3eb3cSopenharmony_ci *
5423b3eb3cSopenharmony_ci * @since 12
5523b3eb3cSopenharmony_ci */
5623b3eb3cSopenharmony_citypedef enum {
5723b3eb3cSopenharmony_ci    ARKUI_UIINPUTEVENT_TYPE_UNKNOWN = 0,
5823b3eb3cSopenharmony_ci    ARKUI_UIINPUTEVENT_TYPE_TOUCH = 1,
5923b3eb3cSopenharmony_ci    ARKUI_UIINPUTEVENT_TYPE_AXIS = 2,
6023b3eb3cSopenharmony_ci    ARKUI_UIINPUTEVENT_TYPE_MOUSE = 3,
6123b3eb3cSopenharmony_ci} ArkUI_UIInputEvent_Type;
6223b3eb3cSopenharmony_ci
6323b3eb3cSopenharmony_ci/**
6423b3eb3cSopenharmony_ci * @brief Defines the action code of the input event.
6523b3eb3cSopenharmony_ci *
6623b3eb3cSopenharmony_ci * @since 12
6723b3eb3cSopenharmony_ci */
6823b3eb3cSopenharmony_cienum {
6923b3eb3cSopenharmony_ci    /** Cancellation of touch. */
7023b3eb3cSopenharmony_ci    UI_TOUCH_EVENT_ACTION_CANCEL = 0,
7123b3eb3cSopenharmony_ci    /** Pressing of a touch point. */
7223b3eb3cSopenharmony_ci    UI_TOUCH_EVENT_ACTION_DOWN = 1,
7323b3eb3cSopenharmony_ci    /** Moving of a touch point. */
7423b3eb3cSopenharmony_ci    UI_TOUCH_EVENT_ACTION_MOVE = 2,
7523b3eb3cSopenharmony_ci    /** Lifting of a touch point. */
7623b3eb3cSopenharmony_ci    UI_TOUCH_EVENT_ACTION_UP = 3,
7723b3eb3cSopenharmony_ci};
7823b3eb3cSopenharmony_ci
7923b3eb3cSopenharmony_ci/**
8023b3eb3cSopenharmony_ci * @brief Defines the tool type of the touch event.
8123b3eb3cSopenharmony_ci *
8223b3eb3cSopenharmony_ci * @since 12
8323b3eb3cSopenharmony_ci */
8423b3eb3cSopenharmony_cienum {
8523b3eb3cSopenharmony_ci    /** Unknown tool type. */
8623b3eb3cSopenharmony_ci    UI_INPUT_EVENT_TOOL_TYPE_UNKNOWN = 0,
8723b3eb3cSopenharmony_ci
8823b3eb3cSopenharmony_ci    /** Finger. */
8923b3eb3cSopenharmony_ci    UI_INPUT_EVENT_TOOL_TYPE_FINGER = 1,
9023b3eb3cSopenharmony_ci
9123b3eb3cSopenharmony_ci    /** Pen. */
9223b3eb3cSopenharmony_ci    UI_INPUT_EVENT_TOOL_TYPE_PEN = 2,
9323b3eb3cSopenharmony_ci
9423b3eb3cSopenharmony_ci    /** Mouse. */
9523b3eb3cSopenharmony_ci    UI_INPUT_EVENT_TOOL_TYPE_MOUSE = 3,
9623b3eb3cSopenharmony_ci
9723b3eb3cSopenharmony_ci    /** TouchPad. */
9823b3eb3cSopenharmony_ci    UI_INPUT_EVENT_TOOL_TYPE_TOUCHPAD = 4,
9923b3eb3cSopenharmony_ci
10023b3eb3cSopenharmony_ci    /** JoyStick. */
10123b3eb3cSopenharmony_ci    UI_INPUT_EVENT_TOOL_TYPE_JOYSTICK = 5,
10223b3eb3cSopenharmony_ci};
10323b3eb3cSopenharmony_ci
10423b3eb3cSopenharmony_ci/**
10523b3eb3cSopenharmony_ci * @brief Defines the source type of the touch event.
10623b3eb3cSopenharmony_ci *
10723b3eb3cSopenharmony_ci * @since 12
10823b3eb3cSopenharmony_ci */
10923b3eb3cSopenharmony_cienum {
11023b3eb3cSopenharmony_ci    /** Unknown source type. */
11123b3eb3cSopenharmony_ci    UI_INPUT_EVENT_SOURCE_TYPE_UNKNOWN = 0,
11223b3eb3cSopenharmony_ci    /** Mouse. */
11323b3eb3cSopenharmony_ci    UI_INPUT_EVENTT_SOURCE_TYPE_MOUSE = 1,
11423b3eb3cSopenharmony_ci    /** Touchscreen. */
11523b3eb3cSopenharmony_ci    UI_INPUT_EVENTT_SOURCE_TYPE_TOUCH_SCREEN = 2,
11623b3eb3cSopenharmony_ci};
11723b3eb3cSopenharmony_ci
11823b3eb3cSopenharmony_ci/**
11923b3eb3cSopenharmony_ci * @brief Enumerates the hit test modes.
12023b3eb3cSopenharmony_ci *
12123b3eb3cSopenharmony_ci * @since 12
12223b3eb3cSopenharmony_ci */
12323b3eb3cSopenharmony_citypedef enum {
12423b3eb3cSopenharmony_ci    /** Both the node and its child node respond to the hit test of a touch event, but its sibling node is blocked from
12523b3eb3cSopenharmony_ci     *  the hit test.
12623b3eb3cSopenharmony_ci     */
12723b3eb3cSopenharmony_ci    HTM_DEFAULT = 0,
12823b3eb3cSopenharmony_ci
12923b3eb3cSopenharmony_ci    /** The node responds to the hit test of a touch event, but its child node and sibling node are blocked from the hit
13023b3eb3cSopenharmony_ci     *  test.
13123b3eb3cSopenharmony_ci     */
13223b3eb3cSopenharmony_ci    HTM_BLOCK,
13323b3eb3cSopenharmony_ci
13423b3eb3cSopenharmony_ci    /** Both the node and its child node respond to the hit test of a touch event, and its sibling node is also
13523b3eb3cSopenharmony_ci     *  considered during the hit test.
13623b3eb3cSopenharmony_ci     */
13723b3eb3cSopenharmony_ci    HTM_TRANSPARENT,
13823b3eb3cSopenharmony_ci
13923b3eb3cSopenharmony_ci    /** The node does not respond to the hit test of a touch event, but its child node and sibling node are considered
14023b3eb3cSopenharmony_ci     *  during the hit test.
14123b3eb3cSopenharmony_ci     */
14223b3eb3cSopenharmony_ci    HTM_NONE,
14323b3eb3cSopenharmony_ci} HitTestMode;
14423b3eb3cSopenharmony_ci
14523b3eb3cSopenharmony_ci/**
14623b3eb3cSopenharmony_ci * @brief 定义鼠标事件的Action Code。
14723b3eb3cSopenharmony_ci *
14823b3eb3cSopenharmony_ci * @since 12
14923b3eb3cSopenharmony_ci */
15023b3eb3cSopenharmony_cienum {
15123b3eb3cSopenharmony_ci    /** 无效行为 */
15223b3eb3cSopenharmony_ci    UI_MOUSE_EVENT_ACTION_UNKNOWN = 0,
15323b3eb3cSopenharmony_ci    /** 鼠标按键按下。 */
15423b3eb3cSopenharmony_ci    UI_MOUSE_EVENT_ACTION_PRESS = 1,
15523b3eb3cSopenharmony_ci    /** 鼠标按键松开。 */
15623b3eb3cSopenharmony_ci    UI_MOUSE_EVENT_ACTION_RELEASE = 2,
15723b3eb3cSopenharmony_ci    /** 鼠标移动。 */
15823b3eb3cSopenharmony_ci    UI_MOUSE_EVENT_ACTION_MOVE = 3,
15923b3eb3cSopenharmony_ci};
16023b3eb3cSopenharmony_ci
16123b3eb3cSopenharmony_ci/**
16223b3eb3cSopenharmony_ci * @brief 定义鼠标事件的按键类型。
16323b3eb3cSopenharmony_ci *
16423b3eb3cSopenharmony_ci * @since 12
16523b3eb3cSopenharmony_ci */
16623b3eb3cSopenharmony_cienum {
16723b3eb3cSopenharmony_ci    /** 无按键。 */
16823b3eb3cSopenharmony_ci    UI_MOUSE_EVENT_BUTTON_NONE = 0,
16923b3eb3cSopenharmony_ci    /** 鼠标左键。 */
17023b3eb3cSopenharmony_ci    UI_MOUSE_EVENT_BUTTON_LEFT = 1,
17123b3eb3cSopenharmony_ci    /** 鼠标右键。 */
17223b3eb3cSopenharmony_ci    UI_MOUSE_EVENT_BUTTON_RIGHT = 2,
17323b3eb3cSopenharmony_ci    /** 鼠标中键。 */
17423b3eb3cSopenharmony_ci    UI_MOUSE_EVENT_BUTTON_MIDDLE = 3,
17523b3eb3cSopenharmony_ci    /** 鼠标左侧后退键。 */
17623b3eb3cSopenharmony_ci    UI_MOUSE_EVENT_BUTTON_BACK = 4,
17723b3eb3cSopenharmony_ci    /** 鼠标左侧前进键。 */
17823b3eb3cSopenharmony_ci    UI_MOUSE_EVENT_BUTTON_FORWARD = 5,
17923b3eb3cSopenharmony_ci};
18023b3eb3cSopenharmony_ci
18123b3eb3cSopenharmony_ci/**
18223b3eb3cSopenharmony_ci * @brief Defines an enum for modifier keys.
18323b3eb3cSopenharmony_ci *
18423b3eb3cSopenharmony_ci * @since 12
18523b3eb3cSopenharmony_ci */
18623b3eb3cSopenharmony_citypedef enum {
18723b3eb3cSopenharmony_ci    /** Ctrl. */
18823b3eb3cSopenharmony_ci    ARKUI_MODIFIER_KEY_CTRL = 1 << 0,
18923b3eb3cSopenharmony_ci    /** Shift. */
19023b3eb3cSopenharmony_ci    ARKUI_MODIFIER_KEY_SHIFT = 1 << 1,
19123b3eb3cSopenharmony_ci    /** Alt. */
19223b3eb3cSopenharmony_ci    ARKUI_MODIFIER_KEY_ALT = 1 << 2,
19323b3eb3cSopenharmony_ci    /** Fn. */
19423b3eb3cSopenharmony_ci    ARKUI_MODIFIER_KEY_FN = 1 << 3,
19523b3eb3cSopenharmony_ci} ArkUI_ModifierKeyName;
19623b3eb3cSopenharmony_ci
19723b3eb3cSopenharmony_ci/**
19823b3eb3cSopenharmony_ci * @brief Obtains the type of this UI input event.
19923b3eb3cSopenharmony_ci *
20023b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
20123b3eb3cSopenharmony_ci * @return Returns the type of the current UI input event; returns <b>0</b> if any parameter error occurs.
20223b3eb3cSopenharmony_ci * @since 12
20323b3eb3cSopenharmony_ci */
20423b3eb3cSopenharmony_ciint32_t OH_ArkUI_UIInputEvent_GetType(const ArkUI_UIInputEvent* event);
20523b3eb3cSopenharmony_ci
20623b3eb3cSopenharmony_ci/**
20723b3eb3cSopenharmony_ci * @brief Obtains the action type of this UI input event.
20823b3eb3cSopenharmony_ci *
20923b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
21023b3eb3cSopenharmony_ci * @return Returns the action type of the current UI input event; returns <b>0</b> if any parameter error occurs.
21123b3eb3cSopenharmony_ci * @since 12
21223b3eb3cSopenharmony_ci */
21323b3eb3cSopenharmony_ciint32_t OH_ArkUI_UIInputEvent_GetAction(const ArkUI_UIInputEvent* event);
21423b3eb3cSopenharmony_ci
21523b3eb3cSopenharmony_ci/**
21623b3eb3cSopenharmony_ci * @brief Obtains the source type of this UI input event.
21723b3eb3cSopenharmony_ci *
21823b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
21923b3eb3cSopenharmony_ci * @return Returns the source type of the current UI input event.
22023b3eb3cSopenharmony_ci * @since 12
22123b3eb3cSopenharmony_ci */
22223b3eb3cSopenharmony_ciint32_t OH_ArkUI_UIInputEvent_GetSourceType(const ArkUI_UIInputEvent* event);
22323b3eb3cSopenharmony_ci
22423b3eb3cSopenharmony_ci/**
22523b3eb3cSopenharmony_ci * @brief Obtains the tool type of this UI input event.
22623b3eb3cSopenharmony_ci *
22723b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
22823b3eb3cSopenharmony_ci * @return Returns the tool type of the current UI input event.
22923b3eb3cSopenharmony_ci * @since 12
23023b3eb3cSopenharmony_ci */
23123b3eb3cSopenharmony_ciint32_t OH_ArkUI_UIInputEvent_GetToolType(const ArkUI_UIInputEvent* event);
23223b3eb3cSopenharmony_ci
23323b3eb3cSopenharmony_ci/**
23423b3eb3cSopenharmony_ci * @brief Obtains the time when this UI input event occurs.
23523b3eb3cSopenharmony_ci *
23623b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
23723b3eb3cSopenharmony_ci * @return Returns the time when the UI input event occurs; returns <b>0</b> if any parameter error occurs.
23823b3eb3cSopenharmony_ci * @since 12
23923b3eb3cSopenharmony_ci */
24023b3eb3cSopenharmony_ciint64_t OH_ArkUI_UIInputEvent_GetEventTime(const ArkUI_UIInputEvent* event);
24123b3eb3cSopenharmony_ci
24223b3eb3cSopenharmony_ci/**
24323b3eb3cSopenharmony_ci * @brief Obtains the number of touch points from a directional input event (such as a touch event, mouse event,
24423b3eb3cSopenharmony_ci * or axis event).
24523b3eb3cSopenharmony_ci *
24623b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
24723b3eb3cSopenharmony_ci * @return Returns the number of touch points for the directional input event.
24823b3eb3cSopenharmony_ci * @since 12
24923b3eb3cSopenharmony_ci */
25023b3eb3cSopenharmony_ciuint32_t OH_ArkUI_PointerEvent_GetPointerCount(const ArkUI_UIInputEvent* event);
25123b3eb3cSopenharmony_ci
25223b3eb3cSopenharmony_ci/**
25323b3eb3cSopenharmony_ci * @brief Obtains the ID of a touch point from a directional input event (such as a touch event, mouse event,
25423b3eb3cSopenharmony_ci * or axis event).
25523b3eb3cSopenharmony_ci *
25623b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
25723b3eb3cSopenharmony_ci * @param pointerIndex Indicates the index of the target touch point in the multi-touch data list.
25823b3eb3cSopenharmony_ci * @return Returns the ID of the corresponding touch point.
25923b3eb3cSopenharmony_ci * @since 12
26023b3eb3cSopenharmony_ci */
26123b3eb3cSopenharmony_ciint32_t OH_ArkUI_PointerEvent_GetPointerId(const ArkUI_UIInputEvent* event, uint32_t pointerIndex);
26223b3eb3cSopenharmony_ci
26323b3eb3cSopenharmony_ci/**
26423b3eb3cSopenharmony_ci * @brief Obtains the X coordinate relative to the upper left corner of the current component from a directional
26523b3eb3cSopenharmony_ci * input event (such as a touch event, mouse event, or axis event).
26623b3eb3cSopenharmony_ci *
26723b3eb3cSopenharmony_ci * @param event Indicates the pointer to the directional input event.
26823b3eb3cSopenharmony_ci * @return Returns the X coordinate relative to the upper left corner of the current component;
26923b3eb3cSopenharmony_ci * returns <b>0</b> if any parameter error occurs.
27023b3eb3cSopenharmony_ci * @since 12
27123b3eb3cSopenharmony_ci */
27223b3eb3cSopenharmony_cifloat OH_ArkUI_PointerEvent_GetX(const ArkUI_UIInputEvent* event);
27323b3eb3cSopenharmony_ci
27423b3eb3cSopenharmony_ci/**
27523b3eb3cSopenharmony_ci * @brief Obtains the X coordinate of a specific touch point relative to the upper left corner of the current component
27623b3eb3cSopenharmony_ci * from a directional input event (such as a touch event, mouse event, or axis event).
27723b3eb3cSopenharmony_ci *
27823b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
27923b3eb3cSopenharmony_ci * @param pointerIndex Indicates the index of the target touch point in the multi-touch data list.
28023b3eb3cSopenharmony_ci * @return Returns the X coordinate relative to the upper left corner of the current component;
28123b3eb3cSopenharmony_ci * returns <b>0.0f</b> if any parameter error occurs.
28223b3eb3cSopenharmony_ci * @since 12
28323b3eb3cSopenharmony_ci */
28423b3eb3cSopenharmony_cifloat OH_ArkUI_PointerEvent_GetXByIndex(const ArkUI_UIInputEvent* event, uint32_t pointerIndex);
28523b3eb3cSopenharmony_ci
28623b3eb3cSopenharmony_ci/**
28723b3eb3cSopenharmony_ci * @brief Obtains the Y coordinate relative to the upper left corner of the current component from a directional
28823b3eb3cSopenharmony_ci * input event (such as a touch event, mouse event, or axis event).
28923b3eb3cSopenharmony_ci *
29023b3eb3cSopenharmony_ci * @param event Indicates the pointer to the UI input event.
29123b3eb3cSopenharmony_ci * @return Returns the Y coordinate relative to the upper left corner of the current component;
29223b3eb3cSopenharmony_ci * returns <b>0</b> if any parameter error occurs.
29323b3eb3cSopenharmony_ci * @since 12
29423b3eb3cSopenharmony_ci */
29523b3eb3cSopenharmony_cifloat OH_ArkUI_PointerEvent_GetY(const ArkUI_UIInputEvent* event);
29623b3eb3cSopenharmony_ci
29723b3eb3cSopenharmony_ci/**
29823b3eb3cSopenharmony_ci * @brief Obtains the Y coordinate of a specific touch point relative to the upper left corner of the current component
29923b3eb3cSopenharmony_ci * from a directional input event (such as a touch event, mouse event, or axis event).
30023b3eb3cSopenharmony_ci *
30123b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
30223b3eb3cSopenharmony_ci * @param pointerIndex Indicates the index of the target touch point in the multi-touch data list.
30323b3eb3cSopenharmony_ci * @return Returns the Y coordinate relative to the upper left corner of the current component;
30423b3eb3cSopenharmony_ci * returns <b>0.0f</b> if any parameter error occurs.
30523b3eb3cSopenharmony_ci * @since 12
30623b3eb3cSopenharmony_ci */
30723b3eb3cSopenharmony_cifloat OH_ArkUI_PointerEvent_GetYByIndex(const ArkUI_UIInputEvent* event, uint32_t pointerIndex);
30823b3eb3cSopenharmony_ci
30923b3eb3cSopenharmony_ci/**
31023b3eb3cSopenharmony_ci * @brief Obtains the X coordinate relative to the upper left corner of the current application window from a
31123b3eb3cSopenharmony_ci * directional input event (such as a touch event, mouse event, or axis event).
31223b3eb3cSopenharmony_ci *
31323b3eb3cSopenharmony_ci * @param event Indicates the pointer to the UI input event.
31423b3eb3cSopenharmony_ci * @return Returns the X coordinate relative to the upper left corner of the current application window;
31523b3eb3cSopenharmony_ci * returns <b>0</b> if any parameter error occurs.
31623b3eb3cSopenharmony_ci * @since 12
31723b3eb3cSopenharmony_ci */
31823b3eb3cSopenharmony_cifloat OH_ArkUI_PointerEvent_GetWindowX(const ArkUI_UIInputEvent* event);
31923b3eb3cSopenharmony_ci
32023b3eb3cSopenharmony_ci/**
32123b3eb3cSopenharmony_ci * @brief Obtains the X coordinate of a specific touch point relative to the upper left corner of the current
32223b3eb3cSopenharmony_ci * application window from a directional input event (such as a touch event, mouse event, or axis event).
32323b3eb3cSopenharmony_ci *
32423b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
32523b3eb3cSopenharmony_ci * @param pointerIndex Indicates the index of the target touch point in the multi-touch data list.
32623b3eb3cSopenharmony_ci * @return Returns the X coordinate relative to the upper left corner of the current application window;
32723b3eb3cSopenharmony_ci * returns <b>0.0f</b> if any parameter error occurs.
32823b3eb3cSopenharmony_ci * @since 12
32923b3eb3cSopenharmony_ci */
33023b3eb3cSopenharmony_cifloat OH_ArkUI_PointerEvent_GetWindowXByIndex(const ArkUI_UIInputEvent* event, uint32_t pointerIndex);
33123b3eb3cSopenharmony_ci
33223b3eb3cSopenharmony_ci/**
33323b3eb3cSopenharmony_ci * @brief Obtains the Y coordinate relative to the upper left corner of the current application window from a
33423b3eb3cSopenharmony_ci * directional input event (such as a touch event, mouse event, or axis event).
33523b3eb3cSopenharmony_ci *
33623b3eb3cSopenharmony_ci * @param event Indicates the pointer to the UI input event.
33723b3eb3cSopenharmony_ci * @return Returns the Y coordinate relative to the upper left corner of the current application window;
33823b3eb3cSopenharmony_ci * returns <b>0</b> if any parameter error occurs.
33923b3eb3cSopenharmony_ci * @since 12
34023b3eb3cSopenharmony_ci */
34123b3eb3cSopenharmony_cifloat OH_ArkUI_PointerEvent_GetWindowY(const ArkUI_UIInputEvent* event);
34223b3eb3cSopenharmony_ci
34323b3eb3cSopenharmony_ci/**
34423b3eb3cSopenharmony_ci * @brief Obtains the Y coordinate of a specific touch point relative to the upper left corner of the current
34523b3eb3cSopenharmony_ci * application window from a directional input event (such as a touch event, mouse event, or axis event).
34623b3eb3cSopenharmony_ci *
34723b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
34823b3eb3cSopenharmony_ci * @param pointerIndex Indicates the index of the target touch point in the multi-touch data list.
34923b3eb3cSopenharmony_ci * @return Returns the Y coordinate relative to the upper left corner of the current application window;
35023b3eb3cSopenharmony_ci * returns <b>0.0f</b> if any parameter error occurs.
35123b3eb3cSopenharmony_ci * @since 12
35223b3eb3cSopenharmony_ci */
35323b3eb3cSopenharmony_cifloat OH_ArkUI_PointerEvent_GetWindowYByIndex(const ArkUI_UIInputEvent* event, uint32_t pointerIndex);
35423b3eb3cSopenharmony_ci
35523b3eb3cSopenharmony_ci/**
35623b3eb3cSopenharmony_ci * @brief Obtains the X coordinate relative to the upper left corner of the current screen from a directional input
35723b3eb3cSopenharmony_ci * event (such as a touch event, mouse event, or axis event).
35823b3eb3cSopenharmony_ci *
35923b3eb3cSopenharmony_ci * @param event Indicates the pointer to the UI input event.
36023b3eb3cSopenharmony_ci * @return Returns the X coordinate relative to the upper left corner of the current screen;
36123b3eb3cSopenharmony_ci * returns <b>0</b> if any parameter error occurs.
36223b3eb3cSopenharmony_ci * @since 12
36323b3eb3cSopenharmony_ci */
36423b3eb3cSopenharmony_cifloat OH_ArkUI_PointerEvent_GetDisplayX(const ArkUI_UIInputEvent* event);
36523b3eb3cSopenharmony_ci
36623b3eb3cSopenharmony_ci/**
36723b3eb3cSopenharmony_ci * @brief Obtains the X coordinate of a specific touch point relative to the upper left corner of the current screen
36823b3eb3cSopenharmony_ci * from a directional input event (such as a touch event, mouse event, or axis event).
36923b3eb3cSopenharmony_ci *
37023b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
37123b3eb3cSopenharmony_ci * @param pointerIndex Indicates the index of the target touch point in the multi-touch data list.
37223b3eb3cSopenharmony_ci * @return Returns the X coordinate relative to the upper left corner of the current screen;
37323b3eb3cSopenharmony_ci * returns <b>0.0f</b> if any parameter error occurs.
37423b3eb3cSopenharmony_ci * @since 12
37523b3eb3cSopenharmony_ci */
37623b3eb3cSopenharmony_cifloat OH_ArkUI_PointerEvent_GetDisplayXByIndex(const ArkUI_UIInputEvent* event, uint32_t pointerIndex);
37723b3eb3cSopenharmony_ci
37823b3eb3cSopenharmony_ci/**
37923b3eb3cSopenharmony_ci * @brief Obtains the Y coordinate relative to the upper left corner of the current screen from a directional input
38023b3eb3cSopenharmony_ci * event (such as a touch event, mouse event, or axis event).
38123b3eb3cSopenharmony_ci *
38223b3eb3cSopenharmony_ci * @param event Indicates the pointer to the UI input event.
38323b3eb3cSopenharmony_ci * @return Returns the Y coordinate relative to the upper left corner of the current screen;
38423b3eb3cSopenharmony_ci * returns <b>0</b> if any parameter error occurs.
38523b3eb3cSopenharmony_ci * @since 12
38623b3eb3cSopenharmony_ci */
38723b3eb3cSopenharmony_cifloat OH_ArkUI_PointerEvent_GetDisplayY(const ArkUI_UIInputEvent* event);
38823b3eb3cSopenharmony_ci
38923b3eb3cSopenharmony_ci/**
39023b3eb3cSopenharmony_ci * @brief Obtains the Y coordinate of a specific touch point relative to the upper left corner of the current screen
39123b3eb3cSopenharmony_ci * from a directional input event (such as a touch event, mouse event, or axis event).
39223b3eb3cSopenharmony_ci *
39323b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
39423b3eb3cSopenharmony_ci * @param pointerIndex Indicates the index of the target touch point in the multi-touch data list.
39523b3eb3cSopenharmony_ci * @return Returns the Y coordinate relative to the upper left corner of the current screen;
39623b3eb3cSopenharmony_ci * returns <b>0.0f</b> if any parameter error occurs.
39723b3eb3cSopenharmony_ci * @since 12
39823b3eb3cSopenharmony_ci */
39923b3eb3cSopenharmony_cifloat OH_ArkUI_PointerEvent_GetDisplayYByIndex(const ArkUI_UIInputEvent* event, uint32_t pointerIndex);
40023b3eb3cSopenharmony_ci
40123b3eb3cSopenharmony_ci/**
40223b3eb3cSopenharmony_ci * @brief Obtains the pressure applied to the touchscreen from a directional input event (for example, a touch event).
40323b3eb3cSopenharmony_ci *
40423b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
40523b3eb3cSopenharmony_ci * @param pointerIndex Indicates the index of the target touch point in the multi-touch data list.
40623b3eb3cSopenharmony_ci * @return Returns the pressure applied to the touchscreen; returns <b>0.0f</b> if any parameter error occurs.
40723b3eb3cSopenharmony_ci * @since 12
40823b3eb3cSopenharmony_ci */
40923b3eb3cSopenharmony_cifloat OH_ArkUI_PointerEvent_GetPressure(const ArkUI_UIInputEvent* event, uint32_t pointerIndex);
41023b3eb3cSopenharmony_ci
41123b3eb3cSopenharmony_ci/**
41223b3eb3cSopenharmony_ci * @brief Obtains the angle relative to the YZ plane from a directional input event (for example, a touch event).
41323b3eb3cSopenharmony_ci * The value range is [-90, 90]. A positive value indicates a rightward tilt.
41423b3eb3cSopenharmony_ci *
41523b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
41623b3eb3cSopenharmony_ci * @param pointerIndex Indicates the index of the target touch point in the multi-touch data list.
41723b3eb3cSopenharmony_ci * @return Returns the angle relative to the YZ plane.
41823b3eb3cSopenharmony_ci * @since 12
41923b3eb3cSopenharmony_ci */
42023b3eb3cSopenharmony_cifloat OH_ArkUI_PointerEvent_GetTiltX(const ArkUI_UIInputEvent* event, uint32_t pointerIndex);
42123b3eb3cSopenharmony_ci
42223b3eb3cSopenharmony_ci/**
42323b3eb3cSopenharmony_ci * @brief Obtains the angle relative to the XZ plane from a directional input event (for example, a touch event).
42423b3eb3cSopenharmony_ci * The value range is [-90, 90]. A positive value indicates a downward tilt.
42523b3eb3cSopenharmony_ci *
42623b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
42723b3eb3cSopenharmony_ci * @param pointerIndex Indicates the index of the target touch point in the multi-touch data list.
42823b3eb3cSopenharmony_ci * @return Returns the angle relative to the XZ plane.
42923b3eb3cSopenharmony_ci * @since 12
43023b3eb3cSopenharmony_ci */
43123b3eb3cSopenharmony_cifloat OH_ArkUI_PointerEvent_GetTiltY(const ArkUI_UIInputEvent* event, uint32_t pointerIndex);
43223b3eb3cSopenharmony_ci
43323b3eb3cSopenharmony_ci/**
43423b3eb3cSopenharmony_ci * @brief Obtains the width of the touch area from a directional input event (for example, a touch event).
43523b3eb3cSopenharmony_ci *
43623b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
43723b3eb3cSopenharmony_ci * @param pointerIndex Indicates the index of the target touch point in the multi-touch data list.
43823b3eb3cSopenharmony_ci * @return Returns the width of the touch area.
43923b3eb3cSopenharmony_ci * @since 12
44023b3eb3cSopenharmony_ci */
44123b3eb3cSopenharmony_cifloat OH_ArkUI_PointerEvent_GetTouchAreaWidth(const ArkUI_UIInputEvent* event, uint32_t pointerIndex);
44223b3eb3cSopenharmony_ci
44323b3eb3cSopenharmony_ci/**
44423b3eb3cSopenharmony_ci * @brief Obtains the height of the touch area from a directional input event (for example, a touch event).
44523b3eb3cSopenharmony_ci *
44623b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
44723b3eb3cSopenharmony_ci * @param pointerIndex Indicates the index of the target touch point in the multi-touch data list.
44823b3eb3cSopenharmony_ci * @return Returns the height of the touch area.
44923b3eb3cSopenharmony_ci * @since 12
45023b3eb3cSopenharmony_ci */
45123b3eb3cSopenharmony_cifloat OH_ArkUI_PointerEvent_GetTouchAreaHeight(const ArkUI_UIInputEvent* event, uint32_t pointerIndex);
45223b3eb3cSopenharmony_ci
45323b3eb3cSopenharmony_ci/**
45423b3eb3cSopenharmony_ci * @brief Obtains the number of historical events from a directional input event (such as a touch event, mouse event,
45523b3eb3cSopenharmony_ci * or axis event).
45623b3eb3cSopenharmony_ci *
45723b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
45823b3eb3cSopenharmony_ci * @return Returns the number of historical events.
45923b3eb3cSopenharmony_ci * @since 12
46023b3eb3cSopenharmony_ci */
46123b3eb3cSopenharmony_ciuint32_t OH_ArkUI_PointerEvent_GetHistorySize(const ArkUI_UIInputEvent* event);
46223b3eb3cSopenharmony_ci
46323b3eb3cSopenharmony_ci/**
46423b3eb3cSopenharmony_ci * @brief Obtains the occurrence time of a historical event from a directional input event (such as a touch event,
46523b3eb3cSopenharmony_ci * mouse event, or axis event).
46623b3eb3cSopenharmony_ci *
46723b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
46823b3eb3cSopenharmony_ci * @param historyIndex Indicates the index of the target historical event.
46923b3eb3cSopenharmony_ci * @return Returns the time when the UI input event occurs; returns <b>0</b> if any parameter error occurs.
47023b3eb3cSopenharmony_ci * @since 12
47123b3eb3cSopenharmony_ci */
47223b3eb3cSopenharmony_ciint64_t OH_ArkUI_PointerEvent_GetHistoryEventTime(const ArkUI_UIInputEvent* event, uint32_t historyIndex);
47323b3eb3cSopenharmony_ci
47423b3eb3cSopenharmony_ci/**
47523b3eb3cSopenharmony_ci * @brief Obtains the number of touch points in a specific historical event from a directional input event (such as
47623b3eb3cSopenharmony_ci * a touch event, mouse event, or axis event).
47723b3eb3cSopenharmony_ci *
47823b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
47923b3eb3cSopenharmony_ci * @param historyIndex Indicates the index of the target historical event.
48023b3eb3cSopenharmony_ci * @return Returns the number of touch points in the specified historical event
48123b3eb3cSopenharmony_ci * @since 12
48223b3eb3cSopenharmony_ci */
48323b3eb3cSopenharmony_ciuint32_t OH_ArkUI_PointerEvent_GetHistoryPointerCount(const ArkUI_UIInputEvent* event, uint32_t historyIndex);
48423b3eb3cSopenharmony_ci
48523b3eb3cSopenharmony_ci/**
48623b3eb3cSopenharmony_ci * @brief Obtains the ID of a touch point in a specific historical event from a directional input event (such as
48723b3eb3cSopenharmony_ci * a touch event, mouse event, or axis event).
48823b3eb3cSopenharmony_ci *
48923b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
49023b3eb3cSopenharmony_ci * @param pointerIndex Indicates the index of the target touch point in the multi-touch data list.
49123b3eb3cSopenharmony_ci * @param historyIndex Indicates the index of the target historical event.
49223b3eb3cSopenharmony_ci * @return Returns the ID of the corresponding touch point in the specified historical event.
49323b3eb3cSopenharmony_ci * @since 12
49423b3eb3cSopenharmony_ci */
49523b3eb3cSopenharmony_ciint32_t OH_ArkUI_PointerEvent_GetHistoryPointerId(
49623b3eb3cSopenharmony_ci    const ArkUI_UIInputEvent* event, uint32_t pointerIndex, uint32_t historyIndex);
49723b3eb3cSopenharmony_ci
49823b3eb3cSopenharmony_ci/**
49923b3eb3cSopenharmony_ci * @brief Obtains the X coordinate of a specific touch point in a historical event relative to the upper left corner
50023b3eb3cSopenharmony_ci * of the current component from a directional input event (such as a touch event, mouse event, or axis event).
50123b3eb3cSopenharmony_ci *
50223b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
50323b3eb3cSopenharmony_ci * @param pointerIndex Indicates the index of the target touch point in the multi-touch data list.
50423b3eb3cSopenharmony_ci * @param historyIndex Indicates the index of the target historical event.
50523b3eb3cSopenharmony_ci * @return Returns the X coordinate relative to the upper left corner of the current component;
50623b3eb3cSopenharmony_ci * returns <b>0.0f</b> if any parameter error occurs.
50723b3eb3cSopenharmony_ci * @since 12
50823b3eb3cSopenharmony_ci */
50923b3eb3cSopenharmony_cifloat OH_ArkUI_PointerEvent_GetHistoryX(const ArkUI_UIInputEvent* event, uint32_t pointerIndex, uint32_t historyIndex);
51023b3eb3cSopenharmony_ci
51123b3eb3cSopenharmony_ci/**
51223b3eb3cSopenharmony_ci * @brief Obtains the Y coordinate of a specific touch point in a historical event relative to the upper left corner
51323b3eb3cSopenharmony_ci * of the current component from a directional input event (such as a touch event, mouse event, or axis event).
51423b3eb3cSopenharmony_ci *
51523b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
51623b3eb3cSopenharmony_ci * @param pointerIndex Indicates the index of the target touch point in the multi-touch data list.
51723b3eb3cSopenharmony_ci * @param historyIndex Indicates the index of the target historical event.
51823b3eb3cSopenharmony_ci * @return Returns the Y coordinate relative to the upper left corner of the current component;
51923b3eb3cSopenharmony_ci * returns <b>0.0f</b> if any parameter error occurs.
52023b3eb3cSopenharmony_ci * @since 12
52123b3eb3cSopenharmony_ci */
52223b3eb3cSopenharmony_cifloat OH_ArkUI_PointerEvent_GetHistoryY(const ArkUI_UIInputEvent* event, uint32_t pointerIndex, uint32_t historyIndex);
52323b3eb3cSopenharmony_ci
52423b3eb3cSopenharmony_ci/**
52523b3eb3cSopenharmony_ci * @brief Obtains the X coordinate of a specific touch point in a historical event relative to the upper left corner
52623b3eb3cSopenharmony_ci * of the current application window from a directional input event (such as a touch event, mouse event, or axis event).
52723b3eb3cSopenharmony_ci *
52823b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
52923b3eb3cSopenharmony_ci * @param pointerIndex Indicates the index of the target touch point in the multi-touch data list.
53023b3eb3cSopenharmony_ci * @param historyIndex Indicates the index of the target historical event.
53123b3eb3cSopenharmony_ci * @return Returns the X coordinate relative to the upper left corner of the current application window;
53223b3eb3cSopenharmony_ci * returns <b>0.0f</b> if any parameter error occurs.
53323b3eb3cSopenharmony_ci * @since 12
53423b3eb3cSopenharmony_ci */
53523b3eb3cSopenharmony_cifloat OH_ArkUI_PointerEvent_GetHistoryWindowX(
53623b3eb3cSopenharmony_ci    const ArkUI_UIInputEvent* event, uint32_t pointerIndex, uint32_t historyIndex);
53723b3eb3cSopenharmony_ci
53823b3eb3cSopenharmony_ci/**
53923b3eb3cSopenharmony_ci * @brief Obtains the Y coordinate of a specific touch point in a historical event relative to the upper left corner
54023b3eb3cSopenharmony_ci * of the current application window from a directional input event (such as a touch event, mouse event, or axis event).
54123b3eb3cSopenharmony_ci *
54223b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
54323b3eb3cSopenharmony_ci * @param pointerIndex Indicates the index of the target touch point in the multi-touch data list.
54423b3eb3cSopenharmony_ci * @param historyIndex Indicates the index of the target historical event.
54523b3eb3cSopenharmony_ci * @return Returns the Y coordinate relative to the upper left corner of the current application window;
54623b3eb3cSopenharmony_ci * returns <b>0.0f</b> if any parameter error occurs.
54723b3eb3cSopenharmony_ci * @since 12
54823b3eb3cSopenharmony_ci */
54923b3eb3cSopenharmony_cifloat OH_ArkUI_PointerEvent_GetHistoryWindowY(
55023b3eb3cSopenharmony_ci    const ArkUI_UIInputEvent* event, uint32_t pointerIndex, uint32_t historyIndex);
55123b3eb3cSopenharmony_ci
55223b3eb3cSopenharmony_ci/**
55323b3eb3cSopenharmony_ci * @brief Obtains the X coordinate of a specific touch point in a historical event relative to the upper left corner
55423b3eb3cSopenharmony_ci * of the current screen from a directional input event (such as a touch event, mouse event, or axis event).
55523b3eb3cSopenharmony_ci *
55623b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
55723b3eb3cSopenharmony_ci * @param pointerIndex Indicates the index of the target touch point in the multi-touch data list.
55823b3eb3cSopenharmony_ci * @param historyIndex Indicates the index of the target historical event.
55923b3eb3cSopenharmony_ci * @return Returns the X coordinate relative to the upper left corner of the current screen;
56023b3eb3cSopenharmony_ci * returns <b>0.0f</b> if any parameter error occurs.
56123b3eb3cSopenharmony_ci * @since 12
56223b3eb3cSopenharmony_ci */
56323b3eb3cSopenharmony_cifloat OH_ArkUI_PointerEvent_GetHistoryDisplayX(
56423b3eb3cSopenharmony_ci    const ArkUI_UIInputEvent* event, uint32_t pointerIndex, uint32_t historyIndex);
56523b3eb3cSopenharmony_ci
56623b3eb3cSopenharmony_ci/**
56723b3eb3cSopenharmony_ci * @brief Obtains the Y coordinate of a specific touch point in a historical event relative to the upper left corner
56823b3eb3cSopenharmony_ci * of the current screen from a directional input event (such as a touch event, mouse event, or axis event).
56923b3eb3cSopenharmony_ci *
57023b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
57123b3eb3cSopenharmony_ci * @param pointerIndex Indicates the index of the target touch point in the multi-touch data list.
57223b3eb3cSopenharmony_ci * @param historyIndex Indicates the index of the target historical event.
57323b3eb3cSopenharmony_ci * @return Returns the Y coordinate relative to the upper left corner of the current screen;
57423b3eb3cSopenharmony_ci * returns <b>0.0f</b> if any parameter error occurs.
57523b3eb3cSopenharmony_ci * @since 12
57623b3eb3cSopenharmony_ci */
57723b3eb3cSopenharmony_cifloat OH_ArkUI_PointerEvent_GetHistoryDisplayY(
57823b3eb3cSopenharmony_ci    const ArkUI_UIInputEvent* event, uint32_t pointerIndex, uint32_t historyIndex);
57923b3eb3cSopenharmony_ci
58023b3eb3cSopenharmony_ci/**
58123b3eb3cSopenharmony_ci * @brief Obtains the pressure applied to the touchscreen in a specific historical event from a directional input event
58223b3eb3cSopenharmony_ci * (for example, a touch event)..
58323b3eb3cSopenharmony_ci *
58423b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
58523b3eb3cSopenharmony_ci * @param pointerIndex Indicates the index of the target touch point in the multi-touch data list.
58623b3eb3cSopenharmony_ci * @param historyIndex Indicates the index of the target historical event.
58723b3eb3cSopenharmony_ci * @return Returns the pressure applied to the touchscreen; returns <b>0.0f</b> if any parameter error occurs.
58823b3eb3cSopenharmony_ci * @since 12
58923b3eb3cSopenharmony_ci */
59023b3eb3cSopenharmony_cifloat OH_ArkUI_PointerEvent_GetHistoryPressure(
59123b3eb3cSopenharmony_ci    const ArkUI_UIInputEvent* event, uint32_t pointerIndex, uint32_t historyIndex);
59223b3eb3cSopenharmony_ci
59323b3eb3cSopenharmony_ci/**
59423b3eb3cSopenharmony_ci * @brief Obtains the angle relative to the YZ plane in a specific historical event from a directional input event
59523b3eb3cSopenharmony_ci * (for example, a touch event). The value range is [-90, 90]. A positive value indicates a rightward tilt.
59623b3eb3cSopenharmony_ci *
59723b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
59823b3eb3cSopenharmony_ci * @param pointerIndex Indicates the index of the target touch point in the multi-touch data list.
59923b3eb3cSopenharmony_ci * @param historyIndex Indicates the index of the target historical event.
60023b3eb3cSopenharmony_ci * @return Returns the angle relative to the YZ plane.
60123b3eb3cSopenharmony_ci * @since 12
60223b3eb3cSopenharmony_ci */
60323b3eb3cSopenharmony_cifloat OH_ArkUI_PointerEvent_GetHistoryTiltX(
60423b3eb3cSopenharmony_ci    const ArkUI_UIInputEvent* event, uint32_t pointerIndex, uint32_t historyIndex);
60523b3eb3cSopenharmony_ci
60623b3eb3cSopenharmony_ci/**
60723b3eb3cSopenharmony_ci * @brief Obtains the angle relative to the XZ plane in a specific historical event from a directional input event
60823b3eb3cSopenharmony_ci * (for example, a touch event). The value range is [-90, 90]. A positive value indicates a downward tilt.
60923b3eb3cSopenharmony_ci *
61023b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
61123b3eb3cSopenharmony_ci * @param pointerIndex Indicates the index of the target touch point in the multi-touch data list.
61223b3eb3cSopenharmony_ci * @param historyIndex Indicates the index of the target historical event.
61323b3eb3cSopenharmony_ci * @return Returns the angle relative to the XZ plane.
61423b3eb3cSopenharmony_ci * @since 12
61523b3eb3cSopenharmony_ci */
61623b3eb3cSopenharmony_cifloat OH_ArkUI_PointerEvent_GetHistoryTiltY(
61723b3eb3cSopenharmony_ci    const ArkUI_UIInputEvent* event, uint32_t pointerIndex, uint32_t historyIndex);
61823b3eb3cSopenharmony_ci
61923b3eb3cSopenharmony_ci/**
62023b3eb3cSopenharmony_ci * @brief Obtains the width of the touch area in a specific historical event from a directional input event
62123b3eb3cSopenharmony_ci * (for example, a touch event).
62223b3eb3cSopenharmony_ci *
62323b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
62423b3eb3cSopenharmony_ci * @param pointerIndex Indicates the index of the target touch point in the multi-touch data list.
62523b3eb3cSopenharmony_ci * @param historyIndex Indicates the index of the target historical event.
62623b3eb3cSopenharmony_ci * @return Returns the width of the touch area.
62723b3eb3cSopenharmony_ci * @since 12
62823b3eb3cSopenharmony_ci */
62923b3eb3cSopenharmony_cifloat OH_ArkUI_PointerEvent_GetHistoryTouchAreaWidth(
63023b3eb3cSopenharmony_ci    const ArkUI_UIInputEvent* event, uint32_t pointerIndex, uint32_t historyIndex);
63123b3eb3cSopenharmony_ci
63223b3eb3cSopenharmony_ci/**
63323b3eb3cSopenharmony_ci * @brief Obtains the height of the touch area in a specific historical event from a directional input event
63423b3eb3cSopenharmony_ci * (for example, a touch event).
63523b3eb3cSopenharmony_ci *
63623b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
63723b3eb3cSopenharmony_ci * @param pointerIndex Indicates the index of the target touch point in the multi-touch data list.
63823b3eb3cSopenharmony_ci * @param historyIndex Indicates the index of the target historical event.
63923b3eb3cSopenharmony_ci * @return Returns the height of the touch area.
64023b3eb3cSopenharmony_ci * @since 12
64123b3eb3cSopenharmony_ci */
64223b3eb3cSopenharmony_cifloat OH_ArkUI_PointerEvent_GetHistoryTouchAreaHeight(
64323b3eb3cSopenharmony_ci    const ArkUI_UIInputEvent* event, uint32_t pointerIndex, uint32_t historyIndex);
64423b3eb3cSopenharmony_ci
64523b3eb3cSopenharmony_ci/**
64623b3eb3cSopenharmony_ci * @brief Obtains the value of the vertical scroll axis for this axis event.
64723b3eb3cSopenharmony_ci *
64823b3eb3cSopenharmony_ci * @param event Indicates the pointer to the UI input event.
64923b3eb3cSopenharmony_ci * @return Returns the value of the vertical scroll axis of the current axis event;
65023b3eb3cSopenharmony_ci * returns <b>0</b> if any parameter error occurs.
65123b3eb3cSopenharmony_ci * @since 12
65223b3eb3cSopenharmony_ci */
65323b3eb3cSopenharmony_cidouble OH_ArkUI_AxisEvent_GetVerticalAxisValue(const ArkUI_UIInputEvent* event);
65423b3eb3cSopenharmony_ci
65523b3eb3cSopenharmony_ci/**
65623b3eb3cSopenharmony_ci * @brief Obtains the value of the horizontal scroll axis for this axis event.
65723b3eb3cSopenharmony_ci *
65823b3eb3cSopenharmony_ci * @param event Indicates the pointer to the UI input event.
65923b3eb3cSopenharmony_ci * @return Returns the value of the horizontal scroll axis of the current axis event;
66023b3eb3cSopenharmony_ci * returns <b>0</b> if any parameter error occurs.
66123b3eb3cSopenharmony_ci * @since 12
66223b3eb3cSopenharmony_ci */
66323b3eb3cSopenharmony_cidouble OH_ArkUI_AxisEvent_GetHorizontalAxisValue(const ArkUI_UIInputEvent* event);
66423b3eb3cSopenharmony_ci
66523b3eb3cSopenharmony_ci/**
66623b3eb3cSopenharmony_ci * @brief Obtains the scale value of the pinch axis for this axis event.
66723b3eb3cSopenharmony_ci *
66823b3eb3cSopenharmony_ci * @param event Indicates the pointer to the UI input event.
66923b3eb3cSopenharmony_ci * @return Returns the scale value of the pinch axis of the current axis event;
67023b3eb3cSopenharmony_ci * returns <b>0</b> if any parameter error occurs.
67123b3eb3cSopenharmony_ci * @since 12
67223b3eb3cSopenharmony_ci */
67323b3eb3cSopenharmony_cidouble OH_ArkUI_AxisEvent_GetPinchAxisScaleValue(const ArkUI_UIInputEvent* event);
67423b3eb3cSopenharmony_ci
67523b3eb3cSopenharmony_ci/**
67623b3eb3cSopenharmony_ci * @brief Sets how the component behaves during hit testing.
67723b3eb3cSopenharmony_ci *
67823b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
67923b3eb3cSopenharmony_ci * @param mode Indicates how the component behaves during hit testing. The parameter type is {@link HitTestMode}.
68023b3eb3cSopenharmony_ci * @return Returns the status code of the execution.
68123b3eb3cSopenharmony_ci * @since 12
68223b3eb3cSopenharmony_ci */
68323b3eb3cSopenharmony_ciint32_t OH_ArkUI_PointerEvent_SetInterceptHitTestMode(const ArkUI_UIInputEvent* event, HitTestMode mode);
68423b3eb3cSopenharmony_ci
68523b3eb3cSopenharmony_ci/**
68623b3eb3cSopenharmony_ci * @brief 获取鼠标事件的按键类型的值。
68723b3eb3cSopenharmony_ci *
68823b3eb3cSopenharmony_ci * @param event 表示指向当前UI输入事件的指针。
68923b3eb3cSopenharmony_ci * @return 返回鼠标按键类型,1为左键,2为右键,3为中键,4为后退键,5为前进键。
69023b3eb3cSopenharmony_ci * @since 12
69123b3eb3cSopenharmony_ci */
69223b3eb3cSopenharmony_ciint32_t OH_ArkUI_MouseEvent_GetMouseButton(const ArkUI_UIInputEvent* event);
69323b3eb3cSopenharmony_ci
69423b3eb3cSopenharmony_ci/**
69523b3eb3cSopenharmony_ci * @brief 获取鼠标事件的鼠标动作类型的值。
69623b3eb3cSopenharmony_ci *
69723b3eb3cSopenharmony_ci * @param event 表示指向当前UI输入事件的指针。
69823b3eb3cSopenharmony_ci * @return 返回鼠标动作类型,1表示按键按下,2表示按键松开,3表示鼠标移动。
69923b3eb3cSopenharmony_ci * @since 12
70023b3eb3cSopenharmony_ci */
70123b3eb3cSopenharmony_ciint32_t OH_ArkUI_MouseEvent_GetMouseAction(const ArkUI_UIInputEvent* event);
70223b3eb3cSopenharmony_ci
70323b3eb3cSopenharmony_ci/**
70423b3eb3cSopenharmony_ci * @brief Sets whether to prevent event bubbling.
70523b3eb3cSopenharmony_ci *
70623b3eb3cSopenharmony_ci * @param event Indicates the pointer to the current UI input event.
70723b3eb3cSopenharmony_ci * @param stopPropagation Indicates whether the event is prevented from bubbling.
70823b3eb3cSopenharmony_ci * @return Returns the status code of the execution. If 0 is returned, the setting is successful.
70923b3eb3cSopenharmony_ci *         If 401 is returned, the execution fails.
71023b3eb3cSopenharmony_ci *         The possible cause of the failure is that the event parameter is abnormal, such as a null pointer.
71123b3eb3cSopenharmony_ci * @since 12
71223b3eb3cSopenharmony_ci */
71323b3eb3cSopenharmony_ciint32_t OH_ArkUI_PointerEvent_SetStopPropagation(const ArkUI_UIInputEvent* event, bool stopPropagation);
71423b3eb3cSopenharmony_ci
71523b3eb3cSopenharmony_ci#ifdef __cplusplus
71623b3eb3cSopenharmony_ci};
71723b3eb3cSopenharmony_ci#endif
71823b3eb3cSopenharmony_ci
71923b3eb3cSopenharmony_ci#endif // _ARKUI_UI_INPUT_EVENT_H_
72023b3eb3cSopenharmony_ci/** @} */
721