{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE NoFieldSelectors #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_HADDOCK prune #-}
module SDL3.Sys.Bindgen.ErrorShims.Safe (
SDL3.Sys.Bindgen.ErrorShims.Safe.lithon_SDL_SetError,
SDL3.Sys.Bindgen.ErrorShims.Safe.lithon_SDL_Unsupported,
SDL3.Sys.Bindgen.ErrorShims.Safe.lithon_SDL_InvalidParamError,
)
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-bindgen-sys/SDL_error_shims.h>"
, "_Bool hs_bindgen_c73a2f11222ce000 ("
, " char const *arg1"
, ")"
, "{"
, " return (lithon_SDL_SetError)(arg1);"
, "}"
, "_Bool hs_bindgen_a0235790ef732ce0 (void)"
, "{"
, " return (lithon_SDL_Unsupported)();"
, "}"
, "_Bool hs_bindgen_ef91fbeac7b7bf79 ("
, " char const *arg1"
, ")"
, "{"
, " return (lithon_SDL_InvalidParamError)(arg1);"
, "}"
]
)
)
foreign import ccall safe "hs_bindgen_c73a2f11222ce000"
hs_bindgen_c73a2f11222ce000_base
:: BG.Ptr BG.Void
-> IO BG.CBool
hs_bindgen_c73a2f11222ce000
:: PtrConst.PtrConst BG.CChar
-> IO BG.CBool
hs_bindgen_c73a2f11222ce000 :: PtrConst CChar -> IO CBool
hs_bindgen_c73a2f11222ce000 =
\PtrConst CChar
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_c73a2f11222ce000_base (PtrConst CChar -> FFIType (PtrConst CChar)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType PtrConst CChar
x0))
lithon_SDL_SetError
:: PtrConst.PtrConst BG.CChar
-> IO BG.CBool
lithon_SDL_SetError :: PtrConst CChar -> IO CBool
lithon_SDL_SetError = PtrConst CChar -> IO CBool
hs_bindgen_c73a2f11222ce000
foreign import ccall safe "hs_bindgen_a0235790ef732ce0"
hs_bindgen_a0235790ef732ce0_base
:: IO BG.CBool
hs_bindgen_a0235790ef732ce0 :: IO BG.CBool
hs_bindgen_a0235790ef732ce0 :: IO CBool
hs_bindgen_a0235790ef732ce0 =
(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 IO CBool
hs_bindgen_a0235790ef732ce0_base
lithon_SDL_Unsupported :: IO BG.CBool
lithon_SDL_Unsupported :: IO CBool
lithon_SDL_Unsupported = IO CBool
hs_bindgen_a0235790ef732ce0
foreign import ccall safe "hs_bindgen_ef91fbeac7b7bf79"
hs_bindgen_ef91fbeac7b7bf79_base
:: BG.Ptr BG.Void
-> IO BG.CBool
hs_bindgen_ef91fbeac7b7bf79
:: PtrConst.PtrConst BG.CChar
-> IO BG.CBool
hs_bindgen_ef91fbeac7b7bf79 :: PtrConst CChar -> IO CBool
hs_bindgen_ef91fbeac7b7bf79 =
\PtrConst CChar
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_ef91fbeac7b7bf79_base (PtrConst CChar -> FFIType (PtrConst CChar)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType PtrConst CChar
x0))
lithon_SDL_InvalidParamError
:: PtrConst.PtrConst BG.CChar
-> IO BG.CBool
lithon_SDL_InvalidParamError :: PtrConst CChar -> IO CBool
lithon_SDL_InvalidParamError =
PtrConst CChar -> IO CBool
hs_bindgen_ef91fbeac7b7bf79