use crate::windowing::dpi::PhysicalSize; /// Handle to a monitor that may or may not exist any longer. #[derive(Debug, Clone)] pub struct Handle { inner: winit::monitor::MonitorHandle, } impl Handle { pub fn name(&self) -> Option { self.inner.name() } pub fn size(&self) -> PhysicalSize { self.inner.size().into() } } impl Handle { pub(super) fn from_winit_monitor_handle( monitor: winit::monitor::MonitorHandle, ) -> Self { Self { inner: monitor } } }