{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE NoFieldSelectors #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_HADDOCK prune #-}
module SDL3.Sys.Bindgen.System.Unsafe (
SDL3.Sys.Bindgen.System.Unsafe.sDL_SetX11EventHook,
SDL3.Sys.Bindgen.System.Unsafe.sDL_SetLinuxThreadPriority,
SDL3.Sys.Bindgen.System.Unsafe.sDL_SetLinuxThreadPriorityAndPolicy,
SDL3.Sys.Bindgen.System.Unsafe.sDL_IsTablet,
SDL3.Sys.Bindgen.System.Unsafe.sDL_IsTV,
SDL3.Sys.Bindgen.System.Unsafe.sDL_GetSandbox,
SDL3.Sys.Bindgen.System.Unsafe.sDL_OnApplicationWillTerminate,
SDL3.Sys.Bindgen.System.Unsafe.sDL_OnApplicationDidReceiveMemoryWarning,
SDL3.Sys.Bindgen.System.Unsafe.sDL_OnApplicationWillEnterBackground,
SDL3.Sys.Bindgen.System.Unsafe.sDL_OnApplicationDidEnterBackground,
SDL3.Sys.Bindgen.System.Unsafe.sDL_OnApplicationWillEnterForeground,
SDL3.Sys.Bindgen.System.Unsafe.sDL_OnApplicationDidEnterForeground,
)
where
import Prelude (IO, fmap)
import HsBindgen.Runtime.LibC qualified
import HsBindgen.Runtime.Support qualified as BG
import HsBindgen.Runtime.Support.CAPI qualified
import SDL3.Sys.Bindgen.Stdinc qualified
import SDL3.Sys.Bindgen.System
$( 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_system.h>"
, "void hs_bindgen_6578867fea03cacb ("
, " SDL_X11EventHook arg1,"
, " void *arg2"
, ")"
, "{"
, " (SDL_SetX11EventHook)(arg1, arg2);"
, "}"
, "_Bool hs_bindgen_2e342f8192ce7216 ("
, " Sint64 arg1,"
, " signed int arg2"
, ")"
, "{"
, "#ifdef SDL_PLATFORM_LINUX"
, " return (SDL_SetLinuxThreadPriority)(arg1, arg2);"
, "#else"
, " (void)arg1; (void)arg2; return SDL_SetError(\"SDL_SetLinuxThreadPriority is only available on Linux\");"
, "#endif"
, "}"
, "_Bool hs_bindgen_5590fa8686376477 ("
, " Sint64 arg1,"
, " signed int arg2,"
, " signed int arg3"
, ")"
, "{"
, "#ifdef SDL_PLATFORM_LINUX"
, " return (SDL_SetLinuxThreadPriorityAndPolicy)(arg1, arg2, arg3);"
, "#else"
, " (void)arg1; (void)arg2; (void)arg3; return SDL_SetError(\"SDL_SetLinuxThreadPriorityAndPolicy is only available on Linux\");"
, "#endif"
, "}"
, "_Bool hs_bindgen_3681fc863886c2d2 (void)"
, "{"
, " return (SDL_IsTablet)();"
, "}"
, "_Bool hs_bindgen_0bab6eb88d9a9496 (void)"
, "{"
, " return (SDL_IsTV)();"
, "}"
, "SDL_Sandbox hs_bindgen_090a9001bc04ef5b (void)"
, "{"
, " return (SDL_GetSandbox)();"
, "}"
, "void hs_bindgen_b7f727ac4163d9e9 (void)"
, "{"
, " (SDL_OnApplicationWillTerminate)();"
, "}"
, "void hs_bindgen_9064fb92743d3c76 (void)"
, "{"
, " (SDL_OnApplicationDidReceiveMemoryWarning)();"
, "}"
, "void hs_bindgen_874965c3cc9cd908 (void)"
, "{"
, " (SDL_OnApplicationWillEnterBackground)();"
, "}"
, "void hs_bindgen_092a71f4734666c3 (void)"
, "{"
, " (SDL_OnApplicationDidEnterBackground)();"
, "}"
, "void hs_bindgen_bf629409e4677855 (void)"
, "{"
, " (SDL_OnApplicationWillEnterForeground)();"
, "}"
, "void hs_bindgen_36db0306e16f75d9 (void)"
, "{"
, " (SDL_OnApplicationDidEnterForeground)();"
, "}"
]
)
)
foreign import ccall unsafe "hs_bindgen_6578867fea03cacb"
hs_bindgen_6578867fea03cacb_base
:: BG.FunPtr BG.Void
-> BG.Ptr BG.Void
-> IO ()
hs_bindgen_6578867fea03cacb
:: SDL_X11EventHook
-> BG.Ptr BG.Void
-> IO ()
hs_bindgen_6578867fea03cacb :: SDL_X11EventHook -> Ptr Void -> IO ()
hs_bindgen_6578867fea03cacb =
\SDL_X11EventHook
x0 ->
\Ptr Void
x1 ->
FunPtr Void -> Ptr Void -> IO ()
hs_bindgen_6578867fea03cacb_base (SDL_X11EventHook -> FFIType SDL_X11EventHook
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType SDL_X11EventHook
x0) (Ptr Void -> FFIType (Ptr Void)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Ptr Void
x1)
sDL_SetX11EventHook
:: SDL_X11EventHook
-> BG.Ptr BG.Void
-> IO ()
sDL_SetX11EventHook :: SDL_X11EventHook -> Ptr Void -> IO ()
sDL_SetX11EventHook = SDL_X11EventHook -> Ptr Void -> IO ()
hs_bindgen_6578867fea03cacb
foreign import ccall unsafe "hs_bindgen_2e342f8192ce7216"
hs_bindgen_2e342f8192ce7216_base
:: HsBindgen.Runtime.LibC.Int64
-> BG.CInt
-> IO BG.CBool
hs_bindgen_2e342f8192ce7216
:: SDL3.Sys.Bindgen.Stdinc.Sint64
-> BG.CInt
-> IO BG.CBool
hs_bindgen_2e342f8192ce7216 :: Sint64 -> CInt -> IO CBool
hs_bindgen_2e342f8192ce7216 =
\Sint64
x0 ->
\CInt
x1 ->
(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 (Int64 -> CInt -> IO CBool
hs_bindgen_2e342f8192ce7216_base (Sint64 -> FFIType Sint64
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Sint64
x0) (CInt -> FFIType CInt
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType CInt
x1))
sDL_SetLinuxThreadPriority
:: SDL3.Sys.Bindgen.Stdinc.Sint64
-> BG.CInt
-> IO BG.CBool
sDL_SetLinuxThreadPriority :: Sint64 -> CInt -> IO CBool
sDL_SetLinuxThreadPriority =
Sint64 -> CInt -> IO CBool
hs_bindgen_2e342f8192ce7216
foreign import ccall unsafe "hs_bindgen_5590fa8686376477"
hs_bindgen_5590fa8686376477_base
:: HsBindgen.Runtime.LibC.Int64
-> BG.CInt
-> BG.CInt
-> IO BG.CBool
hs_bindgen_5590fa8686376477
:: SDL3.Sys.Bindgen.Stdinc.Sint64
-> BG.CInt
-> BG.CInt
-> IO BG.CBool
hs_bindgen_5590fa8686376477 :: Sint64 -> CInt -> CInt -> IO CBool
hs_bindgen_5590fa8686376477 =
\Sint64
x0 ->
\CInt
x1 ->
\CInt
x2 ->
(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
(Int64 -> CInt -> CInt -> IO CBool
hs_bindgen_5590fa8686376477_base (Sint64 -> FFIType Sint64
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Sint64
x0) (CInt -> FFIType CInt
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType CInt
x1) (CInt -> FFIType CInt
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType CInt
x2))
sDL_SetLinuxThreadPriorityAndPolicy
:: SDL3.Sys.Bindgen.Stdinc.Sint64
-> BG.CInt
-> BG.CInt
-> IO BG.CBool
sDL_SetLinuxThreadPriorityAndPolicy :: Sint64 -> CInt -> CInt -> IO CBool
sDL_SetLinuxThreadPriorityAndPolicy =
Sint64 -> CInt -> CInt -> IO CBool
hs_bindgen_5590fa8686376477
foreign import ccall unsafe "hs_bindgen_3681fc863886c2d2"
hs_bindgen_3681fc863886c2d2_base
:: IO BG.CBool
hs_bindgen_3681fc863886c2d2 :: IO BG.CBool
hs_bindgen_3681fc863886c2d2 :: IO CBool
hs_bindgen_3681fc863886c2d2 =
(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_3681fc863886c2d2_base
sDL_IsTablet :: IO BG.CBool
sDL_IsTablet :: IO CBool
sDL_IsTablet = IO CBool
hs_bindgen_3681fc863886c2d2
foreign import ccall unsafe "hs_bindgen_0bab6eb88d9a9496"
hs_bindgen_0bab6eb88d9a9496_base
:: IO BG.CBool
hs_bindgen_0bab6eb88d9a9496 :: IO BG.CBool
hs_bindgen_0bab6eb88d9a9496 :: IO CBool
hs_bindgen_0bab6eb88d9a9496 =
(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_0bab6eb88d9a9496_base
sDL_IsTV :: IO BG.CBool
sDL_IsTV :: IO CBool
sDL_IsTV = IO CBool
hs_bindgen_0bab6eb88d9a9496
foreign import ccall unsafe "hs_bindgen_090a9001bc04ef5b"
hs_bindgen_090a9001bc04ef5b_base
:: IO BG.CUInt
hs_bindgen_090a9001bc04ef5b :: IO SDL_Sandbox
hs_bindgen_090a9001bc04ef5b :: IO SDL_Sandbox
hs_bindgen_090a9001bc04ef5b =
(CUInt -> SDL_Sandbox) -> IO CUInt -> IO SDL_Sandbox
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap CUInt -> SDL_Sandbox
FFIType SDL_Sandbox -> SDL_Sandbox
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType IO CUInt
hs_bindgen_090a9001bc04ef5b_base
sDL_GetSandbox :: IO SDL_Sandbox
sDL_GetSandbox :: IO SDL_Sandbox
sDL_GetSandbox = IO SDL_Sandbox
hs_bindgen_090a9001bc04ef5b
foreign import ccall unsafe "hs_bindgen_b7f727ac4163d9e9"
hs_bindgen_b7f727ac4163d9e9_base
:: IO ()
hs_bindgen_b7f727ac4163d9e9 :: IO ()
hs_bindgen_b7f727ac4163d9e9 :: IO ()
hs_bindgen_b7f727ac4163d9e9 =
IO ()
hs_bindgen_b7f727ac4163d9e9_base
sDL_OnApplicationWillTerminate :: IO ()
sDL_OnApplicationWillTerminate :: IO ()
sDL_OnApplicationWillTerminate =
IO ()
hs_bindgen_b7f727ac4163d9e9
foreign import ccall unsafe "hs_bindgen_9064fb92743d3c76"
hs_bindgen_9064fb92743d3c76_base
:: IO ()
hs_bindgen_9064fb92743d3c76 :: IO ()
hs_bindgen_9064fb92743d3c76 :: IO ()
hs_bindgen_9064fb92743d3c76 =
IO ()
hs_bindgen_9064fb92743d3c76_base
sDL_OnApplicationDidReceiveMemoryWarning :: IO ()
sDL_OnApplicationDidReceiveMemoryWarning :: IO ()
sDL_OnApplicationDidReceiveMemoryWarning =
IO ()
hs_bindgen_9064fb92743d3c76
foreign import ccall unsafe "hs_bindgen_874965c3cc9cd908"
hs_bindgen_874965c3cc9cd908_base
:: IO ()
hs_bindgen_874965c3cc9cd908 :: IO ()
hs_bindgen_874965c3cc9cd908 :: IO ()
hs_bindgen_874965c3cc9cd908 =
IO ()
hs_bindgen_874965c3cc9cd908_base
sDL_OnApplicationWillEnterBackground :: IO ()
sDL_OnApplicationWillEnterBackground :: IO ()
sDL_OnApplicationWillEnterBackground =
IO ()
hs_bindgen_874965c3cc9cd908
foreign import ccall unsafe "hs_bindgen_092a71f4734666c3"
hs_bindgen_092a71f4734666c3_base
:: IO ()
hs_bindgen_092a71f4734666c3 :: IO ()
hs_bindgen_092a71f4734666c3 :: IO ()
hs_bindgen_092a71f4734666c3 =
IO ()
hs_bindgen_092a71f4734666c3_base
sDL_OnApplicationDidEnterBackground :: IO ()
sDL_OnApplicationDidEnterBackground :: IO ()
sDL_OnApplicationDidEnterBackground =
IO ()
hs_bindgen_092a71f4734666c3
foreign import ccall unsafe "hs_bindgen_bf629409e4677855"
hs_bindgen_bf629409e4677855_base
:: IO ()
hs_bindgen_bf629409e4677855 :: IO ()
hs_bindgen_bf629409e4677855 :: IO ()
hs_bindgen_bf629409e4677855 =
IO ()
hs_bindgen_bf629409e4677855_base
sDL_OnApplicationWillEnterForeground :: IO ()
sDL_OnApplicationWillEnterForeground :: IO ()
sDL_OnApplicationWillEnterForeground =
IO ()
hs_bindgen_bf629409e4677855
foreign import ccall unsafe "hs_bindgen_36db0306e16f75d9"
hs_bindgen_36db0306e16f75d9_base
:: IO ()
hs_bindgen_36db0306e16f75d9 :: IO ()
hs_bindgen_36db0306e16f75d9 :: IO ()
hs_bindgen_36db0306e16f75d9 =
IO ()
hs_bindgen_36db0306e16f75d9_base
sDL_OnApplicationDidEnterForeground :: IO ()
sDL_OnApplicationDidEnterForeground :: IO ()
sDL_OnApplicationDidEnterForeground =
IO ()
hs_bindgen_36db0306e16f75d9