OH_ArkUI_PointerEvent_GetPointerCount

Function OH_ArkUI_PointerEvent_GetPointerCount 

Source
pub unsafe extern "C" fn OH_ArkUI_PointerEvent_GetPointerCount(
    event: *const ArkUI_UIInputEvent,
) -> u32
Available on crate feature api-12 only.
Expand description

Obtains the number of contact points from a pointer event (such as a touch, mouse, or axis event).

Pointer events are typically events that carry position information, such as touch events, where the location of the event can be determined. Non-pointer events, such as key events, do not have position information and do not involve contact points, so this API is not applicable to key events.

For touch events, this API returns the number of active touch points, for example, fingers on the screen. For mouse and axis events, this API always returns 1, as they are single-pointer interactions.

§Arguments

  • event - Pointer to the current UI input event.

§Returns

  • Number of contact points for the current pointer event.

Available since API-level: 12