Struct glutin_window::GlutinWindow
source · pub struct GlutinWindow {
pub window: GlWindow,
/* private fields */
}
Expand description
Contains stuff for game window.
Fields
window: GlWindow
The window.
Implementations
sourceimpl GlutinWindow
impl GlutinWindow
sourcepub fn new(settings: &WindowSettings) -> Result<Self, String>
pub fn new(settings: &WindowSettings) -> Result<Self, String>
Creates a new game window for Glutin.
Trait Implementations
sourceimpl AdvancedWindow for GlutinWindow
impl AdvancedWindow for GlutinWindow
sourcefn get_exit_on_esc(&self) -> bool
fn get_exit_on_esc(&self) -> bool
Gets whether to exit when pressing esc. Read more
sourcefn set_exit_on_esc(&mut self, value: bool)
fn set_exit_on_esc(&mut self, value: bool)
Sets whether to exit when pressing esc. Read more
sourcefn set_capture_cursor(&mut self, value: bool)
fn set_capture_cursor(&mut self, value: bool)
Sets whether to capture/grab the cursor. Read more
sourcefn get_position(&self) -> Option<Position>
fn get_position(&self) -> Option<Position>
Gets the position of window. Read more
sourcefn set_position<P: Into<Position>>(&mut self, pos: P)
fn set_position<P: Into<Position>>(&mut self, pos: P)
Sets the position of window. Read more
sourcefn exit_on_esc(self, value: bool) -> Self
fn exit_on_esc(self, value: bool) -> Self
Sets whether to exit when pressing the Esc button. Read more
sourcefn capture_cursor(self, value: bool) -> Self
fn capture_cursor(self, value: bool) -> Self
Sets whether to capture/grab the cursor. Read more
sourceimpl BuildFromWindowSettings for GlutinWindow
impl BuildFromWindowSettings for GlutinWindow
sourcefn build_from_window_settings(settings: &WindowSettings) -> Result<Self, String>
fn build_from_window_settings(settings: &WindowSettings) -> Result<Self, String>
Builds the window from a
WindowSettings
object. Read moresourceimpl OpenGLWindow for GlutinWindow
impl OpenGLWindow for GlutinWindow
sourcefn get_proc_address(&mut self, proc_name: &str) -> ProcAddress
fn get_proc_address(&mut self, proc_name: &str) -> ProcAddress
Returns the address of the specified OpenGL function if it exists. Read more
sourcefn is_current(&self) -> bool
fn is_current(&self) -> bool
Returns true if this window’s gl context is the current gl context.
sourcefn make_current(&mut self)
fn make_current(&mut self)
Make the window’s gl context the current gl context.
sourceimpl Window for GlutinWindow
impl Window for GlutinWindow
sourcefn should_close(&self) -> bool
fn should_close(&self) -> bool
Returns true if the window should close.
sourcefn set_should_close(&mut self, value: bool)
fn set_should_close(&mut self, value: bool)
Tells the window to close or stay open.
sourcefn swap_buffers(&mut self)
fn swap_buffers(&mut self)
Swaps render buffers. Read more
sourcefn wait_event(&mut self) -> Input
fn wait_event(&mut self) -> Input
Wait indefinitely for an input event to be available from the window.
sourcefn wait_event_timeout(&mut self, timeout: Duration) -> Option<Input>
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
sourcefn poll_event(&mut self) -> Option<Input>
fn poll_event(&mut self) -> Option<Input>
Polls an input event from the window. Read more
Auto Trait Implementations
impl !RefUnwindSafe for GlutinWindow
impl !Send for GlutinWindow
impl !Sync for GlutinWindow
impl Unpin for GlutinWindow
impl UnwindSafe for GlutinWindow
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more