Struct sdl2::video::WindowBuilder
[−]
[src]
pub struct WindowBuilder { /* fields omitted */ }
The type that allows you to build windows.
Methods
impl WindowBuilder
[src]
fn new(v: &VideoSubsystem,
title: &str,
width: u32,
height: u32)
-> WindowBuilder
title: &str,
width: u32,
height: u32)
-> WindowBuilder
Initializes a new WindowBuilder
.
fn build(&self) -> Result<Window, WindowBuildError>
Builds the window.
fn 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
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)