OH_ArkUI_PointerEvent_GetGlobalDisplayYByIndex

Function OH_ArkUI_PointerEvent_GetGlobalDisplayYByIndex 

Source
pub unsafe extern "C" fn OH_ArkUI_PointerEvent_GetGlobalDisplayYByIndex(
    event: *const ArkUI_UIInputEvent,
    pointerIndex: u32,
) -> f32
Available on crate features api-12 and api-20 only.
Expand description

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.

§Arguments

  • event - Pointer to the current UI input event.

  • pointerIndex - Index of the target touch point in the multi-touch data list. Value range: [0, OH_ArkUI_PointerEvent_GetPointerCount() - 1]

§Returns

  • float Y coordinate relative to the global display; 0.0f if any parameter error occurs.

Available since API-level: 20