OH_ArkUI_PointerEvent_GetInteractionHand

Function OH_ArkUI_PointerEvent_GetInteractionHand 

Source
pub unsafe extern "C" fn OH_ArkUI_PointerEvent_GetInteractionHand(
    event: *const ArkUI_UIInputEvent,
    hand: *mut ArkUI_InteractionHand,
) -> i32
Available on crate features api-12 and api-15 only.
Expand description

Checks whether an event is triggered by the user’s left or right hand. This API is only effective on some touch devices.

Note: This value cannot be obtained in real time when pressed. Before the system completes result inference, it will return NONE by default. Therefore, please do not over-rely on the results returned by this interface.

§Arguments

  • event - Pointer to the current UI input event.

  • hand - Whether the touch point is from the left or right hand.

§Returns

  • Result code. [ARKUI_ERROR_CODE_NO_ERROR] if the operation is successful. [ARKUI_ERROR_CODE_PARAM_INVALID] if a parameter error occurs.

Available since API-level: 15