Struct window::NoWindow [−][src]
pub struct NoWindow { /* fields omitted */ }A window without user interface, often used in server event loops.
This structure holds just enough state to return values that were set.
The size can be changed because the event loop does not emit
Render
events when the width or height is zero.
Methods
impl NoWindow[src]
impl NoWindowpub fn new(settings: &WindowSettings) -> NoWindow[src]
pub fn new(settings: &WindowSettings) -> NoWindowCreates a new NoWindow.
Trait Implementations
impl Window for NoWindow[src]
impl Window for NoWindowfn should_close(&self) -> bool[src]
fn should_close(&self) -> boolReturns true if the window should close.
fn set_should_close(&mut self, value: bool)[src]
fn set_should_close(&mut self, value: bool)Tells the window to close or stay open.
fn size(&self) -> Size[src]
fn size(&self) -> SizeGets the size of the window.
fn swap_buffers(&mut self)[src]
fn swap_buffers(&mut self)Swaps render buffers. Read more
fn wait_event(&mut self) -> Input[src]
fn wait_event(&mut self) -> InputWait indefinitely for an input event to be available from the window.
fn wait_event_timeout(&mut self, _timeout: Duration) -> Option<Input>[src]
fn wait_event_timeout(&mut self, _timeout: Duration) -> Option<Input>Wait for an input event to be available from the window or for the specified timeout to be reached. Read more
fn poll_event(&mut self) -> Option<Input>[src]
fn poll_event(&mut self) -> Option<Input>Polls an input event from the window. Read more
fn draw_size(&self) -> Size[src]
fn draw_size(&self) -> SizeGets the draw size of the window. Read more
impl BuildFromWindowSettings for NoWindow[src]
impl BuildFromWindowSettings for NoWindowfn build_from_window_settings(settings: &WindowSettings) -> Result<Self, String>[src]
fn build_from_window_settings(settings: &WindowSettings) -> Result<Self, String>Errors
This function will always return without error.
impl AdvancedWindow for NoWindow[src]
impl AdvancedWindow for NoWindowfn get_title(&self) -> String[src]
fn get_title(&self) -> StringGets a copy of the title of the window.
fn set_title(&mut self, value: String)[src]
fn set_title(&mut self, value: String)Sets the title of the window.
fn get_exit_on_esc(&self) -> bool[src]
fn get_exit_on_esc(&self) -> boolGets whether to exit when pressing esc. Read more
fn set_exit_on_esc(&mut self, _value: bool)[src]
fn set_exit_on_esc(&mut self, _value: bool)Sets whether to exit when pressing esc. Read more
fn set_capture_cursor(&mut self, _value: bool)[src]
fn set_capture_cursor(&mut self, _value: bool)Sets whether to capture/grab the cursor. Read more
fn show(&mut self)[src]
fn show(&mut self)Shows the window. Read more
fn hide(&mut self)[src]
fn hide(&mut self)Hides the window. Read more
fn get_position(&self) -> Option<Position>[src]
fn get_position(&self) -> Option<Position>Gets the position of window.
fn set_position<P: Into<Position>>(&mut self, val: P)[src]
fn set_position<P: Into<Position>>(&mut self, val: P)Sets the position of window. Read more
fn set_size<S: Into<Size>>(&mut self, val: S)[src]
fn set_size<S: Into<Size>>(&mut self, val: S)Sets the window size. Read more
fn title(self, value: String) -> Self[src]
fn title(self, value: String) -> SelfSets title on window. Read more
fn exit_on_esc(self, value: bool) -> Self[src]
fn exit_on_esc(self, value: bool) -> SelfSets whether to exit when pressing the Esc button. Read more
fn capture_cursor(self, value: bool) -> Self[src]
fn capture_cursor(self, value: bool) -> SelfSets whether to capture/grab the cursor. Read more
fn position<P: Into<Position>>(self, val: P) -> Self[src]
fn position<P: Into<Position>>(self, val: P) -> SelfSets the position of window. Read more