Struct sdl2::video::WindowRef [] [src]

pub struct WindowRef {
    // some fields omitted
}

An unsized Window reference.

This type is used whenever Windows need to be borrowed from the SDL library, without concern for freeing the Window.

Methods

impl WindowRef
[src]

fn raw(&self) -> *mut SDL_Window

unsafe fn from_ll<'a>(raw: *mut SDL_Window) -> &'a WindowRef

unsafe fn from_ll_mut<'a>(raw: *mut SDL_Window) -> &'a mut WindowRef

fn id(&self) -> u32

fn gl_create_context(&self) -> Result<GLContextString>

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<i32String>

fn set_display_mode(&mut self, display_mode: Option<DisplayMode>) -> Result<()String>

fn display_mode(&self) -> Result<DisplayModeString>

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>

fn minimum_size(&self) -> (u32, u32)

fn set_maximum_size(&mut self, 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 set_fullscreen(&mut self, fullscreen_type: FullscreenType) -> Result<()String>

fn surface<'a>(&'a self, _e: &'a EventPump) -> Result<&'a SurfaceRefString>

fn surface_mut<'a>(&'a mut self, _e: &'a EventPump) -> Result<&'a mut SurfaceRefString>

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>

fn gamma_ramp(&self) -> Result<(Vec<u16>, Vec<u16>, Vec<u16>)String>