pub unsafe extern "C" fn OH_ArkUI_PointerEvent_GetHistoryGlobalDisplayX(
event: *const ArkUI_UIInputEvent,
pointerIndex: u32,
historyIndex: u32,
) -> f32Available on crate features
api-12 and api-20 only.Expand description
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.
§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] -
historyIndex- Index of the historical value to return. It must be less than [#OH_ArkUI_PointerEvent_GetHistorySize].
§Returns
- float X coordinate relative to the global display; 0.0f if any parameter error occurs.
Available since API-level: 20