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]
fn new(settings: &WindowSettings) -> NoWindow
Creates a new NoWindow
.
Trait Implementations
impl Window for NoWindow
[src]
type Event = Input
The event type the window uses for incoming input. Read more
fn should_close(&self) -> bool
Returns true if the window should close.
fn set_should_close(&mut self, value: bool)
Tells the window to close or stay open.
fn size(&self) -> Size
Gets the size of the window.
fn swap_buffers(&mut self)
Swaps render buffers. Read more
fn wait_event(&mut self) -> Input
Wait indefinitely for an event to be available from the window. Read more
fn wait_event_timeout(&mut self, _timeout: Duration) -> Option<Input>
Wait for an event to be available from the window or for the specified timeout to be reached. Read more
fn poll_event(&mut self) -> Option<Input>
Polls an event from the window. Read more
fn draw_size(&self) -> Size
Gets the draw size of the window. Read more
impl BuildFromWindowSettings for NoWindow
[src]
fn build_from_window_settings(settings: &WindowSettings) -> Result<Self, String>
Errors
This function will always return without error.
impl AdvancedWindow for NoWindow
[src]
fn get_title(&self) -> String
Gets a copy of the title of the window.
fn set_title(&mut self, value: String)
Sets the title of the window.
fn get_exit_on_esc(&self) -> bool
Gets whether to exit when pressing esc. Read more
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)
Sets whether to capture/grab the cursor. Read more
fn show(&mut self)
Shows the window. Read more
fn hide(&mut self)
Hides the window. Read more
fn get_position(&self) -> Option<Position>
Gets the position of window. Read more
fn set_position<P: Into<Position>>(&mut self, val: P)
Sets the position of window. Read more
fn title(self, value: String) -> Self
Sets title on window. Read more
fn exit_on_esc(self, value: bool) -> Self
Sets whether to exit when pressing the Esc button. Read more
fn capture_cursor(self, value: bool) -> Self
Sets whether to capture/grab the cursor. Read more
fn position<P: Into<Position>>(self, val: P) -> Self
Sets the position of window. Read more