pub trait Screen {
type Window: HasDisplayHandle + HasWindowHandle + Send + Sync + 'static;
// Required methods
fn size(&self) -> ScreenSize;
fn window(&self) -> Arc<Self::Window>;
}
Expand description
Needs to be implemented by types that can serve as a screen to render to
Required Associated Types§
sourcetype Window: HasDisplayHandle + HasWindowHandle + Send + Sync + 'static
type Window: HasDisplayHandle + HasWindowHandle + Send + Sync + 'static
The window
Required Methods§
sourcefn size(&self) -> ScreenSize
fn size(&self) -> ScreenSize
Access the size of the screen