OH_ArkUI_PointerEvent_GetGlobalDisplayX

Function OH_ArkUI_PointerEvent_GetGlobalDisplayX 

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

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.

§Arguments

  • event - Pointer to the current UI input event.

§Returns

  • float X coordinate relative to the global display. 0 is returned if any parameter error occurs (for example, if the event does not contain position information).

Available since API-level: 20