Crate rich_sdl2_rust

Source
Expand description

§rich-sdl2-rust

The rich-sdl2-rust provides wrapper for SDL2 and abstractions of that APIs, audio, window, EventBox and so on.

§Supported SDL versions

This crate works with libraries:

  • SDL 2.26.2 or later,
  • SDL_ttf 2.20.1 or later (on ttf feature),
  • SDL_mixer 2.6.2 or later (on mixer feature),
  • SDL_image 2.6.2 or later (on image feature),
  • SDL_net 2.2.0 or later (on net feature).

§Module Navigation

§Crate features

  • vulkan: The Vulkan support API wrapper.
  • nightly: The features can be used on nightly.
    • simd_allocator: The wrapper of SIMD-friendly allocator.

Re-exports§

pub use event::app;
pub use event::EventBox;

Modules§

audio
Provides audio device control, configuration, wav format utilities and so on.
clipboard
Clipboard controls.
color
Color managements for graphics.
display
Querying display information.
event
SDL2 event system and handlers.
file
A file handing on SDL2.
gamma_ramp
A gamma ramp for display color management.
geo
Geometry structures such as Point, Size, Rect and so on.
gl_context
OpenGL contexts and attributes.
haptic
Haptic devices, which give the players to feedback by some force.
hint
Getting/setting hints for SDL2 features working.
metal
Metal API support in SDL2.
performance
A counter for performance analysis.
power
System power monitoring.
renderer
Renderer for a window, to render some geometries or query driver information.
screen_saver
Screen saving that allows the screen to be blanked by a screen saver.
surface
Surface, providing flexible modification for the pixels.
system
Querying some system information.
texture
Texture used to draw the image to Renderer.
window
Window managements, graphics and mouse controls.

Structs§

Sdl
A root controller for SDL2. But some sub-feature does not require Sdl.
SdlVersion
A version for SDL2.
Ticks
An elapsed time from when SDL2 has initialized. Please note that the value formed 32-bit, overflowing after about 49 days.
Timer
A timer invokes a TimerCallback with the interval.
Video
A video controller by SDL2.

Enums§

SdlError
An error occurred from SDL2.

Traits§

TimerCallback
A callback for Timer, that returns an interval for next calling.

Functions§

delay
Stops the current thread for ms milliseconds, then returns.

Type Aliases§

Result
A specialized std::result::Result type for this crate.