FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    CompositionScopedBatch

    struct · ferroui-base · v0.5.0

    struct CompositionScopedBatch
    

    An explicitly created group of active animations or effects (WinUI CompositionScopedBatch).

    Every key frame animation started while the batch is active (created and neither suspended nor ended) belongs to it, also the animations of a group and implicit animations. Once end has been called and all its animations are over, the batch raises completed on the thread of its compositor.

    Several batches may be active at once; an animation belongs to each of them.

    View source

    Members

    compositor

    fn compositor(self: &Self) -> &Rc<Compositor>
    

    The associated compositor.

    Source

    is_active

    fn is_active(self: &Self) -> bool
    

    Whether the batch is open for animations to be aggregated: false once it is suspended or ended.

    Source

    is_ended

    fn is_ended(self: &Self) -> bool
    

    Whether the batch has been closed and can no longer accept changes.

    Source

    end

    fn end(self: &Self)
    

    Closes the batch. Once closed it cannot be suspended or resumed again. Completed is raised once all the animations of the batch are over, right away (asynchronously) when there are none. Ending a batch again does nothing.

    Source

    suspend

    fn suspend(self: &Self)
    

    Suspends aggregating animations in the batch until resume. Panics when the batch is ended (WinUI throws).

    Source

    resume

    fn resume(self: &Self)
    

    Resumes aggregating animations in the batch. Panics when the batch is ended (WinUI throws).

    Source

    completed

    fn completed(self: &Self, handler: impl Fn(&CompositionBatchCompletedEventArgs) -> () + 'static) -> Subscription
    

    Raised once all animations of the ended batch have completed. Dropping the returned guard removes the handler; Subscription::detach keeps it for the life of the batch.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ErasedDestructor
    • IntoEither
    • AsCompositionObject

    Availability

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