pub struct Window(/* private fields */);Expand description
A top-level window.
The window lives until it is dropped or closed by the user. Its raw HWND
is available via Window::hwnd for interop with other Windows APIs.
Implementations§
Source§impl Window
impl Window
Sourcepub fn new(title: &str) -> WindowBuilder
pub fn new(title: &str) -> WindowBuilder
Begins configuring a new window with the given title.
Sourcepub fn hwnd(&self) -> *mut c_void
pub fn hwnd(&self) -> *mut c_void
Returns the raw window handle for interop with other Windows APIs.
Sourcepub fn client_size(&self) -> (i32, i32)
pub fn client_size(&self) -> (i32, i32)
Returns the current client-area size in pixels as (width, height).
Trait Implementations§
Auto Trait Implementations§
impl !Send for Window
impl !Sync for Window
impl Freeze for Window
impl RefUnwindSafe for Window
impl Unpin for Window
impl UnsafeUnpin 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