{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE NoFieldSelectors #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_HADDOCK prune #-}
module SDL3.Sys.Bindgen.SurfaceShims.Unsafe (
SDL3.Sys.Bindgen.SurfaceShims.Unsafe.lithon_SDL_MUSTLOCK,
)
where
import Prelude (IO, fmap)
import HsBindgen.Runtime.Support qualified as BG
import HsBindgen.Runtime.Support.CAPI qualified
import SDL3.Sys.Bindgen.Surface qualified
$( HsBindgen.Runtime.Support.CAPI.addCSource
( HsBindgen.Runtime.Support.CAPI.unlines
[ "#define SDL_MAIN_HANDLED"
, "#define SDL_SLOW_MEMCPY"
, "#define SDL_SLOW_MEMMOVE"
, "#define SDL_SLOW_MEMSET"
, "#include <sdl3-bindgen-sys/SDL_surface_shims.h>"
, "_Bool hs_bindgen_6f4ecedfb53f9a9e ("
, " SDL_Surface *arg1"
, ")"
, "{"
, " return (lithon_SDL_MUSTLOCK)(arg1);"
, "}"
]
)
)
foreign import ccall unsafe "hs_bindgen_6f4ecedfb53f9a9e"
hs_bindgen_6f4ecedfb53f9a9e_base
:: BG.Ptr BG.Void
-> IO BG.CBool
hs_bindgen_6f4ecedfb53f9a9e
:: BG.Ptr SDL3.Sys.Bindgen.Surface.SDL_Surface
-> IO BG.CBool
hs_bindgen_6f4ecedfb53f9a9e :: Ptr SDL_Surface -> IO CBool
hs_bindgen_6f4ecedfb53f9a9e =
\Ptr SDL_Surface
x0 ->
(CBool -> CBool) -> IO CBool -> IO CBool
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap CBool -> CBool
FFIType CBool -> CBool
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType (Ptr Void -> IO CBool
hs_bindgen_6f4ecedfb53f9a9e_base (Ptr SDL_Surface -> FFIType (Ptr SDL_Surface)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Ptr SDL_Surface
x0))
lithon_SDL_MUSTLOCK
:: BG.Ptr SDL3.Sys.Bindgen.Surface.SDL_Surface
-> IO BG.CBool
lithon_SDL_MUSTLOCK :: Ptr SDL_Surface -> IO CBool
lithon_SDL_MUSTLOCK = Ptr SDL_Surface -> IO CBool
hs_bindgen_6f4ecedfb53f9a9e