pub struct KeyframeAnimation { /* private fields */ }Expand description
High-level wrapper for ArkUI_KeyframeAnimateOption.
Implementations§
Source§impl KeyframeAnimation
impl KeyframeAnimation
Sourcepub fn new(size: i32) -> ArkUIResult<Self>
pub fn new(size: i32) -> ArkUIResult<Self>
Creates keyframe animation options with the given keyframe count.
pub fn delay(&self, delay: i32) -> ArkUIResult<()>
pub fn get_delay(&self) -> i32
pub fn iterations(&self, iterations: i32) -> ArkUIResult<()>
pub fn get_iterations(&self) -> i32
Sourcepub fn on_finish_callback<T: Fn() + 'static>(
&self,
on_finish: T,
) -> ArkUIResult<()>
pub fn on_finish_callback<T: Fn() + 'static>( &self, on_finish: T, ) -> ArkUIResult<()>
Registers finish callback for keyframe animation.
Sourcepub fn clear_on_finish_callback(&self) -> ArkUIResult<()>
pub fn clear_on_finish_callback(&self) -> ArkUIResult<()>
Clears finish callback.
Sourcepub fn on_event_callback<T: Fn() + 'static>(
&self,
index: i32,
event: T,
) -> ArkUIResult<()>
pub fn on_event_callback<T: Fn() + 'static>( &self, index: i32, event: T, ) -> ArkUIResult<()>
Registers event callback for keyframe at index.
Sourcepub fn clear_on_event_callback(&self, index: i32) -> ArkUIResult<()>
pub fn clear_on_event_callback(&self, index: i32) -> ArkUIResult<()>
Clears event callback for keyframe at index.
Sourcepub fn duration(&self, duration: i32, index: i32) -> ArkUIResult<()>
pub fn duration(&self, duration: i32, index: i32) -> ArkUIResult<()>
Sets keyframe duration for the specified index.
pub fn get_duration(&self, index: i32) -> i32
Sourcepub fn curve(&self, curve: &CurveHandle, index: i32) -> ArkUIResult<()>
pub fn curve(&self, curve: &CurveHandle, index: i32) -> ArkUIResult<()>
Sets keyframe curve for the specified index.
pub fn get_curve(&self, index: i32) -> Option<CurveHandle>
pub fn animate_to(&self, ctx: ArkUIContext) -> ArkUIResult<()>
Trait Implementations§
Source§impl Drop for KeyframeAnimation
impl Drop for KeyframeAnimation
Auto Trait Implementations§
impl !Freeze for KeyframeAnimation
impl !RefUnwindSafe for KeyframeAnimation
impl !Send for KeyframeAnimation
impl !Sync for KeyframeAnimation
impl !UnwindSafe for KeyframeAnimation
impl Unpin for KeyframeAnimation
impl UnsafeUnpin for KeyframeAnimation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more