• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# ArkUI_EventModule
2
3
4## Overview
5
6Declares the UI input event capabilities provided by ArkUI on the native side.
7
8**Since**: 12
9
10
11## Summary
12
13
14### File
15
16| Name| Description|
17| -------- | -------- |
18| [ui_input_event.h](ui__input__event_8h.md) | Provides ArkUI event definitions on the native side. |
19
20
21### Types
22
23| Name| Description|
24| -------- | -------- |
25| typedef struct [ArkUI_UIInputEvent](#arkui_uiinputevent) [ArkUI_UIInputEvent](#arkui_uiinputevent) | Defines the UI input event. |
26
27
28### Enums
29
30| Name| Description|
31| -------- | -------- |
32| [ArkUI_UIInputEvent_Type](#arkui_uiinputevent_type) { ARKUI_UIINPUTEVENT_TYPE_UNKNOWN = 0, ARKUI_UIINPUTEVENT_TYPE_TOUCH = 1, ARKUI_UIINPUTEVENT_TYPE_AXIS = 2, ARKUI_UIINPUTEVENT_TYPE_MOUSE = 3 } | Enumerates the UI input event types. |
33| {<br>OH_NATIVEXCOMPONENT_RESULT_SUCCESS = 0, OH_NATIVEXCOMPONENT_RESULT_FAILED = -1, OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER = -2, UI_TOUCH_EVENT_ACTION_CANCEL = 0,<br>UI_TOUCH_EVENT_ACTION_DOWN = 1, UI_TOUCH_EVENT_ACTION_MOVE = 2, UI_TOUCH_EVENT_ACTION_UP = 3<br>} | Enumerates the action codes of the input event. |
34| {<br>UI_INPUT_EVENT_TOOL_TYPE_UNKNOWN = 0, UI_INPUT_EVENT_TOOL_TYPE_FINGER = 1, UI_INPUT_EVENT_TOOL_TYPE_PEN = 2, UI_INPUT_EVENT_TOOL_TYPE_MOUSE = 3,<br>UI_INPUT_EVENT_TOOL_TYPE_TOUCHPAD = 4, UI_INPUT_EVENT_TOOL_TYPE_JOYSTICK = 5<br>} | Enumerates the tool types of the input event. |
35| { UI_INPUT_EVENT_SOURCE_TYPE_UNKNOWN = 0, UI_INPUT_EVENT_SOURCE_TYPE_MOUSE = 1, UI_INPUT_EVENT_SOURCE_TYPE_TOUCH_SCREEN = 2 } | Enumerates the source types of the input event. |
36| [HitTestMode](#hittestmode) { HTM_DEFAULT = 0, HTM_BLOCK, HTM_TRANSPARENT, HTM_NONE } | Enumerates the hit test modes. |
37| { UI_MOUSE_EVENT_ACTION_UNKNOWN = 0, UI_MOUSE_EVENT_ACTION_PRESS = 1, UI_MOUSE_EVENT_ACTION_RELEASE = 2, UI_MOUSE_EVENT_ACTION_MOVE = 3, UI_MOUSE_EVENT_ACTION_CANCEL = 13 } | Enumerates the action codes of the mouse event. |
38| {<br>UI_MOUSE_EVENT_BUTTON_NONE = 0, UI_MOUSE_EVENT_BUTTON_LEFT = 1, UI_MOUSE_EVENT_BUTTON_RIGHT = 2, UI_MOUSE_EVENT_BUTTON_MIDDLE = 3,<br>UI_MOUSE_EVENT_BUTTON_BACK = 4, UI_MOUSE_EVENT_BUTTON_FORWARD = 5<br>} | Enumerates the button types of the mouse event. |
39| [ArkUI_ModifierKeyName](#arkui_modifierkeyname) { ARKUI_MODIFIER_KEY_CTRL = 1 &lt;&lt; 0, ARKUI_MODIFIER_KEY_SHIFT = 1 &lt;&lt; 1, ARKUI_MODIFIER_KEY_ALT = 1 &lt;&lt; 2, ARKUI_MODIFIER_KEY_FN = 1 &lt;&lt; 3 } | Enumerates the modifier keys. |
40| {<br>UI_FOCUS_AXIS_EVENT_ABS_X = 0, UI_FOCUS_AXIS_EVENT_ABS_Y = 1, UI_FOCUS_AXIS_EVENT_ABS_Z = 2, UI_FOCUS_AXIS_EVENT_ABS_RZ = 3,<br>UI_FOCUS_AXIS_EVENT_ABS_GAS = 4, UI_FOCUS_AXIS_EVENT_ABS_BRAKE = 5, UI_FOCUS_AXIS_EVENT_ABS_HAT0X = 6, UI_FOCUS_AXIS_EVENT_ABS_HAT0Y = 7<br>} | Enumerates the axis types for focus axis events. |
41| {<br>ARKUI_EVENT_HAND_NONE = 0, ARKUI_EVENT_HAND_LEFT = 1, ARKUI_EVENT_HAND_RIGHT = 2<br>} | Defines whether an event is triggered by a left-hand or right-hand tap. |
42
43
44### Functions
45
46| Name| Description|
47| -------- | -------- |
48| int32_t [OH_ArkUI_UIInputEvent_GetType](#oh_arkui_uiinputevent_gettype) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event) | Obtains the type of a UI input event. |
49| int32_t [OH_ArkUI_UIInputEvent_GetAction](#oh_arkui_uiinputevent_getaction) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event) | Obtains the action type of this UI input event. |
50| int32_t [OH_ArkUI_UIInputEvent_GetSourceType](#oh_arkui_uiinputevent_getsourcetype) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event) | Obtains the source type of a UI input event. |
51| int32_t [OH_ArkUI_UIInputEvent_GetToolType](#oh_arkui_uiinputevent_gettooltype) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event) | Obtains the tool type of a UI input event. |
52| int64_t [OH_ArkUI_UIInputEvent_GetEventTime](#oh_arkui_uiinputevent_geteventtime) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event) | Obtains the time when a specified UI input event occurs. |
53| uint32_t [OH_ArkUI_PointerEvent_GetPointerCount](#oh_arkui_pointerevent_getpointercount) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event) | Obtains the number of touch points from a directional input event (such as a touch event, mouse event, or axis event). |
54| int32_t [OH_ArkUI_PointerEvent_GetPointerId](#oh_arkui_pointerevent_getpointerid) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, uint32_t pointerIndex) | Obtains the ID of a touch point from a directional input event (such as a touch event, mouse event, or axis event). |
55| int32_t [OH_ArkUI_PointerEvent_GetChangedPointerId](#oh_arkui_pointerevent_getchangedpointerid) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, uint32_t \*pointerIndex) | Obtains the ID of the touch pointer that triggers the current touch event. |
56| float [OH_ArkUI_PointerEvent_GetX](#oh_arkui_pointerevent_getx) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event) | Obtains the X-coordinate relative to the upper left corner of the current component from a directional input event (such as a touch event, mouse event, or axis event). |
57| float [OH_ArkUI_PointerEvent_GetXByIndex](#oh_arkui_pointerevent_getxbyindex) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, uint32_t pointerIndex) | Obtains the X-coordinate of a specific touch point relative to the upper left corner of the current component from a directional input event (such as a touch event, mouse event, or axis event). |
58| float [OH_ArkUI_PointerEvent_GetY](#oh_arkui_pointerevent_gety) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event) | Obtains the Y-coordinate relative to the upper left corner of the current component from a directional input event (such as a touch event, mouse event, or axis event). |
59| float [OH_ArkUI_PointerEvent_GetYByIndex](#oh_arkui_pointerevent_getybyindex) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, uint32_t pointerIndex) | Obtains the Y-coordinate of a specific touch point relative to the upper left corner of the current component from a directional input event (such as a touch event, mouse event, or axis event). |
60| float [OH_ArkUI_PointerEvent_GetWindowX](#oh_arkui_pointerevent_getwindowx) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event) | Obtains the X-coordinate relative to the upper left corner of the current application window from a directional input event (such as a touch event, mouse event, or axis event). |
61| float [OH_ArkUI_PointerEvent_GetWindowXByIndex](#oh_arkui_pointerevent_getwindowxbyindex) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, uint32_t pointerIndex) | Obtains the X-coordinate of a specific touch point relative to the upper left corner of the current application window from a directional input event (such as a touch event, mouse event, or axis event). |
62| float [OH_ArkUI_PointerEvent_GetWindowY](#oh_arkui_pointerevent_getwindowy) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event) | Obtains the Y-coordinate relative to the upper left corner of the current application window from a directional input event (such as a touch event, mouse event, or axis event). |
63| float [OH_ArkUI_PointerEvent_GetWindowYByIndex](#oh_arkui_pointerevent_getwindowybyindex) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, uint32_t pointerIndex) | Obtains the Y-coordinate of a specific touch point relative to the upper left corner of the current application window from a directional input event (such as a touch event, mouse event, or axis event). |
64| float [OH_ArkUI_PointerEvent_GetDisplayX](#oh_arkui_pointerevent_getdisplayx) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event) | Obtains the X-coordinate relative to the upper left corner of the current screen from a directional input event (such as a touch event, mouse event, or axis event). |
65| float [OH_ArkUI_PointerEvent_GetDisplayXByIndex](#oh_arkui_pointerevent_getdisplayxbyindex) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, uint32_t pointerIndex) | Obtains the X-coordinate of a specific touch point relative to the upper left corner of the current screen from a directional input event (such as a touch event, mouse event, or axis event). |
66| float [OH_ArkUI_PointerEvent_GetDisplayY](#oh_arkui_pointerevent_getdisplayy) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event) | Obtains the Y-coordinate relative to the upper left corner of the current screen from a directional input event (such as a touch event, mouse event, or axis event). |
67| float [OH_ArkUI_PointerEvent_GetDisplayYByIndex](#oh_arkui_pointerevent_getdisplayybyindex) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, uint32_t pointerIndex) | Obtains the Y-coordinate of a specific touch point relative to the upper left corner of the current screen from a directional input event (such as a touch event, mouse event, or axis event). |
68| float [OH_ArkUI_PointerEvent_GetPressure](#oh_arkui_pointerevent_getpressure) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, uint32_t pointerIndex) | Obtains the pressure applied to the touchscreen from a directional input event (for example, a touch event). |
69| float [OH_ArkUI_PointerEvent_GetTiltX](#oh_arkui_pointerevent_gettiltx) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, uint32_t pointerIndex) | Obtains the angle relative to the YZ plane from a directional input event (for example, a touch event). The value range is [-90, 90]. A positive value indicates a rightward tilt. |
70| float [OH_ArkUI_PointerEvent_GetTiltY](#oh_arkui_pointerevent_gettilty) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, uint32_t pointerIndex) | Obtains the angle relative to the XZ plane from a directional input event (for example, a touch event). The value range is [-90, 90]. A positive value indicates a downward tilt. |
71| float [OH_ArkUI_PointerEvent_GetTouchAreaWidth](#oh_arkui_pointerevent_gettouchareawidth) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, uint32_t pointerIndex) | Obtains the width of the touch area from a directional input event (for example, a touch event). |
72| float [OH_ArkUI_PointerEvent_GetTouchAreaHeight](#oh_arkui_pointerevent_gettouchareaheight) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, uint32_t pointerIndex) | Obtains the height of the touch area from a directional input event (for example, a touch event). |
73| uint32_t [OH_ArkUI_PointerEvent_GetHistorySize](#oh_arkui_pointerevent_gethistorysize) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event) | Obtains the number of historical events from a directional input event (such as a touch event, mouse event, or axis event). |
74| int64_t [OH_ArkUI_PointerEvent_GetHistoryEventTime](#oh_arkui_pointerevent_gethistoryeventtime) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, uint32_t historyIndex) | Obtains the occurrence time of a historical event from a directional input event (such as a touch event, mouse event, or axis event). |
75| uint32_t [OH_ArkUI_PointerEvent_GetHistoryPointerCount](#oh_arkui_pointerevent_gethistorypointercount) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, uint32_t historyIndex) | Obtains the number of touch points in a specific historical event from a directional input event (such as a touch event, mouse event, or axis event). |
76| int32_t [OH_ArkUI_PointerEvent_GetHistoryPointerId](#oh_arkui_pointerevent_gethistorypointerid) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, uint32_t pointerIndex, uint32_t historyIndex) | Obtains the ID of a touch point from a directional input event (such as a touch event, mouse event, or axis event). |
77| float [OH_ArkUI_PointerEvent_GetHistoryX](#oh_arkui_pointerevent_gethistoryx) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, uint32_t pointerIndex, uint32_t historyIndex) | Obtains the X-coordinate of a specific touch point in a specific historical event relative to the upper left corner of the current component from a directional input event (such as a touch event, mouse event, or axis event). |
78| float [OH_ArkUI_PointerEvent_GetHistoryY](#oh_arkui_pointerevent_gethistoryy) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, uint32_t pointerIndex, uint32_t historyIndex) | Obtains the Y-coordinate of a specific touch point in a specific historical event relative to the upper left corner of the current component from a directional input event (such as a touch event, mouse event, or axis event). |
79| float [OH_ArkUI_PointerEvent_GetHistoryWindowX](#oh_arkui_pointerevent_gethistorywindowx) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, uint32_t pointerIndex, uint32_t historyIndex) | Obtains the X-coordinate of a specific touch point in a specific historical event relative to the upper left corner of the current application window from a directional input event (such as a touch event, mouse event, or axis event). |
80| float [OH_ArkUI_PointerEvent_GetHistoryWindowY](#oh_arkui_pointerevent_gethistorywindowy) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, uint32_t pointerIndex, uint32_t historyIndex) | Obtains the Y-coordinate of a specific touch point in a specific historical event relative to the upper left corner of the current application window from a directional input event (such as a touch event, mouse event, or axis event). |
81| float [OH_ArkUI_PointerEvent_GetHistoryDisplayX](#oh_arkui_pointerevent_gethistorydisplayx) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, uint32_t pointerIndex, uint32_t historyIndex) | Obtains the X-coordinate of a specific touch point in a specific historical event relative to the upper left corner of the current screen from a directional input event (such as a touch event, mouse event, or axis event). |
82| float [OH_ArkUI_PointerEvent_GetHistoryDisplayY](#oh_arkui_pointerevent_gethistorydisplayy) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, uint32_t pointerIndex, uint32_t historyIndex) | Obtains the Y-coordinate of a specific touch point in a specific historical event relative to the upper left corner of the current screen from a directional input event (such as a touch event, mouse event, or axis event). |
83| float [OH_ArkUI_PointerEvent_GetHistoryPressure](#oh_arkui_pointerevent_gethistorypressure) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, uint32_t pointerIndex, uint32_t historyIndex) | Obtains the pressure applied to the touchscreen in a specific historical event from a directional input event (for example, a touch event). |
84| float [OH_ArkUI_PointerEvent_GetHistoryTiltX](#oh_arkui_pointerevent_gethistorytiltx) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, uint32_t pointerIndex, uint32_t historyIndex) | Obtains the angle relative to the YZ plane in a specific historical event from a directional input event (for example, a touch event). The value range is [-90, 90]. A positive value indicates a rightward tilt. |
85| float [OH_ArkUI_PointerEvent_GetHistoryTiltY](#oh_arkui_pointerevent_gethistorytilty) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, uint32_t pointerIndex, uint32_t historyIndex) | Obtains the angle relative to the XZ plane in a specific historical event from a directional input event (for example, a touch event). The value range is [-90, 90]. A positive value indicates a downward tilt. |
86| float [OH_ArkUI_PointerEvent_GetHistoryTouchAreaWidth](#oh_arkui_pointerevent_gethistorytouchareawidth) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, uint32_t pointerIndex, uint32_t historyIndex) | Obtains the width of the touch area in a specific historical event from a directional input event (for example, a touch event). |
87| float [OH_ArkUI_PointerEvent_GetHistoryTouchAreaHeight](#oh_arkui_pointerevent_gethistorytouchareaheight) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, uint32_t pointerIndex, uint32_t historyIndex) | Obtains the height of the touch area in a specific historical event from a directional input event (for example, a touch event). |
88| double [OH_ArkUI_AxisEvent_GetVerticalAxisValue](#oh_arkui_axisevent_getverticalaxisvalue) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event) | Obtains the value of the vertical scroll axis for this axis event. |
89| double [OH_ArkUI_AxisEvent_GetHorizontalAxisValue](#oh_arkui_axisevent_gethorizontalaxisvalue) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event) | Obtains the value of the horizontal scroll axis for this axis event. |
90| double [OH_ArkUI_AxisEvent_GetPinchAxisScaleValue](#oh_arkui_axisevent_getpinchaxisscalevalue) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event) | Obtains the scale value of the pinch axis for this axis event. |
91| int32_t [OH_ArkUI_AxisEvent_GetAxisAction](#oh_arkui_axisevent_getaxisaction)(const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event) | Obtains the action type of the current axis event. |
92| int32_t [OH_ArkUI_PointerEvent_SetInterceptHitTestMode](#oh_arkui_pointerevent_setintercepthittestmode) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, [HitTestMode](#hittestmode) mode) | Sets how the component behaves during hit testing. |
93| int32_t [OH_ArkUI_MouseEvent_GetMouseButton](#oh_arkui_mouseevent_getmousebutton) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event) | Obtains the button type of a mouse event. |
94| int32_t [OH_ArkUI_MouseEvent_GetMouseAction](#oh_arkui_mouseevent_getmouseaction) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event) | Obtains the action type of a mouse event. |
95| int32_t [OH_ArkUI_PointerEvent_SetStopPropagation](#oh_arkui_pointerevent_setstoppropagation) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, bool stopPropagation) | Sets whether to stop event propagation. |
96| int32_t [OH_ArkUI_UIInputEvent_GetDeviceId](#oh_arkui_uiinputevent_getdeviceid) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event) | Obtains the ID of the input device that triggers a key event. |
97| int32_t [OH_ArkUI_UIInputEvent_GetPressedKeys](#oh_arkui_uiinputevent_getpressedkeys) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, int32_t \*pressedKeyCodes, int32_t \*length) | Obtains all pressed keys. Currently, only key events are supported. |
98| double [OH_ArkUI_FocusAxisEvent_GetAxisValue](#oh_arkui_focusaxisevent_getaxisvalue) (const [ArkUI_UIInputEvent](_ark_u_i___event_module.md#arkui_uiinputevent) \*event, int32_t \*axis) | Obtains the axis value of a focus axis event. |
99| int32_t [OH_ArkUI_FocusAxisEvent_SetStopPropagation](#oh_arkui_focusaxisevent_setstoppropagation) (const [ArkUI_UIInputEvent](_ark_u_i___event_module.md#arkui_uiinputevent) \*event, bool \*stopPropagation) | Sets whether to prevent a focus axis event from bubbling up. |
100| int32_t [OH_ArkUI_PointerEvent_GetInteractionHand](#oh_arkui_pointerevent_getinteractionhand) (const [ArkUI_UIInputEvent](_ark_u_i___event_module.md#arkui_uiinputevent) \*event, [ArkUI_InteractionHand](_ark_u_i___event_module.md#interactionhand) \*hand) | Checks whether an event is triggered by a left-hand or right-hand tap. |
101| int32_t [OH_ArkUI_PointerEvent_GetInteractionHandByIndex](#oh_arkui_pointerevent_getinteractionhandbyindex) (const [ArkUI_UIInputEvent](_ark_u_i___event_module.md#arkui_uiinputevent) \*event, int32_t pointerIndex, [ArkUI_InteractionHand](_ark_u_i___event_module.md#interactionhand) \*hand) | Checks whether an event is triggered by a left-hand or right-hand tap. |
102| float [OH_ArkUI_UIInputEvent_GetEventTargetWidth](#oh_arkui_uiinputevent_geteventtargetwidth) (const [ArkUI_UIInputEvent](#arkui_uiinputevent)) | Obtains the width of the component hit by an event. |
103| float [OH_ArkUI_UIInputEvent_GetEventTargetHeight](#oh_arkui_uiinputevent_geteventtargetheight) (const [ArkUI_UIInputEvent](#arkui_uiinputevent)) | Obtains the height of the component hit by an event. |
104| float [OH_ArkUI_UIInputEvent_GetEventTargetPositionX](#oh_arkui_uiinputevent_geteventtargetpositionx) (const [ArkUI_UIInputEvent](#arkui_uiinputevent)) | Obtains the X coordinate of the component hit by an event. |
105| float [OH_ArkUI_UIInputEvent_GetEventTargetPositionY](#oh_arkui_uiinputevent_geteventtargetpositiony) (const [ArkUI_UIInputEvent](#arkui_uiinputevent)) | Obtains the Y coordinate of the component hit by an event. |
106| float [OH_ArkUI_UIInputEvent_GetEventTargetGlobalPositionX](#oh_arkui_uiinputevent_geteventtargetglobalpositionx) (const [ArkUI_UIInputEvent](#arkui_uiinputevent)) | Obtains the global X coordinate of the component hit by an event. |
107| float [OH_ArkUI_UIInputEvent_GetEventTargetGlobalPositionY](#oh_arkui_uiinputevent_geteventtargetglobalpositiony) (const [ArkUI_UIInputEvent](#arkui_uiinputevent)) | Obtains the global Y coordinate of the component hit by an event. |
108| int32_t [OH_ArkUI_UIInputEvent_GetModifierKeyStates](#oh_arkui_uiinputevent_getmodifierkeystates) (const [ArkUI_UIInputEvent](#arkui_uiinputevent), uint64_t \*keys) | Obtains the state of the modifier keys in a UI input event. |
109| bool [OH_ArkUI_HoverEvent_IsHovered](#oh_arkui_hoverevent_ishovered) (const [ArkUI_UIInputEvent](#arkui_uiinputevent)) | Checks whether the cursor is hovering over this component. |
110| int32_t [OH_ArkUI_PointerEvent_CreateClonedEvent](#oh_arkui_pointerevent_createclonedevent) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, [ArkUI_UIInputEvent](#arkui_uiinputevent) \*clonedevent) | Creates a cloned event pointer based on an event pointer. |
111| int32_t [OH_ArkUI_PointerEvent_DestroyClonedEvent](#oh_arkui_pointerevent_destroyclonedevent) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event) | Destroys a cloned event pointer. |
112| int32_t [OH_ArkUI_PointerEvent_SetClonedEventLocalPosition](#oh_arkui_pointerevent_setclonedeventlocalposition) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, float x, float y) | Sets the X and Y coordinates of a cloned event relative to the upper left corner of the current component. |
113| int32_t [OH_ArkUI_PointerEvent_SetClonedEventLocalPositionByIndex](#oh_arkui_pointerevent_setclonedeventlocalpositionbyindex) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, float x, float y, int32_t pointerIndex) | Sets the X and Y coordinates of a specific contact point of a cloned event relative to the upper left corner of the current component. |
114| int32_t [OH_ArkUI_PointerEvent_SetClonedEventActionType](#oh_arkui_pointerevent_setclonedeventactiontype) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, int32_t actionType) | Sets the action type of a cloned event. |
115| int32_t [OH_ArkUI_PointerEvent_SetClonedEventChangedFingerId](#oh_arkui_pointerevent_setclonedeventchangedfingerid) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, int32_t fingerId) | Sets the touch point ID of a cloned pointer event. |
116| int32_t [OH_ArkUI_PointerEvent_SetClonedEventFingerIdByIndex](#oh_arkui_pointerevent_setclonedeventfingeridbyindex) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, int32_t fingerId, int32_t pointerIndex) | Sets the touch point ID of a specific contact point of a cloned event. |
117| int32_t [OH_ArkUI_PointerEvent_PostClonedEvent](#oh_arkui_pointerevent_postclonedevent) ([ArkUI_NodeHandle](_ark_u_i___native_module.md#arkui_nodehandle) \*node, const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event) | Posts a cloned event to a specific node. |
118| int64_t [OH_ArkUI_PointerEvent_GetPressedTimeByIndex](#oh_arkui_pointerevent_getpressedtimebyindex) (const [ArkUI_UIInputEvent](_ark_u_i___event_module.md#arkui_uiinputevent) \*event, int32_t pointerIndex) | Obtains the press time of a specific touch point. |
119| float [OH_ArkUI_MouseEvent_GetRawDeltaX](#oh_arkui_mouseevent_getrawdeltax) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event) | Obtains the x-axis offset of the mouse pointer position relative to the position in the previously reported mouse event. This value may be less than the difference between the two reported X coordinates when the mouse pointer is near the screen edge. |
120| float [OH_ArkUI_MouseEvent_GetRawDeltaY](#oh_arkui_mouseevent_getrawdeltay) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event) | Obtains the y-axis offset of the mouse pointer position relative to the position in the previously reported mouse event. This value may be less than the difference between the two reported Y coordinates when the mouse pointer is near the screen edge. |
121| int32_t [OH_ArkUI_MouseEvent_GetPressedButtons](#oh_arkui_mouseevent_getpressedbuttons) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, int32_t* pressedButtons, int32_t* length) | Obtains the pressed buttons from a mouse event. |
122| int32_t [OH_ArkUI_UIInputEvent_GetTargetDisplayId](#oh_arkui_uiinputevent_gettargetdisplayid) (const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event) | Obtains the ID of the screen where the UI input event occurs.|
123| int32_t [OH_ArkUI_AxisEvent_SetPropagation](#oh_arkui_axisevent_setpropagation)(const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event, bool propagation) | Sets whether to enable axis event propagation.|
124| int32_t [OH_ArkUI_AxisEvent_GetScrollStep](#oh_arkui_axisevent_getscrollstep)(const [ArkUI_UIInputEvent](#arkui_uiinputevent) \*event) | Obtains the scroll step configuration of the mouse wheel axis event.|
125
126
127## Type Description
128
129
130### ArkUI_UIInputEvent
131
132```
133typedef struct ArkUI_UIInputEvent ArkUI_UIInputEvent
134```
135**Description**
136
137Defines the UI input event.
138
139**Since**: 12
140
141
142## Enum Description
143
144
145### anonymous enum
146
147```
148anonymous enum
149```
150**Description**
151
152Enumerates the action codes of the input event.
153
154**Since**: 12
155
156| Value| Description|
157| -------- | -------- |
158| OH_NATIVEXCOMPONENT_RESULT_SUCCESS  | Success. |
159| OH_NATIVEXCOMPONENT_RESULT_FAILED  | Failure. |
160| OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER  | Invalid parameter. |
161| UI_TOUCH_EVENT_ACTION_CANCEL  | Cancellation of touch. |
162| UI_TOUCH_EVENT_ACTION_DOWN  | Pressing of touch. |
163| UI_TOUCH_EVENT_ACTION_MOVE  | Moving of touch. |
164| UI_TOUCH_EVENT_ACTION_UP  | Lifting of touch. |
165
166
167### anonymous enum
168
169```
170anonymous enum
171```
172**Description**
173
174Enumerates the tool types of the input event.
175
176**Since**: 12
177
178| Value| Description|
179| -------- | -------- |
180| UI_INPUT_EVENT_TOOL_TYPE_UNKNOWN  | Unknown tool type. |
181| UI_INPUT_EVENT_TOOL_TYPE_FINGER  | Finger. |
182| UI_INPUT_EVENT_TOOL_TYPE_PEN  | Stylus. |
183| UI_INPUT_EVENT_TOOL_TYPE_MOUSE  | Mouse. |
184| UI_INPUT_EVENT_TOOL_TYPE_TOUCHPAD  | Touchpad. |
185| UI_INPUT_EVENT_TOOL_TYPE_JOYSTICK  | Joystick. |
186
187
188### anonymous enum
189
190```
191anonymous enum
192```
193**Description**
194
195Enumerates the source types of the input event.
196
197**Since**: 12
198
199| Value| Description|
200| -------- | -------- |
201| UI_INPUT_EVENT_SOURCE_TYPE_UNKNOWN  | Unknown source type. |
202| UI_INPUT_EVENT_SOURCE_TYPE_MOUSE  | Mouse. |
203| UI_INPUT_EVENT_SOURCE_TYPE_TOUCH_SCREEN  | Touchscreen. |
204
205
206### anonymous enum
207
208```
209anonymous enum
210```
211**Description**
212
213Enumerates the action codes of the mouse event.
214
215**Since**: 12
216
217| Value| Description|
218| -------- | -------- |
219| UI_MOUSE_EVENT_ACTION_UNKNOWN  | Unknown action. |
220| UI_MOUSE_EVENT_ACTION_PRESS  | The mouse button is pressed. |
221| UI_MOUSE_EVENT_ACTION_RELEASE  | The mouse button is released. |
222| UI_MOUSE_EVENT_ACTION_MOVE  | The mouse cursor moves. |
223| UI_MOUSE_EVENT_ACTION_CANCEL  | The mouse button action is canceled. |
224
225
226### anonymous enum
227
228```
229anonymous enum
230```
231**Description**
232
233Enumerates the button types of the mouse event.
234
235**Since**: 12
236
237| Value| Description|
238| -------- | -------- |
239| UI_MOUSE_EVENT_BUTTON_NONE  | No button. |
240| UI_MOUSE_EVENT_BUTTON_LEFT  | Left button on the mouse. |
241| UI_MOUSE_EVENT_BUTTON_RIGHT  | Right button on the mouse. |
242| UI_MOUSE_EVENT_BUTTON_MIDDLE  | Middle button on the mouse. |
243| UI_MOUSE_EVENT_BUTTON_BACK  | Back button on the left of the mouse. |
244| UI_MOUSE_EVENT_BUTTON_FORWARD  | Forward button on the left of the mouse. |
245
246
247### ArkUI_ModifierKeyName
248
249```
250enum ArkUI_ModifierKeyName
251```
252**Description**
253
254Enumerates the modifier keys.
255
256**Since**: 12
257
258| Value| Description|
259| -------- | -------- |
260| ARKUI_MODIFIER_KEY_CTRL  | Ctrl.  |
261| ARKUI_MODIFIER_KEY_SHIFT  | Shift.  |
262| ARKUI_MODIFIER_KEY_ALT  | Alt.  |
263| ARKUI_MODIFIER_KEY_FN  | Fn.  |
264
265
266### ArkUI_UIInputEvent_Type
267
268```
269enum ArkUI_UIInputEvent_Type
270```
271**Description**
272
273Enumerates the UI input event types.
274
275**Since**: 12
276
277
278### HitTestMode
279
280```
281enum HitTestMode
282```
283**Description**
284
285Enumerates the hit test modes.
286
287**Since**: 12
288
289| Value| Description|
290| -------- | -------- |
291| HTM_DEFAULT  | Both the node and its child node respond to the hit test of a touch event, but its sibling node is blocked from the hit test. |
292| HTM_BLOCK  | The node responds to the hit test of a touch event, but its child node and sibling node are blocked from the hit test. |
293| HTM_TRANSPARENT  | Both the node and its child node respond to the hit test of a touch event, and its sibling node is also considered during the hit test. |
294| HTM_NONE  | The node does not respond to the hit test of a touch event, but its child node and sibling node are considered during the hit test. |
295
296
297### anonymous enum
298
299```
300anonymous enum
301```
302**Description**
303
304Enumerates the axis types for focus axis events.
305
306**Since**: 15
307
308| Value| Description|
309| -------- | -------- |
310| UI_FOCUS_AXIS_EVENT_ABS_X  | Game controller x-axis. |
311| UI_FOCUS_AXIS_EVENT_ABS_Y  | Game controller y-axis.|
312| UI_FOCUS_AXIS_EVENT_ABS_Z  | Game controller z-axis. |
313| UI_FOCUS_AXIS_EVENT_ABS_RZ  | Game controller rz-axis. |
314| UI_FOCUS_AXIS_EVENT_ABS_GAS  | Game controller GAS-axis.|
315| UI_FOCUS_AXIS_EVENT_ABS_BRAKE  | Game controller BRAKE-axis.  |
316| UI_FOCUS_AXIS_EVENT_ABS_HAT0X  | Game controller HAT0X-axis.  |
317| UI_FOCUS_AXIS_EVENT_ABS_HAT0Y  | Game controller HAT0Y-axis.|
318
319### InteractionHand
320
321```
322enum ArkUI_InteractionHand
323```
324**Description**
325
326Defines whether an event is triggered by a left-hand or right-hand tap.
327
328**Since**: 15
329
330| Value| Description|
331| -------- | -------- |
332| ARKUI_EVENT_HAND_NONE  | Unknown. |
333| ARKUI_EVENT_HAND_LEFT  | Left hand. |
334| ARKUI_EVENT_HAND_RIGHT  | Right hand. |
335
336
337## Function Description
338
339
340### OH_ArkUI_AxisEvent_GetHorizontalAxisValue()
341
342```
343double OH_ArkUI_AxisEvent_GetHorizontalAxisValue (const ArkUI_UIInputEvent * event)
344```
345**Description**
346
347Obtains the value of the horizontal scroll axis for this axis event.
348
349**Since**: 12
350
351**Parameters**
352
353| Name| Description|
354| -------- | -------- |
355| event | Pointer to the UI input event. |
356
357**Returns**
358
359Returns the value of the horizontal scroll axis of the current axis event; returns **0.0** if any parameter error occurs.
360
361
362### OH_ArkUI_AxisEvent_GetPinchAxisScaleValue()
363
364```
365double OH_ArkUI_AxisEvent_GetPinchAxisScaleValue (const ArkUI_UIInputEvent * event)
366```
367**Description**
368
369Obtains the scale value of the pinch axis for this axis event.
370
371**Since**: 12
372
373**Parameters**
374
375| Name| Description|
376| -------- | -------- |
377| event | Pointer to the UI input event. |
378
379**Returns**
380
381Returns the scale value of the pinch axis of the current axis event; returns **0.0** if any parameter error occurs.
382
383
384### OH_ArkUI_AxisEvent_GetVerticalAxisValue()
385
386```
387double OH_ArkUI_AxisEvent_GetVerticalAxisValue (const ArkUI_UIInputEvent * event)
388```
389**Description**
390
391Obtains the value of the vertical scroll axis for this axis event.
392
393**Since**: 12
394
395**Parameters**
396
397| Name| Description|
398| -------- | -------- |
399| event | Pointer to the UI input event. |
400
401**Returns**
402
403Returns the value of the vertical scroll axis of the current axis event; returns **0.0** if any parameter error occurs.
404
405### OH_ArkUI_AxisEvent_GetAxisAction()
406
407```
408int32_t OH_ArkUI_AxisEvent_GetAxisAction(const ArkUI_UIInputEvent* event)
409```
410
411**Description**
412
413Obtains the action type of the current axis event.
414
415**Since**: 15
416
417**Parameters**
418
419| Name | Description|
420| -------- | -------- |
421| event | Pointer to the UI input event. |
422
423**Returns**
424
425Returns the action type of the current axis event.
426
427
428### OH_ArkUI_MouseEvent_GetMouseAction()
429
430```
431int32_t OH_ArkUI_MouseEvent_GetMouseAction (const ArkUI_UIInputEvent * event)
432```
433**Description**
434
435Obtains the action type of a mouse event.
436
437**Since**: 12
438
439**Parameters**
440
441| Name| Description|
442| -------- | -------- |
443| event | Pointer to the UI input event. |
444
445**Returns**
446
447Returns the mouse action type. The value **1** indicates that the mouse button is pressed, **2** indicates that the mouse button is released, and **3** indicates that the mouse cursor moves.
448
449
450### OH_ArkUI_MouseEvent_GetMouseButton()
451
452```
453int32_t OH_ArkUI_MouseEvent_GetMouseButton (const ArkUI_UIInputEvent * event)
454```
455**Description**
456
457Obtains the button type of a mouse event.
458
459**Since**: 12
460
461**Parameters**
462
463| Name| Description|
464| -------- | -------- |
465| event | Pointer to the UI input event. |
466
467**Returns**
468
469Returns the mouse button type. The value **1** indicates the left button, **2** indicates the right button, **3** indicates the middle button, **4** indicates the back button, and **5** indicates the forward button.
470
471
472### OH_ArkUI_PointerEvent_GetDisplayX()
473
474```
475float OH_ArkUI_PointerEvent_GetDisplayX (const ArkUI_UIInputEvent * event)
476```
477**Description**
478
479Obtains the X-coordinate relative to the upper left corner of the current screen from a directional input event (such as a touch event, mouse event, or axis event).
480
481**Since**: 12
482
483**Parameters**
484
485| Name| Description|
486| -------- | -------- |
487| event | Pointer to the UI input event. |
488
489**Returns**
490
491Returns the X-coordinate relative to the upper left corner of the current screen; returns **0.0f** if any parameter error occurs.
492
493
494### OH_ArkUI_PointerEvent_GetDisplayXByIndex()
495
496```
497float OH_ArkUI_PointerEvent_GetDisplayXByIndex (const ArkUI_UIInputEvent * event, uint32_t pointerIndex )
498```
499**Description**
500
501Obtains the X-coordinate of a specific touch point relative to the upper left corner of the current screen from a directional input event (such as a touch event, mouse event, or axis event).
502
503**Since**: 12
504
505**Parameters**
506
507| Name| Description|
508| -------- | -------- |
509| event | Pointer to the UI input event. |
510| pointerIndex | Index of the target touch point in the multi-touch data list. |
511
512**Returns**
513
514Returns the X-coordinate relative to the upper left corner of the current screen; returns **0.0f** if any parameter error occurs.
515
516
517### OH_ArkUI_PointerEvent_GetDisplayY()
518
519```
520float OH_ArkUI_PointerEvent_GetDisplayY (const ArkUI_UIInputEvent * event)
521```
522**Description**
523
524Obtains the Y-coordinate relative to the upper left corner of the current screen from a directional input event (such as a touch event, mouse event, or axis event).
525
526**Since**: 12
527
528**Parameters**
529
530| Name| Description|
531| -------- | -------- |
532| event | Pointer to the UI input event. |
533
534**Returns**
535
536Returns the Y-coordinate relative to the upper left corner of the current screen; returns **0.0f** if any parameter error occurs.
537
538
539### OH_ArkUI_PointerEvent_GetDisplayYByIndex()
540
541```
542float OH_ArkUI_PointerEvent_GetDisplayYByIndex (const ArkUI_UIInputEvent * event, uint32_t pointerIndex )
543```
544**Description**
545
546Obtains the Y-coordinate of a specific touch point relative to the upper left corner of the current screen from a directional input event (such as a touch event, mouse event, or axis event).
547
548**Since**: 12
549
550**Parameters**
551
552| Name| Description|
553| -------- | -------- |
554| event | Pointer to the UI input event. |
555| pointerIndex | Index of the target touch point in the multi-touch data list. |
556
557**Returns**
558
559Returns the Y-coordinate relative to the upper left corner of the current screen; returns **0.0f** if any parameter error occurs.
560
561
562### OH_ArkUI_PointerEvent_GetHistoryDisplayX()
563
564```
565float OH_ArkUI_PointerEvent_GetHistoryDisplayX (const ArkUI_UIInputEvent * event, uint32_t pointerIndex, uint32_t historyIndex )
566```
567**Description**
568
569Obtains the X-coordinate of a specific touch point in a specific historical event relative to the upper left corner of the current screen from a directional input event (such as a touch event, mouse event, or axis event).
570
571**Since**: 12
572
573**Parameters**
574
575| Name| Description|
576| -------- | -------- |
577| event | Pointer to the UI input event. |
578| pointerIndex | Index of the target touch point in the multi-touch data list. |
579| historyIndex | Index of the target historical event. |
580
581**Returns**
582
583Returns the X-coordinate relative to the upper left corner of the current screen; returns **0.0f** if any parameter error occurs.
584
585
586### OH_ArkUI_PointerEvent_GetHistoryDisplayY()
587
588```
589float OH_ArkUI_PointerEvent_GetHistoryDisplayY (const ArkUI_UIInputEvent * event, uint32_t pointerIndex, uint32_t historyIndex )
590```
591**Description**
592
593Obtains the Y-coordinate of a specific touch point in a specific historical event relative to the upper left corner of the current screen from a directional input event (such as a touch event, mouse event, or axis event).
594
595**Since**: 12
596
597**Parameters**
598
599| Name| Description|
600| -------- | -------- |
601| event | Pointer to the UI input event. |
602| pointerIndex | Index of the target touch point in the multi-touch data list. |
603| historyIndex | Index of the target historical event. |
604
605**Returns**
606
607Returns the Y-coordinate relative to the upper left corner of the current screen; returns **0.0f** if any parameter error occurs.
608
609
610### OH_ArkUI_PointerEvent_GetHistoryEventTime()
611
612```
613int64_t OH_ArkUI_PointerEvent_GetHistoryEventTime (const ArkUI_UIInputEvent * event, uint32_t historyIndex )
614```
615**Description**
616
617Obtains the occurrence time of a historical event from a directional input event (such as a touch event, mouse event, or axis event).
618
619**Since**: 12
620
621**Parameters**
622
623| Name| Description|
624| -------- | -------- |
625| event | Pointer to the UI input event. |
626| historyIndex | Index of the target historical event. |
627
628**Returns**
629
630Returns the time when the UI input event occurs; returns **0** if any parameter error occurs.
631
632
633### OH_ArkUI_PointerEvent_GetHistoryPointerCount()
634
635```
636uint32_t OH_ArkUI_PointerEvent_GetHistoryPointerCount (const ArkUI_UIInputEvent * event, uint32_t historyIndex )
637```
638**Description**
639
640Obtains the number of touch points in a specific historical event from a directional input event (such as a touch event, mouse event, or axis event).
641
642**Since**: 12
643
644**Parameters**
645
646| Name| Description|
647| -------- | -------- |
648| event | Pointer to the UI input event. |
649| historyIndex | Index of the target historical event. |
650
651**Returns**
652
653Returns the number of touch points in the specified historical event
654
655
656### OH_ArkUI_PointerEvent_GetHistoryPointerId()
657
658```
659int32_t OH_ArkUI_PointerEvent_GetHistoryPointerId (const ArkUI_UIInputEvent * event, uint32_t pointerIndex, uint32_t historyIndex )
660```
661**Description**
662
663Obtains the ID of a touch point from a directional input event (such as a touch event, mouse event, or axis event).
664
665**Since**: 12
666
667**Parameters**
668
669| Name| Description|
670| -------- | -------- |
671| event | Pointer to the UI input event. |
672| pointerIndex | Index of the target touch point in the multi-touch data list. |
673| historyIndex | Index of the target historical event. |
674
675**Returns**
676
677Returns the ID of the corresponding touch point in the specified historical event.
678
679
680### OH_ArkUI_PointerEvent_GetHistoryPressure()
681
682```
683float OH_ArkUI_PointerEvent_GetHistoryPressure (const ArkUI_UIInputEvent * event, uint32_t pointerIndex, uint32_t historyIndex )
684```
685**Description**
686
687Obtains the pressure applied to the touchscreen in a specific historical event from a directional input event (for example, a touch event).
688
689**Since**: 12
690
691**Parameters**
692
693| Name| Description|
694| -------- | -------- |
695| event | Pointer to the UI input event. |
696| pointerIndex | Index of the target touch point in the multi-touch data list. |
697| historyIndex | Index of the target historical event. |
698
699**Returns**
700
701Returns the pressure applied to the touchscreen; returns **0.0f** if any parameter error occurs.
702
703
704### OH_ArkUI_PointerEvent_GetHistorySize()
705
706```
707uint32_t OH_ArkUI_PointerEvent_GetHistorySize (const ArkUI_UIInputEvent * event)
708```
709**Description**
710
711Obtains the number of historical events from a directional input event (such as a touch event, mouse event, or axis event).
712
713**Since**: 12
714
715**Parameters**
716
717| Name| Description|
718| -------- | -------- |
719| event | Pointer to the UI input event. |
720
721**Returns**
722
723Returns the number of historical events.
724
725
726### OH_ArkUI_PointerEvent_GetHistoryTiltX()
727
728```
729float OH_ArkUI_PointerEvent_GetHistoryTiltX (const ArkUI_UIInputEvent * event, uint32_t pointerIndex, uint32_t historyIndex )
730```
731**Description**
732
733Obtains the angle relative to the YZ plane in a specific historical event from a directional input event (for example, a touch event). The value range is [-90, 90]. A positive value indicates a rightward tilt.
734
735**Since**: 12
736
737**Parameters**
738
739| Name| Description|
740| -------- | -------- |
741| event | Pointer to the UI input event. |
742| pointerIndex | Index of the target touch point in the multi-touch data list. |
743| historyIndex | Index of the target historical event. |
744
745**Returns**
746
747Returns the angle relative to the YZ plane.
748
749
750### OH_ArkUI_PointerEvent_GetHistoryTiltY()
751
752```
753float OH_ArkUI_PointerEvent_GetHistoryTiltY (const ArkUI_UIInputEvent * event, uint32_t pointerIndex, uint32_t historyIndex )
754```
755**Description**
756
757Obtains the angle relative to the XZ plane in a specific historical event from a directional input event (for example, a touch event). The value range is [-90, 90]. A positive value indicates a downward tilt.
758
759**Since**: 12
760
761**Parameters**
762
763| Name| Description|
764| -------- | -------- |
765| event | Pointer to the UI input event. |
766| pointerIndex | Index of the target touch point in the multi-touch data list. |
767| historyIndex | Index of the target historical event. |
768
769**Returns**
770
771Returns the angle relative to the XZ plane.
772
773### OH_ArkUI_PointerEvent_GetHistoryTouchAreaHeight()
774
775```
776float OH_ArkUI_PointerEvent_GetHistoryTouchAreaHeight (const ArkUI_UIInputEvent * event, uint32_t pointerIndex, uint32_t historyIndex )
777```
778**Description**
779
780Obtains the height of the touch area in a specific historical event from a directional input event (for example, a touch event).
781
782**Since**: 12
783
784**Parameters**
785
786| Name| Description|
787| -------- | -------- |
788| event | Pointer to the UI input event. |
789| pointerIndex | Index of the target touch point in the multi-touch data list. |
790| historyIndex | Index of the target historical event. |
791
792**Returns**
793
794Returns the height of the touch area.
795
796
797### OH_ArkUI_PointerEvent_GetHistoryTouchAreaWidth()
798
799```
800float OH_ArkUI_PointerEvent_GetHistoryTouchAreaWidth (const ArkUI_UIInputEvent * event, uint32_t pointerIndex, uint32_t historyIndex )
801```
802**Description**
803
804Obtains the width of the touch area in a specific historical event from a directional input event (for example, a touch event).
805
806**Since**: 12
807
808**Parameters**
809
810| Name| Description|
811| -------- | -------- |
812| event | Pointer to the UI input event. |
813| pointerIndex | Index of the target touch point in the multi-touch data list. |
814| historyIndex | Index of the target historical event. |
815
816**Returns**
817
818Returns the width of the touch area.
819
820
821### OH_ArkUI_PointerEvent_GetHistoryWindowX()
822
823```
824float OH_ArkUI_PointerEvent_GetHistoryWindowX (const ArkUI_UIInputEvent * event, uint32_t pointerIndex, uint32_t historyIndex )
825```
826**Description**
827
828Obtains the X-coordinate of a specific touch point in a specific historical event relative to the upper left corner of the current application window from a directional input event (such as a touch event, mouse event, or axis event).
829
830**Since**: 12
831
832**Parameters**
833
834| Name| Description|
835| -------- | -------- |
836| event | Pointer to the UI input event. |
837| pointerIndex | Index of the target touch point in the multi-touch data list. |
838| historyIndex | Index of the target historical event. |
839
840**Returns**
841
842Returns the X-coordinate relative to the upper left corner of the current application window; returns **0.0f** if any parameter error occurs.
843
844
845### OH_ArkUI_PointerEvent_GetHistoryWindowY()
846
847```
848float OH_ArkUI_PointerEvent_GetHistoryWindowY (const ArkUI_UIInputEvent * event, uint32_t pointerIndex, uint32_t historyIndex )
849```
850**Description**
851
852Obtains the Y-coordinate of a specific touch point in a specific historical event relative to the upper left corner of the current application window from a directional input event (such as a touch event, mouse event, or axis event).
853
854**Since**: 12
855
856**Parameters**
857
858| Name| Description|
859| -------- | -------- |
860| event | Pointer to the UI input event. |
861| pointerIndex | Index of the target touch point in the multi-touch data list. |
862| historyIndex | Index of the target historical event. |
863
864**Returns**
865
866Returns the Y-coordinate relative to the upper left corner of the current application window; returns **0.0f** if any parameter error occurs.
867
868
869### OH_ArkUI_PointerEvent_GetHistoryX()
870
871```
872float OH_ArkUI_PointerEvent_GetHistoryX (const ArkUI_UIInputEvent * event, uint32_t pointerIndex, uint32_t historyIndex )
873```
874**Description**
875
876Obtains the X-coordinate of a specific touch point in a specific historical event relative to the upper left corner of the current component from a directional input event (such as a touch event, mouse event, or axis event).
877
878**Since**: 12
879
880**Parameters**
881
882| Name| Description|
883| -------- | -------- |
884| event | Pointer to the UI input event. |
885| pointerIndex | Index of the target touch point in the multi-touch data list. |
886| historyIndex | Index of the target historical event. |
887
888**Returns**
889
890Returns the X-coordinate relative to the upper left corner of the current component; returns **0.0f** if any parameter error occurs.
891
892
893### OH_ArkUI_PointerEvent_GetHistoryY()
894
895```
896float OH_ArkUI_PointerEvent_GetHistoryY (const ArkUI_UIInputEvent * event, uint32_t pointerIndex, uint32_t historyIndex )
897```
898**Description**
899
900Obtains the Y-coordinate of a specific touch point in a specific historical event relative to the upper left corner of the current component from a directional input event (such as a touch event, mouse event, or axis event).
901
902**Since**: 12
903
904**Parameters**
905
906| Name| Description|
907| -------- | -------- |
908| event | Pointer to the UI input event. |
909| pointerIndex | Index of the target touch point in the multi-touch data list. |
910| historyIndex | Index of the target historical event. |
911
912**Returns**
913
914Returns the Y-coordinate relative to the upper left corner of the current component; returns **0.0f** if any parameter error occurs.
915
916
917### OH_ArkUI_PointerEvent_GetPointerCount()
918
919```
920uint32_t OH_ArkUI_PointerEvent_GetPointerCount (const ArkUI_UIInputEvent * event)
921```
922**Description**
923
924Obtains the number of touch points from a directional input event (such as a touch event, mouse event, or axis event).
925
926**Since**: 12
927
928**Parameters**
929
930| Name| Description|
931| -------- | -------- |
932| event | Pointer to the UI input event. |
933
934**Returns**
935
936Returns the number of touch points for the directional input event.
937
938
939### OH_ArkUI_PointerEvent_GetPointerId()
940
941```
942int32_t OH_ArkUI_PointerEvent_GetPointerId (const ArkUI_UIInputEvent * event, uint32_t pointerIndex )
943```
944**Description**
945
946Obtains the ID of a touch point from a directional input event (such as a touch event, mouse event, or axis event).
947
948**Since**: 12
949
950**Parameters**
951
952| Name| Description|
953| -------- | -------- |
954| event | Pointer to the UI input event. |
955| pointerIndex | Index of the target touch point in the multi-touch data list. |
956
957**Returns**
958
959Returns the ID of the corresponding touch point.
960
961
962### OH_ArkUI_PointerEvent_GetChangedPointerId()
963
964```
965int32_t OH_ArkUI_PointerEvent_GetChangedPointerId (const ArkUI_UIInputEvent * event, uint32_t * pointerIndex )
966```
967**Description**
968
969Obtains the ID of the touch pointer that triggers the current touch event.
970
971**Since**: 15
972
973**Parameters**
974
975| Name| Description|
976| -------- | -------- |
977| event | Pointer to the UI input event. |
978| pointerIndex | Index of the target touch point in the multi-touch data list. |
979
980**Returns**
981
982Returns the status code of the execution. Returns **0** if the operation is successful; returns **401** if the operation fails, possibly because a parameter error, for example, null pointer for the **event** parameter, occurs.
983
984
985### OH_ArkUI_PointerEvent_GetPressure()
986
987```
988float OH_ArkUI_PointerEvent_GetPressure (const ArkUI_UIInputEvent * event, uint32_t pointerIndex )
989```
990**Description**
991
992Obtains the pressure applied to the touchscreen from a directional input event (for example, a touch event).
993
994**Since**: 12
995
996**Parameters**
997
998| Name| Description|
999| -------- | -------- |
1000| event | Pointer to the UI input event. |
1001| pointerIndex | Index of the target touch point in the multi-touch data list. |
1002
1003**Returns**
1004
1005Returns the pressure applied to the touchscreen; returns **0.0f** if any parameter error occurs.
1006
1007
1008### OH_ArkUI_PointerEvent_GetTiltX()
1009
1010```
1011float OH_ArkUI_PointerEvent_GetTiltX (const ArkUI_UIInputEvent * event, uint32_t pointerIndex )
1012```
1013**Description**
1014
1015Obtains the angle relative to the YZ plane from a directional input event (for example, a touch event). The value range is [-90, 90]. A positive value indicates a rightward tilt.
1016
1017**Since**: 12
1018
1019**Parameters**
1020
1021| Name| Description|
1022| -------- | -------- |
1023| event | Pointer to the UI input event. |
1024| pointerIndex | Index of the target touch point in the multi-touch data list. |
1025
1026**Returns**
1027
1028Returns the angle relative to the YZ plane.
1029
1030
1031### OH_ArkUI_PointerEvent_GetTiltY()
1032
1033```
1034float OH_ArkUI_PointerEvent_GetTiltY (const ArkUI_UIInputEvent * event, uint32_t pointerIndex )
1035```
1036**Description**
1037
1038Obtains the angle relative to the XZ plane from a directional input event (for example, a touch event). The value range is [-90, 90]. A positive value indicates a downward tilt.
1039
1040**Since**: 12
1041
1042**Parameters**
1043
1044| Name| Description|
1045| -------- | -------- |
1046| event | Pointer to the UI input event. |
1047| pointerIndex | Index of the target touch point in the multi-touch data list. |
1048
1049**Returns**
1050
1051Returns the angle relative to the XZ plane.
1052
1053
1054### OH_ArkUI_PointerEvent_GetTouchAreaHeight()
1055
1056```
1057float OH_ArkUI_PointerEvent_GetTouchAreaHeight (const ArkUI_UIInputEvent * event, uint32_t pointerIndex )
1058```
1059**Description**
1060
1061Obtains the height of the touch area from a directional input event (for example, a touch event).
1062
1063**Since**: 12
1064
1065**Parameters**
1066
1067| Name| Description|
1068| -------- | -------- |
1069| event | Pointer to the UI input event. |
1070| pointerIndex | Index of the target touch point in the multi-touch data list. |
1071
1072**Returns**
1073
1074Returns the height of the touch area.
1075
1076
1077### OH_ArkUI_PointerEvent_GetTouchAreaWidth()
1078
1079```
1080float OH_ArkUI_PointerEvent_GetTouchAreaWidth (const ArkUI_UIInputEvent * event, uint32_t pointerIndex )
1081```
1082**Description**
1083
1084Obtains the width of the touch area from a directional input event (for example, a touch event).
1085
1086**Since**: 12
1087
1088**Parameters**
1089
1090| Name| Description|
1091| -------- | -------- |
1092| event | Pointer to the UI input event. |
1093| pointerIndex | Index of the target touch point in the multi-touch data list. |
1094
1095**Returns**
1096
1097Returns the width of the touch area.
1098
1099
1100### OH_ArkUI_PointerEvent_GetWindowX()
1101
1102```
1103float OH_ArkUI_PointerEvent_GetWindowX (const ArkUI_UIInputEvent * event)
1104```
1105**Description**
1106
1107Obtains the X-coordinate relative to the upper left corner of the current application window from a directional input event (such as a touch event, mouse event, or axis event).
1108
1109**Since**: 12
1110
1111**Parameters**
1112
1113| Name| Description|
1114| -------- | -------- |
1115| event | Pointer to the UI input event. |
1116
1117**Returns**
1118
1119Returns the X-coordinate relative to the upper left corner of the current application window; returns **0.0f** if any parameter error occurs.
1120
1121
1122### OH_ArkUI_PointerEvent_GetWindowXByIndex()
1123
1124```
1125float OH_ArkUI_PointerEvent_GetWindowXByIndex (const ArkUI_UIInputEvent * event, uint32_t pointerIndex )
1126```
1127**Description**
1128
1129Obtains the X-coordinate of a specific touch point relative to the upper left corner of the current application window from a directional input event (such as a touch event, mouse event, or axis event).
1130
1131**Since**: 12
1132
1133**Parameters**
1134
1135| Name| Description|
1136| -------- | -------- |
1137| event | Pointer to the UI input event. |
1138| pointerIndex | Index of the target touch point in the multi-touch data list. |
1139
1140**Returns**
1141
1142Returns the X-coordinate relative to the upper left corner of the current application window; returns **0.0f** if any parameter error occurs.
1143
1144
1145### OH_ArkUI_PointerEvent_GetWindowY()
1146
1147```
1148float OH_ArkUI_PointerEvent_GetWindowY (const ArkUI_UIInputEvent * event)
1149```
1150**Description**
1151
1152Obtains the Y-coordinate relative to the upper left corner of the current application window from a directional input event (such as a touch event, mouse event, or axis event).
1153
1154**Since**: 12
1155
1156**Parameters**
1157
1158| Name| Description|
1159| -------- | -------- |
1160| event | Pointer to the UI input event. |
1161
1162**Returns**
1163
1164Returns the Y-coordinate relative to the upper left corner of the current application window; returns **0.0f** if any parameter error occurs.
1165
1166
1167### OH_ArkUI_PointerEvent_GetWindowYByIndex()
1168
1169```
1170float OH_ArkUI_PointerEvent_GetWindowYByIndex (const ArkUI_UIInputEvent * event, uint32_t pointerIndex )
1171```
1172**Description**
1173
1174Obtains the Y-coordinate of a specific touch point relative to the upper left corner of the current application window from a directional input event (such as a touch event, mouse event, or axis event).
1175
1176**Since**: 12
1177
1178**Parameters**
1179
1180| Name| Description|
1181| -------- | -------- |
1182| event | Pointer to the UI input event. |
1183| pointerIndex | Index of the target touch point in the multi-touch data list. |
1184
1185**Returns**
1186
1187Returns the Y-coordinate relative to the upper left corner of the current application window; returns **0.0f** if any parameter error occurs.
1188
1189
1190### OH_ArkUI_PointerEvent_GetX()
1191
1192```
1193float OH_ArkUI_PointerEvent_GetX (const ArkUI_UIInputEvent * event)
1194```
1195**Description**
1196
1197Obtains the X-coordinate relative to the upper left corner of the current component from a directional input event (such as a touch event, mouse event, or axis event).
1198
1199**Since**: 12
1200
1201**Parameters**
1202
1203| Name| Description|
1204| -------- | -------- |
1205| event | Pointer to the UI input event. |
1206
1207**Returns**
1208
1209Returns the X-coordinate relative to the upper left corner of the current component; returns **0.0f** if any parameter error occurs.
1210
1211
1212### OH_ArkUI_PointerEvent_GetXByIndex()
1213
1214```
1215float OH_ArkUI_PointerEvent_GetXByIndex (const ArkUI_UIInputEvent * event, uint32_t pointerIndex )
1216```
1217**Description**
1218
1219Obtains the X-coordinate of a specific touch point relative to the upper left corner of the current component from a directional input event (such as a touch event, mouse event, or axis event).
1220
1221**Since**: 12
1222
1223**Parameters**
1224
1225| Name| Description|
1226| -------- | -------- |
1227| event | Pointer to the UI input event. |
1228| pointerIndex | Index of the target touch point in the multi-touch data list. |
1229
1230**Returns**
1231
1232Returns the X-coordinate relative to the upper left corner of the current component; returns **0.0f** if any parameter error occurs.
1233
1234
1235### OH_ArkUI_PointerEvent_GetY()
1236
1237```
1238float OH_ArkUI_PointerEvent_GetY (const ArkUI_UIInputEvent * event)
1239```
1240**Description**
1241
1242Obtains the Y-coordinate relative to the upper left corner of the current component from a directional input event (such as a touch event, mouse event, or axis event).
1243
1244**Since**: 12
1245
1246**Parameters**
1247
1248| Name| Description|
1249| -------- | -------- |
1250| event | Pointer to the UI input event. |
1251
1252**Returns**
1253
1254Returns the Y-coordinate relative to the upper left corner of the current component; returns **0.0f** if any parameter error occurs.
1255
1256
1257### OH_ArkUI_PointerEvent_GetYByIndex()
1258
1259```
1260float OH_ArkUI_PointerEvent_GetYByIndex (const ArkUI_UIInputEvent * event, uint32_t pointerIndex )
1261```
1262**Description**
1263
1264Obtains the Y-coordinate of a specific touch point relative to the upper left corner of the current component from a directional input event (such as a touch event, mouse event, or axis event).
1265
1266**Since**: 12
1267
1268**Parameters**
1269
1270| Name| Description|
1271| -------- | -------- |
1272| event | Pointer to the UI input event. |
1273| pointerIndex | Index of the target touch point in the multi-touch data list. |
1274
1275**Returns**
1276
1277Returns the Y-coordinate relative to the upper left corner of the current component; returns **0.0f** if any parameter error occurs.
1278
1279
1280### OH_ArkUI_PointerEvent_SetInterceptHitTestMode()
1281
1282```
1283int32_t OH_ArkUI_PointerEvent_SetInterceptHitTestMode (const ArkUI_UIInputEvent * event, HitTestMode mode )
1284```
1285**Description**
1286
1287Sets how the component behaves during hit testing.
1288
1289**Since**: 12
1290
1291**Parameters**
1292
1293| Name| Description|
1294| -------- | -------- |
1295| event | Pointer to the UI input event. |
1296| mode | How the component behaves during hit testing. The parameter type is [HitTestMode](#hittestmode). |
1297
1298**Returns**
1299
1300Returns the status code of the execution.
1301
1302
1303### OH_ArkUI_PointerEvent_SetStopPropagation()
1304
1305```
1306int32_t OH_ArkUI_PointerEvent_SetStopPropagation (const ArkUI_UIInputEvent * event, bool stopPropagation )
1307```
1308**Description**
1309
1310Sets whether to stop event propagation.
1311
1312**Since**: 12
1313
1314**Parameters**
1315
1316| Name| Description|
1317| -------- | -------- |
1318| event | Pointer to the UI input event. |
1319| stopPropagation | Whether to stop event propagation. |
1320
1321**Returns**
1322
1323Returns the status code of the execution. Returns **0** if the operation is successful; returns **401** if the operation fails, possibly because a parameter error, for example, null pointer for the **event** parameter, occurs.
1324
1325
1326### OH_ArkUI_UIInputEvent_GetAction()
1327
1328```
1329int32_t OH_ArkUI_UIInputEvent_GetAction (const ArkUI_UIInputEvent * event)
1330```
1331**Description**
1332
1333Obtains the action type of this UI input event.
1334
1335**Since**: 12
1336
1337**Parameters**
1338
1339| Name| Description|
1340| -------- | -------- |
1341| event | Pointer to the UI input event. |
1342
1343**Returns**
1344
1345Returns the action type of the UI input event; returns **0** if any parameter error occurs.
1346
1347
1348### OH_ArkUI_UIInputEvent_GetDeviceId()
1349
1350```
1351int32_t OH_ArkUI_UIInputEvent_GetDeviceId (const ArkUI_UIInputEvent * event)
1352```
1353**Description**
1354
1355Obtains the ID of the input device that triggers a key event.
1356
1357**Since**: 14
1358
1359**Parameters**
1360
1361| Name| Description|
1362| -------- | -------- |
1363| event | Pointer to an **ArkUI_UIInputEvent** object. |
1364
1365**Returns**
1366
1367Returns the device ID.
1368
1369
1370### OH_ArkUI_UIInputEvent_GetEventTime()
1371
1372```
1373int64_t OH_ArkUI_UIInputEvent_GetEventTime (const ArkUI_UIInputEvent * event)
1374```
1375**Description**
1376
1377Obtains the time when a specified UI input event occurs.
1378
1379**Since**: 12
1380
1381**Parameters**
1382
1383| Name| Description|
1384| -------- | -------- |
1385| event | Pointer to the UI input event. |
1386
1387**Returns**
1388
1389Returns the time when the UI input event occurs; returns **0** if any parameter error occurs.
1390
1391
1392### OH_ArkUI_UIInputEvent_GetPressedKeys()
1393
1394```
1395int32_t OH_ArkUI_UIInputEvent_GetPressedKeys (const ArkUI_UIInputEvent * event, int32_t * pressedKeyCodes, int32_t * length )
1396```
1397**Description**
1398
1399Obtains all pressed keys. Currently, only key events are supported.
1400
1401**Since**: 14
1402
1403**Parameters**
1404
1405| Name| Description|
1406| -------- | -------- |
1407| event | Pointer to an **ArkUI_UIInputEvent** object. |
1408| pressedKeyCodes | Array of all pressed keys. The caller is responsible for allocating the memory space to which the array points. |
1409| length | Dual-purpose parameter: As input, it indicates the length of the provided **pressedKeyCodes** array; as output, it indicates the number of pressed keys. |
1410
1411**Returns**
1412
1413Returns [ARKUI_ERROR_CODE_NO_ERROR](_ark_u_i___native_module.md) if the operation is successful; returns [ARKUI_ERROR_CODE_BUFFER_SIZE_NOT_ENOUGH](_ark_u_i___native_module.md) if the memory is insufficient. returns [ARKUI_ERROR_CODE_PARAM_INVALID](_ark_u_i___native_module.md) if a parameter error occurs.
1414
1415
1416### OH_ArkUI_UIInputEvent_GetSourceType()
1417
1418```
1419int32_t OH_ArkUI_UIInputEvent_GetSourceType (const ArkUI_UIInputEvent * event)
1420```
1421**Description**
1422
1423Obtains the source type of a UI input event.
1424
1425**Since**: 12
1426
1427**Parameters**
1428
1429| Name| Description|
1430| -------- | -------- |
1431| event | Pointer to the UI input event. |
1432
1433**Returns**
1434
1435Returns the source type of the UI input event.
1436
1437
1438### OH_ArkUI_UIInputEvent_GetToolType()
1439
1440```
1441int32_t OH_ArkUI_UIInputEvent_GetToolType (const ArkUI_UIInputEvent * event)
1442```
1443**Description**
1444
1445Obtains the tool type of a UI input event.
1446
1447**Since**: 12
1448
1449**Parameters**
1450
1451| Name| Description|
1452| -------- | -------- |
1453| event | Pointer to the UI input event. |
1454
1455**Returns**
1456
1457Returns the tool type of the UI input event.
1458
1459
1460### OH_ArkUI_UIInputEvent_GetType()
1461
1462```
1463int32_t OH_ArkUI_UIInputEvent_GetType (const ArkUI_UIInputEvent * event)
1464```
1465**Description**
1466
1467Obtains the type of a UI input event.
1468
1469**Since**: 12
1470
1471**Parameters**
1472
1473| Name| Description|
1474| -------- | -------- |
1475| event | Pointer to the UI input event. |
1476
1477**Returns**
1478
1479Returns the type of the UI input event; returns **0** if any parameter error occurs.
1480
1481
1482### OH_ArkUI_FocusAxisEvent_GetAxisValue()
1483
1484```
1485double OH_ArkUI_FocusAxisEvent_GetAxisValue (const ArkUI_UIInputEvent * event, int32_t axis)
1486```
1487**Description**
1488
1489Obtains the axis value of a focus axis event.
1490
1491**Since**: 15
1492
1493**Parameters**
1494
1495| Name| Description|
1496| -------- | -------- |
1497| event | Pointer to the UI input event. |
1498| axis | Axis type of the focus axis event. |
1499
1500**Returns**
1501
1502Returns the axis value of the focus axis event; returns <b>0.0</b> if any parameter error occurs.
1503
1504
1505### OH_ArkUI_FocusAxisEvent_SetStopPropagation()
1506
1507```
1508int32_t OH_ArkUI_FocusAxisEvent_SetStopPropagation (const ArkUI_UIInputEvent * event, bool stopPropagation)
1509```
1510**Description**
1511
1512Sets whether to prevent a focus axis event from bubbling up.
1513
1514**Since**: 15
1515
1516**Parameters**
1517
1518| Name| Description|
1519| -------- | -------- |
1520| event | Pointer to the UI input event. |
1521| stopPropagation | Whether to stop event propagation. |
1522
1523**Returns**
1524
1525Returns [ARKUI_ERROR_CODE_NO_ERROR](_ark_u_i___native_module.md) if the operation is successful; returns [ARKUI_ERROR_CODE_PARAM_INVALID](_ark_u_i___native_module.md) if a parameter error occurs.
1526
1527
1528### OH_ArkUI_PointerEvent_GetPressedTimeByIndex()
1529
1530```
1531int64_t OH_ArkUI_PointerEvent_GetPressedTimeByIndex (const ArkUI_UIInputEvent* event, uint32_t pointerIndex)
1532```
1533**Description**
1534
1535Obtains the press time of a specific touch point.
1536
1537**Since**: 15
1538
1539**Parameters**
1540
1541| Name| Description|
1542| -------- | -------- |
1543| event | Pointer to the UI input event. |
1544| pointerIndex | Index of the target touch point in the multi-touch data list. |
1545
1546**Returns**
1547
1548Returns the press time of the specific touch point; returns **0** if any parameter error occurs.
1549
1550
1551### OH_ArkUI_MouseEvent_GetRawDeltaX()
1552
1553```
1554float OH_ArkUI_MouseEvent_GetRawDeltaX (const ArkUI_UIInputEvent* event)
1555```
1556**Description**
1557
1558Obtains the x-axis offset of the mouse pointer position relative to the position in the previously reported mouse event. This value may be less than the difference between the two reported X coordinates when the mouse pointer is near the screen edge.
1559
1560**Since**: 15
1561
1562**Parameters**
1563
1564| Name| Description|
1565| -------- | -------- |
1566| event | Pointer to the UI input event. |
1567
1568**Returns**
1569
1570Returns the x-axis offset of the mouse pointer position relative to the position in the previously reported mouse event; returns **0.0f** if any parameter error occurs.
1571
1572
1573### OH_ArkUI_MouseEvent_GetRawDeltaY()
1574
1575```
1576float OH_ArkUI_MouseEvent_GetRawDeltaY (const ArkUI_UIInputEvent* event)
1577```
1578**Description**
1579
1580Obtains the x-axis offset of the mouse pointer position relative to the position in the previously reported mouse event. This value may be less than the difference between the two reported Y coordinates when the mouse pointer is near the screen edge.
1581
1582**Since**: 15
1583
1584**Parameters**
1585
1586| Name| Description|
1587| -------- | -------- |
1588| event | Pointer to the UI input event. |
1589
1590**Returns**
1591
1592Returns the y-axis offset of the mouse pointer position relative to the position in the previously reported mouse event; returns **0.0f** if any parameter error occurs.
1593
1594
1595### OH_ArkUI_MouseEvent_GetPressedButtons()
1596
1597```
1598int32_t OH_ArkUI_MouseEvent_GetPressedButtons (const ArkUI_UIInputEvent* event, int32_t* pressedButtons, int32_t* length)
1599```
1600**Description**
1601
1602Obtains the pressed buttons from a mouse event.
1603
1604**Since**: 15
1605
1606**Parameters**
1607
1608| Name| Description|
1609| -------- | -------- |
1610| event | Pointer to the UI input event. |
1611| pressedButtons | List of buttons that are pressed. An int array must be created beforehand to store the pressed buttons.|
1612| length | Dual-purpose parameter: As input, it indicates the length of the provided **pressedButtons** array; as output, it indicates the number of pressed keys.|
1613
1614**Returns**
1615
1616Returns [ARKUI_ERROR_CODE_NO_ERROR](_ark_u_i___native_module.md) if the operation is successful; Returns [ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR](_ark_u_i___native_module.md) if the given buffer size is insufficient.
1617
1618
1619### OH_ArkUI_UIInputEvent_GetTargetDisplayId()
1620
1621```
1622int32_t OH_ArkUI_UIInputEvent_GetTargetDisplayId (const ArkUI_UIInputEvent* event)
1623```
1624**Description**
1625
1626Obtains the ID of the screen where the UI input event occurs.
1627
1628**Since**: 15
1629
1630**Parameters**
1631
1632| Name| Description|
1633| -------- | -------- |
1634| event | Pointer to the UI input event. |
1635
1636**Returns**
1637
1638Returns the screen ID; returns **0** if any parameter error occurs.
1639
1640
1641### OH_ArkUI_PointerEvent_GetInteractionHand()
1642
1643```
1644int32_t OH_ArkUI_PointerEvent_GetInteractionHand (const ArkUI_UIInputEvent * event, ArkUI_InteractionHand * hand)
1645```
1646**Description**
1647
1648Checks whether an event is triggered by a left-hand or right-hand tap.
1649
1650**Since**: 15
1651
1652**Parameters**
1653
1654| Name| Description|
1655| -------- | -------- |
1656| event | Pointer to the UI input event. |
1657| hand | Returns the interactive hand recognized by the current event. |
1658
1659**Returns**
1660
1661Returns [ARKUI_ERROR_CODE_NO_ERROR](_ark_u_i___native_module.md) if the operation is successful; returns [ARKUI_ERROR_CODE_PARAM_INVALID](_ark_u_i___native_module.md) if a parameter error occurs.
1662
1663
1664### OH_ArkUI_PointerEvent_GetInteractionHandByIndex()
1665
1666```
1667int32_t OH_ArkUI_PointerEvent_GetInteractionHandByIndex (const ArkUI_UIInputEvent * event, int32_t pointerIndex, ArkUI_InteractionHand * hand)
1668```
1669**Description**
1670
1671Checks whether an event is triggered by a left-hand or right-hand tap.
1672
1673**Since**: 15
1674
1675**Parameters**
1676
1677| Name| Description|
1678| -------- | -------- |
1679| event | Pointer to the UI input event. |
1680| pointerIndex | Index of the target touch point in the multi-touch data list. |
1681| hand | Returns the interactive hand of the specified finger. |
1682
1683**Returns**
1684
1685Returns [ARKUI_ERROR_CODE_NO_ERROR](_ark_u_i___native_module.md) if the operation is successful; returns [ARKUI_ERROR_CODE_PARAM_INVALID](_ark_u_i___native_module.md) if a parameter error occurs.
1686
1687
1688### OH_ArkUI_UIInputEvent_GetEventTargetWidth()
1689
1690```
1691float OH_ArkUI_UIInputEvent_GetEventTargetWidth(const ArkUI_UIInputEvent* event)
1692```
1693**Description**
1694
1695Obtains the width of the component hit by an event.
1696
1697**Since**: 18
1698
1699**Parameters**
1700
1701| Name| Description|
1702| -------- | -------- |
1703| event | Pointer to the **ArkUI_UIInputEvent** object. |
1704
1705**Returns**
1706
1707Returns the width of the component hit by the event; returns **0.0f** if any parameter error occurs.
1708
1709
1710### OH_ArkUI_UIInputEvent_GetEventTargetHeight()
1711
1712```
1713float OH_ArkUI_UIInputEvent_GetEventTargetHeight(const ArkUI_UIInputEvent* event)
1714```
1715**Description**
1716
1717Obtains the height of the component hit by an event.
1718
1719**Since**: 18
1720
1721**Parameters**
1722
1723| Name| Description|
1724| -------- | -------- |
1725| event | Pointer to the **ArkUI_UIInputEvent** object. |
1726
1727**Returns**
1728
1729Returns the height of the component hit by the event; returns **0.0f** if any parameter error occurs.
1730
1731
1732### OH_ArkUI_UIInputEvent_GetEventTargetPositionX()
1733
1734```
1735float OH_ArkUI_UIInputEvent_GetEventTargetPositionX(const ArkUI_UIInputEvent* event)
1736```
1737**Description**
1738
1739Obtains the X coordinate of the component hit by an event.
1740
1741**Since**: 18
1742
1743**Parameters**
1744
1745| Name| Description|
1746| -------- | -------- |
1747| event | Pointer to the **ArkUI_UIInputEvent** object. |
1748
1749**Returns**
1750
1751Returns the X coordinate of the component hit by the event; returns **0.0f** if any parameter error occurs.
1752
1753
1754### OH_ArkUI_UIInputEvent_GetEventTargetPositionY()
1755
1756```
1757float OH_ArkUI_UIInputEvent_GetEventTargetPositionY(const ArkUI_UIInputEvent* event)
1758```
1759**Description**
1760
1761Obtains the Y coordinate of the component hit by an event.
1762
1763**Since**: 18
1764
1765**Parameters**
1766
1767| Name| Description|
1768| -------- | -------- |
1769| event | Pointer to the **ArkUI_UIInputEvent** object. |
1770
1771**Returns**
1772
1773Returns the Y coordinate of the component hit by the event; returns **0.0f** if any parameter error occurs.
1774
1775
1776### OH_ArkUI_UIInputEvent_GetEventTargetGlobalPositionX()
1777
1778```
1779float OH_ArkUI_UIInputEvent_GetEventTargetGlobalPositionX(const ArkUI_UIInputEvent* event)
1780```
1781**Description**
1782
1783Obtains the global X coordinate of the component hit by an event.
1784
1785**Since**: 18
1786
1787**Parameters**
1788
1789| Name| Description|
1790| -------- | -------- |
1791| event | Pointer to the **ArkUI_UIInputEvent** object. |
1792
1793**Returns**
1794
1795Returns the global Y coordinate of the component hit by the event; returns **0.0f** if any parameter error occurs.
1796
1797
1798### OH_ArkUI_UIInputEvent_GetEventTargetGlobalPositionY()
1799
1800```
1801float OH_ArkUI_UIInputEvent_GetEventTargetGlobalPositionY(const ArkUI_UIInputEvent* event)
1802```
1803**Description**
1804
1805Obtains the global Y coordinate of the component hit by an event.
1806
1807**Since**: 18
1808
1809**Parameters**
1810
1811| Name| Description|
1812| -------- | -------- |
1813| event | Pointer to the **ArkUI_UIInputEvent** object. |
1814
1815**Returns**
1816
1817Returns the global Y coordinate of the component hit by the event; returns **0.0f** if any parameter error occurs.
1818
1819
1820### OH_ArkUI_UIInputEvent_GetModifierKeyStates()
1821
1822```
1823int32_t OH_ArkUI_UIInputEvent_GetModifierKeyStates(const ArkUI_UIInputEvent* event, uint64_t* keys)
1824```
1825**Description**
1826
1827Obtains the state of the modifier keys in a UI input event.
1828
1829**Since**: 18
1830
1831**Parameters**
1832
1833| Name| Description|
1834| -------- | -------- |
1835| event | Pointer to the **ArkUI_UIInputEvent** object. |
1836| keys | Indicates the modifier key combination that is being pressed. |
1837
1838**Returns**
1839
1840Returns the modifier key combination that is being pressed. If the parameter is abnormal, 401 is returned.
1841
1842
1843### OH_ArkUI_HoverEvent_IsHovered()
1844
1845```
1846bool OH_ArkUI_HoverEvent_IsHovered(const ArkUI_UIInputEvent* event)
1847```
1848**Description**
1849
1850Checks whether the cursor is hovering over this component.
1851
1852**Since**: 18
1853
1854**Parameters**
1855
1856| Name| Description|
1857| -------- | -------- |
1858| event | Pointer to the **ArkUI_UIInputEvent** object. |
1859
1860**Returns**
1861
1862Returns true if the cursor is hovered over the current component. If the cursor is not hovered over the current component, false is returned.
1863
1864
1865### OH_ArkUI_PointerEvent_CreateClonedEvent()
1866
1867```
1868int32_t OH_ArkUI_PointerEvent_CreateClonedEvent(const ArkUI_UIInputEvent* event, ArkUI_UIInputEvent** clonedEvent)
1869```
1870**Description**
1871
1872Creates a cloned event pointer based on an event pointer.
1873
1874**Since**: 15
1875
1876**Parameters**
1877
1878| Name| Description|
1879| -------- | -------- |
1880| event | Pointer to an **ArkUI_UIInputEvent** object. |
1881| clonedEvent | Pointer to the ArkUI_UIInputEvent clone event. |
1882
1883**Returns**
1884
1885Returns [ARKUI_ERROR_CODE_NO_ERROR](_ark_u_i___native_module.md) if the operation is successful;
1886returns [ARKUI_ERROR_CODE_PARAM_INVALID](_ark_u_i___native_module.md) if a parameter error occurs.
1887
1888### OH_ArkUI_PointerEvent_DestroyClonedEvent()
1889
1890```
1891int32_t OH_ArkUI_PointerEvent_DestroyClonedEvent(const ArkUI_UIInputEvent* event)
1892```
1893**Description**
1894
1895Destroys a cloned event pointer.
1896
1897**Since**: 15
1898
1899**Parameters**
1900
1901| Name| Description|
1902| -------- | -------- |
1903| event | Pointer to an **ArkUI_UIInputEvent** object. |
1904
1905**Returns**
1906
1907Returns [ARKUI_ERROR_CODE_NO_ERROR](_ark_u_i___native_module.md) if the operation is successful;
1908returns [ARKUI_ERROR_CODE_PARAM_INVALID](_ark_u_i___native_module.md) if a parameter error occurs.
1909Returns [ARKUI_ERROR_CODE_NON_CLONED_POINTER_EVENT](_ark_u_i___native_module.md) if the input event pointer is not a cloned event pointer.
1910
1911### OH_ArkUI_PointerEvent_SetClonedEventLocalPosition()
1912
1913```
1914int32_t OH_ArkUI_PointerEvent_SetClonedEventLocalPosition(const ArkUI_UIInputEvent * event, float x, float y)
1915```
1916**Description**
1917
1918Sets the X and Y coordinates of a cloned event relative to the upper left corner of the current component.
1919
1920**Since**: 15
1921
1922**Parameters**
1923
1924| Name| Description|
1925| -------- | -------- |
1926| event | Pointer to an **ArkUI_UIInputEvent** object. |
1927| x | X coordinate of the event relative to the upper left corner of the current component. |
1928| y | Y coordinate of the event relative to the upper left corner of the current component. |
1929
1930**Returns**
1931
1932Returns [ARKUI_ERROR_CODE_NO_ERROR](_ark_u_i___native_module.md) if the operation is successful;
1933returns [ARKUI_ERROR_CODE_PARAM_INVALID](_ark_u_i___native_module.md) if a parameter error occurs.
1934Returns [ARKUI_ERROR_CODE_NON_CLONED_POINTER_EVENT](_ark_u_i___native_module.md) if the input event pointer is not a cloned event pointer.
1935
1936### OH_ArkUI_PointerEvent_SetClonedEventLocalPositionByIndex()
1937
1938```
1939int32_t OH_ArkUI_PointerEvent_SetClonedEventLocalPositionByIndex(const ArkUI_UIInputEvent * event,
1940float x, float y, int32_t pointerIndex)
1941```
1942**Description**
1943
1944Sets the X and Y coordinates of a specific contact point of a cloned event relative to the upper left corner of the current component.
1945
1946**Since**: 15
1947
1948**Parameters**
1949
1950| Name| Description|
1951| -------- | -------- |
1952| event | Pointer to an **ArkUI_UIInputEvent** object. |
1953| x | X coordinate of the event relative to the upper left corner of the current component. |
1954| y | Y coordinate of the event relative to the upper left corner of the current component. |
1955| pointerIndex | Index of the target touch point in the multi-touch data list. |
1956
1957**Returns**
1958
1959Returns [ARKUI_ERROR_CODE_NO_ERROR](_ark_u_i___native_module.md) if the operation is successful;
1960returns [ARKUI_ERROR_CODE_PARAM_INVALID](_ark_u_i___native_module.md) if a parameter error occurs.
1961Returns [ARKUI_ERROR_CODE_NON_CLONED_POINTER_EVENT](_ark_u_i___native_module.md) if the input event pointer is not a cloned event pointer.
1962
1963### OH_ArkUI_PointerEvent_SetClonedEventActionType()
1964
1965```
1966int32_t OH_ArkUI_PointerEvent_SetClonedEventActionType(const ArkUI_UIInputEvent * event, int32_t actionType)
1967```
1968**Description**
1969
1970Sets the action type of a cloned event.
1971
1972**Since**: 15
1973
1974**Parameters**
1975
1976| Name| Description|
1977| -------- | -------- |
1978| event | Pointer to an **ArkUI_UIInputEvent** object. |
1979| actionType | Event type. |
1980
1981**Returns**
1982
1983Returns [ARKUI_ERROR_CODE_NO_ERROR](_ark_u_i___native_module.md) if the operation is successful;
1984returns [ARKUI_ERROR_CODE_PARAM_INVALID](_ark_u_i___native_module.md) if a parameter error occurs.
1985Returns [ARKUI_ERROR_CODE_NON_CLONED_POINTER_EVENT](_ark_u_i___native_module.md) if the input event pointer is not a cloned event pointer.
1986
1987### OH_ArkUI_PointerEvent_SetClonedEventChangedFingerId()
1988
1989```
1990int32_t OH_ArkUI_PointerEvent_SetClonedEventChangedFingerId(const ArkUI_UIInputEvent * event, int32_t fingerId)
1991```
1992**Description**
1993
1994Sets the touch point ID of a cloned pointer event.
1995
1996**Since**: 15
1997
1998**Parameters**
1999
2000| Name| Description|
2001| -------- | -------- |
2002| event | Pointer to an **ArkUI_UIInputEvent** object. |
2003| fingerId | ID of the touch point that triggers the event. |
2004
2005**Returns**
2006
2007Returns [ARKUI_ERROR_CODE_NO_ERROR](_ark_u_i___native_module.md) if the operation is successful;
2008returns [ARKUI_ERROR_CODE_PARAM_INVALID](_ark_u_i___native_module.md) if a parameter error occurs.
2009Returns [ARKUI_ERROR_CODE_NON_CLONED_POINTER_EVENT](_ark_u_i___native_module.md) if the input event pointer is not a cloned event pointer.
2010
2011### OH_ArkUI_PointerEvent_SetClonedEventFingerIdByIndex()
2012
2013```
2014int32_t OH_ArkUI_PointerEvent_SetClonedEventFingerIdByIndex(const ArkUI_UIInputEvent * event,
2015int32_t fingerId, int32_t pointerIndex)
2016```
2017**Description**
2018
2019Sets the touch point ID of a specific contact point of a cloned event.
2020
2021**Since**: 15
2022
2023**Parameters**
2024
2025| Name| Description|
2026| -------- | -------- |
2027| event | Pointer to an **ArkUI_UIInputEvent** object. |
2028| fingerId | ID of the touch point that triggers the event. |
2029| pointerIndex | Index of the target touch point in the multi-touch data list. |
2030
2031**Returns**
2032
2033Returns [ARKUI_ERROR_CODE_NO_ERROR](_ark_u_i___native_module.md) if the operation is successful;
2034returns [ARKUI_ERROR_CODE_PARAM_INVALID](_ark_u_i___native_module.md) if a parameter error occurs.
2035Returns [ARKUI_ERROR_CODE_NON_CLONED_POINTER_EVENT](_ark_u_i___native_module.md) if the input event pointer is not a cloned event pointer.
2036
2037### OH_ArkUI_PointerEvent_PostClonedEvent()
2038
2039```
2040int32_t OH_ArkUI_PointerEvent_PostClonedEvent(ArkUI_NodeHandle node, const ArkUI_UIInputEvent * event)
2041```
2042**Description**
2043
2044Posts a cloned event to a specific node.
2045
2046**Since**: 15
2047
2048**Parameters**
2049
2050| Name| Description|
2051| -------- | -------- |
2052| event | Pointer to an **ArkUI_UIInputEvent** object. |
2053
2054**Returns**
2055
2056Returns [ARKUI_ERROR_CODE_NO_ERROR](_ark_u_i___native_module.md) if the operation is successful;
2057returns [ARKUI_ERROR_CODE_PARAM_INVALID](_ark_u_i___native_module.md) if a parameter error occurs.
2058Returns [ARKUI_ERROR_CODE_NON_CLONED_POINTER_EVENT](_ark_u_i___native_module.md) if the input event pointer is not a cloned event pointer.
2059Returns [ARKUI_ERROR_CODE_POST_CLONED_COMPONENT_STATUS_ABNORMAL](_ark_u_i___native_module.md) if the component status is abnormal.
2060Returns [ARKUI_ERROR_CODE_POST_CLONED_NO_COMPONENT_HIT_TO_RESPOND_TO_THE_EVENT] if no component hit to respond to the event.
2061
2062
2063### OH_ArkUI_AxisEvent_SetPropagation()
2064
2065```
2066int32_t OH_ArkUI_AxisEvent_SetPropagation (const ArkUI_UIInputEvent * event, bool propagation)
2067```
2068**Description**
2069
2070Sets whether to enable axis event propagation.
2071
2072**Since**: 18
2073
2074**Parameters**
2075
2076| Name| Description|
2077| -------- | -------- |
2078| event | Pointer to the UI input event.|
2079| propagation | Whether to stop event propagation. |
2080
2081**Returns**
2082
2083Returns [ARKUI_ERROR_CODE_NO_ERROR](_ark_u_i___native_module.md) if the operation is successful; returns [ARKUI_ERROR_CODE_PARAM_INVALID](_ark_u_i___native_module.md) if a parameter error occurs.
2084
2085
2086### OH_ArkUI_AxisEvent_GetScrollStep()
2087
2088```
2089int32_t OH_ArkUI_AxisEvent_GetScrollStep (const ArkUI_UIInputEvent * event)
2090```
2091**Description**
2092
2093Obtains the scroll step configuration of the mouse wheel axis event.
2094
2095**Since**: 18
2096
2097**Parameters**
2098
2099| Name| Description|
2100| -------- | -------- |
2101| event | Pointer to the **ArkUI_UIInputEvent** event.|
2102
2103**Returns**
2104
2105Returns the scrolling step of the mouse wheel axis.
2106