pub struct CompositionScopedBatch { /* private fields */ }Expand description
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.
Implementations§
Source§impl CompositionScopedBatch
impl CompositionScopedBatch
Sourcepub fn compositor(&self) -> &Rc<Compositor>
pub fn compositor(&self) -> &Rc<Compositor>
The associated compositor.
Sourcepub fn is_active(&self) -> bool
pub fn is_active(&self) -> bool
Whether the batch is open for animations to be aggregated: false once it is suspended or ended.
Sourcepub fn is_ended(&self) -> bool
pub fn is_ended(&self) -> bool
Whether the batch has been closed and can no longer accept changes.
Sourcepub fn end(&self)
pub fn end(&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.
Sourcepub fn suspend(&self)
pub fn suspend(&self)
Suspends aggregating animations in the batch until
resume. Panics when the batch is ended (WinUI
throws).
Sourcepub fn resume(&self)
pub fn resume(&self)
Resumes aggregating animations in the batch. Panics when the batch is ended (WinUI throws).
Sourcepub fn completed(
&self,
handler: impl Fn(&CompositionBatchCompletedEventArgs) + 'static,
) -> Rc<dyn IDisposable>
pub fn completed( &self, handler: impl Fn(&CompositionBatchCompletedEventArgs) + 'static, ) -> Rc<dyn IDisposable>
Raised once all animations of the ended batch have completed. Disposing the returned handle unsubscribes.
Trait Implementations§
Source§impl AsCompositionObject for CompositionScopedBatch
impl AsCompositionObject for CompositionScopedBatch
Source§fn as_composition_object(&self) -> &CompositionObject
fn as_composition_object(&self) -> &CompositionObject
CompositionObject.Source§fn composition_type_name(&self) -> &'static str
fn composition_type_name(&self) -> &'static str
Source§fn as_property_set(self: Rc<Self>) -> Option<Rc<CompositionPropertySet>>
fn as_property_set(self: Rc<Self>) -> Option<Rc<CompositionPropertySet>>
is CompositionPropertySet test of upstream).Auto Trait Implementations§
impl !Freeze for CompositionScopedBatch
impl !RefUnwindSafe for CompositionScopedBatch
impl !Send for CompositionScopedBatch
impl !Sync for CompositionScopedBatch
impl !UnwindSafe for CompositionScopedBatch
impl Unpin for CompositionScopedBatch
impl UnsafeUnpin for CompositionScopedBatch
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more