pub struct ServerCompositionPropertySet { /* private fields */ }Expand description
The server-side counterpart of a live
CompositionPropertySet: its
entries, animatable, readable by the expressions that refer to the set.
Not from upstream, whose property sets have no server side: an expression sees a copy of a
referenced set taken when its animation starts. WinUI’s property sets are live and their
entries can be animated, which the WinUI composition API relies on (the property sets of
ElementCompositionPreview, the effect property set of a connected animation, the
interaction tracker).
Implementations§
Source§impl ServerCompositionPropertySet
impl ServerCompositionPropertySet
Sourcepub fn new(
compositor: &Rc<ServerCompositor>,
) -> Rc<ServerCompositionPropertySet>
pub fn new( compositor: &Rc<ServerCompositor>, ) -> Rc<ServerCompositionPropertySet>
Creates the property set, active: its animations run from the start, as a property set is not part of a tree that activates it.
Sourcepub fn get_value(&self, name: &str) -> ExpressionVariant
pub fn get_value(&self, name: &str) -> ExpressionVariant
The current value of an entry, animated or not; the default variant for an entry the set does not have.
Sourcepub fn changed(&self) -> &ServerCompositionSurfaceChanged
pub fn changed(&self) -> &ServerCompositionSurfaceChanged
Raised when an entry of the set changed, by a batch or by an animation (not from upstream; the effect brushes follow the entries that are their animatable properties).
Trait Implementations§
Source§impl IAnimatedServerObject for ServerCompositionPropertySet
impl IAnimatedServerObject for ServerCompositionPropertySet
Source§fn get_composition_property(
&self,
field_name: &str,
) -> Option<&'static CompositionProperty>
fn get_composition_property( &self, field_name: &str, ) -> Option<&'static CompositionProperty>
Every name is an entry of a property set; one that was never inserted reads as the default variant, as a missing parameter does.
Source§fn server_object(&self) -> &ServerObject
fn server_object(&self) -> &ServerObject
ServerObject part.Source§fn as_server_object_dyn(&self) -> &dyn IServerObject
fn as_server_object_dyn(&self) -> &dyn IServerObject
Source§fn read_property_variant(
&self,
property: &'static CompositionProperty,
) -> ExpressionVariant
fn read_property_variant( &self, property: &'static CompositionProperty, ) -> ExpressionVariant
CompositionProperty::get_variant; an object with dynamic properties (a property set)
reads its own storage.Source§fn write_property_variant(
&self,
property: &'static CompositionProperty,
value: ExpressionVariant,
)
fn write_property_variant( &self, property: &'static CompositionProperty, value: ExpressionVariant, )
CompositionProperty::set_variant; an object with dynamic properties writes its own
storage.Source§impl IServerAnimatedPropertyHost for ServerCompositionPropertySet
impl IServerAnimatedPropertyHost for ServerCompositionPropertySet
Source§fn set_animated_value(
&self,
property: &'static CompositionProperty,
current_value: ExpressionVariant,
committed_at: Duration,
animation: Rc<dyn IAnimationInstance>,
)
fn set_animated_value( &self, property: &'static CompositionProperty, current_value: ExpressionVariant, committed_at: Duration, animation: Rc<dyn IAnimationInstance>, )
SetAnimatedValue(prop, ref field, committedAt, animation): starts
animation on the property. current_value is the value of the
field as a variant; the animation writes the field through
CompositionProperty::set_variant.Source§fn remove_animation_for_property(&self, property: &'static CompositionProperty)
fn remove_animation_for_property(&self, property: &'static CompositionProperty)
SetAnimatedValue(prop, out field, value): the field
has been assigned directly, so the animation of the property, if
any, is removed.Source§fn notify_animated_value_changed(&self, _property: &'static CompositionProperty)
fn notify_animated_value_changed(&self, _property: &'static CompositionProperty)
property.Source§impl IServerObject for ServerCompositionPropertySet
impl IServerObject for ServerCompositionPropertySet
Source§fn deserialize_changes_core(
&self,
reader: &mut BatchStreamReader<'_>,
committed_at: Duration,
)
fn deserialize_changes_core( &self, reader: &mut BatchStreamReader<'_>, committed_at: Duration, )
Source§fn as_animated(self: Rc<Self>) -> Option<Rc<dyn IAnimatedServerObject>>
fn as_animated(self: Rc<Self>) -> Option<Rc<dyn IAnimatedServerObject>>
fn as_any(&self) -> &dyn Any
fn into_any_rc(self: Rc<Self>) -> Rc<dyn Any>
Source§fn values_invalidated(&self)
fn values_invalidated(&self)
Source§fn deserialize_changes(
&self,
reader: &mut BatchStreamReader<'_>,
committed_at: Duration,
)
fn deserialize_changes( &self, reader: &mut BatchStreamReader<'_>, committed_at: Duration, )
Source§fn as_render_resource(self: Rc<Self>) -> Option<Rc<dyn IServerRenderResource>>
fn as_render_resource(self: Rc<Self>) -> Option<Rc<dyn IServerRenderResource>>
Source§fn as_brush(self: Rc<Self>) -> Option<Rc<dyn IBrush>>
fn as_brush(self: Rc<Self>) -> Option<Rc<dyn IBrush>>
Source§fn as_pen(self: Rc<Self>) -> Option<Rc<dyn IPen>>
fn as_pen(self: Rc<Self>) -> Option<Rc<dyn IPen>>
Source§fn as_render_data_geometry(
self: Rc<Self>,
) -> Option<Rc<dyn IRenderDataGeometry>>
fn as_render_data_geometry( self: Rc<Self>, ) -> Option<Rc<dyn IRenderDataGeometry>>
Source§fn as_transform(self: Rc<Self>) -> Option<Rc<dyn ITransform>>
fn as_transform(self: Rc<Self>) -> Option<Rc<dyn ITransform>>
Source§fn as_gradient_stop(self: Rc<Self>) -> Option<Rc<dyn IGradientStop>>
fn as_gradient_stop(self: Rc<Self>) -> Option<Rc<dyn IGradientStop>>
Source§fn as_surface(self: Rc<Self>) -> Option<Rc<dyn IServerCompositionSurface>>
fn as_surface(self: Rc<Self>) -> Option<Rc<dyn IServerCompositionSurface>>
Source§impl IServerPropertyHost for ServerCompositionPropertySet
impl IServerPropertyHost for ServerCompositionPropertySet
Source§fn server_compositor(&self) -> Option<Rc<ServerCompositor>>
fn server_compositor(&self) -> Option<Rc<ServerCompositor>>
Source§fn set_value(
&self,
property: &'static CompositionProperty,
change: ServerValueChange<'_>,
)
fn set_value( &self, property: &'static CompositionProperty, change: ServerValueChange<'_>, )
SetValue(prop, ref field, value) as the class of the object
defines it. A plain server object assigns; an animated object also
invalidates the subscriptions of the property; a render resource
goes through super::ServerRenderResourceCore::set_value.Auto Trait Implementations§
impl !Freeze for ServerCompositionPropertySet
impl !RefUnwindSafe for ServerCompositionPropertySet
impl !Send for ServerCompositionPropertySet
impl !Sync for ServerCompositionPropertySet
impl !UnwindSafe for ServerCompositionPropertySet
impl Unpin for ServerCompositionPropertySet
impl UnsafeUnpin for ServerCompositionPropertySet
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