Struct piston_window::NoWindow [−]
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.
Implementations
impl NoWindow
pub fn new(settings: &WindowSettings) -> NoWindow
Creates a new NoWindow
.
Trait Implementations
impl AdvancedWindow for NoWindow
pub fn get_title(&self) -> String
pub fn set_title(&mut self, value: String)
pub fn get_exit_on_esc(&self) -> bool
pub fn set_exit_on_esc(&mut self, _value: bool)
pub fn get_automatic_close(&self) -> bool
pub fn set_automatic_close(&mut self, value: bool)
pub fn set_capture_cursor(&mut self, _value: bool)
pub fn show(&mut self)
pub fn hide(&mut self)
pub fn get_position(&self) -> Option<Position>
pub fn set_position<P>(&mut self, val: P) where
P: Into<Position>,
P: Into<Position>,
pub fn set_size<S>(&mut self, val: S) where
S: Into<Size>,
S: Into<Size>,
pub fn title(self, value: String) -> Self
pub fn exit_on_esc(self, value: bool) -> Self
pub fn automatic_close(self, value: bool) -> Self
pub fn capture_cursor(self, value: bool) -> Self
pub fn position<P>(self, val: P) -> Self where
P: Into<Position>,
P: Into<Position>,
impl BuildFromWindowSettings for NoWindow
pub fn build_from_window_settings(
settings: &WindowSettings
) -> Result<NoWindow, Box<dyn Error + 'static, Global>>
settings: &WindowSettings
) -> Result<NoWindow, Box<dyn Error + 'static, Global>>
Errors
This function will always return without error.
impl Window for NoWindow
pub fn should_close(&self) -> bool
pub fn set_should_close(&mut self, value: bool)
pub fn size(&self) -> Size
pub fn swap_buffers(&mut self)
pub fn wait_event(&mut self) -> Event
pub fn wait_event_timeout(&mut self, _timeout: Duration) -> Option<Event>
pub fn poll_event(&mut self) -> Option<Event>
pub fn draw_size(&self) -> Size
Auto Trait Implementations
impl RefUnwindSafe for NoWindow
impl Send for NoWindow
impl Sync for NoWindow
impl Unpin for NoWindow
impl UnwindSafe for NoWindow
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,
pub 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> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
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.
pub 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>,