{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE NoFieldSelectors #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_HADDOCK prune #-}
module SDL3.Sys.Bindgen.Error.FunPtr (
SDL3.Sys.Bindgen.Error.FunPtr.sDL_OutOfMemory,
SDL3.Sys.Bindgen.Error.FunPtr.sDL_GetError,
SDL3.Sys.Bindgen.Error.FunPtr.sDL_ClearError,
)
where
import Prelude (IO, fmap)
import HsBindgen.Runtime.PtrConst qualified as PtrConst
import HsBindgen.Runtime.Support qualified as BG
import HsBindgen.Runtime.Support.CAPI 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/SDL_error.h>"
, "/* sdl3bindgensys_SDL3.Sys.Bindgen.Error_get_SDL_OutOfMemory */"
, "__attribute__ ((const))"
, "_Bool (*hs_bindgen_c1c2f6095b18fb13 (void)) (void)"
, "{"
, " return &SDL_OutOfMemory;"
, "}"
, "/* sdl3bindgensys_SDL3.Sys.Bindgen.Error_get_SDL_GetError */"
, "__attribute__ ((const))"
, "char const *(*hs_bindgen_030d67d7c033781b (void)) (void)"
, "{"
, " return &SDL_GetError;"
, "}"
, "/* sdl3bindgensys_SDL3.Sys.Bindgen.Error_get_SDL_ClearError */"
, "__attribute__ ((const))"
, "_Bool (*hs_bindgen_000d9156b04d2f47 (void)) (void)"
, "{"
, " return &SDL_ClearError;"
, "}"
]
)
)
foreign import ccall unsafe "hs_bindgen_c1c2f6095b18fb13"
hs_bindgen_c1c2f6095b18fb13_base
:: IO (BG.FunPtr BG.Void)
hs_bindgen_c1c2f6095b18fb13 :: IO (BG.FunPtr (IO BG.CBool))
hs_bindgen_c1c2f6095b18fb13 :: IO (FunPtr (IO CBool))
hs_bindgen_c1c2f6095b18fb13 =
(FunPtr Void -> FunPtr (IO CBool))
-> IO (FunPtr Void) -> IO (FunPtr (IO CBool))
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap FunPtr Void -> FunPtr (IO CBool)
FFIType (FunPtr (IO CBool)) -> FunPtr (IO CBool)
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType IO (FunPtr Void)
hs_bindgen_c1c2f6095b18fb13_base
{-# NOINLINE sDL_OutOfMemory #-}
sDL_OutOfMemory :: BG.FunPtr (IO BG.CBool)
sDL_OutOfMemory :: FunPtr (IO CBool)
sDL_OutOfMemory =
IO (FunPtr (IO CBool)) -> FunPtr (IO CBool)
forall a. IO a -> a
BG.unsafePerformIO IO (FunPtr (IO CBool))
hs_bindgen_c1c2f6095b18fb13
foreign import ccall unsafe "hs_bindgen_030d67d7c033781b"
hs_bindgen_030d67d7c033781b_base
:: IO (BG.FunPtr BG.Void)
hs_bindgen_030d67d7c033781b :: IO (BG.FunPtr (IO (PtrConst.PtrConst BG.CChar)))
hs_bindgen_030d67d7c033781b :: IO (FunPtr (IO (PtrConst CChar)))
hs_bindgen_030d67d7c033781b =
(FunPtr Void -> FunPtr (IO (PtrConst CChar)))
-> IO (FunPtr Void) -> IO (FunPtr (IO (PtrConst CChar)))
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap FunPtr Void -> FunPtr (IO (PtrConst CChar))
FFIType (FunPtr (IO (PtrConst CChar)))
-> FunPtr (IO (PtrConst CChar))
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType IO (FunPtr Void)
hs_bindgen_030d67d7c033781b_base
{-# NOINLINE sDL_GetError #-}
sDL_GetError :: BG.FunPtr (IO (PtrConst.PtrConst BG.CChar))
sDL_GetError :: FunPtr (IO (PtrConst CChar))
sDL_GetError =
IO (FunPtr (IO (PtrConst CChar))) -> FunPtr (IO (PtrConst CChar))
forall a. IO a -> a
BG.unsafePerformIO IO (FunPtr (IO (PtrConst CChar)))
hs_bindgen_030d67d7c033781b
foreign import ccall unsafe "hs_bindgen_000d9156b04d2f47"
hs_bindgen_000d9156b04d2f47_base
:: IO (BG.FunPtr BG.Void)
hs_bindgen_000d9156b04d2f47 :: IO (BG.FunPtr (IO BG.CBool))
hs_bindgen_000d9156b04d2f47 :: IO (FunPtr (IO CBool))
hs_bindgen_000d9156b04d2f47 =
(FunPtr Void -> FunPtr (IO CBool))
-> IO (FunPtr Void) -> IO (FunPtr (IO CBool))
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap FunPtr Void -> FunPtr (IO CBool)
FFIType (FunPtr (IO CBool)) -> FunPtr (IO CBool)
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType IO (FunPtr Void)
hs_bindgen_000d9156b04d2f47_base
{-# NOINLINE sDL_ClearError #-}
sDL_ClearError :: BG.FunPtr (IO BG.CBool)
sDL_ClearError :: FunPtr (IO CBool)
sDL_ClearError =
IO (FunPtr (IO CBool)) -> FunPtr (IO CBool)
forall a. IO a -> a
BG.unsafePerformIO IO (FunPtr (IO CBool))
hs_bindgen_000d9156b04d2f47