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]

[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.

[src]

Creates a window with the supplied SDL Video subsystem.

[src]

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]

[src]

Builds the window from a WindowSettings object. Read more

impl Drop for Sdl2Window
[src]

[src]

Executes the destructor for this type. Read more

impl Window for Sdl2Window
[src]

[src]

Returns true if the window should close.

[src]

Tells the window to close or stay open.

[src]

Swaps render buffers. Read more

[src]

Gets the size of the window.

[src]

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

[src]

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

[src]

Polls an input event from the window. Read more

[src]

Gets the draw size of the window. Read more

impl AdvancedWindow for Sdl2Window
[src]

[src]

Gets a copy of the title of the window.

[src]

Sets the title of the window.

[src]

Gets whether to exit when pressing esc. Read more

[src]

Sets whether to exit when pressing esc. Read more

[src]

Sets whether to capture/grab the cursor. Read more

[src]

Shows the window. Read more

[src]

Hides the window. Read more

[src]

Gets the position of window. Read more

[src]

Sets the position of window. Read more

[src]

Sets title on window. Read more

[src]

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

[src]

Sets whether to capture/grab the cursor. Read more

[src]

Sets the position of window. Read more

impl OpenGLWindow for Sdl2Window
[src]

[src]

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

[src]

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

[src]

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