OH_ArkUI_GetRouterPageIndex

Function OH_ArkUI_GetRouterPageIndex 

Source
pub unsafe extern "C" fn OH_ArkUI_GetRouterPageIndex(
    node: ArkUI_NodeHandle,
    index: *mut i32,
) -> ArkUiResult
Available on crate feature api-12 only.
Expand description

Obtain the index of the page where the node resides in the Router page stack.

§Arguments

  • node - The node.

  • index - Index value, counted from 1.

§Returns

  • The error code. [ARKUI_ERROR_CODE_NO_ERROR] if the operation is successful. [ARKUI_ERROR_CODE_PARAM_INVALID] if the node or index is null. [ARKUI_ERROR_CODE_GET_INFO_FAILED] if query information failed, this may be because the node is not in RouterPage.

Available since API-level: 12