[−][src]Struct sdl2::video::WindowBuilder
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
pub fn vulkan(&mut self) -> &mut WindowBuilder
[src]
Sets the window to be usable with a Vulkan instance
[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
Auto Trait Implementations
impl !RefUnwindSafe for WindowBuilder
impl !Send for WindowBuilder
impl !Sync for WindowBuilder
impl Unpin for WindowBuilder
impl !UnwindSafe for WindowBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,