pub unsafe extern "C" fn OH_ArkUI_NodeAdapter_RegisterEventReceiver(
handle: ArkUI_NodeAdapterHandle,
userData: *mut c_void,
receiver: Option<unsafe extern "C" fn(event: *mut ArkUI_NodeAdapterEvent)>,
) -> i32Available on crate feature
api-12 only.Expand description
Registers an event callback for the adapter.
§Arguments
-
handle- Indicates the target component adapter. -
userData- Indicates custom data. -
receiver- Indicates the event receiver callback.
§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