FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    Members

    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.

    Source

    comment

    fn comment(self: &Self) -> String
    

    A string the application associates with the object, for debugging (WinUI Comment); empty by default.

    Source

    set_comment

    fn set_comment(self: &Self, value: String)
    

    Source

    implicit_animations

    fn implicit_animations(self: &Self) -> Option<Rc<ImplicitAnimationCollection>>
    

    The collection of implicit animations attached to this object.

    Source

    set_implicit_animations

    fn set_implicit_animations(self: &Self, value: Option<Rc<ImplicitAnimationCollection>>)
    

    Source

    compositor

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

    Source

    is_disposed

    fn is_disposed(self: &Self) -> bool
    

    Source

    dispose

    fn dispose(self: &Self)
    

    Source

    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.

    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
    • Drop

    Availability

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