pub unsafe extern "C" fn OH_ArkUI_NodeEvent_GetStringValue(
event: *mut ArkUI_NodeEvent,
index: i32,
string: *mut *mut c_char,
stringSize: *mut i32,
) -> i32Available on crate feature
api-12 only.Expand description
Obtains the string-type parameter of a component event. The string data is valid only during an event callback. To use it outside an event callback, you are advised to copy the string data.
§Arguments
-
event- Indicates the pointer to the component event. -
index- Indicates the index of the return value. -
string- Indicates the pointer to the string array. -
stringSize- Indicates the length of the string array.
§Returns
- Returns the error code.
Returns [
ARKUI_ERROR_CODE_NO_ERROR] if the operation is successful. Returns [ARKUI_ERROR_CODE_NODE_EVENT_PARAM_INDEX_OUT_OF_RANGE] if the parameter length exceeds the limit. Returns [ARKUI_ERROR_CODE_NODE_EVENT_PARAM_INVALID] if the data does not exist in the component event.
Available since API-level: 12