Module ui_input_event

Module ui_input_event 

Source
Available on crate feature api-12 only.

Structs§

ArkUI_InteractionHandapi-15
Defines whether the touch event is from the left or right hand.
ArkUI_ModifierKeyName
Defines an enum for modifier keys.
ArkUI_UIInputEvent
Defines the UI input event.
ArkUI_UIInputEvent_Type
Enumerates the UI input event types.
HitTestMode
Enumerates the hit test modes.
InputEventSourceType
MouseEventAction
TouchEventAction
TouchEventToolType
_bindgen_ty_6api-15
Defines an enum for the axis types for focus axis events.
_bindgen_ty_7api-15
Enumerates the action types for axis events.

Constants§

UI_AXIS_EVENT_ACTION_BEGINapi-15
The axis event begins.
UI_AXIS_EVENT_ACTION_CANCELapi-15
The axis event is canceled.
UI_AXIS_EVENT_ACTION_ENDapi-15
The axis event ends.
UI_AXIS_EVENT_ACTION_NONEapi-15
The axis event is abnormal.
UI_AXIS_EVENT_ACTION_UPDATEapi-15
The axis event is updated.
UI_FOCUS_AXIS_EVENT_ABS_BRAKEapi-15
ABS_BRAKE.
UI_FOCUS_AXIS_EVENT_ABS_GASapi-15
ABS_GAS.
UI_FOCUS_AXIS_EVENT_ABS_HAT0Xapi-15
ABS_HAT0X.
UI_FOCUS_AXIS_EVENT_ABS_HAT0Yapi-15
ABS_HAT0Y.
UI_FOCUS_AXIS_EVENT_ABS_RZapi-15
ABS_RZ.
UI_FOCUS_AXIS_EVENT_ABS_Xapi-15
ABS_X.
UI_FOCUS_AXIS_EVENT_ABS_Yapi-15
ABS_Y.
UI_FOCUS_AXIS_EVENT_ABS_Zapi-15
ABS_Z.

Functions§

OH_ArkUI_AxisEvent_GetAxisActionapi-15
Obtains the action type of the current axis event.
OH_ArkUI_AxisEvent_GetHorizontalAxisValue
Obtains the value of the horizontal scroll axis for this axis event. This value is generated by two-finger horizontal swiping on a touchpad.
OH_ArkUI_AxisEvent_GetPinchAxisScaleValue
This value is generated by a two-finger pinch gesture on a touchpad. The reported scale value is relative to the initial state
OH_ArkUI_AxisEvent_GetScrollStepapi-17
Obtains the scroll step coefficient for a wheel-based axis event. This API returns the user-configured scroll scale factor factor.
OH_ArkUI_AxisEvent_GetVerticalAxisValue
Obtains the value of the vertical scroll axis for this axis event. This value is typically generated by mouse wheel scrolling or two-finger vertical swiping on a touchpad.
OH_ArkUI_AxisEvent_SetPropagationapi-17
Sets whether to enable axis event propagation (bubbling). By default, axis events do not bubble and are only sent to the first component that can respond to axis events. You can enable axis event bubbling to allow the current event to be passed to the next ancestor component in the response chain that can handle axis events. This API cannot be used on axis events obtained from gesture events.
OH_ArkUI_FocusAxisEvent_GetAxisValueapi-15
Obtains the axis value of a focus axis event.
OH_ArkUI_FocusAxisEvent_SetStopPropagationapi-15
Sets whether to prevent a focus axis event from bubbling up.
OH_ArkUI_HoverEvent_IsHoveredapi-17
Checks whether the cursor is hovering over this component.
OH_ArkUI_MouseEvent_GetMouseAction
Get the value of the mouse action type for mouse events.
OH_ArkUI_MouseEvent_GetMouseButton
Get the value of the button type for mouse events.
OH_ArkUI_MouseEvent_GetPressedButtonsapi-15
Obtains the pressed buttons from a mouse event.
OH_ArkUI_MouseEvent_GetRawDeltaXapi-15
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.
OH_ArkUI_MouseEvent_GetRawDeltaYapi-15
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.
OH_ArkUI_PointerEvent_CreateClonedEventapi-15
Creates a cloned event pointer based on an event pointer. This API is effective only for touch events.
OH_ArkUI_PointerEvent_DestroyClonedEventapi-15
Destroys a cloned event pointer.
OH_ArkUI_PointerEvent_GetChangedPointerIdapi-15
Obtains the ID of the touch pointer that triggers the current touch event.
OH_ArkUI_PointerEvent_GetDisplayX
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).
OH_ArkUI_PointerEvent_GetDisplayXByIndex
Obtains the X coordinate of a specific contact point relative to the upper left corner of the current screen from a pointer event (such as a touch, mouse, or axis event). For mouse and axis events, this API returns the default value of 0.0f if the given index is greater than 0.
OH_ArkUI_PointerEvent_GetDisplayY
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).
OH_ArkUI_PointerEvent_GetDisplayYByIndex
Obtains the Y coordinate of a specific touch point relative to the upper left corner of the current screen from a pointer event (such as a touch event, mouse event, or axis event).
OH_ArkUI_PointerEvent_GetGlobalDisplayXapi-20
Obtains the X coordinate relative to global display from a pointer event (such as a touch, mouse, or axis event). Position information can only be obtained from UI input events.
OH_ArkUI_PointerEvent_GetGlobalDisplayXByIndexapi-20
Obtains the X coordinate of a specific contact point relative to global display from a pointer event (such as a touch, mouse, or axis event). Position information can only be obtained from UI input events. For mouse and axis events, if the provided pointerIndex is greater than 0, this API always returns the default value 0.0f.
OH_ArkUI_PointerEvent_GetGlobalDisplayYapi-20
Obtains the Y coordinate relative to global display from a pointer event (such as a touch, mouse, or axis event). Position information can only be obtained from pointer-like events.
OH_ArkUI_PointerEvent_GetGlobalDisplayYByIndexapi-20
Obtains the Y coordinate of a specific contact point relative to global display from a pointer event (such as a touch, mouse, or axis event). Position information can only be obtained from UI input events. For mouse and axis events, if the provided pointerIndex is greater than 0, this API always returns the default value 0.0f.
OH_ArkUI_PointerEvent_GetHistoryDisplayX
Obtains the X coordinate of a specific touch point in a 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).
OH_ArkUI_PointerEvent_GetHistoryDisplayY
Obtains the Y coordinate of a specific touch point in a 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).
OH_ArkUI_PointerEvent_GetHistoryEventTime
Obtains the occurrence time of a historical event from a directional input event (such as a touch event, mouse event, or axis event).
OH_ArkUI_PointerEvent_GetHistoryGlobalDisplayXapi-20
Obtains the X coordinate relative to the global display for a specific touch point from historical events, based on the given pointer index and history index of an input event (such as a touch, mouse, or axis event). Position information can only be obtained from UI input events. For mouse and axis events, if the provided pointerIndex is greater than 0, this API always returns the default value 0.0f.
OH_ArkUI_PointerEvent_GetHistoryGlobalDisplayYapi-20
Obtains the Y coordinate relative to the global display for a specific touch point from historical events, based on the given pointer index and history index of an input event (such as a touch, mouse, or axis event). Position information can only be obtained from UI input events. For mouse and axis events, if the provided pointerIndex is greater than 0, this API always returns the default value 0.0f.
OH_ArkUI_PointerEvent_GetHistoryPointerCount
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).
OH_ArkUI_PointerEvent_GetHistoryPointerId
Obtains the unique ID of a contact point from a historical event of a pointer event (such as a touch event).
OH_ArkUI_PointerEvent_GetHistoryPressure
Obtains the pressure applied to the touchscreen in a specific historical event from a directional input event (for example, a touch event)..
OH_ArkUI_PointerEvent_GetHistorySize
Obtains the number of historical events from a pointer event (such as a touch event). Historical events are the raw events that occur between the current event and the previous event. This API is applicable only to move events.
OH_ArkUI_PointerEvent_GetHistoryTiltX
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.
OH_ArkUI_PointerEvent_GetHistoryTiltY
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.
OH_ArkUI_PointerEvent_GetHistoryTouchAreaHeight
Obtains the height of the touch area in a specific historical event from a directional input event (for example, a touch event).
OH_ArkUI_PointerEvent_GetHistoryTouchAreaWidth
Obtains the width of the touch area in a specific historical event from a directional input event (for example, a touch event).
OH_ArkUI_PointerEvent_GetHistoryWindowX
Obtains the X coordinate of a specific touch point in a 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).
OH_ArkUI_PointerEvent_GetHistoryWindowY
Obtains the Y coordinate of a specific touch point in a 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).
OH_ArkUI_PointerEvent_GetHistoryX
Obtains the X coordinate of a specific touch point in a 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).
OH_ArkUI_PointerEvent_GetHistoryY
Obtains the Y coordinate of a specific touch point in a 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).
OH_ArkUI_PointerEvent_GetInteractionHandapi-15
Checks whether an event is triggered by the user’s left or right hand. This API is only effective on some touch devices.
OH_ArkUI_PointerEvent_GetInteractionHandByIndexapi-15
Checks whether an event is triggered by the user’s left or right hand. This API is only effective on some touch devices.
OH_ArkUI_PointerEvent_GetPointerCount
Obtains the number of contact points from a pointer event (such as a touch, mouse, or axis event).
OH_ArkUI_PointerEvent_GetPointerId
Obtains the unique ID of a contact point from a pointer event (such as a touch, mouse, or axis event).
OH_ArkUI_PointerEvent_GetPressedTimeByIndexapi-15
Obtains the press time of a specified touch point. This API is effective only for touch events.
OH_ArkUI_PointerEvent_GetPressure
Obtains the pressure applied to the touchscreen from a directional input event (for example, a touch event).
OH_ArkUI_PointerEvent_GetRollAngleapi-17
Obtains the rotation angle of the stylus around the z-axis from a UI input event.
OH_ArkUI_PointerEvent_GetTiltX
Obtains the tilt angle relative to the YZ plane from a pointer event. The value range is [-90, 90], where positive values indicate a rightward tilt. This API is applicable only to stylus-based touch events from devices that support tilt angle reporting.
OH_ArkUI_PointerEvent_GetTiltY
Obtains the tilt angle relative to the XZ plane from a pointer event. The value range is [-90, 90], where positive values indicate a rightward tilt. This API is applicable only to stylus-based touch events from devices that support tilt angle reporting.
OH_ArkUI_PointerEvent_GetTouchAreaHeight
Obtains the height of the contact area for a pointer event. This API is applicable only to finger-based touch events, and the return value typically represents the radius of a circular touch area.
OH_ArkUI_PointerEvent_GetTouchAreaWidth
Obtains the width of the contact area for a pointer event. This API is applicable only to finger-based touch events, and the return value typically represents the radius of a circular touch area.
OH_ArkUI_PointerEvent_GetWindowX
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).
OH_ArkUI_PointerEvent_GetWindowXByIndex
Obtains the X coordinate of a specific contact point relative to the upper left corner of the current application window from a pointer event (such as a touch, mouse, or axis event). For mouse and axis events, this API returns the default value of 0.0f if the given index is greater than 0.
OH_ArkUI_PointerEvent_GetWindowY
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).
OH_ArkUI_PointerEvent_GetWindowYByIndex
Obtains the Y coordinate of a specific contact point relative to the upper left corner of the current application window from a pointer event (such as a touch, mouse, or axis event). For mouse and axis events, this API returns the default value of 0.0f if the given index is greater than 0.
OH_ArkUI_PointerEvent_GetX
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).
OH_ArkUI_PointerEvent_GetXByIndex
Obtains the X coordinate of a specific contact point relative to the upper left corner of the current component from a pointer event (such as a touch, mouse, or axis event). For mouse and axis events, this API returns the default value of 0.0f if the given index is greater than 0.
OH_ArkUI_PointerEvent_GetY
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).
OH_ArkUI_PointerEvent_GetYByIndex
Obtains the Y coordinate of a specific contact point relative to the upper left corner of the current component from a pointer event (such as a touch, mouse, or axis event). For mouse and axis events, this API returns the default value of 0.0f if the given index is greater than 0.
OH_ArkUI_PointerEvent_PostClonedEventapi-15
Posts a cloned event to a specific node.
OH_ArkUI_PointerEvent_SetClonedEventActionTypeapi-15
Sets the action type of a cloned event.
OH_ArkUI_PointerEvent_SetClonedEventChangedFingerIdapi-15
Sets the touch point ID of a cloned pointer event.
OH_ArkUI_PointerEvent_SetClonedEventFingerIdByIndexapi-15
Sets the touch point ID of a specific contact point of a cloned event.
OH_ArkUI_PointerEvent_SetClonedEventLocalPositionapi-15
Sets the X and Y coordinates of a cloned event relative to the upper left corner of the current component.
OH_ArkUI_PointerEvent_SetClonedEventLocalPositionByIndexapi-15
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.
OH_ArkUI_PointerEvent_SetInterceptHitTestMode
Sets the hit testing mode, that is, how the component behaves during hit testing. This API only applies to scenarios raw input events are received, such as when [NODE_ON_TOUCH] is used for touch event handling. It cannot be used with ArkUI_UIInputEvent objects obtained from gesture events through [OH_ArkUI_GestureEvent_GetRawInputEvent].
OH_ArkUI_PointerEvent_SetStopPropagation
Sets whether to stop event propagation. This API only applies to scenarios raw input events are received, such as when [NODE_ON_TOUCH] is used for touch event handling. It cannot be used with ArkUI_UIInputEvent objects obtained from gesture events through [OH_ArkUI_GestureEvent_GetRawInputEvent].
OH_ArkUI_UIInputEvent_GetAction
Obtains the action type of this UI input event.
OH_ArkUI_UIInputEvent_GetDeviceIdapi-14
Obtains the ID of device that triggers UI input event.
OH_ArkUI_UIInputEvent_GetEventTargetGlobalPositionXapi-17
Obtains the global X coordinate of the component hit by an event.
OH_ArkUI_UIInputEvent_GetEventTargetGlobalPositionYapi-17
Obtains the global Y coordinate of the component hit by an event.
OH_ArkUI_UIInputEvent_GetEventTargetHeightapi-17
Obtains the height of the component hit by an event.
OH_ArkUI_UIInputEvent_GetEventTargetPositionXapi-17
Obtains the X coordinate of the component hit by an event.
OH_ArkUI_UIInputEvent_GetEventTargetPositionYapi-17
Obtains the Y coordinate of the component hit by an event.
OH_ArkUI_UIInputEvent_GetEventTargetWidthapi-17
Obtains the width of the component hit by an event.
OH_ArkUI_UIInputEvent_GetEventTime
Obtains the time when this UI input event occurs.
OH_ArkUI_UIInputEvent_GetLatestStatusapi-20
Use this method to obtain the execution status of the latest UI input related method.
OH_ArkUI_UIInputEvent_GetModifierKeyStatesapi-17
Obtains the modifier key states for a UI input event. This API outputs the state of all modifier keys at the time of the event through the keys parameter. You can determine which keys are pressed by performing bitwise operations with the modifier key types defined in ArkUI_ModifierKeyName.
OH_ArkUI_UIInputEvent_GetPressedKeysapi-14
Obtains all keys that are pressed from UI input event. Only supports key events currently.
OH_ArkUI_UIInputEvent_GetSourceType
Obtains the source type of a UI input event.
OH_ArkUI_UIInputEvent_GetTargetDisplayIdapi-15
Obtains the ID of the screen where the UI input event occurs.
OH_ArkUI_UIInputEvent_GetToolType
Obtains the tool type of a UI input event.
OH_ArkUI_UIInputEvent_GetType
Obtains the type of a UI input event.