i_slint_core::animations

Struct AnimationDriver

Source
pub struct AnimationDriver { /* private fields */ }
Expand description

The AnimationDriver

Implementations§

Source§

impl AnimationDriver

Source

pub fn update_animations(&self, new_tick: Instant)

Iterates through all animations based on the new time tick and updates their state. This should be called by the windowing system driver for every frame.

Source

pub fn has_active_animations(&self) -> bool

Returns true if there are any active or ready animations. This is used by the windowing system to determine if a new animation frame is required or not. Returns false otherwise.

Source

pub fn set_has_active_animations(&self)

Tell the driver that there are active animations

Source

pub fn current_tick(&self) -> Instant

The current instant that is to be used for animation using this function register the current binding as a dependency

Trait Implementations§

Source§

impl Default for AnimationDriver

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

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

Source§

type Error = Infallible

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

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

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.