Struct sdl2::video::WindowBuilder
[−]
[src]
pub struct WindowBuilder { /* fields omitted */ }
The type that allows you to build windows.
Methods
impl WindowBuilder
[src]
pub fn new(
v: &VideoSubsystem,
title: &str,
width: u32,
height: u32
) -> WindowBuilder
[src]
v: &VideoSubsystem,
title: &str,
width: u32,
height: u32
) -> WindowBuilder
Initializes a new WindowBuilder
.
pub fn build(&self) -> Result<Window, WindowBuildError>
[src]
Builds the window.
pub fn window_flags(&self) -> u32
[src]
Gets the underlying window flags.
pub fn set_window_flags(&mut self, flags: u32) -> &mut WindowBuilder
[src]
Sets the underlying window flags. This will effectively undo any previous build operations, excluding window size and position.
pub fn position(&mut self, x: i32, y: i32) -> &mut WindowBuilder
[src]
Sets the window position.
pub fn position_centered(&mut self) -> &mut WindowBuilder
[src]
Centers the window.
pub fn fullscreen(&mut self) -> &mut WindowBuilder
[src]
Sets the window to fullscreen.
pub fn fullscreen_desktop(&mut self) -> &mut WindowBuilder
[src]
Sets the window to fullscreen at the current desktop resolution.
pub fn opengl(&mut self) -> &mut WindowBuilder
[src]
Sets the window to be usable with an OpenGL context
[src]
Hides the window.
pub fn borderless(&mut self) -> &mut WindowBuilder
[src]
Removes the window decoration.
pub fn resizable(&mut self) -> &mut WindowBuilder
[src]
Sets the window to be resizable.
pub fn minimized(&mut self) -> &mut WindowBuilder
[src]
Minimizes the window.
pub fn maximized(&mut self) -> &mut WindowBuilder
[src]
Maximizes the window.
pub fn input_grabbed(&mut self) -> &mut WindowBuilder
[src]
Sets the window to have grabbed input focus.
pub fn allow_highdpi(&mut self) -> &mut WindowBuilder
[src]
Creates the window in high-DPI mode if supported (>= SDL 2.0.1)