[−][src]Struct sdl2::VideoSubsystem
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<S: Into<SwapInterval>>(
&self,
interval: S
) -> Result<(), String>
[src]
&self,
interval: S
) -> Result<(), String>
pub fn gl_get_swap_interval(&self) -> SwapInterval
[src]
pub fn vulkan_load_library_default(&self) -> Result<(), String>
[src]
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]
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]
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]
Gets the pointer to the
vkGetInstanceProcAddr
Vulkan function. This function can be called to retrieve the address of other Vulkan
functions.
impl VideoSubsystem
[src]
Trait Implementations
impl Clone for VideoSubsystem
[src]
fn clone(&self) -> VideoSubsystem
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for VideoSubsystem
[src]
Auto Trait Implementations
impl !RefUnwindSafe for VideoSubsystem
impl !Send for VideoSubsystem
impl !Sync for VideoSubsystem
impl Unpin for VideoSubsystem
impl !UnwindSafe for VideoSubsystem
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,