pub trait IntervalExt: 'static {
Show 13 methods
// Required methods
fn clone(&self) -> Option<Interval>;
fn compute(&self, factor: f64) -> Option<Value>;
fn compute_value(&self, factor: f64) -> Option<Value>;
fn get_final_value(&self) -> Value;
fn get_initial_value(&self) -> Value;
fn get_value_type(&self) -> Type;
fn is_valid(&self) -> bool;
fn peek_final_value(&self) -> Option<Value>;
fn peek_initial_value(&self) -> Option<Value>;
fn set_final_value(&self, value: &Value);
fn set_initial_value(&self, value: &Value);
fn connect_property_final_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId;
fn connect_property_initial_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId;
}
Required Methods§
Sourcefn compute(&self, factor: f64) -> Option<Value>
fn compute(&self, factor: f64) -> Option<Value>
Computes the value between the self
boundaries given the
progress factor
Unlike IntervalExt::compute_value
, this function will
return a const pointer to the computed value
You should use this function if you immediately pass the computed
value to another function that makes a copy of it, like
gobject::ObjectExt::set_property
§factor
the progress factor, between 0 and 1
§Returns
a pointer to the computed value,
or None
if the computation was not successfull
Sourcefn compute_value(&self, factor: f64) -> Option<Value>
fn compute_value(&self, factor: f64) -> Option<Value>
Sourcefn get_final_value(&self) -> Value
fn get_final_value(&self) -> Value
Retrieves the final value of self
and copies
it into value
.
The passed gobject::Value
must be initialized to the value held by
the Interval
.
§value
a gobject::Value
Sourcefn get_initial_value(&self) -> Value
fn get_initial_value(&self) -> Value
Retrieves the initial value of self
and copies
it into value
.
The passed gobject::Value
must be initialized to the value held by
the Interval
.
§value
a gobject::Value
Sourcefn get_value_type(&self) -> Type
fn get_value_type(&self) -> Type
Retrieves the glib::Type
of the values inside self
.
§Returns
the type of the value, or G_TYPE_INVALID
Sourcefn is_valid(&self) -> bool
fn is_valid(&self) -> bool
Checks if the self
has a valid initial and final values.
§Returns
true
if the Interval
has an initial and
final values, and false
otherwise
Sourcefn peek_final_value(&self) -> Option<Value>
fn peek_final_value(&self) -> Option<Value>
Gets the pointer to the final value of self
§Returns
the final value of the interval.
The value is owned by the Interval
and it should not be
modified or freed
Sourcefn peek_initial_value(&self) -> Option<Value>
fn peek_initial_value(&self) -> Option<Value>
Gets the pointer to the initial value of self
§Returns
the initial value of the interval.
The value is owned by the Interval
and it should not be
modified or freed
Sourcefn set_final_value(&self, value: &Value)
fn set_final_value(&self, value: &Value)
Sets the final value of self
to value
. The value is
copied inside the Interval
.
§value
a gobject::Value
Sourcefn set_initial_value(&self, value: &Value)
fn set_initial_value(&self, value: &Value)
Sets the initial value of self
to value
. The value is copied
inside the Interval
.
§value
a gobject::Value
fn connect_property_final_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_property_initial_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
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.