Struct sdl2::video::WindowBuilder [] [src]

pub struct WindowBuilder {
    // some fields omitted
}

The type that allows you to build windows.

Methods

impl WindowBuilder
[src]

fn new(_sdl: &Sdl, title: &str, width: u32, height: u32) -> WindowBuilder

Initializes a new WindowBuilder.

fn build(&self) -> SdlResult<Window>

Builds the window.

fn get_window_flags(&self) -> u32

Gets the underlying window flags.

fn set_window_flags(&mut self, flags: u32) -> &mut WindowBuilder

Sets the underlying window flags. This will effectively undo any previous build operations, excluding window size and position.

fn position(&mut self, x: i32, y: i32) -> &mut WindowBuilder

Sets the window position.

fn position_centered(&mut self) -> &mut WindowBuilder

Centers the window.

fn fullscreen(&mut self) -> &mut WindowBuilder

Sets the window to fullscreen.

fn fullscreen_desktop(&mut self) -> &mut WindowBuilder

Sets the window to fullscreen at the current desktop resolution.

fn opengl(&mut self) -> &mut WindowBuilder

Sets the window to be usable with an OpenGL context

fn hidden(&mut self) -> &mut WindowBuilder

Hides the window.

fn borderless(&mut self) -> &mut WindowBuilder

Removes the window decoration.

fn resizable(&mut self) -> &mut WindowBuilder

Sets the window to be resizable.

fn minimized(&mut self) -> &mut WindowBuilder

Minimizes the window.

fn maximized(&mut self) -> &mut WindowBuilder

Maximizes the window.

fn input_grabbed(&mut self) -> &mut WindowBuilder

Sets the window to have grabbed input focus.

fn allow_highdpi(&mut self) -> &mut WindowBuilder

Creates the window in high-DPI mode if supported (>= SDL 2.0.1)