This package contains bindings to the SDL 2 library, in both high- and
low-level forms:
The SDL namespace contains high-level bindings, where enumerations are split
into sum types, and we perform automatic error-checking.
The SDL.Raw namespace contains an almost 1-1 translation of the C API into
Haskell FFI calls. As such, this does not contain sum types nor error
checking. Thus this namespace is suitable for building your own abstraction
over SDL, but is not recommended for day-to-day programming.
Changes
2.1.1
SDL.Input.Mouse new has a new API for fetching the location of the mouse. This
API gives you greater control over finding the mouse position with respect to the
various “modes” a mouse can be in. The old API still exists, but will be removed
at some point in the future.
SDL.Raw now has a binding to SDL_free.
2.1.0
Introduce initializeAll and deprecate InitEverything. To fix this deprecation
warning, change initialize [InitEverything] to initializeAll.
surfaceColorKey, surfaceFillRect and surfaceFillRects now all operate on
on RGBA V4 Word8 values. They all implicitly map and unmap (using SDL_MapRGBA
and SDL_GetRGBA respectively).
SDL.mapRGB is now deprecated, as this conversion is always done for you.
If you still need this routine, use SDL.Raw.mapRGB.
Fix a runtime crash when reading the current BlendMode of a texture. Thanks to
@seppeljordan for discovering and fixing this bug.
2.0.0
Introduce a set of comprehensive high-level bindings to SDL. These bindings
should allow users to work with SDL while writing idiomatic Haskell code. They
take care of pointer manipulation, and wrap up values in much more “natural”
data types. The high-level bindings live in the SDL namespace, and have been
extensively documented.
Raw bindings have been moved from Graphics.UI.SDL to SDL.Raw.