@@ -32,6 +32,7 @@ module SDL.Raw.Video (
3232 getDisplayDPI ,
3333 getDisplayMode ,
3434 getDisplayName ,
35+ getDisplayUsableBounds ,
3536 getGrabbedWindow ,
3637 getNumDisplayModes ,
3738 getNumVideoDisplays ,
@@ -82,6 +83,7 @@ module SDL.Raw.Video (
8283 videoQuit ,
8384
8485 -- * 2D Accelerated Rendering
86+ composeCustomBlendMode ,
8587 createRenderer ,
8688 createSoftwareRenderer ,
8789 createTexture ,
@@ -248,12 +250,13 @@ foreign import ccall "SDL.h SDL_GetDisplayBounds" getDisplayBoundsFFI :: CInt ->
248250foreign import ccall " SDL.h SDL_GetDisplayDPI" getDisplayDPIFFI :: CInt -> Ptr CFloat -> Ptr CFloat -> Ptr CFloat -> IO CInt
249251foreign import ccall " SDL.h SDL_GetDisplayMode" getDisplayModeFFI :: CInt -> CInt -> Ptr DisplayMode -> IO CInt
250252foreign import ccall " SDL.h SDL_GetDisplayName" getDisplayNameFFI :: CInt -> IO CString
253+ foreign import ccall " SDL.h SDL_GetDisplayUsableBounds" getDisplayUsableBoundsFFI :: CInt -> Ptr Rect -> IO CInt
251254foreign import ccall " SDL.h SDL_GetGrabbedWindow" getGrabbedWindowFFI :: IO Window
252255foreign import ccall " SDL.h SDL_GetNumDisplayModes" getNumDisplayModesFFI :: CInt -> IO CInt
253256foreign import ccall " SDL.h SDL_GetNumVideoDisplays" getNumVideoDisplaysFFI :: IO CInt
254257foreign import ccall " SDL.h SDL_GetNumVideoDrivers" getNumVideoDriversFFI :: IO CInt
255258foreign import ccall " SDL.h SDL_GetVideoDriver" getVideoDriverFFI :: CInt -> IO CString
256- foreign import ccall " SDL.h SDL_GetWindowBordersSize" getWindowBordersSize :: Window -> Ptr CInt -> Ptr CInt -> Ptr CInt -> Ptr CInt -> IO CInt
259+ foreign import ccall " SDL.h SDL_GetWindowBordersSize" getWindowBordersSizeFFI :: Window -> Ptr CInt -> Ptr CInt -> Ptr CInt -> Ptr CInt -> IO CInt
257260foreign import ccall " SDL.h SDL_GetWindowBrightness" getWindowBrightnessFFI :: Window -> IO CFloat
258261foreign import ccall " SDL.h SDL_GetWindowData" getWindowDataFFI :: Window -> CString -> IO (Ptr () )
259262foreign import ccall " SDL.h SDL_GetWindowDisplayIndex" getWindowDisplayIndexFFI :: Window -> IO CInt
@@ -297,6 +300,7 @@ foreign import ccall "SDL.h SDL_UpdateWindowSurfaceRects" updateWindowSurfaceRec
297300foreign import ccall " SDL.h SDL_VideoInit" videoInitFFI :: CString -> IO CInt
298301foreign import ccall " SDL.h SDL_VideoQuit" videoQuitFFI :: IO ()
299302
303+ foreign import ccall " SDL.h SDL_ComposeCustomBlendMode" composeCustomBlendModeFFI :: BlendFactor -> BlendFactor -> BlendOperation -> BlendFactor -> BlendFactor -> BlendOperation -> IO BlendMode
300304foreign import ccall " SDL.h SDL_CreateRenderer" createRendererFFI :: Window -> CInt -> Word32 -> IO Renderer
301305foreign import ccall " SDL.h SDL_CreateSoftwareRenderer" createSoftwareRendererFFI :: Ptr Surface -> IO Renderer
302306foreign import ccall " SDL.h SDL_CreateTexture" createTextureFFI :: Renderer -> Word32 -> CInt -> CInt -> CInt -> IO Texture
@@ -541,6 +545,10 @@ getDisplayName :: MonadIO m => CInt -> m CString
541545getDisplayName v1 = liftIO $ getDisplayNameFFI v1
542546{-# INLINE getDisplayName #-}
543547
548+ getDisplayUsableBounds :: MonadIO m => CInt -> Ptr Rect -> m CInt
549+ getDisplayUsableBounds v1 v2 = liftIO $ getDisplayUsableBoundsFFI v1 v2
550+ {-# INLINE getDisplayUsableBounds #-}
551+
544552getGrabbedWindow :: MonadIO m => m Window
545553getGrabbedWindow = liftIO getGrabbedWindowFFI
546554{-# INLINE getGrabbedWindow #-}
@@ -561,6 +569,10 @@ getVideoDriver :: MonadIO m => CInt -> m CString
561569getVideoDriver v1 = liftIO $ getVideoDriverFFI v1
562570{-# INLINE getVideoDriver #-}
563571
572+ getWindowBordersSize :: MonadIO m => Window -> Ptr CInt -> Ptr CInt -> Ptr CInt -> Ptr CInt -> m CInt
573+ getWindowBordersSize v1 v2 v3 v4 v5 = liftIO $ getWindowBordersSizeFFI v1 v2 v3 v4 v5
574+ {-# INLINE getWindowBordersSize #-}
575+
564576getWindowBrightness :: MonadIO m => Window -> m CFloat
565577getWindowBrightness v1 = liftIO $ getWindowBrightnessFFI v1
566578{-# INLINE getWindowBrightness #-}
@@ -729,6 +741,10 @@ videoQuit :: MonadIO m => m ()
729741videoQuit = liftIO videoQuitFFI
730742{-# INLINE videoQuit #-}
731743
744+ composeCustomBlendMode :: MonadIO m => BlendFactor -> BlendFactor -> BlendOperation -> BlendFactor -> BlendFactor -> BlendOperation -> m BlendMode
745+ composeCustomBlendMode v1 v2 v3 v4 v5 v6 = liftIO $ composeCustomBlendModeFFI v1 v2 v3 v4 v5 v6
746+ {-# INLINE composeCustomBlendMode #-}
747+
732748createRenderer :: MonadIO m => Window -> CInt -> Word32 -> m Renderer
733749createRenderer v1 v2 v3 = liftIO $ createRendererFFI v1 v2 v3
734750{-# INLINE createRenderer #-}
0 commit comments