sdl2 1.3.0 → 1.3.1
raw patch · 4 files changed
+76/−4 lines, 4 files
Files
- ChangeLog.md +70/−0
- Graphics/UI/SDL/Types.hsc +2/−1
- Graphics/UI/SDL/Video.hs +2/−2
- sdl2.cabal +2/−1
+ ChangeLog.md view
@@ -0,0 +1,70 @@+1.3.1+=====+* Correct type signature of `getSurfaceBlendMode`++1.3.0+=====+* Use pattern synonyms exclusively+ * `Graphics.UI.SDL.Enum.Pattern` overrides `Graphics.UI.SDL.Enum`+* Generalize all IO functions over MonadIO+* Add convenience wrapper functions for constructing FunPtr callbacks+* Add Typeable instances to all type classes+* Add strictness annotations to all data structure fields+* Add missing `SDLK_AUDIOPREV` enumeration+* Correct deserialization of `SDL_TEXTINPUT` event+ * Data beyond the null terminator was returned previously++1.2.0+=====+* Add support for pattern synonyms as an alternative for SDL enumerations+ * Only present when compiling with GHC 7.8 or newer+* Add missing enumerations:+ * `keymodShift`, `keymodCtrl`, `keymodAlt`, `keymodGUI`+ * `keyPressend`, `keyReleased`+ * `toucheMouseID`+* Specialize init flags over `InitFlag`, a `Word32`+* Generalize `keymod*` enumerations over `Num`+ * The C API is inconsistent on their types+* Fix foreign imports on `Graphics.UI.SDL.Thread`+* Correct type signature of `getRenderDrawBlendMode`+* Correct type signature of `queryTexture`+* Remove export of `Keycode` from `Graphics.UI.SDL.Types`+ * `Graphics.UI.SDL.Enum` already exports `Keycode`++1.1.3+=====+* Add missing `Keycode` enumerations+* Add missing enumerations:+ * `audioAllowFrequencyChange`, `audioAllowFormatChange`+ * `audioAllowChannelsChange`, `audioAllowAnyChange`++1.1.2+=====+* Add `ClipboardUpdateEvent` to `Event` data structure+* Add `UnknownEvent` to `Event` data structure++1.1.1+=====+* Add `Graphics.UI.SDL.Platform` module+* Add `Graphics.UI.SDL.Thread` module and associated types and enumerations+* Add `getWindowWMInfo`+* Add `setError`+* Add additional logging functions++1.1.0+=====+* Require SDL 2.0.3+ * Add `gameControllerAddMappingsFromFile`+ * Add `gameControllerAddMappingsFromRW`+ * Add `glResetAttributes`+ * Add `mouseButtonEventClicks` field to `WindowEvent`+* Add missing mouse button enumerations++1.0.2+=====+* Correct type signature of `getNumTouchFingers`++1.0.1+=====+* Factor type of `addHintCallback` and `delHintCallback` into `HintCallback`+* Add `Version` data structure
Graphics/UI/SDL/Types.hsc view
@@ -480,7 +480,8 @@ (#const SDL_TEXTINPUT) -> do wid <- (#peek SDL_Event, text.windowID) ptr text <- peekArray (#const SDL_TEXTINPUTEVENT_TEXT_SIZE) $ (#ptr SDL_Event, text.text) ptr- return $! TextInputEvent typ timestamp wid text+ let upToNull = takeWhile (/= 0) text+ return $! TextInputEvent typ timestamp wid upToNull (#const SDL_MOUSEMOTION) -> do wid <- (#peek SDL_Event, motion.windowID) ptr which <- (#peek SDL_Event, motion.which) ptr
Graphics/UI/SDL/Video.hs view
@@ -366,7 +366,7 @@ foreign import ccall "SDL.h SDL_GetClipRect" getClipRect' :: Ptr Surface -> Ptr Rect -> IO () foreign import ccall "SDL.h SDL_GetColorKey" getColorKey' :: Ptr Surface -> Ptr Word32 -> IO CInt foreign import ccall "SDL.h SDL_GetSurfaceAlphaMod" getSurfaceAlphaMod' :: Ptr Surface -> Ptr Word8 -> IO CInt-foreign import ccall "SDL.h SDL_GetSurfaceBlendMode" getSurfaceBlendMode' :: Ptr Surface -> BlendMode -> IO CInt+foreign import ccall "SDL.h SDL_GetSurfaceBlendMode" getSurfaceBlendMode' :: Ptr Surface -> Ptr BlendMode -> IO CInt foreign import ccall "SDL.h SDL_GetSurfaceColorMod" getSurfaceColorMod' :: Ptr Surface -> Ptr Word8 -> Ptr Word8 -> Ptr Word8 -> IO CInt foreign import ccall "SDL.h SDL_LoadBMP_RW" loadBMP_RW' :: Ptr RWops -> CInt -> IO (Ptr Surface) foreign import ccall "SDL.h SDL_LockSurface" lockSurface' :: Ptr Surface -> IO CInt@@ -1024,7 +1024,7 @@ getSurfaceAlphaMod v1 v2 = liftIO $ getSurfaceAlphaMod' v1 v2 {-# INLINE getSurfaceAlphaMod #-} -getSurfaceBlendMode :: MonadIO m => Ptr Surface -> BlendMode -> m CInt+getSurfaceBlendMode :: MonadIO m => Ptr Surface -> Ptr BlendMode -> m CInt getSurfaceBlendMode v1 v2 = liftIO $ getSurfaceBlendMode' v1 v2 {-# INLINE getSurfaceBlendMode #-}
sdl2.cabal view
@@ -1,5 +1,5 @@ name: sdl2-version: 1.3.0+version: 1.3.1 synopsis: Low-level bindings to SDL2 description: Low-level bindings to the SDL2 library, version 2.0.3. license: BSD3@@ -12,6 +12,7 @@ cabal-version: >= 1.10 extra-source-files:+ ChangeLog.md, cbits/sdlhelper.c, include/sdlhelper.h