{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE NoFieldSelectors #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_HADDOCK prune #-}
module SDL3.Sys.Bindgen.Timer.Unsafe (
SDL3.Sys.Bindgen.Timer.Unsafe.sDL_GetTicks,
SDL3.Sys.Bindgen.Timer.Unsafe.sDL_GetTicksNS,
SDL3.Sys.Bindgen.Timer.Unsafe.sDL_GetPerformanceCounter,
SDL3.Sys.Bindgen.Timer.Unsafe.sDL_GetPerformanceFrequency,
SDL3.Sys.Bindgen.Timer.Unsafe.sDL_Delay,
SDL3.Sys.Bindgen.Timer.Unsafe.sDL_DelayNS,
SDL3.Sys.Bindgen.Timer.Unsafe.sDL_DelayPrecise,
SDL3.Sys.Bindgen.Timer.Unsafe.sDL_AddTimer,
SDL3.Sys.Bindgen.Timer.Unsafe.sDL_AddTimerNS,
SDL3.Sys.Bindgen.Timer.Unsafe.sDL_RemoveTimer,
)
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.Timer
$( 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_timer.h>"
, "Uint64 hs_bindgen_048639750b48f695 (void)"
, "{"
, " return (SDL_GetTicks)();"
, "}"
, "Uint64 hs_bindgen_5bd68dc01ceb08e8 (void)"
, "{"
, " return (SDL_GetTicksNS)();"
, "}"
, "Uint64 hs_bindgen_8d8e0f9377cfcf7d (void)"
, "{"
, " return (SDL_GetPerformanceCounter)();"
, "}"
, "Uint64 hs_bindgen_6775fe97a579d8be (void)"
, "{"
, " return (SDL_GetPerformanceFrequency)();"
, "}"
, "void hs_bindgen_1b1b86e10ec2a52a ("
, " Uint32 arg1"
, ")"
, "{"
, " (SDL_Delay)(arg1);"
, "}"
, "void hs_bindgen_8bb71f8de5a6570c ("
, " Uint64 arg1"
, ")"
, "{"
, " (SDL_DelayNS)(arg1);"
, "}"
, "void hs_bindgen_ec69e98c6a717d75 ("
, " Uint64 arg1"
, ")"
, "{"
, " (SDL_DelayPrecise)(arg1);"
, "}"
, "SDL_TimerID hs_bindgen_14f66e216435c762 ("
, " Uint32 arg1,"
, " SDL_TimerCallback arg2,"
, " void *arg3"
, ")"
, "{"
, " return (SDL_AddTimer)(arg1, arg2, arg3);"
, "}"
, "SDL_TimerID hs_bindgen_a0b2068e0ed2278f ("
, " Uint64 arg1,"
, " SDL_NSTimerCallback arg2,"
, " void *arg3"
, ")"
, "{"
, " return (SDL_AddTimerNS)(arg1, arg2, arg3);"
, "}"
, "_Bool hs_bindgen_55aee2089fbaec7e ("
, " SDL_TimerID arg1"
, ")"
, "{"
, " return (SDL_RemoveTimer)(arg1);"
, "}"
]
)
)
foreign import ccall unsafe "hs_bindgen_048639750b48f695"
hs_bindgen_048639750b48f695_base
:: IO HsBindgen.Runtime.LibC.Word64
hs_bindgen_048639750b48f695 :: IO SDL3.Sys.Bindgen.Stdinc.Uint64
hs_bindgen_048639750b48f695 :: IO Uint64
hs_bindgen_048639750b48f695 =
(Word64 -> Uint64) -> IO Word64 -> IO Uint64
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Word64 -> Uint64
FFIType Uint64 -> Uint64
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType IO Word64
hs_bindgen_048639750b48f695_base
sDL_GetTicks :: IO SDL3.Sys.Bindgen.Stdinc.Uint64
sDL_GetTicks :: IO Uint64
sDL_GetTicks = IO Uint64
hs_bindgen_048639750b48f695
foreign import ccall unsafe "hs_bindgen_5bd68dc01ceb08e8"
hs_bindgen_5bd68dc01ceb08e8_base
:: IO HsBindgen.Runtime.LibC.Word64
hs_bindgen_5bd68dc01ceb08e8 :: IO SDL3.Sys.Bindgen.Stdinc.Uint64
hs_bindgen_5bd68dc01ceb08e8 :: IO Uint64
hs_bindgen_5bd68dc01ceb08e8 =
(Word64 -> Uint64) -> IO Word64 -> IO Uint64
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Word64 -> Uint64
FFIType Uint64 -> Uint64
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType IO Word64
hs_bindgen_5bd68dc01ceb08e8_base
sDL_GetTicksNS :: IO SDL3.Sys.Bindgen.Stdinc.Uint64
sDL_GetTicksNS :: IO Uint64
sDL_GetTicksNS = IO Uint64
hs_bindgen_5bd68dc01ceb08e8
foreign import ccall unsafe "hs_bindgen_8d8e0f9377cfcf7d"
hs_bindgen_8d8e0f9377cfcf7d_base
:: IO HsBindgen.Runtime.LibC.Word64
hs_bindgen_8d8e0f9377cfcf7d :: IO SDL3.Sys.Bindgen.Stdinc.Uint64
hs_bindgen_8d8e0f9377cfcf7d :: IO Uint64
hs_bindgen_8d8e0f9377cfcf7d =
(Word64 -> Uint64) -> IO Word64 -> IO Uint64
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Word64 -> Uint64
FFIType Uint64 -> Uint64
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType IO Word64
hs_bindgen_8d8e0f9377cfcf7d_base
sDL_GetPerformanceCounter :: IO SDL3.Sys.Bindgen.Stdinc.Uint64
sDL_GetPerformanceCounter :: IO Uint64
sDL_GetPerformanceCounter =
IO Uint64
hs_bindgen_8d8e0f9377cfcf7d
foreign import ccall unsafe "hs_bindgen_6775fe97a579d8be"
hs_bindgen_6775fe97a579d8be_base
:: IO HsBindgen.Runtime.LibC.Word64
hs_bindgen_6775fe97a579d8be :: IO SDL3.Sys.Bindgen.Stdinc.Uint64
hs_bindgen_6775fe97a579d8be :: IO Uint64
hs_bindgen_6775fe97a579d8be =
(Word64 -> Uint64) -> IO Word64 -> IO Uint64
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Word64 -> Uint64
FFIType Uint64 -> Uint64
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType IO Word64
hs_bindgen_6775fe97a579d8be_base
sDL_GetPerformanceFrequency :: IO SDL3.Sys.Bindgen.Stdinc.Uint64
sDL_GetPerformanceFrequency :: IO Uint64
sDL_GetPerformanceFrequency =
IO Uint64
hs_bindgen_6775fe97a579d8be
foreign import ccall unsafe "hs_bindgen_1b1b86e10ec2a52a"
hs_bindgen_1b1b86e10ec2a52a_base
:: HsBindgen.Runtime.LibC.Word32
-> IO ()
hs_bindgen_1b1b86e10ec2a52a
:: SDL3.Sys.Bindgen.Stdinc.Uint32
-> IO ()
hs_bindgen_1b1b86e10ec2a52a :: Uint32 -> IO ()
hs_bindgen_1b1b86e10ec2a52a =
\Uint32
x0 ->
Word32 -> IO ()
hs_bindgen_1b1b86e10ec2a52a_base (Uint32 -> FFIType Uint32
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Uint32
x0)
sDL_Delay
:: SDL3.Sys.Bindgen.Stdinc.Uint32
-> IO ()
sDL_Delay :: Uint32 -> IO ()
sDL_Delay = Uint32 -> IO ()
hs_bindgen_1b1b86e10ec2a52a
foreign import ccall unsafe "hs_bindgen_8bb71f8de5a6570c"
hs_bindgen_8bb71f8de5a6570c_base
:: HsBindgen.Runtime.LibC.Word64
-> IO ()
hs_bindgen_8bb71f8de5a6570c
:: SDL3.Sys.Bindgen.Stdinc.Uint64
-> IO ()
hs_bindgen_8bb71f8de5a6570c :: Uint64 -> IO ()
hs_bindgen_8bb71f8de5a6570c =
\Uint64
x0 ->
Word64 -> IO ()
hs_bindgen_8bb71f8de5a6570c_base (Uint64 -> FFIType Uint64
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Uint64
x0)
sDL_DelayNS
:: SDL3.Sys.Bindgen.Stdinc.Uint64
-> IO ()
sDL_DelayNS :: Uint64 -> IO ()
sDL_DelayNS = Uint64 -> IO ()
hs_bindgen_8bb71f8de5a6570c
foreign import ccall unsafe "hs_bindgen_ec69e98c6a717d75"
hs_bindgen_ec69e98c6a717d75_base
:: HsBindgen.Runtime.LibC.Word64
-> IO ()
hs_bindgen_ec69e98c6a717d75
:: SDL3.Sys.Bindgen.Stdinc.Uint64
-> IO ()
hs_bindgen_ec69e98c6a717d75 :: Uint64 -> IO ()
hs_bindgen_ec69e98c6a717d75 =
\Uint64
x0 ->
Word64 -> IO ()
hs_bindgen_ec69e98c6a717d75_base (Uint64 -> FFIType Uint64
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Uint64
x0)
sDL_DelayPrecise
:: SDL3.Sys.Bindgen.Stdinc.Uint64
-> IO ()
sDL_DelayPrecise :: Uint64 -> IO ()
sDL_DelayPrecise = Uint64 -> IO ()
hs_bindgen_ec69e98c6a717d75
foreign import ccall unsafe "hs_bindgen_14f66e216435c762"
hs_bindgen_14f66e216435c762_base
:: HsBindgen.Runtime.LibC.Word32
-> BG.FunPtr BG.Void
-> BG.Ptr BG.Void
-> IO HsBindgen.Runtime.LibC.Word32
hs_bindgen_14f66e216435c762
:: SDL3.Sys.Bindgen.Stdinc.Uint32
-> SDL_TimerCallback
-> BG.Ptr BG.Void
-> IO SDL_TimerID
hs_bindgen_14f66e216435c762 :: Uint32 -> SDL_TimerCallback -> Ptr Void -> IO SDL_TimerID
hs_bindgen_14f66e216435c762 =
\Uint32
x0 ->
\SDL_TimerCallback
x1 ->
\Ptr Void
x2 ->
(Word32 -> SDL_TimerID) -> IO Word32 -> IO SDL_TimerID
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap
Word32 -> SDL_TimerID
FFIType SDL_TimerID -> SDL_TimerID
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType
(Word32 -> FunPtr Void -> Ptr Void -> IO Word32
hs_bindgen_14f66e216435c762_base (Uint32 -> FFIType Uint32
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Uint32
x0) (SDL_TimerCallback -> FFIType SDL_TimerCallback
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType SDL_TimerCallback
x1) (Ptr Void -> FFIType (Ptr Void)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Ptr Void
x2))
sDL_AddTimer
:: SDL3.Sys.Bindgen.Stdinc.Uint32
-> SDL_TimerCallback
-> BG.Ptr BG.Void
-> IO SDL_TimerID
sDL_AddTimer :: Uint32 -> SDL_TimerCallback -> Ptr Void -> IO SDL_TimerID
sDL_AddTimer = Uint32 -> SDL_TimerCallback -> Ptr Void -> IO SDL_TimerID
hs_bindgen_14f66e216435c762
foreign import ccall unsafe "hs_bindgen_a0b2068e0ed2278f"
hs_bindgen_a0b2068e0ed2278f_base
:: HsBindgen.Runtime.LibC.Word64
-> BG.FunPtr BG.Void
-> BG.Ptr BG.Void
-> IO HsBindgen.Runtime.LibC.Word32
hs_bindgen_a0b2068e0ed2278f
:: SDL3.Sys.Bindgen.Stdinc.Uint64
-> SDL_NSTimerCallback
-> BG.Ptr BG.Void
-> IO SDL_TimerID
hs_bindgen_a0b2068e0ed2278f :: Uint64 -> SDL_NSTimerCallback -> Ptr Void -> IO SDL_TimerID
hs_bindgen_a0b2068e0ed2278f =
\Uint64
x0 ->
\SDL_NSTimerCallback
x1 ->
\Ptr Void
x2 ->
(Word32 -> SDL_TimerID) -> IO Word32 -> IO SDL_TimerID
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap
Word32 -> SDL_TimerID
FFIType SDL_TimerID -> SDL_TimerID
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType
(Word64 -> FunPtr Void -> Ptr Void -> IO Word32
hs_bindgen_a0b2068e0ed2278f_base (Uint64 -> FFIType Uint64
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Uint64
x0) (SDL_NSTimerCallback -> FFIType SDL_NSTimerCallback
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType SDL_NSTimerCallback
x1) (Ptr Void -> FFIType (Ptr Void)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Ptr Void
x2))
sDL_AddTimerNS
:: SDL3.Sys.Bindgen.Stdinc.Uint64
-> SDL_NSTimerCallback
-> BG.Ptr BG.Void
-> IO SDL_TimerID
sDL_AddTimerNS :: Uint64 -> SDL_NSTimerCallback -> Ptr Void -> IO SDL_TimerID
sDL_AddTimerNS = Uint64 -> SDL_NSTimerCallback -> Ptr Void -> IO SDL_TimerID
hs_bindgen_a0b2068e0ed2278f
foreign import ccall unsafe "hs_bindgen_55aee2089fbaec7e"
hs_bindgen_55aee2089fbaec7e_base
:: HsBindgen.Runtime.LibC.Word32
-> IO BG.CBool
hs_bindgen_55aee2089fbaec7e
:: SDL_TimerID
-> IO BG.CBool
hs_bindgen_55aee2089fbaec7e :: SDL_TimerID -> IO CBool
hs_bindgen_55aee2089fbaec7e =
\SDL_TimerID
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 (Word32 -> IO CBool
hs_bindgen_55aee2089fbaec7e_base (SDL_TimerID -> FFIType SDL_TimerID
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType SDL_TimerID
x0))
sDL_RemoveTimer
:: SDL_TimerID
-> IO BG.CBool
sDL_RemoveTimer :: SDL_TimerID -> IO CBool
sDL_RemoveTimer = SDL_TimerID -> IO CBool
hs_bindgen_55aee2089fbaec7e