@@ -32,6 +32,7 @@ module SDL.Raw.Video (
32
32
getDisplayDPI ,
33
33
getDisplayMode ,
34
34
getDisplayName ,
35
+ getDisplayUsableBounds ,
35
36
getGrabbedWindow ,
36
37
getNumDisplayModes ,
37
38
getNumVideoDisplays ,
@@ -82,6 +83,7 @@ module SDL.Raw.Video (
82
83
videoQuit ,
83
84
84
85
-- * 2D Accelerated Rendering
86
+ composeCustomBlendMode ,
85
87
createRenderer ,
86
88
createSoftwareRenderer ,
87
89
createTexture ,
@@ -248,12 +250,13 @@ foreign import ccall "SDL.h SDL_GetDisplayBounds" getDisplayBoundsFFI :: CInt ->
248
250
foreign import ccall " SDL.h SDL_GetDisplayDPI" getDisplayDPIFFI :: CInt -> Ptr CFloat -> Ptr CFloat -> Ptr CFloat -> IO CInt
249
251
foreign import ccall " SDL.h SDL_GetDisplayMode" getDisplayModeFFI :: CInt -> CInt -> Ptr DisplayMode -> IO CInt
250
252
foreign import ccall " SDL.h SDL_GetDisplayName" getDisplayNameFFI :: CInt -> IO CString
253
+ foreign import ccall " SDL.h SDL_GetDisplayUsableBounds" getDisplayUsableBoundsFFI :: CInt -> Ptr Rect -> IO CInt
251
254
foreign import ccall " SDL.h SDL_GetGrabbedWindow" getGrabbedWindowFFI :: IO Window
252
255
foreign import ccall " SDL.h SDL_GetNumDisplayModes" getNumDisplayModesFFI :: CInt -> IO CInt
253
256
foreign import ccall " SDL.h SDL_GetNumVideoDisplays" getNumVideoDisplaysFFI :: IO CInt
254
257
foreign import ccall " SDL.h SDL_GetNumVideoDrivers" getNumVideoDriversFFI :: IO CInt
255
258
foreign 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
257
260
foreign import ccall " SDL.h SDL_GetWindowBrightness" getWindowBrightnessFFI :: Window -> IO CFloat
258
261
foreign import ccall " SDL.h SDL_GetWindowData" getWindowDataFFI :: Window -> CString -> IO (Ptr () )
259
262
foreign import ccall " SDL.h SDL_GetWindowDisplayIndex" getWindowDisplayIndexFFI :: Window -> IO CInt
@@ -297,6 +300,7 @@ foreign import ccall "SDL.h SDL_UpdateWindowSurfaceRects" updateWindowSurfaceRec
297
300
foreign import ccall " SDL.h SDL_VideoInit" videoInitFFI :: CString -> IO CInt
298
301
foreign import ccall " SDL.h SDL_VideoQuit" videoQuitFFI :: IO ()
299
302
303
+ foreign import ccall " SDL.h SDL_ComposeCustomBlendMode" composeCustomBlendModeFFI :: BlendFactor -> BlendFactor -> BlendOperation -> BlendFactor -> BlendFactor -> BlendOperation -> IO BlendMode
300
304
foreign import ccall " SDL.h SDL_CreateRenderer" createRendererFFI :: Window -> CInt -> Word32 -> IO Renderer
301
305
foreign import ccall " SDL.h SDL_CreateSoftwareRenderer" createSoftwareRendererFFI :: Ptr Surface -> IO Renderer
302
306
foreign import ccall " SDL.h SDL_CreateTexture" createTextureFFI :: Renderer -> Word32 -> CInt -> CInt -> CInt -> IO Texture
@@ -541,6 +545,10 @@ getDisplayName :: MonadIO m => CInt -> m CString
541
545
getDisplayName v1 = liftIO $ getDisplayNameFFI v1
542
546
{-# INLINE getDisplayName #-}
543
547
548
+ getDisplayUsableBounds :: MonadIO m => CInt -> Ptr Rect -> m CInt
549
+ getDisplayUsableBounds v1 v2 = liftIO $ getDisplayUsableBoundsFFI v1 v2
550
+ {-# INLINE getDisplayUsableBounds #-}
551
+
544
552
getGrabbedWindow :: MonadIO m => m Window
545
553
getGrabbedWindow = liftIO getGrabbedWindowFFI
546
554
{-# INLINE getGrabbedWindow #-}
@@ -561,6 +569,10 @@ getVideoDriver :: MonadIO m => CInt -> m CString
561
569
getVideoDriver v1 = liftIO $ getVideoDriverFFI v1
562
570
{-# INLINE getVideoDriver #-}
563
571
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
+
564
576
getWindowBrightness :: MonadIO m => Window -> m CFloat
565
577
getWindowBrightness v1 = liftIO $ getWindowBrightnessFFI v1
566
578
{-# INLINE getWindowBrightness #-}
@@ -729,6 +741,10 @@ videoQuit :: MonadIO m => m ()
729
741
videoQuit = liftIO videoQuitFFI
730
742
{-# INLINE videoQuit #-}
731
743
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
+
732
748
createRenderer :: MonadIO m => Window -> CInt -> Word32 -> m Renderer
733
749
createRenderer v1 v2 v3 = liftIO $ createRendererFFI v1 v2 v3
734
750
{-# INLINE createRenderer #-}
0 commit comments