[−][src]Struct quicksilver::Window
The window on the user's desktop or in the browser tab
Implementations
impl Window
[src]
pub fn set_cursor_icon(&self, icon: Option<CursorIcon>)
[src]
Set the cursor icon to some value, or set it to invisible (None)
pub fn size(&self) -> Vector
[src]
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_factor
when passing sizes to functions like set_viewport
pub fn set_size(&self, size: Vector)
[src]
Set the size of the inside of the window in logical units
pub fn set_title(&self, title: &str)
[src]
Set the title of the window or browser tab
pub fn set_fullscreen(&self, fullscreen: bool)
[src]
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.
pub fn scale_factor(&self) -> f32
[src]
The DPI scale factor of the window
Mostly, this isn't important to you. Some computer screens have more "physical" pixels than "logical" pixels, allowing them to draw sharper-looking images. Quicksilver abstracts this away. However, if you are manually setting the viewport, you need to take this into account.
pub fn present(&self)
[src]
Draw the current frame to the screen
If vsync is enabled, this will block until the frame is completed on desktop. On web, there is no way to control vsync, or to manually control presentation, so this function is a no-op.
Auto Trait Implementations
impl !RefUnwindSafe for Window
impl !Send for Window
impl !Sync for Window
impl Unpin for Window
impl !UnwindSafe for Window
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,