{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE NoFieldSelectors #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_HADDOCK prune #-}
module SDL3.Sys.Bindgen.Timer.Safe (
SDL3.Sys.Bindgen.Timer.Safe.sDL_GetTicks,
SDL3.Sys.Bindgen.Timer.Safe.sDL_GetTicksNS,
SDL3.Sys.Bindgen.Timer.Safe.sDL_GetPerformanceCounter,
SDL3.Sys.Bindgen.Timer.Safe.sDL_GetPerformanceFrequency,
SDL3.Sys.Bindgen.Timer.Safe.sDL_Delay,
SDL3.Sys.Bindgen.Timer.Safe.sDL_DelayNS,
SDL3.Sys.Bindgen.Timer.Safe.sDL_DelayPrecise,
SDL3.Sys.Bindgen.Timer.Safe.sDL_AddTimer,
SDL3.Sys.Bindgen.Timer.Safe.sDL_AddTimerNS,
SDL3.Sys.Bindgen.Timer.Safe.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_c6153618a018e856 (void)"
, "{"
, " return (SDL_GetTicks)();"
, "}"
, "Uint64 hs_bindgen_47e2e360ac6e112d (void)"
, "{"
, " return (SDL_GetTicksNS)();"
, "}"
, "Uint64 hs_bindgen_e58f7e74d5dfd2f6 (void)"
, "{"
, " return (SDL_GetPerformanceCounter)();"
, "}"
, "Uint64 hs_bindgen_3a4825ac03082c11 (void)"
, "{"
, " return (SDL_GetPerformanceFrequency)();"
, "}"
, "void hs_bindgen_8754cd6d3f04ccff ("
, " Uint32 arg1"
, ")"
, "{"
, " (SDL_Delay)(arg1);"
, "}"
, "void hs_bindgen_4581488a34fdd3e7 ("
, " Uint64 arg1"
, ")"
, "{"
, " (SDL_DelayNS)(arg1);"
, "}"
, "void hs_bindgen_19457ba0f1d978a7 ("
, " Uint64 arg1"
, ")"
, "{"
, " (SDL_DelayPrecise)(arg1);"
, "}"
, "SDL_TimerID hs_bindgen_1eb4863b9e459f9b ("
, " Uint32 arg1,"
, " SDL_TimerCallback arg2,"
, " void *arg3"
, ")"
, "{"
, " return (SDL_AddTimer)(arg1, arg2, arg3);"
, "}"
, "SDL_TimerID hs_bindgen_04843533c2eea6bf ("
, " Uint64 arg1,"
, " SDL_NSTimerCallback arg2,"
, " void *arg3"
, ")"
, "{"
, " return (SDL_AddTimerNS)(arg1, arg2, arg3);"
, "}"
, "_Bool hs_bindgen_3794f4416b9527ed ("
, " SDL_TimerID arg1"
, ")"
, "{"
, " return (SDL_RemoveTimer)(arg1);"
, "}"
]
)
)
foreign import ccall safe "hs_bindgen_c6153618a018e856"
hs_bindgen_c6153618a018e856_base
:: IO HsBindgen.Runtime.LibC.Word64
hs_bindgen_c6153618a018e856 :: IO SDL3.Sys.Bindgen.Stdinc.Uint64
hs_bindgen_c6153618a018e856 :: IO Uint64
hs_bindgen_c6153618a018e856 =
(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_c6153618a018e856_base
sDL_GetTicks :: IO SDL3.Sys.Bindgen.Stdinc.Uint64
sDL_GetTicks :: IO Uint64
sDL_GetTicks = IO Uint64
hs_bindgen_c6153618a018e856
foreign import ccall safe "hs_bindgen_47e2e360ac6e112d"
hs_bindgen_47e2e360ac6e112d_base
:: IO HsBindgen.Runtime.LibC.Word64
hs_bindgen_47e2e360ac6e112d :: IO SDL3.Sys.Bindgen.Stdinc.Uint64
hs_bindgen_47e2e360ac6e112d :: IO Uint64
hs_bindgen_47e2e360ac6e112d =
(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_47e2e360ac6e112d_base
sDL_GetTicksNS :: IO SDL3.Sys.Bindgen.Stdinc.Uint64
sDL_GetTicksNS :: IO Uint64
sDL_GetTicksNS = IO Uint64
hs_bindgen_47e2e360ac6e112d
foreign import ccall safe "hs_bindgen_e58f7e74d5dfd2f6"
hs_bindgen_e58f7e74d5dfd2f6_base
:: IO HsBindgen.Runtime.LibC.Word64
hs_bindgen_e58f7e74d5dfd2f6 :: IO SDL3.Sys.Bindgen.Stdinc.Uint64
hs_bindgen_e58f7e74d5dfd2f6 :: IO Uint64
hs_bindgen_e58f7e74d5dfd2f6 =
(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_e58f7e74d5dfd2f6_base
sDL_GetPerformanceCounter :: IO SDL3.Sys.Bindgen.Stdinc.Uint64
sDL_GetPerformanceCounter :: IO Uint64
sDL_GetPerformanceCounter =
IO Uint64
hs_bindgen_e58f7e74d5dfd2f6
foreign import ccall safe "hs_bindgen_3a4825ac03082c11"
hs_bindgen_3a4825ac03082c11_base
:: IO HsBindgen.Runtime.LibC.Word64
hs_bindgen_3a4825ac03082c11 :: IO SDL3.Sys.Bindgen.Stdinc.Uint64
hs_bindgen_3a4825ac03082c11 :: IO Uint64
hs_bindgen_3a4825ac03082c11 =
(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_3a4825ac03082c11_base
sDL_GetPerformanceFrequency :: IO SDL3.Sys.Bindgen.Stdinc.Uint64
sDL_GetPerformanceFrequency :: IO Uint64
sDL_GetPerformanceFrequency =
IO Uint64
hs_bindgen_3a4825ac03082c11
foreign import ccall safe "hs_bindgen_8754cd6d3f04ccff"
hs_bindgen_8754cd6d3f04ccff_base
:: HsBindgen.Runtime.LibC.Word32
-> IO ()
hs_bindgen_8754cd6d3f04ccff
:: SDL3.Sys.Bindgen.Stdinc.Uint32
-> IO ()
hs_bindgen_8754cd6d3f04ccff :: Uint32 -> IO ()
hs_bindgen_8754cd6d3f04ccff =
\Uint32
x0 ->
Word32 -> IO ()
hs_bindgen_8754cd6d3f04ccff_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_8754cd6d3f04ccff
foreign import ccall safe "hs_bindgen_4581488a34fdd3e7"
hs_bindgen_4581488a34fdd3e7_base
:: HsBindgen.Runtime.LibC.Word64
-> IO ()
hs_bindgen_4581488a34fdd3e7
:: SDL3.Sys.Bindgen.Stdinc.Uint64
-> IO ()
hs_bindgen_4581488a34fdd3e7 :: Uint64 -> IO ()
hs_bindgen_4581488a34fdd3e7 =
\Uint64
x0 ->
Word64 -> IO ()
hs_bindgen_4581488a34fdd3e7_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_4581488a34fdd3e7
foreign import ccall safe "hs_bindgen_19457ba0f1d978a7"
hs_bindgen_19457ba0f1d978a7_base
:: HsBindgen.Runtime.LibC.Word64
-> IO ()
hs_bindgen_19457ba0f1d978a7
:: SDL3.Sys.Bindgen.Stdinc.Uint64
-> IO ()
hs_bindgen_19457ba0f1d978a7 :: Uint64 -> IO ()
hs_bindgen_19457ba0f1d978a7 =
\Uint64
x0 ->
Word64 -> IO ()
hs_bindgen_19457ba0f1d978a7_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_19457ba0f1d978a7
foreign import ccall safe "hs_bindgen_1eb4863b9e459f9b"
hs_bindgen_1eb4863b9e459f9b_base
:: HsBindgen.Runtime.LibC.Word32
-> BG.FunPtr BG.Void
-> BG.Ptr BG.Void
-> IO HsBindgen.Runtime.LibC.Word32
hs_bindgen_1eb4863b9e459f9b
:: SDL3.Sys.Bindgen.Stdinc.Uint32
-> SDL_TimerCallback
-> BG.Ptr BG.Void
-> IO SDL_TimerID
hs_bindgen_1eb4863b9e459f9b :: Uint32 -> SDL_TimerCallback -> Ptr Void -> IO SDL_TimerID
hs_bindgen_1eb4863b9e459f9b =
\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_1eb4863b9e459f9b_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_1eb4863b9e459f9b
foreign import ccall safe "hs_bindgen_04843533c2eea6bf"
hs_bindgen_04843533c2eea6bf_base
:: HsBindgen.Runtime.LibC.Word64
-> BG.FunPtr BG.Void
-> BG.Ptr BG.Void
-> IO HsBindgen.Runtime.LibC.Word32
hs_bindgen_04843533c2eea6bf
:: SDL3.Sys.Bindgen.Stdinc.Uint64
-> SDL_NSTimerCallback
-> BG.Ptr BG.Void
-> IO SDL_TimerID
hs_bindgen_04843533c2eea6bf :: Uint64 -> SDL_NSTimerCallback -> Ptr Void -> IO SDL_TimerID
hs_bindgen_04843533c2eea6bf =
\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_04843533c2eea6bf_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_04843533c2eea6bf
foreign import ccall safe "hs_bindgen_3794f4416b9527ed"
hs_bindgen_3794f4416b9527ed_base
:: HsBindgen.Runtime.LibC.Word32
-> IO BG.CBool
hs_bindgen_3794f4416b9527ed
:: SDL_TimerID
-> IO BG.CBool
hs_bindgen_3794f4416b9527ed :: SDL_TimerID -> IO CBool
hs_bindgen_3794f4416b9527ed =
\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_3794f4416b9527ed_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_3794f4416b9527ed