pub unsafe extern "C" fn OH_ArkUI_RegisterSystemColorModeChangeEvent(
node: ArkUI_NodeHandle,
userData: *mut c_void,
onColorModeChange: Option<unsafe extern "C" fn(colorMode: ArkUI_SystemColorMode, userData: *mut c_void)>,
) -> i32Available on crate feature
api-12 only.Expand description
The event called when the system color mode changes. Only one system color change callback can be registered for the same component.
§Arguments
-
node- Indicates the target node. -
userData- Indicates the custom data to be saved. -
onColorModeChange- Callback Events.
§Returns
- Error code.
[
ARKUI_ERROR_CODE_NO_ERROR] Success. [ARKUI_ERROR_CODE_PARAM_INVALID] Function parameter exception.
Available since API-level: 12