Skip to main content

ContextWindow

Trait ContextWindow 

Source
pub trait ContextWindow {
Show 15 methods // Required methods fn get_clipboard(&mut self) -> Option<String>; fn set_clipboard(&mut self, text: &str); fn dpi_scale(&mut self) -> float; fn is_dpi_hight(&mut self) -> bool; fn quit(&mut self); fn request_quit(&mut self); fn get_position(&mut self) -> Point2; fn set_position(&mut self, pos: Point2); fn get_screen_size_tuple(&mut self) -> Point2; fn set_size(&mut self, size: Point2); fn set_fullscreen(&mut self, fullscreen: bool); fn show_keyboard(&mut self, show: bool); fn show_mouse(&mut self, show: bool); fn grab_mouse(&mut self, grab: bool); fn set_mouse_cursor(&mut self, cursor_icon: CursorIcon);
}

Required Methods§

Source

fn get_clipboard(&mut self) -> Option<String>

Source

fn set_clipboard(&mut self, text: &str)

Source

fn dpi_scale(&mut self) -> float

Source

fn is_dpi_hight(&mut self) -> bool

Source

fn quit(&mut self)

Quit the window

Source

fn request_quit(&mut self)

Ask the user for a quitting confirmation and quit

Source

fn get_position(&mut self) -> Point2

Source

fn set_position(&mut self, pos: Point2)

Source

fn get_screen_size_tuple(&mut self) -> Point2

Current window size in pixel (taking dpi in account)

Source

fn set_size(&mut self, size: Point2)

Source

fn set_fullscreen(&mut self, fullscreen: bool)

Source

fn show_keyboard(&mut self, show: bool)

Source

fn show_mouse(&mut self, show: bool)

Source

fn grab_mouse(&mut self, grab: bool)

Source

fn set_mouse_cursor(&mut self, cursor_icon: CursorIcon)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ContextWindow for ()

Source§

fn get_clipboard(&mut self) -> Option<String>

Source§

fn set_clipboard(&mut self, _text: &str)

Source§

fn dpi_scale(&mut self) -> f32

Source§

fn is_dpi_hight(&mut self) -> bool

Source§

fn quit(&mut self)

Source§

fn request_quit(&mut self)

Source§

fn get_position(&mut self) -> Point2

Source§

fn set_position(&mut self, _pos: Point2)

Source§

fn get_screen_size_tuple(&mut self) -> Point2

Source§

fn set_size(&mut self, _size: Point2)

Source§

fn set_fullscreen(&mut self, _fullscreen: bool)

Source§

fn show_keyboard(&mut self, _show: bool)

Source§

fn show_mouse(&mut self, _show: bool)

Source§

fn grab_mouse(&mut self, _grab: bool)

Source§

fn set_mouse_cursor(&mut self, _cursor_icon: CursorIcon)

Implementors§