{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE NoFieldSelectors #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_HADDOCK prune #-}
module SDL3.Sys.Bindgen.Assert.Unsafe (
SDL3.Sys.Bindgen.Assert.Unsafe.sDL_ReportAssertion,
SDL3.Sys.Bindgen.Assert.Unsafe.sDL_SetAssertionHandler,
SDL3.Sys.Bindgen.Assert.Unsafe.sDL_GetDefaultAssertionHandler,
SDL3.Sys.Bindgen.Assert.Unsafe.sDL_GetAssertionHandler,
SDL3.Sys.Bindgen.Assert.Unsafe.sDL_GetAssertionReport,
SDL3.Sys.Bindgen.Assert.Unsafe.sDL_ResetAssertionReport,
)
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
import SDL3.Sys.Bindgen.Assert
$( 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_assert.h>"
, "SDL_AssertState hs_bindgen_a7639e4e554aca71 ("
, " SDL_AssertData *arg1,"
, " char const *arg2,"
, " char const *arg3,"
, " signed int arg4"
, ")"
, "{"
, " return (SDL_ReportAssertion)(arg1, arg2, arg3, arg4);"
, "}"
, "void hs_bindgen_e1f2894e05101967 ("
, " SDL_AssertionHandler arg1,"
, " void *arg2"
, ")"
, "{"
, " (SDL_SetAssertionHandler)(arg1, arg2);"
, "}"
, "SDL_AssertionHandler hs_bindgen_dff5ecac8d034d8d (void)"
, "{"
, " return (SDL_GetDefaultAssertionHandler)();"
, "}"
, "SDL_AssertionHandler hs_bindgen_0c314ac7cf70966e ("
, " void **arg1"
, ")"
, "{"
, " return (SDL_GetAssertionHandler)(arg1);"
, "}"
, "SDL_AssertData const *hs_bindgen_53829b7497744243 (void)"
, "{"
, " return (SDL_GetAssertionReport)();"
, "}"
, "void hs_bindgen_bb1d739857931f60 (void)"
, "{"
, " (SDL_ResetAssertionReport)();"
, "}"
]
)
)
foreign import ccall unsafe "hs_bindgen_a7639e4e554aca71"
hs_bindgen_a7639e4e554aca71_base
:: BG.Ptr BG.Void
-> BG.Ptr BG.Void
-> BG.Ptr BG.Void
-> BG.CInt
-> IO BG.CUInt
hs_bindgen_a7639e4e554aca71
:: BG.Ptr SDL_AssertData
-> PtrConst.PtrConst BG.CChar
-> PtrConst.PtrConst BG.CChar
-> BG.CInt
-> IO SDL_AssertState
hs_bindgen_a7639e4e554aca71 :: Ptr SDL_AssertData
-> PtrConst CChar -> PtrConst CChar -> CInt -> IO SDL_AssertState
hs_bindgen_a7639e4e554aca71 =
\Ptr SDL_AssertData
x0 ->
\PtrConst CChar
x1 ->
\PtrConst CChar
x2 ->
\CInt
x3 ->
(CUInt -> SDL_AssertState) -> IO CUInt -> IO SDL_AssertState
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap
CUInt -> SDL_AssertState
FFIType SDL_AssertState -> SDL_AssertState
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType
( Ptr Void -> Ptr Void -> Ptr Void -> CInt -> IO CUInt
hs_bindgen_a7639e4e554aca71_base
(Ptr SDL_AssertData -> FFIType (Ptr SDL_AssertData)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Ptr SDL_AssertData
x0)
(PtrConst CChar -> FFIType (PtrConst CChar)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType PtrConst CChar
x1)
(PtrConst CChar -> FFIType (PtrConst CChar)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType PtrConst CChar
x2)
(CInt -> FFIType CInt
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType CInt
x3)
)
sDL_ReportAssertion
:: BG.Ptr SDL_AssertData
-> PtrConst.PtrConst BG.CChar
-> PtrConst.PtrConst BG.CChar
-> BG.CInt
-> IO SDL_AssertState
sDL_ReportAssertion :: Ptr SDL_AssertData
-> PtrConst CChar -> PtrConst CChar -> CInt -> IO SDL_AssertState
sDL_ReportAssertion = Ptr SDL_AssertData
-> PtrConst CChar -> PtrConst CChar -> CInt -> IO SDL_AssertState
hs_bindgen_a7639e4e554aca71
foreign import ccall unsafe "hs_bindgen_e1f2894e05101967"
hs_bindgen_e1f2894e05101967_base
:: BG.FunPtr BG.Void
-> BG.Ptr BG.Void
-> IO ()
hs_bindgen_e1f2894e05101967
:: SDL_AssertionHandler
-> BG.Ptr BG.Void
-> IO ()
hs_bindgen_e1f2894e05101967 :: SDL_AssertionHandler -> Ptr Void -> IO ()
hs_bindgen_e1f2894e05101967 =
\SDL_AssertionHandler
x0 ->
\Ptr Void
x1 ->
FunPtr Void -> Ptr Void -> IO ()
hs_bindgen_e1f2894e05101967_base (SDL_AssertionHandler -> FFIType SDL_AssertionHandler
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType SDL_AssertionHandler
x0) (Ptr Void -> FFIType (Ptr Void)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Ptr Void
x1)
sDL_SetAssertionHandler
:: SDL_AssertionHandler
-> BG.Ptr BG.Void
-> IO ()
sDL_SetAssertionHandler :: SDL_AssertionHandler -> Ptr Void -> IO ()
sDL_SetAssertionHandler = SDL_AssertionHandler -> Ptr Void -> IO ()
hs_bindgen_e1f2894e05101967
foreign import ccall unsafe "hs_bindgen_dff5ecac8d034d8d"
hs_bindgen_dff5ecac8d034d8d_base
:: IO (BG.FunPtr BG.Void)
hs_bindgen_dff5ecac8d034d8d :: IO SDL_AssertionHandler
hs_bindgen_dff5ecac8d034d8d :: IO SDL_AssertionHandler
hs_bindgen_dff5ecac8d034d8d =
(FunPtr Void -> SDL_AssertionHandler)
-> IO (FunPtr Void) -> IO SDL_AssertionHandler
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap FunPtr Void -> SDL_AssertionHandler
FFIType SDL_AssertionHandler -> SDL_AssertionHandler
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType IO (FunPtr Void)
hs_bindgen_dff5ecac8d034d8d_base
sDL_GetDefaultAssertionHandler :: IO SDL_AssertionHandler
sDL_GetDefaultAssertionHandler :: IO SDL_AssertionHandler
sDL_GetDefaultAssertionHandler =
IO SDL_AssertionHandler
hs_bindgen_dff5ecac8d034d8d
foreign import ccall unsafe "hs_bindgen_0c314ac7cf70966e"
hs_bindgen_0c314ac7cf70966e_base
:: BG.Ptr BG.Void
-> IO (BG.FunPtr BG.Void)
hs_bindgen_0c314ac7cf70966e
:: BG.Ptr (BG.Ptr BG.Void)
-> IO SDL_AssertionHandler
hs_bindgen_0c314ac7cf70966e :: Ptr (Ptr Void) -> IO SDL_AssertionHandler
hs_bindgen_0c314ac7cf70966e =
\Ptr (Ptr Void)
x0 ->
(FunPtr Void -> SDL_AssertionHandler)
-> IO (FunPtr Void) -> IO SDL_AssertionHandler
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap FunPtr Void -> SDL_AssertionHandler
FFIType SDL_AssertionHandler -> SDL_AssertionHandler
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType (Ptr Void -> IO (FunPtr Void)
hs_bindgen_0c314ac7cf70966e_base (Ptr (Ptr Void) -> FFIType (Ptr (Ptr Void))
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Ptr (Ptr Void)
x0))
sDL_GetAssertionHandler
:: BG.Ptr (BG.Ptr BG.Void)
-> IO SDL_AssertionHandler
sDL_GetAssertionHandler :: Ptr (Ptr Void) -> IO SDL_AssertionHandler
sDL_GetAssertionHandler = Ptr (Ptr Void) -> IO SDL_AssertionHandler
hs_bindgen_0c314ac7cf70966e
foreign import ccall unsafe "hs_bindgen_53829b7497744243"
hs_bindgen_53829b7497744243_base
:: IO (BG.Ptr BG.Void)
hs_bindgen_53829b7497744243 :: IO (PtrConst.PtrConst SDL_AssertData)
hs_bindgen_53829b7497744243 :: IO (PtrConst SDL_AssertData)
hs_bindgen_53829b7497744243 =
(Ptr Void -> PtrConst SDL_AssertData)
-> IO (Ptr Void) -> IO (PtrConst SDL_AssertData)
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr Void -> PtrConst SDL_AssertData
FFIType (PtrConst SDL_AssertData) -> PtrConst SDL_AssertData
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType IO (Ptr Void)
hs_bindgen_53829b7497744243_base
sDL_GetAssertionReport :: IO (PtrConst.PtrConst SDL_AssertData)
sDL_GetAssertionReport :: IO (PtrConst SDL_AssertData)
sDL_GetAssertionReport = IO (PtrConst SDL_AssertData)
hs_bindgen_53829b7497744243
foreign import ccall unsafe "hs_bindgen_bb1d739857931f60"
hs_bindgen_bb1d739857931f60_base
:: IO ()
hs_bindgen_bb1d739857931f60 :: IO ()
hs_bindgen_bb1d739857931f60 :: IO ()
hs_bindgen_bb1d739857931f60 =
IO ()
hs_bindgen_bb1d739857931f60_base
sDL_ResetAssertionReport :: IO ()
sDL_ResetAssertionReport :: IO ()
sDL_ResetAssertionReport =
IO ()
hs_bindgen_bb1d739857931f60