sdl2 1.1.1 → 1.1.2
raw patch · 2 files changed
+27/−2 lines, 2 files
Files
- Graphics/UI/SDL/Types.hsc +17/−1
- sdl2.cabal +10/−1
Graphics/UI/SDL/Types.hsc view
@@ -399,6 +399,14 @@ , eventTimestamp :: Word32 , dropEventFile :: CString }+ | ClipboardUpdateEvent {+ eventType :: Word32+ , eventTimestamp :: Word32+ }+ | UnknownEvent {+ eventType :: Word32+ , eventTimestamp :: Word32+ } deriving (Eq, Show) instance Storable Event where@@ -491,6 +499,8 @@ y <- (#peek SDL_Event, mgesture.y) ptr numFingers <- (#peek SDL_Event, mgesture.numFingers) ptr return $! MultiGestureEvent typ timestamp touchId dTheta dDist x y numFingers+ (#const SDL_CLIPBOARDUPDATE) ->+ return $! ClipboardUpdateEvent typ timestamp (#const SDL_DROPFILE) -> do file <- (#peek SDL_Event, drop.file) ptr return $! DropEvent typ timestamp file@@ -500,7 +510,7 @@ data1 <- (#peek SDL_Event, user.data1) ptr data2 <- (#peek SDL_Event, user.data2) ptr return $! UserEvent typ timestamp wid code data1 data2- _ -> error $ "Unknown type " ++ show typ ++ " for SDL_Event"+ _ -> return $! UnknownEvent typ timestamp where key f = do wid <- (#peek SDL_Event, key.windowID) ptr@@ -698,10 +708,16 @@ (#poke SDL_Event, dgesture.error) ptr err (#poke SDL_Event, dgesture.x) ptr x (#poke SDL_Event, dgesture.y) ptr y+ ClipboardUpdateEvent typ timestamp -> do+ (#poke SDL_Event, common.type) ptr typ+ (#poke SDL_Event, common.timestamp) ptr timestamp DropEvent typ timestamp file -> do (#poke SDL_Event, common.type) ptr typ (#poke SDL_Event, common.timestamp) ptr timestamp (#poke SDL_Event, drop.file) ptr file+ UnknownEvent typ timestamp -> do+ (#poke SDL_Event, common.type) ptr typ+ (#poke SDL_Event, common.timestamp) ptr timestamp data Finger = Finger { fingerID :: FingerID
sdl2.cabal view
@@ -1,5 +1,5 @@ name: sdl2-version: 1.1.1+version: 1.1.2 synopsis: Low-level bindings to SDL2 description: Low-level bindings to the SDL2 library, version 2.0.3. license: BSD3@@ -14,6 +14,15 @@ extra-source-files: cbits/sdlhelper.c, include/sdlhelper.h++source-repository head+ type: git+ location: git://github.com/polarina/sdl2.git++source-repository this+ type: git+ location: git://github.com/polarina/sdl2.git+ tag: v1.1.2 library ghc-options: -Wall