pub struct ServerCompositorAnimations { /* private fields */ }Expand description
The clock items and the dirty animated objects of a server compositor.
Implementations§
Source§impl ServerCompositorAnimations
impl ServerCompositorAnimations
pub fn new() -> Self
pub fn add_to_clock(&self, item: Rc<dyn IServerClockItem>)
pub fn remove_from_clock(&self, item: &Rc<dyn IServerClockItem>)
pub fn process(&self)
pub fn need_next_tick(&self) -> bool
Sourcepub fn animation_time(&self, real: Duration) -> Duration
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.
Sourcepub fn global_playback_rate(&self) -> f64
pub fn global_playback_rate(&self) -> f64
The global playback rate (1 until it is set).
Sourcepub fn set_global_playback_rate(&self, rate: f64, real_now: Duration)
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.
pub fn add_dirty_animated_object(&self, obj: Rc<ServerObjectAnimations>)
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ServerCompositorAnimations
impl !RefUnwindSafe for ServerCompositorAnimations
impl !Send for ServerCompositorAnimations
impl !Sync for ServerCompositorAnimations
impl !UnwindSafe for ServerCompositorAnimations
impl Unpin for ServerCompositorAnimations
impl UnsafeUnpin for ServerCompositorAnimations
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
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