Struct sdl2_window::Sdl2Window [] [src]

pub struct Sdl2Window {
    pub window: Window,
    pub context: GLContext,
    pub sdl_context: Sdl,
    pub video_subsystem: VideoSubsystem,
    // some fields omitted
}

A window implemented by SDL2 back-end.

Fields

SDL window handle.

Allow dead code because this keeps track of the OpenGL context. Will be released on drop.

SDL context.

Video subsystem.

Methods

impl Sdl2Window
[src]

Creates a new game window for SDL2. This will initialize SDL and the video subsystem. You can retrieve both via the public fields on the Sdl2Window struct.

Creates a window with the supplied SDL Video subsystem.

Initialize the joystick subsystem. Required before joystick input events will be returned. Returns the number available or error.

Trait Implementations

impl BuildFromWindowSettings for Sdl2Window
[src]

Builds the window from a WindowSettings object. Read more

impl Drop for Sdl2Window
[src]

A method called when the value goes out of scope. Read more

impl Window for Sdl2Window
[src]

Returns true if the window should close.

Tells the window to close or stay open.

Swaps render buffers. Read more

Gets the size of the window.

Wait indefinitely for an input event to be available from the window.

Wait for an input event to be available from the window or for the specified timeout to be reached. Read more

Polls an input event from the window. Read more

Gets the draw size of the window. Read more

impl AdvancedWindow for Sdl2Window
[src]

Gets a copy of the title of the window.

Sets the title of the window.

Gets whether to exit when pressing esc. Read more

Sets whether to exit when pressing esc. Read more

Sets whether to capture/grab the cursor. Read more

Shows the window. Read more

Hides the window. Read more

Gets the position of window. Read more

Sets the position of window. Read more

Sets title on window. Read more

Sets whether to exit when pressing the Esc button. Read more

Sets whether to capture/grab the cursor. Read more

Sets the position of window. Read more

impl OpenGLWindow for Sdl2Window
[src]

Returns the address of the specified OpenGL function if it exists. Read more

Returns true if this window's gl context is the current gl context.

Make the window's gl context the current gl context.