Struct sdl2::video::Window
[−]
[src]
pub struct Window { /* fields omitted */ }
Methods
impl Window
[src]
fn raw(&self) -> *mut SDL_Window
unsafe fn from_ll(subsystem: VideoSubsystem, raw: *mut SDL_Window) -> Window
fn subsystem(&self) -> &VideoSubsystem
fn renderer(self) -> RendererBuilder
Initializes a new RendererBuilder
; a convenience method that calls RendererBuilder::new()
.
Methods from Deref<Target=WindowRef>
fn raw(&self) -> *mut SDL_Window
fn id(&self) -> u32
fn gl_create_context(&self) -> Result<GLContext, String>
fn gl_set_context_to_current(&self) -> Result<(), String>
Set the window's OpenGL context to the current context on the thread.
fn gl_make_current(&self, context: &GLContext) -> Result<(), String>
fn gl_swap_window(&self)
fn display_index(&self) -> Result<i32, String>
fn set_display_mode(&mut self,
display_mode: Option<DisplayMode>)
-> Result<(), String>
display_mode: Option<DisplayMode>)
-> Result<(), String>
fn display_mode(&self) -> Result<DisplayMode, String>
fn window_pixel_format(&self) -> PixelFormatEnum
fn window_flags(&self) -> u32
fn set_title(&mut self, title: &str) -> Result<(), NulError>
fn title(&self) -> &str
fn set_icon<S: AsRef<SurfaceRef>>(&mut self, icon: S)
fn set_position(&mut self, x: WindowPos, y: WindowPos)
fn position(&self) -> (i32, i32)
fn set_size(&mut self, width: u32, height: u32) -> Result<(), IntegerOrSdlError>
fn size(&self) -> (u32, u32)
fn drawable_size(&self) -> (u32, u32)
fn set_minimum_size(&mut self,
width: u32,
height: u32)
-> Result<(), IntegerOrSdlError>
width: u32,
height: u32)
-> Result<(), IntegerOrSdlError>
fn minimum_size(&self) -> (u32, u32)
fn set_maximum_size(&mut self,
width: u32,
height: u32)
-> Result<(), IntegerOrSdlError>
width: u32,
height: u32)
-> Result<(), IntegerOrSdlError>
fn maximum_size(&self) -> (u32, u32)
fn set_bordered(&mut self, bordered: bool)
fn show(&mut self)
fn hide(&mut self)
fn raise(&mut self)
fn maximize(&mut self)
fn minimize(&mut self)
fn restore(&mut self)
fn fullscreen_state(&self) -> FullscreenType
fn set_fullscreen(&mut self,
fullscreen_type: FullscreenType)
-> Result<(), String>
fullscreen_type: FullscreenType)
-> Result<(), String>
fn surface<'a>(&'a self, _e: &'a EventPump) -> Result<&'a SurfaceRef, String>
fn surface_mut<'a>(&'a mut self,
_e: &'a EventPump)
-> Result<&'a mut SurfaceRef, String>
_e: &'a EventPump)
-> Result<&'a mut SurfaceRef, String>
fn update_surface(&self) -> Result<(), String>
fn update_surface_rects(&self, rects: &[Rect]) -> Result<(), String>
fn set_grab(&mut self, grabbed: bool)
fn grab(&self) -> bool
fn set_brightness(&mut self, brightness: f64) -> Result<(), String>
fn brightness(&self) -> f64
fn set_gamma_ramp(&mut self,
red: Option<&[u16; 256]>,
green: Option<&[u16; 256]>,
blue: Option<&[u16; 256]>)
-> Result<(), String>
red: Option<&[u16; 256]>,
green: Option<&[u16; 256]>,
blue: Option<&[u16; 256]>)
-> Result<(), String>
fn gamma_ramp(&self) -> Result<(Vec<u16>, Vec<u16>, Vec<u16>), String>
Trait Implementations
impl Drop for Window
[src]
impl Deref for Window
[src]
type Target = WindowRef
The resulting type after dereferencing
fn deref(&self) -> &WindowRef
The method called to dereference a value