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

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]

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

pub fn vulkan(&mut self) -> &mut WindowBuilder[src]

Sets the window to be usable with a Vulkan instance

pub fn hidden(&mut self) -> &mut WindowBuilder[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)

Trait Implementations

impl Debug for WindowBuilder[src]

Auto Trait Implementations

impl !Send for WindowBuilder

impl Unpin for WindowBuilder

impl !Sync for WindowBuilder

impl !UnwindSafe for WindowBuilder

impl !RefUnwindSafe for WindowBuilder

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]