pub trait Window: Send {
// Required methods
fn size(&self) -> (u32, u32);
fn logical_size(&self) -> (f32, f32);
fn scale_factor(&self) -> f64;
fn set_title(&self, title: &str);
fn set_cursor(&self, cursor: Cursor);
fn request_redraw(&self);
fn is_focused(&self) -> bool;
fn is_visible(&self) -> bool;
}Expand description
Window abstraction trait
Implemented by platform-specific window types.
Required Methods§
Sourcefn logical_size(&self) -> (f32, f32)
fn logical_size(&self) -> (f32, f32)
Get window size in logical pixels
Sourcefn scale_factor(&self) -> f64
fn scale_factor(&self) -> f64
Get the display scale factor (DPI scaling)
Sourcefn set_cursor(&self, cursor: Cursor)
fn set_cursor(&self, cursor: Cursor)
Set the cursor icon
Sourcefn request_redraw(&self)
fn request_redraw(&self)
Request a redraw
Sourcefn is_focused(&self) -> bool
fn is_focused(&self) -> bool
Check if the window is focused
Sourcefn is_visible(&self) -> bool
fn is_visible(&self) -> bool
Check if the window is visible