mirror of
https://github.com/encounter/rust-sdl2.git
synced 2026-07-10 21:18:41 -07:00
54 lines
48 KiB
HTML
54 lines
48 KiB
HTML
|
|
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `VideoSubsystem` struct in crate `sdl2`."><meta name="keywords" content="rust, rustlang, rust-lang, VideoSubsystem"><title>sdl2::VideoSubsystem - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../sdl2/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Struct VideoSubsystem</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.clipboard">clipboard</a><a href="#method.closest_display_mode">closest_display_mode</a><a href="#method.current_display_mode">current_display_mode</a><a href="#method.current_video_driver">current_video_driver</a><a href="#method.desktop_display_mode">desktop_display_mode</a><a href="#method.disable_screen_saver">disable_screen_saver</a><a href="#method.display_bounds">display_bounds</a><a href="#method.display_dpi">display_dpi</a><a href="#method.display_mode">display_mode</a><a href="#method.display_name">display_name</a><a href="#method.enable_screen_saver">enable_screen_saver</a><a href="#method.gl_attr">gl_attr</a><a href="#method.gl_extension_supported">gl_extension_supported</a><a href="#method.gl_get_current_window_id">gl_get_current_window_id</a><a href="#method.gl_get_proc_address">gl_get_proc_address</a><a href="#method.gl_get_swap_interval">gl_get_swap_interval</a><a href="#method.gl_load_library">gl_load_library</a><a href="#method.gl_load_library_default">gl_load_library_default</a><a href="#method.gl_release_current_context">gl_release_current_context</a><a href="#method.gl_set_swap_interval">gl_set_swap_interval</a><a href="#method.gl_unload_library">gl_unload_library</a><a href="#method.is_screen_saver_enabled">is_screen_saver_enabled</a><a href="#method.num_display_modes">num_display_modes</a><a href="#method.num_video_displays">num_video_displays</a><a href="#method.sdl">sdl</a><a href="#method.text_input">text_input</a><a href="#method.vulkan_get_proc_address_function">vulkan_get_proc_address_function</a><a href="#method.vulkan_load_library">vulkan_load_library</a><a href="#method.vulkan_load_library_default">vulkan_load_library_default</a><a href="#method.vulkan_unload_library">vulkan_unload_library</a><a href="#method.window">window</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">!Send</a><a href="#impl-Sync">!Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">!UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU
|
||
|
|
</div></div><h3 id='impl-3' class='impl'><code class='in-band'>impl <a class="struct" href="../sdl2/struct.VideoSubsystem.html" title="struct sdl2::VideoSubsystem">VideoSubsystem</a></code><a href='#impl-3' class='anchor'></a><a class='srclink' href='../src/sdl2/video.rs.html#590-881' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.window' class="method"><code id='window.v'>pub fn <a href='#method.window' class='fnname'>window</a>(&self, title: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, width: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, height: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> <a class="struct" href="../sdl2/video/struct.WindowBuilder.html" title="struct sdl2::video::WindowBuilder">WindowBuilder</a></code><a class='srclink' href='../src/sdl2/video.rs.html#592-594' title='goto source code'>[src]</a></h4><div class='docblock'><p>Initializes a new <code>WindowBuilder</code>; a convenience method that calls <code>WindowBuilder::new()</code>.</p>
|
||
|
|
</div><h4 id='method.current_video_driver' class="method"><code id='current_video_driver.v'>pub fn <a href='#method.current_video_driver' class='fnname'>current_video_driver</a>(&self) -> &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></code><a class='srclink' href='../src/sdl2/video.rs.html#596-605' title='goto source code'>[src]</a></h4><h4 id='method.num_video_displays' class="method"><code id='num_video_displays.v'>pub fn <a href='#method.num_video_displays' class='fnname'>num_video_displays</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></code><a class='srclink' href='../src/sdl2/video.rs.html#607-614' title='goto source code'>[src]</a></h4><h4 id='method.display_name' class="method"><code id='display_name.v'>pub fn <a href='#method.display_name' class='fnname'>display_name</a>(&self, display_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></code><a class='srclink' href='../src/sdl2/video.rs.html#620-629' title='goto source code'>[src]</a></h4><div class='docblock'><p>Get the name of the display at the index <code>display_name</code>.</p>
|
||
|
|
<p>Will return an error if the index is out of bounds or if SDL experienced a failure; inspect
|
||
|
|
the returned string for further info.</p>
|
||
|
|
</div><h4 id='method.display_bounds' class="method"><code id='display_bounds.v'>pub fn <a href='#method.display_bounds' class='fnname'>display_bounds</a>(&self, display_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../sdl2/rect/struct.Rect.html" title="struct sdl2::rect::Rect">Rect</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></code><a class='srclink' href='../src/sdl2/video.rs.html#631-641' title='goto source code'>[src]</a></h4><h4 id='method.num_display_modes' class="method"><code id='num_display_modes.v'>pub fn <a href='#method.num_display_modes' class='fnname'>num_display_modes</a>(&self, display_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></code><a class='srclink' href='../src/sdl2/video.rs.html#643-650' title='goto source code'>[src]</a></h4><h4 id='method.display_mode' class="method"><code id='display_mode.v'>pub fn <a href='#method.display_mode' class='fnname'>display_mode</a>(<br> &self, <br> display_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>, <br> mode_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../sdl2/video/struct.DisplayMode.html" title="struct sdl2::video::DisplayMode">DisplayMode</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></code><a class='srclink' href='../src/sdl2/video.rs.html#652-662' title='goto source code'>[src]</a></h4><h4 id='method.desktop_display_mode' class="method"><code id='desktop_display_mode.v'>pub fn <a href='#method.desktop_display_mode' class='fnname'>desktop_display_mode</a>(<br> &self, <br> display_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../sdl2/video/struct.DisplayMode.html" title="struct sdl2::video::DisplayMode">DisplayMode</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></code><a class='srclink' href='../src/sdl2/video.rs.html#664-674' title='goto source code'>[src]</a></h4><h4 id='method.current_display_mode' class="method"><code id='current_display_mode.v'>pub fn <a href='#method.current_display_mode' class='fnname'>current_display_mode</a>(<br> &self, <br> display_index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../sdl2/video/struct.DisplayMode.html" title="struct sdl2::video::DisplayMode">DisplayMode</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&g
|
||
|
|
dots/pixels-per-inch of a display</p>
|
||
|
|
</div><h4 id='method.is_screen_saver_enabled' class="method"><code id='is_screen_saver_enabled.v'>pub fn <a href='#method.is_screen_saver_enabled' class='fnname'>is_screen_saver_enabled</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/sdl2/video.rs.html#716-718' title='goto source code'>[src]</a></h4><h4 id='method.enable_screen_saver' class="method"><code id='enable_screen_saver.v'>pub fn <a href='#method.enable_screen_saver' class='fnname'>enable_screen_saver</a>(&self)</code><a class='srclink' href='../src/sdl2/video.rs.html#720-722' title='goto source code'>[src]</a></h4><h4 id='method.disable_screen_saver' class="method"><code id='disable_screen_saver.v'>pub fn <a href='#method.disable_screen_saver' class='fnname'>disable_screen_saver</a>(&self)</code><a class='srclink' href='../src/sdl2/video.rs.html#724-726' title='goto source code'>[src]</a></h4><h4 id='method.gl_load_library_default' class="method"><code id='gl_load_library_default.v'>pub fn <a href='#method.gl_load_library_default' class='fnname'>gl_load_library_default</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></code><a class='srclink' href='../src/sdl2/video.rs.html#734-742' title='goto source code'>[src]</a></h4><div class='docblock'><p>Loads the default OpenGL library.</p>
|
||
|
|
<p>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.</p>
|
||
|
|
<p>If a different library is already loaded, this function will return an error.</p>
|
||
|
|
</div><h4 id='method.gl_load_library' class="method"><code id='gl_load_library.v'>pub fn <a href='#method.gl_load_library' class='fnname'>gl_load_library</a><P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="https://doc.rust-lang.org/nightly/std/path/struct.Path.html" title="struct std::path::Path">Path</a>>>(&self, path: P) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></code><a class='srclink' href='../src/sdl2/video.rs.html#750-760' title='goto source code'>[src]</a></h4><div class='docblock'><p>Loads the OpenGL library using a platform-dependent OpenGL library name (usually a file path).</p>
|
||
|
|
<p>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.</p>
|
||
|
|
<p>If a different library is already loaded, this function will return an error.</p>
|
||
|
|
</div><h4 id='method.gl_unload_library' class="method"><code id='gl_unload_library.v'>pub fn <a href='#method.gl_unload_library' class='fnname'>gl_unload_library</a>(&self)</code><a class='srclink' href='../src/sdl2/video.rs.html#766-768' title='goto source code'>[src]</a></h4><div class='docblock'><p>Unloads the current OpenGL library.</p>
|
||
|
|
<p>To completely unload the library, this should be called for every successful load of the
|
||
|
|
OpenGL library.</p>
|
||
|
|
</div><h4 id='method.gl_get_proc_address' class="method"><code id='gl_get_proc_address.v'>pub fn <a href='#method.gl_get_proc_address' class='fnname'>gl_get_proc_address</a>(&self, procname: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*const </a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></code><a class='srclink' href='../src/sdl2/video.rs.html#773-779' title='goto source code'>[src]</a></h4><div class='docblock'><p>Gets the pointer to the named OpenGL function.</p>
|
||
|
|
<p>This is useful for OpenGL wrappers such as <a href="https://github.com/bjz/gl-rs"><code>gl-rs</code></a>.</p>
|
||
|
|
</div><h4 id='method.gl_extension_supported' class="method"><code id='gl_extension_supported.v'>pub fn <a href='#method.gl_extension_supported' class='fnname'>gl_extension_supported</a>(&self, extension: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/sdl2/video.rs.html#781-787' title='goto source code'>[src]</a></h4><h4 id='method.gl_get_current_window_id' class="method"><code id='gl_get_current_window_id.v'>pub fn <a href='#method.gl_get_current_window_id' class='fnname'>gl_get_current_window_id</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></code><a class='srclink' href='../src/sdl2/video.rs.html#789-797' title='goto source code'>[src]</a></h4><h4 id='method.gl_release_current_context' class="method"><code id='gl_release_current_context.v'>pub fn <a href='#method.gl_release_current_context' class='fnname'>gl_release_current_context</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></code><a class='srclink' href='../src/sdl2/video.rs.html#800-808' title='goto source code'>[src]</a></h4><div class='docblock'><p>Releases the thread's current OpenGL context, i.e. sets the current OpenGL context to nothing.</p>
|
||
|
|
</div><h4 id='method.gl_set_swap_interval' class="method"><code id='gl_set_swap_interval.v'>pub fn <a href='#method.gl_set_swap_interval' class='fnname'>gl_set_swap_interval</a><S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../sdl2/video/enum.SwapInterval.html" title="enum sdl2::video::SwapInterval">SwapInterval</a>>>(<br> &self, <br> interval: S<br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></code><a class='srclink' href='../src/sdl2/video.rs.html#810-817' title='goto source code'>[src]</a></h4><h4 id='method.gl_get_swap_interval' class="method"><code id='gl_get_swap_interval.v'>pub fn <a href='#method.gl_get_swap_interval' class='fnname'>gl_get_swap_interval</a>(&self) -> <a class="enum" href="../sdl2/video/enum.SwapInterval.html" title="enum sdl2::video::SwapInterval">SwapInterval</a></code><a class='srclink' href='../src/sdl2/video.rs.html#819-825' title='goto source code'>[src]</a></h4><h4 id='method.vulkan_load_library_default' class="method"><code id='vulkan_load_library_default.v'>pub fn <a href='#method.vulkan_load_library_default' class='fnname'>vulkan_load_library_default</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></code><a class='srclink' href='../src/sdl2/video.rs.html#833-841' title='goto source code'>[src]</a></h4><div class='docblock'><p>Loads the default Vulkan library.</p>
|
||
|
|
<p>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.</p>
|
||
|
|
<p>If a different library is already loaded, this function will return an error.</p>
|
||
|
|
</div><h4 id='method.vulkan_load_library' class="method"><code id='vulkan_load_library.v'>pub fn <a href='#method.vulkan_load_library' class='fnname'>vulkan_load_library</a><P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="https://doc.rust-lang.org/nightly/std/path/struct.Path.html" title="struct std::path::Path">Path</a>>>(&self, path: P) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></code><a class='srclink' href='../src/sdl2/video.rs.html#849-859' title='goto source code'>[src]</a></h4><div class='docblock'><p>Loads the Vulkan library using a platform-dependent Vulkan library name (usually a file path).</p>
|
||
|
|
<p>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.</p>
|
||
|
|
<p>If a different library is already loaded, this function will return an error.</p>
|
||
|
|
</div><h4 id='method.vulkan_unload_library' class="method"><code id='vulkan_unload_library.v'>pub fn <a href='#method.vulkan_unload_library' class='fnname'>vulkan_unload_library</a>(&self)</code><a class='srclink' href='../src/sdl2/video.rs.html#865-867' title='goto source code'>[src]</a></h4><div class='docblock'><p>Unloads the current Vulkan library.</p>
|
||
|
|
<p>To completely unload the library, this should be called for every successful load of the
|
||
|
|
Vulkan library.</p>
|
||
|
|
</div><h4 id='method.vulkan_get_proc_address_function' class="method"><code id='vulkan_get_proc_address_function.v'>pub fn <a href='#method.vulkan_get_proc_address_function' class='fnname'>vulkan_get_proc_address_function</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*const </a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></code><a class='srclink' href='../src/sdl2/video.rs.html#873-880' title='goto source code'>[src]</a></h4><div class='docblock'><p>Gets the pointer to the
|
||
|
|
<a href="https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetInstanceProcAddr.html"><code>vkGetInstanceProcAddr</code></a>
|
||
|
|
Vulkan function. This function can be called to retrieve the address of other Vulkan
|
||
|
|
functions.</p>
|
||
|
|
</div></div><h3 id='impl-4' class='impl'><code class='in-band'>impl <a class="struct" href="../sdl2/struct.VideoSubsystem.html" title="struct sdl2::VideoSubsystem">VideoSubsystem</a></code><a href='#impl-4' class='anchor'></a><a class='srclink' href='../src/sdl2/sdl.rs.html#188-194' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.sdl' class="method"><code id='sdl.v'>pub fn <a href='#method.sdl' class='fnname'>sdl</a>(&self) -> <a class="struct" href="../sdl2/struct.Sdl.html" title="struct sdl2::Sdl">Sdl</a></code><a class='srclink' href='../src/sdl2/sdl.rs.html#191-193' title='goto source code'>[src]</a></h4><div class='docblock'><p>Obtain an SDL context.</p>
|
||
|
|
</div></div><h2 id='implementations' class='small-section-header'>Trait Implementations<a href='#implementations' class='anchor'></a></h2><div id='implementations-list'><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../sdl2/struct.VideoSubsystem.html" title="struct sdl2::VideoSubsystem">VideoSubsystem</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../src/sdl2/sdl.rs.html#181' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code id='clone.v'>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class="struct" href="../sdl2/struct.VideoSubsystem.html" title="struct sdl2::VideoSubsystem">VideoSubsystem</a></code><a class='srclink' href='../src/sdl2/sdl.rs.html#181' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||
|
|
</div><h4 id='method.clone_from' class="method hidden"><code id='clone_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#131-133' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||
|
|
</div></div><h3 id='impl-Debug' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../sdl2/struct.VideoSubsystem.html" title="struct sdl2::VideoSubsystem">VideoSubsystem</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../src/sdl2/sdl.rs.html#181' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code id='fmt.v'>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../src/sdl2/sdl.rs.html#181' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||
|
|
</div></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../sdl2/struct.VideoSubsystem.html" title="struct sdl2::VideoSubsystem">VideoSubsystem</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Send' class='impl'><code class='in-band'>impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../sdl2/struct.VideoSubsystem.html" title="struct sdl2::VideoSubsystem">VideoSubsystem</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../sdl2/struct.VideoSubsystem.html" title="struct sdl2::VideoSubsystem">VideoSubsystem</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../sdl2/struct.VideoSubsystem.html" title="struct sdl2::VideoSubsystem">VideoSubsystem</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../sdl2/struct.VideoSubsystem.html" title="struct sdl2::VideoSubsystem">VideoSubsystem</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Any' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code id='type_id.v'>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||
|
|
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-217' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code id='borrow.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214-216' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||
|
|
</div></div><h3 id='impl-BorrowMut%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#220-224' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code id='borrow_mut.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#221-223' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||
|
|
</div></div><h3 id='impl-From%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href='#impl-From%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#565-569' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method hidden"><code id='from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(t: T) -> T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#566-568' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
|
|
</div></div><h3 id='impl-Into%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href='#impl-Into%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#554-561' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.into' class="method hidden"><code id='into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into' class='fnname'>into</a>(self) -> U</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#558-560' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
|
|
</div></div><h3 id='impl-ToOwned' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></code><a href='#impl-ToOwned' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#80-92' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Owned' class="type"><code id='Owned.t'>type <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned' class="type">Owned</a> = T</code></h4><div class='docblock'><p>The resulting type after obtaining ownership.</p>
|
||
|
|
</div><h4 id='method.to_owned' class="method hidden"><code id='to_owned.v'>fn <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned' class='fnname'>to_owned</a>(&self) -> T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#85-87' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p>
|
||
|
|
</div><h4 id='method.clone_into' class="method hidden"><code id='clone_into.v'>fn <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into' class='fnname'>clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T)</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#89-91' title='goto source code'>[src]</a></h4><div class='stability hidden'><div class='stab unstable'><details><summary><span class='emoji'>🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</summary><p>recently added</p>
|
||
|
|
</details></div></div><div class='docblock hidden'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p>
|
||
|
|
</div></div><h3 id='impl-TryFrom%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></code><a href='#impl-TryFrom%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#602-611' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error' class="type"><code id='Error.t'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||
|
|
</div><h4 id='method.try_from' class="method hidden"><code id='try_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#608-610' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
|
|
</div></div><h3 id='impl-TryInto%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><a href='#impl-TryInto%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#588-597' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-1' class="type"><code id='Error.t-1'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error' class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||
|
|
</div><h4 id='method.try_into' class="method hidden"><code id='try_into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into' class='fnname'>try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#594-596' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
|
|
</div></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "sdl2";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|