Struct sdl2::VideoSubsystem [−][src]
pub struct VideoSubsystem { /* fields omitted */ }
Methods
impl VideoSubsystem
[src]
impl VideoSubsystem
pub fn clipboard(&self) -> ClipboardUtil
[src]
pub fn clipboard(&self) -> ClipboardUtil
impl VideoSubsystem
[src]
impl VideoSubsystem
pub fn text_input(&self) -> TextInputUtil
[src]
pub fn text_input(&self) -> TextInputUtil
impl VideoSubsystem
[src]
impl VideoSubsystem
impl VideoSubsystem
[src]
impl VideoSubsystem
pub fn window(&self, title: &str, width: u32, height: u32) -> WindowBuilder
[src]
pub fn window(&self, title: &str, width: u32, height: u32) -> WindowBuilder
Initializes a new WindowBuilder
; a convenience method that calls WindowBuilder::new()
.
pub fn current_video_driver(&self) -> &'static str
[src]
pub fn current_video_driver(&self) -> &'static str
pub fn num_video_displays(&self) -> Result<i32, String>
[src]
pub fn num_video_displays(&self) -> Result<i32, String>
pub fn display_name(&self, display_index: i32) -> Result<String, String>
[src]
pub fn display_name(&self, display_index: i32) -> Result<String, String>
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 display_bounds(&self, display_index: i32) -> Result<Rect, String>
pub fn num_display_modes(&self, display_index: i32) -> Result<i32, String>
[src]
pub fn num_display_modes(&self, display_index: i32) -> Result<i32, String>
pub fn display_mode(
&self,
display_index: i32,
mode_index: i32
) -> Result<DisplayMode, String>
[src]
pub fn display_mode(
&self,
display_index: i32,
mode_index: i32
) -> Result<DisplayMode, String>
pub fn desktop_display_mode(
&self,
display_index: i32
) -> Result<DisplayMode, String>
[src]
pub fn desktop_display_mode(
&self,
display_index: i32
) -> Result<DisplayMode, String>
pub fn current_display_mode(
&self,
display_index: i32
) -> Result<DisplayMode, String>
[src]
pub fn current_display_mode(
&self,
display_index: i32
) -> Result<DisplayMode, String>
pub fn closest_display_mode(
&self,
display_index: i32,
mode: &DisplayMode
) -> Result<DisplayMode, String>
[src]
pub fn closest_display_mode(
&self,
display_index: i32,
mode: &DisplayMode
) -> Result<DisplayMode, String>
pub fn display_dpi(&self, display_index: i32) -> Result<(f32, f32, f32), String>
[src]
pub fn display_dpi(&self, display_index: i32) -> Result<(f32, f32, f32), String>
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 is_screen_saver_enabled(&self) -> bool
pub fn enable_screen_saver(&self)
[src]
pub fn enable_screen_saver(&self)
pub fn disable_screen_saver(&self)
[src]
pub fn disable_screen_saver(&self)
pub fn gl_load_library_default(&self) -> Result<(), String>
[src]
pub 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.
pub fn gl_load_library<P: AsRef<Path>>(&self, path: P) -> Result<(), String>
[src]
pub 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.
pub fn gl_unload_library(&self)
[src]
pub 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.
pub fn gl_get_proc_address(&self, procname: &str) -> *const ()
[src]
pub 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
.
pub fn gl_extension_supported(&self, extension: &str) -> bool
[src]
pub fn gl_extension_supported(&self, extension: &str) -> bool
pub fn gl_get_current_window_id(&self) -> Result<u32, String>
[src]
pub fn gl_get_current_window_id(&self) -> Result<u32, String>
pub fn gl_release_current_context(&self) -> Result<(), String>
[src]
pub fn gl_release_current_context(&self) -> Result<(), String>
Releases the thread's current OpenGL context, i.e. sets the current OpenGL context to nothing.
pub fn gl_set_swap_interval<S: Into<SwapInterval>>(
&self,
interval: S
) -> Result<(), String>
[src]
pub fn gl_set_swap_interval<S: Into<SwapInterval>>(
&self,
interval: S
) -> Result<(), String>
pub fn gl_get_swap_interval(&self) -> SwapInterval
[src]
pub fn gl_get_swap_interval(&self) -> SwapInterval
pub fn vulkan_load_library_default(&self) -> Result<(), String>
[src]
pub fn vulkan_load_library_default(&self) -> Result<(), String>
Loads the default Vulkan library.
This should be done after initializing the video driver, but before creating any Vulkan windows. If no Vulkan library is loaded, the default library will be loaded upon creation of the first Vulkan window.
If a different library is already loaded, this function will return an error.
pub fn vulkan_load_library<P: AsRef<Path>>(&self, path: P) -> Result<(), String>
[src]
pub fn vulkan_load_library<P: AsRef<Path>>(&self, path: P) -> Result<(), String>
Loads the Vulkan library using a platform-dependent Vulkan library name (usually a file path).
This should be done after initializing the video driver, but before creating any Vulkan windows. If no Vulkan library is loaded, the default library will be loaded upon creation of the first Vulkan window.
If a different library is already loaded, this function will return an error.
pub fn vulkan_unload_library(&self)
[src]
pub fn vulkan_unload_library(&self)
Unloads the current Vulkan library.
To completely unload the library, this should be called for every successful load of the Vulkan library.
pub fn vulkan_get_proc_address_function(&self) -> Result<*const (), String>
[src]
pub fn vulkan_get_proc_address_function(&self) -> Result<*const (), String>
Gets the pointer to the
vkGetInstanceProcAddr
Vulkan function. This function can be called to retrieve the address of other Vulkan
functions.
impl VideoSubsystem
[src]
impl VideoSubsystem
Trait Implementations
impl Debug for VideoSubsystem
[src]
impl Debug for VideoSubsystem
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for VideoSubsystem
[src]
impl Clone for VideoSubsystem
fn clone(&self) -> VideoSubsystem
[src]
fn clone(&self) -> VideoSubsystem
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl !Send for VideoSubsystem
impl !Send for VideoSubsystem
impl !Sync for VideoSubsystem
impl !Sync for VideoSubsystem