pub unsafe extern "C" fn OH_ArkUI_GetNavDestinationNameByIndex(
node: ArkUI_NodeHandle,
index: i32,
buffer: *mut c_char,
bufferSize: i32,
writeLength: *mut i32,
) -> ArkUiResultAvailable on crate feature
api-12 only.Expand description
Based on the given index value, obtain the page name of the corresponding position in the navigation stack where the node is located. Index values are counted from 0, with 0 being the bottom of the stack.
§Arguments
-
node- The node. -
index- The index of the NavDestination in the stack is queried. -
buffer- The buffer to which NavDestination index writes to the memory, memory space needs to be allocated by the developer. -
bufferSize- The buffer size -
writeLength- Indicates the string length actually written to the buffer when returning [ARKUI_ERROR_CODE_NO_ERROR]. Indicates the minimum buffer size that can accommodate the target when [ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR] is returned.
§Returns
- The error code.
[
ARKUI_ERROR_CODE_NO_ERROR] if the operation is successful. [ARKUI_ERROR_CODE_PARAM_INVALID] if the node, buffer or writeLength is null. [ARKUI_ERROR_CODE_NODE_INDEX_INVALID] if index is an invalid value. [ARKUI_ERROR_CODE_GET_INFO_FAILED] if query information failed, this may be because the node is not in Navigation. [ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR] If the buffer size is less than the minimum buffer size.
Available since API-level: 12