Struct rich_sdl2_rust::Sdl
source · pub struct Sdl { /* private fields */ }
Expand description
A root controller for SDL2. But some sub-feature does not require Sdl
.
Implementations§
source§impl Sdl
impl Sdl
sourcepub fn new() -> Self
pub fn new() -> Self
Setup the SDL2 system.
Panics
Panics if SDL2 system is already initialized such as there are existing Sdl
instances
sourcepub fn version() -> SdlVersion
pub fn version() -> SdlVersion
Returns the version of SDL2.
sourcepub fn revision_str() -> &'static str
pub fn revision_str() -> &'static str
Returns the revision string.
sourcepub fn revision_num() -> u32
pub fn revision_num() -> u32
Returns the revision number.
sourcepub fn error_then_panic(context: &'static str) -> !
pub fn error_then_panic(context: &'static str) -> !
On an unrecoverable error detected, panics with the provided context
.