Struct sdl2::VideoSubsystem [] [src]

pub struct VideoSubsystem {
    // some fields omitted
}

Methods

impl VideoSubsystem
[src]

fn clipboard(&self) -> ClipboardUtil

impl VideoSubsystem
[src]

impl VideoSubsystem
[src]

fn gl_attr(&self) -> GLAttr

Obtains access to the OpenGL window attributes.

impl VideoSubsystem
[src]

fn window(&self, title: &str, width: u32, height: u32) -> WindowBuilder

Initializes a new WindowBuilder; a convenience method that calls WindowBuilder::new().

fn current_video_driver(&self) -> &'static str

fn num_video_displays(&self) -> Result<i32String>

fn display_name(&self, display_index: i32) -> String

fn display_bounds(&self, display_index: i32) -> Result<RectString>

fn num_display_modes(&self, display_index: i32) -> Result<i32String>

fn display_mode(&self, display_index: i32, mode_index: i32) -> Result<DisplayModeString>

fn desktop_display_mode(&self, display_index: i32) -> Result<DisplayModeString>

fn current_display_mode(&self, display_index: i32) -> Result<DisplayModeString>

fn closest_display_mode(&self, display_index: i32, mode: &DisplayMode) -> Result<DisplayModeString>

fn is_screen_saver_enabled(&self) -> bool

fn enable_screen_saver(&self)

fn disable_screen_saver(&self)

fn gl_load_library_default(&self) -> Result<()String>

Loads the default OpenGL library.

This should be done after initializing the video driver, but before creating any OpenGL windows. If no OpenGL library is loaded, the default library will be loaded upon creation of the first OpenGL window.

If a different library is already loaded, this function will return an error.

fn gl_load_library<P: AsRef<Path>>(&self, path: P) -> Result<()String>

Loads the OpenGL library using a platform-dependent OpenGL library name (usually a file path).

This should be done after initializing the video driver, but before creating any OpenGL windows. If no OpenGL library is loaded, the default library will be loaded upon creation of the first OpenGL window.

If a different library is already loaded, this function will return an error.

fn gl_unload_library(&self)

Unloads the current OpenGL library.

To completely unload the library, this should be called for every successful load of the OpenGL library.

fn gl_get_proc_address(&self, procname: &str) -> *const ()

Gets the pointer to the named OpenGL function.

This is useful for OpenGL wrappers such as gl-rs.

fn gl_extension_supported(&self, extension: &str) -> bool

fn gl_get_current_window_id(&self) -> Result<u32String>

fn gl_release_current_context(&self) -> Result<()String>

Releases the thread's current OpenGL context, i.e. sets the current OpenGL context to nothing.

fn gl_set_swap_interval(&self, interval: i32) -> bool

fn gl_get_swap_interval(&self) -> i32

impl VideoSubsystem
[src]

fn sdl(&self) -> Sdl

Obtain an SDL context.

Trait Implementations

impl Clone for VideoSubsystem
[src]

fn clone(&self) -> VideoSubsystem

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Debug for VideoSubsystem
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.