uzor-desktop 1.2.2

uzor-desktop: winit-based desktop runtime for uzor apps. Implements AppBuilder::run() for native desktop targets.
//! Window configuration supplied by the app before window creation.

/// Saved window geometry for session restore.
#[derive(Debug, Clone, Copy)]
pub struct WindowGeom {
    pub x: i32,
    pub y: i32,
    pub width: u32,
    pub height: u32,
}

/// App-supplied settings for creating a new winit window.
pub struct WindowConfig {
    /// Window title bar text.
    pub title: String,
    /// Logical pixel size `(width, height)` for the initial window dimensions.
    pub initial_size: (u32, u32),
    /// Minimum logical pixel size `(width, height)`.  `None` = no minimum.
    pub min_size: Option<(u32, u32)>,
    /// Initial window position in physical pixels.  `None` = OS default.
    pub initial_position: Option<(i32, i32)>,
    /// Whether to show OS-native window decorations (title bar, border).
    pub decorations: bool,
    /// Optional window icon.
    pub icon: Option<winit::window::Icon>,
    /// Restore saved geometry from a previous session.
    pub restore_geom: Option<WindowGeom>,
    /// Cascade position offset.
    pub cascade_from: Option<winit::window::WindowId>,
    /// When `false` the window is created invisible until first GPU frame.
    pub start_visible: bool,
    /// Override automatic backend detection.
    pub backend_hint: Option<uzor_render_hub::RenderBackend>,
}

impl Default for WindowConfig {
    fn default() -> Self {
        Self {
            title: "uzor".to_string(),
            initial_size: (1200, 800),
            min_size: Some((400, 300)),
            initial_position: None,
            decorations: false,
            icon: None,
            restore_geom: None,
            cascade_from: None,
            start_visible: false,
            backend_hint: None,
        }
    }
}