OH_ArkUI_NodeUtils_GetLayoutPositionInGlobalDisplay

Function OH_ArkUI_NodeUtils_GetLayoutPositionInGlobalDisplay 

Source
pub unsafe extern "C" fn OH_ArkUI_NodeUtils_GetLayoutPositionInGlobalDisplay(
    node: ArkUI_NodeHandle,
    offset: *mut ArkUI_IntOffset,
) -> i32
Available on crate features api-12 and api-20 only.
Expand description

Obtains the offset of a component relative to the global display. The relative position does not count in transformation attributes, such as translate.

§Arguments

  • node - Pointer to the ArkUI_NodeHandle representing the component.

  • offset - Offset of the component relative to the global display, in px.

§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: 20