Skip to main content

IServerAnimatedPropertyHost

Trait IServerAnimatedPropertyHost 

Source
pub trait IServerAnimatedPropertyHost: IServerPropertyHost {
    // Required methods
    fn set_animated_value(
        &self,
        property: &'static CompositionProperty,
        current_value: ExpressionVariant,
        committed_at: Duration,
        animation: Rc<dyn IAnimationInstance>,
    );
    fn remove_animation_for_property(
        &self,
        property: &'static CompositionProperty,
    );
    fn notify_animated_value_changed(
        &self,
        property: &'static CompositionProperty,
    );
}
Expand description

What the generated property block of an animatable server object needs from the object that embeds it (the animation members of upstream ServerObject).

Required Methods§

Source

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)

The tail of 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)

An animation wrote a new value into the field of property.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§