pub struct WindowHandle { /* private fields */ }Expand description
A window of the application, named by the id of its Window node.
Copy, so it can move into any number of handlers. current_window hands out the
one the caller is in.
Implementations§
Source§impl WindowHandle
impl WindowHandle
Sourcepub const fn id(&self) -> u32
pub const fn id(&self) -> u32
The id of the window’s node, the number its events are reported under.
Sourcepub fn focus(&self)
pub fn focus(&self)
Brings the window forward and makes it the key window. A platform that does not let an application take the focus makes the window flash in the task bar instead.
Sourcepub fn set_theme(&self, theme: Theme)
pub fn set_theme(&self, theme: Theme)
Gives this window a theme of its own over the application’s.
Sourcepub fn size(&self) -> WindowSize
pub fn size(&self) -> WindowSize
What this window last measured. Not recorded as a read; a composable that has to
run again when the class changes reads current_window_size().
Sourcepub fn density(&self) -> f32
pub fn density(&self) -> f32
How many device pixels one dp of this window covers, or 1.0 before it has reported.
Sourcepub fn set_zoom_level(&self, level: i8)
pub fn set_zoom_level(&self, level: i8)
Asks for an application zoom level for this window, kept inside its range.