euv-core 0.47.0

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::*;

/// External trigger presented to `FramePacingController` to determine whether simulation and rendering should proceed.
#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
pub enum FramePacingTrigger {
    /// Authoritative platform VSync, Choreographer, CADisplayLink, or `requestAnimationFrame` signal.
    #[default]
    Vsync,
    /// Pointer, touch, keyboard, or gamepad input arrival.
    InputEvent,
    /// System safe-area inset change (notch, navigation bar, IME animation).
    SafeAreaChanged,
    /// Fullscreen or window chrome transition.
    FullscreenChanged,
    /// Lifecycle first-frame presentation request (must draw immediately without advancing simulation time).
    LifecycleFirstFrame,
    /// Display refresh mode or foreground resume requiring a clean time-base rebase.
    TimebaseReset,
}

/// Authoritative pacing verdict emitted by `FramePacingController::evaluate`.
#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
pub enum PacingAction {
    /// Advance fixed simulation by `sim_dt_secs` and submit at most one complete frame for this VSync.
    #[default]
    StepAndRender,
    /// Present a fresh visual frame without advancing simulation time (used for lifecycle first frames).
    RenderWithoutSimAdvance,
    /// Record pending input/layout dirtiness and wait for the next VSync without double-stepping simulation.
    DeferToNextVsync,
    /// Defer submission because `in_flight_frames >= max_in_flight_frames`.
    WaitInFlight,
    /// Skip this presentation opportunity to respect an explicit user FPS cap below the display refresh rate.
    SkipUserCap,
}