euv-core 0.48.1

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

/// Active Windows presentation path distinguishing native DXGI/D3D GPU swapchain direct present from GDI software fallback.
#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub enum WindowsPresentationPath {
    /// Native DXGI/D3D11/D3D12 swapchain direct GPU presentation (`cpu_mirror_active = false`).
    GpuDirect,
    /// Software GDI dirty-rect `StretchDIBits` fallback (`cpu_mirror_active = true`).
    #[default]
    SoftwareGdi,
}

/// Truthful presentation timing source reported by Windows frame telemetry.
#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub enum WindowsPresentTimingSource {
    /// Hardware compositor presentation timestamp from `DXGI_FRAME_STATISTICS.SyncQPCTime`.
    DxgiFrameStatistics,
    /// CPU-side submission proxy timestamp without compositor scanout proof.
    SubmissionProxy,
    /// Presentation timing could not be observed.
    #[default]
    Unobservable,
}

/// Decoded Win32 `WndProc` callback event queued for `WindowsPlatform::poll_events`.
#[derive(Clone, Copy, Debug)]
pub(crate) enum Win32EventPayload {
    /// OS requested window close (`WM_CLOSE`).
    Close,
    /// Client dimensions or DPI scale changed (`WM_SIZE`, `WM_DPICHANGED`).
    Resized(u32, u32, f32),
    /// Window requires repaint (`WM_PAINT`).
    Redraw,
    /// Window focus gained or lost (`WM_SETFOCUS`, `WM_KILLFOCUS`).
    Focused(bool),
    /// Pointer moved inside client coordinates (`WM_MOUSEMOVE`).
    PointerMove(i32, i32, Modifiers),
    /// Mouse button pressed (`WM_*BUTTONDOWN`).
    PointerDown(i32, i32, PointerButton, Modifiers),
    /// Mouse button released (`WM_*BUTTONUP`).
    PointerUp(i32, i32, PointerButton, Modifiers),
    /// Active pointer capture or modal drag cancelled (`WM_CANCELMODE`, `WM_CAPTURECHANGED`).
    PointerCancel,
    /// Mouse wheel scrolled (`WM_MOUSEWHEEL`).
    Scroll(f32),
    /// Keyboard key pressed (`WM_KEYDOWN`).
    KeyDown(KeyCode, Modifiers, bool),
    /// Keyboard key released (`WM_KEYUP`).
    KeyUp(KeyCode, Modifiers),
    /// Decoded UTF-16 character input (`WM_CHAR`).
    Text(char),
    /// Application activation state changed (`WM_ACTIVATEAPP`).
    Activated(bool),
    /// Window minimized or restored (`WM_SIZE` `SIZE_MINIMIZED`).
    Minimized(bool),
    /// System clipboard contents changed (`WM_CLIPBOARDUPDATE`).
    ClipboardUpdated,
    /// System appearance or settings changed (`WM_SETTINGCHANGE` / `WM_THEMECHANGED`).
    ThemeUpdated,
    /// System power / battery-saver status changed (`WM_POWERBROADCAST`).
    PowerStatusChanged(bool),
    /// Monitor resolution or display refresh rate changed (`WM_DISPLAYCHANGE`).
    DisplayChanged,
    /// Window destroyed (`WM_DESTROY`).
    Destroyed,
}