#[repr(C)]pub struct ArkUI_NativeAnimateAPI_1 {
pub animateTo: Option<unsafe extern "C" fn(context: ArkUI_ContextHandle, option: *mut ArkUI_AnimateOption, update: *mut ArkUI_ContextCallback, complete: *mut ArkUI_AnimateCompleteCallback) -> i32>,
pub keyframeAnimateTo: Option<unsafe extern "C" fn(context: ArkUI_ContextHandle, option: *mut ArkUI_KeyframeAnimateOption) -> i32>,
pub createAnimator: Option<unsafe extern "C" fn(context: ArkUI_ContextHandle, option: *mut ArkUI_AnimatorOption) -> ArkUI_AnimatorHandle>,
pub disposeAnimator: Option<unsafe extern "C" fn(animatorHandle: ArkUI_AnimatorHandle)>,
}api-12 only.Expand description
Implements the native animation APIs provided by ArkUI.
Version: 1
Available since API-level: 12
Fields§
§animateTo: Option<unsafe extern "C" fn(context: ArkUI_ContextHandle, option: *mut ArkUI_AnimateOption, update: *mut ArkUI_ContextCallback, complete: *mut ArkUI_AnimateCompleteCallback) -> i32>Defines an explicit animation.
Note: Make sure the component attributes to be set in the event closure have been set before.
§Arguments
-
context- Indicates a UIContext instance. -
option- Indicates the pointer to an animation configuration. -
update- Indicates the animation closure. The system automatically inserts a transition animation for the state change caused by the closure. -
complete- Indicates the callback to be invoked when the animation playback is complete.
§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.
keyframeAnimateTo: Option<unsafe extern "C" fn(context: ArkUI_ContextHandle, option: *mut ArkUI_KeyframeAnimateOption) -> i32>Sets the keyframe animation.
§Arguments
-
context- Indicates a UIContext instance. -
option- Indicates the keyframe animation parameters.
§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.
createAnimator: Option<unsafe extern "C" fn(context: ArkUI_ContextHandle, option: *mut ArkUI_AnimatorOption) -> ArkUI_AnimatorHandle>Creates an animator object.
§Arguments
-
context- Indicates a UIContext instance. -
option- Indicates the animator parameters.
§Returns
- Returns the pointer to the animator object; returns NULL if a function parameter error occurs.
disposeAnimator: Option<unsafe extern "C" fn(animatorHandle: ArkUI_AnimatorHandle)>