pub trait AnimatableExt: 'static {
// Required methods
fn find_property(&self, property_name: &str) -> Option<ParamSpec>;
fn get_initial_state(&self, property_name: &str, value: &mut Value);
fn interpolate_value<P: IsA<Interval>>(
&self,
property_name: &str,
interval: &P,
progress: f64,
) -> Option<Value>;
fn set_final_state(&self, property_name: &str, value: &Value);
}
Expand description
Required Methods§
Sourcefn find_property(&self, property_name: &str) -> Option<ParamSpec>
fn find_property(&self, property_name: &str) -> Option<ParamSpec>
Sourcefn get_initial_state(&self, property_name: &str, value: &mut Value)
fn get_initial_state(&self, property_name: &str, value: &mut Value)
Sourcefn interpolate_value<P: IsA<Interval>>(
&self,
property_name: &str,
interval: &P,
progress: f64,
) -> Option<Value>
fn interpolate_value<P: IsA<Interval>>( &self, property_name: &str, interval: &P, progress: f64, ) -> Option<Value>
Asks a Animatable
implementation to interpolate a
a named property between the initial and final values of
a Interval
, using progress
as the interpolation
value, and store the result inside value
.
This function should be used for every property animation
involving Animatable
s.
This function replaces Animatable::animate_property
.
§property_name
the name of the property to interpolate
§interval
a Interval
with the animation range
§progress
the progress to use to interpolate between the
initial and final values of the interval
§value
return location for an initialized gobject::Value
using the same type of the interval
§Returns
true
if the interpolation was successful,
and false
otherwise
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.