FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    MediaContextClock

    struct · ferroui-base · v0.5.0

    struct MediaContextClock
    

    The global animation clock: pulsed once per frame by the media context with the time elapsed since the media context started.

    Subscribing schedules a render pass, so that the clock keeps ticking while anything observes it.

    View source

    Members

    has_new_subscriptions

    fn has_new_subscriptions(self: &Self) -> bool
    

    Whether observers subscribed since the last pulse.

    Source

    has_subscriptions

    fn has_subscriptions(self: &Self) -> bool
    

    Whether anything is waiting for the next pulse.

    Source

    request_animation_frame

    fn request_animation_frame(self: &Self, action: impl FnOnce(SignedDuration) -> () + 'static)
    

    Runs action with the frame time on the next pulse.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.