{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE NoFieldSelectors #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_HADDOCK prune #-}
module SDL3.Sys.Bindgen.Main.Unsafe (
SDL3.Sys.Bindgen.Main.Unsafe.sDL_SetMainReady,
SDL3.Sys.Bindgen.Main.Unsafe.sDL_RunApp,
SDL3.Sys.Bindgen.Main.Unsafe.sDL_EnterAppMainCallbacks,
SDL3.Sys.Bindgen.Main.Unsafe.sDL_GDKSuspendComplete,
)
where
import Prelude (IO, fmap)
import HsBindgen.Runtime.IncompleteArray qualified as IA
import HsBindgen.Runtime.IsArray qualified as IsA
import HsBindgen.Runtime.Support qualified
import HsBindgen.Runtime.Support qualified as BG
import HsBindgen.Runtime.Support.CAPI qualified
import SDL3.Sys.Bindgen.Init qualified
import SDL3.Sys.Bindgen.Main
$( 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_main.h>"
, "void hs_bindgen_330c7ba17652a449 (void)"
, "{"
, " (SDL_SetMainReady)();"
, "}"
, "signed int hs_bindgen_76e1bdcf20b82e65 ("
, " signed int arg1,"
, " char **arg2,"
, " SDL_main_func arg3,"
, " void *arg4"
, ")"
, "{"
, " return (SDL_RunApp)(arg1, arg2, arg3, arg4);"
, "}"
, "signed int hs_bindgen_471713b022799202 ("
, " signed int arg1,"
, " char **arg2,"
, " SDL_AppInit_func arg3,"
, " SDL_AppIterate_func arg4,"
, " SDL_AppEvent_func arg5,"
, " SDL_AppQuit_func arg6"
, ")"
, "{"
, " return (SDL_EnterAppMainCallbacks)(arg1, arg2, arg3, arg4, arg5, arg6);"
, "}"
, "void hs_bindgen_9f3d69665a0be341 (void)"
, "{"
, " (SDL_GDKSuspendComplete)();"
, "}"
]
)
)
foreign import ccall unsafe "hs_bindgen_330c7ba17652a449"
hs_bindgen_330c7ba17652a449_base
:: IO ()
hs_bindgen_330c7ba17652a449 :: IO ()
hs_bindgen_330c7ba17652a449 :: IO ()
hs_bindgen_330c7ba17652a449 =
IO ()
hs_bindgen_330c7ba17652a449_base
sDL_SetMainReady :: IO ()
sDL_SetMainReady :: IO ()
sDL_SetMainReady = IO ()
hs_bindgen_330c7ba17652a449
foreign import ccall unsafe "hs_bindgen_76e1bdcf20b82e65"
hs_bindgen_76e1bdcf20b82e65_base
:: BG.CInt
-> BG.Ptr BG.Void
-> BG.FunPtr BG.Void
-> BG.Ptr BG.Void
-> IO BG.CInt
hs_bindgen_76e1bdcf20b82e65
:: BG.CInt
-> BG.Ptr (IsA.Elem (IA.IncompleteArray (BG.Ptr BG.CChar)))
-> SDL_main_func
-> BG.Ptr BG.Void
-> IO BG.CInt
hs_bindgen_76e1bdcf20b82e65 :: CInt
-> Ptr (Elem (IncompleteArray (Ptr CChar)))
-> SDL_main_func
-> Ptr Void
-> IO CInt
hs_bindgen_76e1bdcf20b82e65 =
\CInt
x0 ->
\Ptr (Elem (IncompleteArray (Ptr CChar)))
x1 ->
\SDL_main_func
x2 ->
\Ptr Void
x3 ->
(CInt -> CInt) -> IO CInt -> IO CInt
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap
CInt -> CInt
FFIType CInt -> CInt
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType
( CInt -> Ptr Void -> FunPtr Void -> Ptr Void -> IO CInt
hs_bindgen_76e1bdcf20b82e65_base
(CInt -> FFIType CInt
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType CInt
x0)
(Ptr (Ptr CChar) -> FFIType (Ptr (Ptr CChar))
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Ptr (Ptr CChar)
Ptr (Elem (IncompleteArray (Ptr CChar)))
x1)
(SDL_main_func -> FFIType SDL_main_func
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType SDL_main_func
x2)
(Ptr Void -> FFIType (Ptr Void)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Ptr Void
x3)
)
sDL_RunApp
:: BG.CInt
-> BG.Ptr (IsA.Elem (IA.IncompleteArray (BG.Ptr BG.CChar)))
-> SDL_main_func
-> BG.Ptr BG.Void
-> IO BG.CInt
sDL_RunApp :: CInt
-> Ptr (Elem (IncompleteArray (Ptr CChar)))
-> SDL_main_func
-> Ptr Void
-> IO CInt
sDL_RunApp = CInt
-> Ptr (Elem (IncompleteArray (Ptr CChar)))
-> SDL_main_func
-> Ptr Void
-> IO CInt
hs_bindgen_76e1bdcf20b82e65
foreign import ccall unsafe "hs_bindgen_471713b022799202"
hs_bindgen_471713b022799202_base
:: BG.CInt
-> BG.Ptr BG.Void
-> HsBindgen.Runtime.Support.FunPtrVoid
-> HsBindgen.Runtime.Support.FunPtrVoid
-> HsBindgen.Runtime.Support.FunPtrVoid
-> HsBindgen.Runtime.Support.FunPtrVoid
-> IO BG.CInt
hs_bindgen_471713b022799202
:: BG.CInt
-> BG.Ptr (IsA.Elem (IA.IncompleteArray (BG.Ptr BG.CChar)))
-> SDL3.Sys.Bindgen.Init.SDL_AppInit_func
-> SDL3.Sys.Bindgen.Init.SDL_AppIterate_func
-> SDL3.Sys.Bindgen.Init.SDL_AppEvent_func
-> SDL3.Sys.Bindgen.Init.SDL_AppQuit_func
-> IO BG.CInt
hs_bindgen_471713b022799202 :: CInt
-> Ptr (Elem (IncompleteArray (Ptr CChar)))
-> SDL_AppInit_func
-> SDL_AppIterate_func
-> SDL_AppEvent_func
-> SDL_AppQuit_func
-> IO CInt
hs_bindgen_471713b022799202 =
\CInt
x0 ->
\Ptr (Elem (IncompleteArray (Ptr CChar)))
x1 ->
\SDL_AppInit_func
x2 ->
\SDL_AppIterate_func
x3 ->
\SDL_AppEvent_func
x4 ->
\SDL_AppQuit_func
x5 ->
(CInt -> CInt) -> IO CInt -> IO CInt
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap
CInt -> CInt
FFIType CInt -> CInt
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType
( CInt
-> Ptr Void
-> FunPtr Void
-> FunPtr Void
-> FunPtr Void
-> FunPtr Void
-> IO CInt
hs_bindgen_471713b022799202_base
(CInt -> FFIType CInt
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType CInt
x0)
(Ptr (Ptr CChar) -> FFIType (Ptr (Ptr CChar))
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Ptr (Ptr CChar)
Ptr (Elem (IncompleteArray (Ptr CChar)))
x1)
(SDL_AppInit_func -> FFIType SDL_AppInit_func
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType SDL_AppInit_func
x2)
(SDL_AppIterate_func -> FFIType SDL_AppIterate_func
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType SDL_AppIterate_func
x3)
(SDL_AppEvent_func -> FFIType SDL_AppEvent_func
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType SDL_AppEvent_func
x4)
(SDL_AppQuit_func -> FFIType SDL_AppQuit_func
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType SDL_AppQuit_func
x5)
)
sDL_EnterAppMainCallbacks
:: BG.CInt
-> BG.Ptr (IsA.Elem (IA.IncompleteArray (BG.Ptr BG.CChar)))
-> SDL3.Sys.Bindgen.Init.SDL_AppInit_func
-> SDL3.Sys.Bindgen.Init.SDL_AppIterate_func
-> SDL3.Sys.Bindgen.Init.SDL_AppEvent_func
-> SDL3.Sys.Bindgen.Init.SDL_AppQuit_func
-> IO BG.CInt
sDL_EnterAppMainCallbacks :: CInt
-> Ptr (Elem (IncompleteArray (Ptr CChar)))
-> SDL_AppInit_func
-> SDL_AppIterate_func
-> SDL_AppEvent_func
-> SDL_AppQuit_func
-> IO CInt
sDL_EnterAppMainCallbacks =
CInt
-> Ptr (Elem (IncompleteArray (Ptr CChar)))
-> SDL_AppInit_func
-> SDL_AppIterate_func
-> SDL_AppEvent_func
-> SDL_AppQuit_func
-> IO CInt
hs_bindgen_471713b022799202
foreign import ccall unsafe "hs_bindgen_9f3d69665a0be341"
hs_bindgen_9f3d69665a0be341_base
:: IO ()
hs_bindgen_9f3d69665a0be341 :: IO ()
hs_bindgen_9f3d69665a0be341 :: IO ()
hs_bindgen_9f3d69665a0be341 =
IO ()
hs_bindgen_9f3d69665a0be341_base
sDL_GDKSuspendComplete :: IO ()
sDL_GDKSuspendComplete :: IO ()
sDL_GDKSuspendComplete = IO ()
hs_bindgen_9f3d69665a0be341