pub trait KeyframeTransitionExt: 'static {
// Required methods
fn clear(&self);
fn get_key_frame(&self, index_: u32) -> (f64, AnimationMode, Value);
fn get_n_key_frames(&self) -> u32;
fn set_key_frame(
&self,
index_: u32,
key: f64,
mode: AnimationMode,
value: &Value,
);
fn set_key_frames(&self, key_frames: &[f64]);
fn set_values(&self, values: &[&Value]);
}Expand description
Required Methods§
Sourcefn get_key_frame(&self, index_: u32) -> (f64, AnimationMode, Value)
fn get_key_frame(&self, index_: u32) -> (f64, AnimationMode, Value)
Retrieves the details of the key frame at index_ inside self.
The self must already have key frames set, and index_ must be
smaller than the number of key frames.
§index_
the index of the key frame
§key
return location for the key, or None
§mode
return location for the easing mode, or None
§value
a gobject::Value initialized with the type of
the values
Sourcefn get_n_key_frames(&self) -> u32
fn get_n_key_frames(&self) -> u32
Sourcefn set_key_frame(
&self,
index_: u32,
key: f64,
mode: AnimationMode,
value: &Value,
)
fn set_key_frame( &self, index_: u32, key: f64, mode: AnimationMode, value: &Value, )
Sets the details of the key frame at index_ inside self.
The self must already have a key frame at index_, and index_
must be smaller than the number of key frames inside self.
§index_
the index of the key frame
§key
the key of the key frame
§mode
the easing mode of the key frame
§value
a gobject::Value containing the value of the key frame
Sourcefn set_key_frames(&self, key_frames: &[f64])
fn set_key_frames(&self, key_frames: &[f64])
Sets the keys for each key frame inside self.
If self does not hold any key frame, n_key_frames key frames
will be created; if self already has key frames, key_frames must
have at least as many elements as the number of key frames.
§n_key_frames
the number of values
§key_frames
an array of keys between 0.0 and 1.0, one for each key frame
Sourcefn set_values(&self, values: &[&Value])
fn set_values(&self, values: &[&Value])
Sets the values for each key frame inside self.
If self does not hold any key frame, n_values key frames will
be created; if self already has key frames, values must have
at least as many elements as the number of key frames.
§n_values
the number of values
§values
an array of values, one for each key frame
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".