Trait TransitionExt

Source
pub trait TransitionExt: 'static {
    // Required methods
    fn get_animatable(&self) -> Option<Animatable>;
    fn get_interval(&self) -> Option<Interval>;
    fn get_remove_on_complete(&self) -> bool;
    fn set_animatable<P: IsA<Animatable>>(&self, animatable: Option<&P>);
    fn set_from_value(&self, value: &Value);
    fn set_interval<P: IsA<Interval>>(&self, interval: Option<&P>);
    fn set_remove_on_complete(&self, remove_complete: bool);
    fn set_to_value(&self, value: &Value);
    fn connect_property_animatable_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId;
    fn connect_property_interval_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId;
    fn connect_property_remove_on_complete_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId;
}
Expand description

Trait containing all Transition methods.

§Implementors

PropertyTransition, TransitionGroup, Transition

Required Methods§

Source

fn get_animatable(&self) -> Option<Animatable>

Retrieves the Animatable set using TransitionExt::set_animatable.

§Returns

a Animatable, or None; the returned animatable is owned by the Transition, and it should not be freed directly.

Source

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

Retrieves the interval set using TransitionExt::set_interval

§Returns

a Interval, or None; the returned interval is owned by the Transition and it should not be freed directly

Source

fn get_remove_on_complete(&self) -> bool

Retrieves the value of the Transition:remove-on-complete property.

§Returns

true if the self should be detached when complete, and false otherwise

Source

fn set_animatable<P: IsA<Animatable>>(&self, animatable: Option<&P>)

Sets the Transition:animatable property.

The self will acquire a reference to the animatable instance, and will call the TransitionClass.attached() virtual function.

If an existing Animatable is attached to self, the reference will be released, and the TransitionClass.detached() virtual function will be called.

§animatable

a Animatable, or None

Source

fn set_from_value(&self, value: &Value)

Sets the initial value of the transition.

This is a convenience function that will either create the Interval used by self, or will update it if the Transition:interval is already set.

This function will copy the contents of value, so it is safe to call gobject::Value::unset after it returns.

If self already has a Transition:interval set, then value must hold the same type, or a transformable type, as the interval’s Interval:value-type property.

This function is meant to be used by language bindings.

§value

a gobject::Value with the initial value of the transition

Source

fn set_interval<P: IsA<Interval>>(&self, interval: Option<&P>)

Sets the Transition:interval property using interval.

The self will acquire a reference on the interval, sinking the floating flag on it if necessary.

§interval

a Interval, or None

Source

fn set_remove_on_complete(&self, remove_complete: bool)

Sets whether self should be detached from the Animatable set using TransitionExt::set_animatable when the Timeline::completed signal is emitted.

§remove_complete

whether to detach self when complete

Source

fn set_to_value(&self, value: &Value)

Sets the final value of the transition.

This is a convenience function that will either create the Interval used by self, or will update it if the Transition:interval is already set.

This function will copy the contents of value, so it is safe to call gobject::Value::unset after it returns.

If self already has a Transition:interval set, then value must hold the same type, or a transformable type, as the interval’s Interval:value-type property.

This function is meant to be used by language bindings.

§value

a gobject::Value with the final value of the transition

Source

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

Source

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

Source

fn connect_property_remove_on_complete_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§