Struct sdl2::VideoSubsystem
[−]
[src]
pub struct VideoSubsystem { /* fields omitted */ }
Methods
impl VideoSubsystem
[src]
pub fn clipboard(&self) -> ClipboardUtil
[src]
impl VideoSubsystem
[src]
pub fn text_input(&self) -> TextInputUtil
[src]
impl VideoSubsystem
[src]
impl VideoSubsystem
[src]
pub fn window(&self, title: &str, width: u32, height: u32) -> WindowBuilder
[src]
Initializes a new WindowBuilder
; a convenience method that calls WindowBuilder::new()
.
pub fn current_video_driver(&self) -> &'static str
[src]
pub fn num_video_displays(&self) -> Result<i32, String>
[src]
pub fn display_name(&self, display_index: i32) -> Result<String, String>
[src]
Get the name of the display at the index display_name
.
Will return an error if the index is out of bounds or if SDL experienced a failure; inspect the returned string for further info.
pub fn display_bounds(&self, display_index: i32) -> Result<Rect, String>
[src]
pub fn num_display_modes(&self, display_index: i32) -> Result<i32, String>
[src]
pub fn display_mode(
&self,
display_index: i32,
mode_index: i32
) -> Result<DisplayMode, String>
[src]
&self,
display_index: i32,
mode_index: i32
) -> Result<DisplayMode, String>
pub fn desktop_display_mode(
&self,
display_index: i32
) -> Result<DisplayMode, String>
[src]
&self,
display_index: i32
) -> Result<DisplayMode, String>
pub fn current_display_mode(
&self,
display_index: i32
) -> Result<DisplayMode, String>
[src]
&self,
display_index: i32
) -> Result<DisplayMode, String>
pub fn closest_display_mode(
&self,
display_index: i32,
mode: &DisplayMode
) -> Result<DisplayMode, String>
[src]
&self,
display_index: i32,
mode: &DisplayMode
) -> Result<DisplayMode, String>
pub fn display_dpi(&self, display_index: i32) -> Result<(f32, f32, f32), String>
[src]
Return a triplet (ddpi, hdpi, vdpi)
containing the diagonal, horizontal and vertical
dots/pixels-per-inch of a display
pub fn is_screen_saver_enabled(&self) -> bool
[src]
pub fn enable_screen_saver(&self)
[src]
pub fn disable_screen_saver(&self)
[src]
pub fn gl_load_library_default(&self) -> Result<(), String>
[src]
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.
pub fn gl_load_library<P: AsRef<Path>>(&self, path: P) -> Result<(), String>
[src]
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.
pub fn gl_unload_library(&self)
[src]
Unloads the current OpenGL library.
To completely unload the library, this should be called for every successful load of the OpenGL library.
pub fn gl_get_proc_address(&self, procname: &str) -> *const ()
[src]
Gets the pointer to the named OpenGL function.
This is useful for OpenGL wrappers such as gl-rs
.
pub fn gl_extension_supported(&self, extension: &str) -> bool
[src]
pub fn gl_get_current_window_id(&self) -> Result<u32, String>
[src]
pub fn gl_release_current_context(&self) -> Result<(), String>
[src]
Releases the thread's current OpenGL context, i.e. sets the current OpenGL context to nothing.
pub fn gl_set_swap_interval(&self, interval: i32) -> bool
[src]
pub fn gl_get_swap_interval(&self) -> i32
[src]
impl VideoSubsystem
[src]
Trait Implementations
impl Debug for VideoSubsystem
[src]
impl Clone for VideoSubsystem
[src]
fn clone(&self) -> VideoSubsystem
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more