Crate fermium[−][src]
Bindings to the SDL2 C library.
This crate bundles a copy of the SDL2 source code and builds it
automatically via build.rs
. No special setup is required on your part.
Building SDL2 takes about a minute on an average development machine, so the “first time” compilation of this crate can seem quite slow.
Crate Features
cargo_check
: This causes the crate to skip building SDL2 entirely. This allows thecargo check
command (and similar commands that don’t build an executable, such ascargo doc
) to execute much faster.
Modules
audio | Audio playback. |
blendmode | Support module for pixel blending. |
clipboard | Interact with the system clipboard. |
cpuinfo | Get some useful info about the current CPU. |
error | SDL uses a thread-local buffer to store the current error string. |
events | Module for event handling. |
filesystem | Filesystem helper functions. |
gamecontroller | The SDL “game controller” API lets you view any joystick as being (approximately) an XBox 360 controller. |
gesture | Module for touch gestures. |
hints | SDL configuration variables |
joystick | Module for SDL joystick event handling. |
keyboard | Interactions with the keyboard. |
keycode | Logical key mappings (changes by locale). |
loadso | Module for loading “shared objects” (aka dynamic libraries / DLLs). |
messagebox | Allows the creation of message boxes, for short messages to the user. |
mouse | Mouse control and interaction. |
pixels | Module for pixel editing. |
platform | Platform based functions. |
power | Lets you get power info about the system. |
prelude | This is a module that re-exports every sub-module of the crate. |
quit | Quit stuff. |
rect | Operations for SDL’s rectangle type. |
renderer | SDL’s portable 2D rendering functions. |
rwops | Allows for interaction with things you can read and write from. |
scancode | Physical key mappings (ignores locale). |
sensor | Lets SDL use various sensors (such as the accelerometer in a phone). |
stdinc | The “standard include” which almost every other include tends to use. |
surface | Module for SDL’s in-memory bitmap type. |
syswm | SDL’s custom system window manager hooks. |
timer | Timer related functionality. |
touch | Module for touch interface interactions. |
version | Lets you get info about the runtime SDL version. |
video | Module for interacting with the video subsystem. |
vulkan | Functions to make Vulkan and SDL work together. |
Structs
SDL_InitFlags | SDL2’s initialization flags. |
Enums
c_void | Equivalent to C’s |
Constants
SDL_INIT_AUDIO | |
SDL_INIT_EVENTS | |
SDL_INIT_EVERYTHING | |
SDL_INIT_GAMECONTROLLER |
|
SDL_INIT_HAPTIC | |
SDL_INIT_JOYSTICK |
|
SDL_INIT_NOPARACHUTE | compatibility; this flag is ignored. |
SDL_INIT_SENSOR | |
SDL_INIT_TIMER | |
SDL_INIT_VIDEO |
|
Functions
SDL_Init⚠ | This function initializes the subsystems specified by |
SDL_InitSubSystem⚠ | This function initializes specific SDL subsystems |
SDL_Quit⚠ | This function cleans up all initialized subsystems. |
SDL_QuitSubSystem⚠ | This function cleans up specific SDL subsystems. |
SDL_WasInit⚠ | This function returns a mask of the specified subsystems which have previously been initialized. |
Type Definitions
c_char | |
c_double | |
c_float | |
c_int | |
c_long | |
c_longlong | |
c_schar | |
c_short | |
c_uchar | |
c_uint | |
c_ulong | |
c_ulonglong | |
c_ushort |