arkui_sys::native_animate

Function OH_ArkUI_KeyframeAnimateOption_RegisterOnEventCallback

Source
pub unsafe extern "C" fn OH_ArkUI_KeyframeAnimateOption_RegisterOnEventCallback(
    option: *mut ArkUI_KeyframeAnimateOption,
    userData: *mut c_void,
    event: Option<unsafe extern "C" fn(userData: *mut c_void)>,
    index: i32,
) -> i32
Available on crate feature api-12 only.
Expand description

Sets the closure function of the state at the time of the keyframe, that is, the state to be reached at the time of the keyframe.

§Arguments

option - Indicates the keyframe animation parameters.

event - Indicates a closure function.

userData - Indicates the pointer to a custom object.

index - Indicates a state index.

§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