CompositionObject
struct · ferroui-base · v0.5.0
struct CompositionObject
The part every composition object embeds: what upstream's abstract
CompositionObject holds.
A class "derives" from CompositionObject by embedding this value,
implementing ICompositorSerializable through it, and forwarding the
animation members to the functions of this module.
The server-side counterpart is known by id. Disposing the object disposes its counterpart with the next batch, which keeps it under its id while this object is alive: upstream the UI-thread object holds its server object, so jobs and animations that name it after the disposal still reach it, and the id cannot be reused meanwhile. When the object is dropped, its counterpart is disposed (if it was not) and released with a later batch: this stands in for the garbage collector, which reclaims a server object upstream once the UI-thread object is unreachable. A counterpart that was disposed out of band (a composition target) is kept and released the same way.
Members
propertiescommentset_commentimplicit_animationsset_implicit_animationscompositoris_disposeddisposebegin_serialize_changes
properties
fn properties(self: &Self) -> Rc<CompositionPropertySet>
The property set of the object (WinUI CompositionObject.Properties):
a live property set that belongs to the object, for the values an
application keeps with it. Animations and expressions use it as any
property set (set_reference_parameter("props", obj.properties()),
then props.Name). Created when it is first asked for.
comment
fn comment(self: &Self) -> String
A string the application associates with the object, for debugging
(WinUI Comment); empty by default.
set_comment
fn set_comment(self: &Self, value: String)
implicit_animations
fn implicit_animations(self: &Self) -> Option<Rc<ImplicitAnimationCollection>>
The collection of implicit animations attached to this object.
set_implicit_animations
fn set_implicit_animations(self: &Self, value: Option<Rc<ImplicitAnimationCollection>>)
compositor
fn compositor(self: &Self) -> &Rc<Compositor>
is_disposed
fn is_disposed(self: &Self) -> bool
dispose
fn dispose(self: &Self)
begin_serialize_changes
fn begin_serialize_changes(self: &Self, c: &Compositor)
The head of ICompositorSerializable.SerializeChanges: the object
may be registered again from now on.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyErasedDestructorIntoEitherDrop
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.