pub struct Window { /* private fields */ }
Expand description
The Tetris window.
§Notes
Please note that currently the creation of multiple windows (at the same time) is not a supported workflow.
Implementations§
Source§impl Window
impl Window
Sourcepub fn context_mut(&mut self) -> &mut Context
pub fn context_mut(&mut self) -> &mut Context
Retrieve the window’s OpenGL context.
Sourcepub fn size(&self) -> (NonZeroU32, NonZeroU32)
pub fn size(&self) -> (NonZeroU32, NonZeroU32)
Retrieve the window’s inner size (i.e., the size of the drawable area).
Sourcepub fn on_resize(&mut self, phys_w: NonZeroU32, phys_h: NonZeroU32)
pub fn on_resize(&mut self, phys_w: NonZeroU32, phys_h: NonZeroU32)
Inform the window that it has been resized.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Window
impl RefUnwindSafe for Window
impl !Send for Window
impl !Sync for Window
impl Unpin for Window
impl UnwindSafe for Window
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more