[−]Struct piston::NoWindow
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
pub fn new(settings: &WindowSettings) -> NoWindow
Creates a new NoWindow
.
Trait Implementations
impl BuildFromWindowSettings for NoWindow
fn build_from_window_settings(
settings: &WindowSettings
) -> Result<NoWindow, Box<dyn Error + 'static>>
settings: &WindowSettings
) -> Result<NoWindow, Box<dyn Error + 'static>>
Errors
This function will always return without error.
impl AdvancedWindow for NoWindow
fn get_title(&self) -> String
fn set_title(&mut self, value: String)
fn get_exit_on_esc(&self) -> bool
fn set_exit_on_esc(&mut self, _value: bool)
fn get_automatic_close(&self) -> bool
fn set_automatic_close(&mut self, value: bool)
fn set_capture_cursor(&mut self, _value: bool)
fn show(&mut self)
fn hide(&mut self)
fn get_position(&self) -> Option<Position>
fn set_position<P>(&mut self, val: P) where
P: Into<Position>,
P: Into<Position>,
fn set_size<S>(&mut self, val: S) where
S: Into<Size>,
S: Into<Size>,
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 automatic_close(self, value: bool) -> Self
Sets whether the window will automatically close when attempting to close it. If this is disabled, attempts to close the window can be detected via an Input::Close(..)
event, and Window::set_should_close()
can be called to actually close the window. Read more
fn capture_cursor(self, value: bool) -> Self
Sets whether to capture/grab the cursor. Read more
fn position<P>(self, val: P) -> Self where
P: Into<Position>,
P: Into<Position>,
Sets the position of window. Read more
impl Window for NoWindow
fn should_close(&self) -> bool
fn set_should_close(&mut self, value: bool)
fn size(&self) -> Size
fn swap_buffers(&mut self)
fn wait_event(&mut self) -> Event
fn wait_event_timeout(&mut self, _timeout: Duration) -> Option<Event>
fn poll_event(&mut self) -> Option<Event>
fn draw_size(&self) -> Size
Auto Trait Implementations
impl Sync for NoWindow
impl Unpin for NoWindow
impl Send for NoWindow
impl RefUnwindSafe for NoWindow
impl UnwindSafe for NoWindow
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,