Skip to main content

ServerCompositorAnimations

Struct ServerCompositorAnimations 

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

The clock items and the dirty animated objects of a server compositor.

Implementations§

Source§

impl ServerCompositorAnimations

Source

pub fn new() -> Self

Source

pub fn add_to_clock(&self, item: Rc<dyn IServerClockItem>)

Source

pub fn remove_from_clock(&self, item: &Rc<dyn IServerClockItem>)

Source

pub fn process(&self)

Source

pub fn need_next_tick(&self) -> bool

Source

pub fn animation_time(&self, real: Duration) -> Duration

The time of the animations at the compositor time real: the compositor time, scaled by the global playback rate from the moment the rate was set. Animations are started and evaluated at this time, so a rate of 0.5 runs every animation at half speed.

Source

pub fn global_playback_rate(&self) -> f64

The global playback rate (1 until it is set).

Source

pub fn set_global_playback_rate(&self, rate: f64, real_now: Duration)

Sets the global playback rate from the compositor time real_now on: the animation time goes on from where it is at that moment.

Source

pub fn add_dirty_animated_object(&self, obj: Rc<ServerObjectAnimations>)

Trait Implementations§

Source§

impl Default for ServerCompositorAnimations

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> ClassDefaults for T
where T: ?Sized,

Source§

fn static_constructor()

The static constructor of a type: work done once per thread, after the properties of the type are registered and before its first instance exists (class handlers, affects_render, metadata overrides). 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.