mod monitor;
mod window;

pub use monitor::*;
pub use window::*;

use crate::ecs::world::World;

/// Returns the viewport size in physical pixels, or `None` if no size
/// is registered yet.
pub fn window_viewport_size(world: &World) -> Option<(u32, u32)> {
    world.resources.window.cached_viewport_size
}

/// Returns the window's DPI scale factor.
pub fn window_scale_factor(world: &World) -> f32 {
    world.resources.window.cached_scale_factor
}
