[−][src]Crate fermium
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
dynamic_link
: This causes SDL2 to be dynamically linked instead of statically linked. This is of little value, except that your final binary will be slightly smaller. If you're very sure that the end user will already have SDL2 available on their system and you really want to save the space then you can enable this.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. |
Enums
c_void | Equivalent to C's |
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 |