OH_ArkUI_NodeContent_SetUserData

Function OH_ArkUI_NodeContent_SetUserData 

Source
pub unsafe extern "C" fn OH_ArkUI_NodeContent_SetUserData(
    content: ArkUI_NodeContentHandle,
    userData: *mut c_void,
) -> i32
Available on crate feature api-12 only.
Expand description

Saves custom data on the specified node content.

§Arguments

  • content - Indicates the node content on which the custom data will be saved.

  • userData - Indicates the custom data to be saved.

§Returns

  • Returns the error code. Returns [ARKUI_ERROR_CODE_NO_ERROR] if the operation is successful. Returns [ARKUI_ERROR_CODE_PARAM_INVALID] if a parameter error occurs.

Available since API-level: 12