euv-core 0.48.3

Core cross-platform runtime for euv featuring arena-based fine-grained reactivity, deterministic layout, flat scene graph, multi-mode rendering, and direct OS platform adapters.
Documentation
use super::*;

/// GIF89a Graphic Control Extension disposal method applied after a frame finishes displaying.
#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
pub enum GifDisposalMethod {
    /// Disposal method `0`: no disposal specified (leave canvas intact).
    #[default]
    Unspecified,
    /// Disposal method `1`: do not dispose (preserve drawn pixels for subsequent frames).
    Keep,
    /// Disposal method `2`: restore the frame's sub-rectangle to transparent background `[0, 0, 0, 0]`.
    RestoreToBackground,
    /// Disposal method `3`: restore the canvas to its state immediately before this frame was composited.
    RestoreToPrevious,
}

/// Playback resume strategy applied when an off-screen paused GIF becomes visible again.
#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
pub enum GifVisibilityPolicy {
    /// Pause pre-decoding and timeline while off-screen and resume from the current frame when visible.
    #[default]
    PauseAndResumeFromCurrent,
    /// Pause while off-screen and restart cleanly from frame `0` upon becoming visible again.
    PauseAndRestart,
}

/// Operational status of a streaming `GifStreamPlayer`.
#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
pub enum GifPlaybackStatus {
    /// Decoded header and frame index ready at frame `0`.
    #[default]
    Ready,
    /// Actively advancing frames on screen.
    Playing,
    /// Suspended because the viewport is currently off-screen (zero decode or timer work).
    PausedOffscreen,
    /// Finite Netscape loop count completed.
    Ended,
    /// Encountered a corrupt frame or budget violation (never fakes valid output).
    Corrupt,
}