pub trait AnimationExt: IsA<Animation> + 'static {
Show 17 methods
// Provided methods
fn follows_enable_animations_setting(&self) -> bool { ... }
fn state(&self) -> AnimationState { ... }
fn target(&self) -> AnimationTarget { ... }
fn value(&self) -> f64 { ... }
fn widget(&self) -> Widget { ... }
fn pause(&self) { ... }
fn play(&self) { ... }
fn reset(&self) { ... }
fn resume(&self) { ... }
fn set_follow_enable_animations_setting(&self, setting: bool) { ... }
fn set_target(&self, target: &impl IsA<AnimationTarget>) { ... }
fn skip(&self) { ... }
fn connect_done<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { ... }
fn connect_follow_enable_animations_setting_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_state_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_target_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_value_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}
Expand description
Provided Methods§
sourcefn follows_enable_animations_setting(&self) -> bool
Available on crate feature v1_3
only.
fn follows_enable_animations_setting(&self) -> bool
v1_3
only.Gets whether @self should be skipped when animations are globally disabled.
§Returns
whether to follow the global setting
sourcefn state(&self) -> AnimationState
fn state(&self) -> AnimationState
Gets the current value of @self.
The state indicates whether @self is currently playing, paused, finished or hasn’t been started yet.
§Returns
the animation value
sourcefn target(&self) -> AnimationTarget
fn target(&self) -> AnimationTarget
sourcefn widget(&self) -> Widget
fn widget(&self) -> Widget
Gets the widget @self was created for.
It provides the frame clock for the animation. It’s not strictly necessary for this widget to be same as the one being animated.
The widget must be mapped in order for the animation to work. If it’s not mapped, or if it gets unmapped during an ongoing animation, the animation will be automatically skipped.
§Returns
the animation widget
sourcefn pause(&self)
fn pause(&self)
Pauses a playing animation for @self.
Does nothing if the current state of @self isn’t ADW_ANIMATION_PLAYING
.
Sets state
to ADW_ANIMATION_PAUSED
.
sourcefn play(&self)
fn play(&self)
Starts the animation for @self.
If the animation is playing, paused or has been completed, restarts it from the beginning. This allows to easily play an animation regardless of whether it’s already playing or not.
Sets state
to ADW_ANIMATION_PLAYING
.
The animation will be automatically skipped if widget
is
unmapped, or if gtk-enable-animations
is FALSE
.
As such, it’s not guaranteed that the animation will actually run. For
example, when using idle_add()
and starting an animation
immediately afterwards, it’s entirely possible that the idle callback will
run after the animation has already finished, and not while it’s playing.
sourcefn set_follow_enable_animations_setting(&self, setting: bool)
Available on crate feature v1_3
only.
fn set_follow_enable_animations_setting(&self, setting: bool)
v1_3
only.Sets whether to skip @self when animations are globally disabled.
The default behavior is to skip the animation. Set to FALSE
to disable this
behavior.
This can be useful for cases where animation is essential, like spinners, or in demo applications. Most other animations should keep it enabled.
§setting
whether to follow the global setting
sourcefn set_target(&self, target: &impl IsA<AnimationTarget>)
fn set_target(&self, target: &impl IsA<AnimationTarget>)
sourcefn connect_done<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_done<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
This signal is emitted when the animation has been completed, either on its
own or via calling skip()
.
fn connect_follow_enable_animations_setting_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
v1_3
only.fn connect_state_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_target_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_value_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.