Skip to main content

ferroui_base/animation/
playback_behavior.rs

1/// Determines whether an animation pauses when its target is not effectively
2/// visible.
3#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
4#[repr(i32)]
5pub enum PlaybackBehavior {
6    /// The system decides based on context: animations started from styles
7    /// pause when the control is not effectively visible, while manually
8    /// started animations and animations that animate visibility run
9    /// regardless.
10    #[default]
11    Auto = 0,
12    /// The animation always plays regardless of the control's effective
13    /// visibility.
14    Always = 1,
15    /// The animation pauses when the control is not effectively visible.
16    OnlyIfVisible = 2,
17}