pub struct Window(/* private fields */);Expand description
The Window for your blinds application
Implementations§
Source§impl Window
impl Window
Sourcepub fn set_cursor_icon(&self, icon: Option<CursorIcon>)
pub fn set_cursor_icon(&self, icon: Option<CursorIcon>)
Set the cursor icon to some value, or set it to invisible (None)
Sourcepub fn size(&self) -> Vector2<f32>
pub fn size(&self) -> Vector2<f32>
Get the size of the window in logical units
On a high-dpi display, this doesn’t correspond to physical pixels and must be multiplied by
scale when passing sizes to functions like glViewport.
Sourcepub fn scale_factor(&self) -> f32
pub fn scale_factor(&self) -> f32
The DPI scale factor of the window
For a good example of DPI scale factors, see the winit docs on the subject
Sourcepub fn set_size(&self, size: Vector2<f32>)
pub fn set_size(&self, size: Vector2<f32>)
Set the size of the inside of the window in logical units
Sourcepub fn set_fullscreen(&self, fullscreen: bool)
pub fn set_fullscreen(&self, fullscreen: bool)
Set if the window should be fullscreen or not
On desktop, it will instantly become fullscreen (borderless windowed on Windows and Linux, and fullscreen on macOS). On web, it will become fullscreen after the next user interaction, due to browser API restrictions.
Sourcepub fn get_proc_address(&self, func: &str) -> *const c_void
pub fn get_proc_address(&self, func: &str) -> *const c_void
Return the address of a given OpenGL function