ArkUI_NativeAnimateAPI_1

Struct ArkUI_NativeAnimateAPI_1 

Source
#[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)>, }
Available on crate feature 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)>

Disposes of an animator object.

§Arguments

  • animatorHandle - Indicates the target animator object.

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.