Trait IntervalExt

Source
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;
}
Expand description

Trait containing all Interval methods.

§Implementors

Interval

Required Methods§

Source

fn clone(&self) -> Option<Interval>

Creates a copy of self.

§Returns

the newly created Interval

Source

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

Source

fn compute_value(&self, factor: f64) -> Option<Value>

Computes the value between the self boundaries given the progress factor and copies it into value.

§factor

the progress factor, between 0 and 1

§value

return location for an initialized gobject::Value

§Returns

true if the operation was successful

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

fn connect_property_final_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

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.

Implementors§