pub struct Animation { /* private fields */ }Expand description
High-level wrapper for ArkUI_AnimateOption.
Implementations§
Source§impl Animation
impl Animation
pub fn get_duration(&self) -> u32
pub fn get_tempo(&self) -> f32
pub fn get_delay(&self) -> i32
Sourcepub fn iterations(&self, iterations: i32)
pub fn iterations(&self, iterations: i32)
Sets iteration count (-1 for infinite).
pub fn get_iterations(&self) -> i32
pub fn get_curve(&self) -> Option<Curve>
Sourcepub fn i_curve(&self, curve: &CurveHandle)
pub fn i_curve(&self, curve: &CurveHandle)
Selects custom curve handle.
pub fn get_i_curve(&self) -> Option<CurveHandle>
Sourcepub fn mode(&self, mode: AnimationMode)
pub fn mode(&self, mode: AnimationMode)
Sets animation play mode.
pub fn get_mode(&self) -> Option<AnimationMode>
Sourcepub fn rate_range(&self, range: AnimationFrameRateRange)
pub fn rate_range(&self, range: AnimationFrameRateRange)
Sets expected frame-rate range.
pub fn get_rate_range(&self) -> AnimationFrameRateRange
Sourcepub fn finish<T: Fn() + 'static>(
&self,
callback_type: AnimationFinishCallbackType,
callback: T,
)
pub fn finish<T: Fn() + 'static>( &self, callback_type: AnimationFinishCallbackType, callback: T, )
Registers finish callback with callback-type selector.
pub fn animate_to(&self, ctx: ArkUIContext) -> ArkUIResult<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Animation
impl !RefUnwindSafe for Animation
impl !Send for Animation
impl !Sync for Animation
impl Unpin for Animation
impl UnsafeUnpin for Animation
impl !UnwindSafe for Animation
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