pub struct Window<'a> { /* private fields */ }Implementations§
Source§impl<'a> Window<'a>
impl<'a> Window<'a>
pub fn open_parented<P, H, B>(
parent: &P,
options: WindowOpenOptions,
build: B,
) -> WindowHandlewhere
P: HasRawWindowHandle,
H: WindowHandler + 'static,
B: FnOnce(&mut Window<'_>) -> H + Send + 'static,
pub fn open_blocking<H, B>(options: WindowOpenOptions, build: B)
Sourcepub fn resize(&mut self, size: Size)
pub fn resize(&mut self, size: Size)
Resize the window to the given size. The size is always in logical pixels. DPI scaling will automatically be accounted for.
pub fn set_mouse_cursor(&mut self, cursor: MouseCursor)
pub fn has_focus(&mut self) -> bool
pub fn focus(&mut self)
Sourcepub fn gl_context(&self) -> Option<&GlContext>
pub fn gl_context(&self) -> Option<&GlContext>
If provided, then an OpenGL context will be created for this window. You’ll be able to access this context through crate::Window::gl_context.
Trait Implementations§
Source§impl<'a> HasRawDisplayHandle for Window<'a>
impl<'a> HasRawDisplayHandle for Window<'a>
fn raw_display_handle(&self) -> RawDisplayHandle
Source§impl<'a> HasRawWindowHandle for Window<'a>
impl<'a> HasRawWindowHandle for Window<'a>
fn raw_window_handle(&self) -> RawWindowHandle
Auto Trait Implementations§
impl<'a> Freeze for Window<'a>
impl<'a> !RefUnwindSafe for Window<'a>
impl<'a> !Send for Window<'a>
impl<'a> !Sync for Window<'a>
impl<'a> Unpin for Window<'a>
impl<'a> UnsafeUnpin for Window<'a>
impl<'a> !UnwindSafe for Window<'a>
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