{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE NoFieldSelectors #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_HADDOCK prune #-}
module SDL3.Sys.Bindgen.TimerShims.Unsafe (
SDL3.Sys.Bindgen.TimerShims.Unsafe.lithon_SDL_SECONDS_TO_NS,
SDL3.Sys.Bindgen.TimerShims.Unsafe.lithon_SDL_MS_TO_NS,
SDL3.Sys.Bindgen.TimerShims.Unsafe.lithon_SDL_US_TO_NS,
)
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
$( 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-bindgen-sys/SDL_timer_shims.h>"
, "Uint64 hs_bindgen_0447cf08139ac18b ("
, " Uint64 arg1"
, ")"
, "{"
, " return (lithon_SDL_SECONDS_TO_NS)(arg1);"
, "}"
, "Uint64 hs_bindgen_5f508296550393f9 ("
, " Uint64 arg1"
, ")"
, "{"
, " return (lithon_SDL_MS_TO_NS)(arg1);"
, "}"
, "Uint64 hs_bindgen_70ba6a3967e18243 ("
, " Uint64 arg1"
, ")"
, "{"
, " return (lithon_SDL_US_TO_NS)(arg1);"
, "}"
]
)
)
foreign import ccall unsafe "hs_bindgen_0447cf08139ac18b"
hs_bindgen_0447cf08139ac18b_base
:: HsBindgen.Runtime.LibC.Word64
-> IO HsBindgen.Runtime.LibC.Word64
hs_bindgen_0447cf08139ac18b
:: SDL3.Sys.Bindgen.Stdinc.Uint64
-> IO SDL3.Sys.Bindgen.Stdinc.Uint64
hs_bindgen_0447cf08139ac18b :: Uint64 -> IO Uint64
hs_bindgen_0447cf08139ac18b =
\Uint64
x0 ->
(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 (Word64 -> IO Word64
hs_bindgen_0447cf08139ac18b_base (Uint64 -> FFIType Uint64
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Uint64
x0))
lithon_SDL_SECONDS_TO_NS
:: SDL3.Sys.Bindgen.Stdinc.Uint64
-> IO SDL3.Sys.Bindgen.Stdinc.Uint64
lithon_SDL_SECONDS_TO_NS :: Uint64 -> IO Uint64
lithon_SDL_SECONDS_TO_NS =
Uint64 -> IO Uint64
hs_bindgen_0447cf08139ac18b
foreign import ccall unsafe "hs_bindgen_5f508296550393f9"
hs_bindgen_5f508296550393f9_base
:: HsBindgen.Runtime.LibC.Word64
-> IO HsBindgen.Runtime.LibC.Word64
hs_bindgen_5f508296550393f9
:: SDL3.Sys.Bindgen.Stdinc.Uint64
-> IO SDL3.Sys.Bindgen.Stdinc.Uint64
hs_bindgen_5f508296550393f9 :: Uint64 -> IO Uint64
hs_bindgen_5f508296550393f9 =
\Uint64
x0 ->
(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 (Word64 -> IO Word64
hs_bindgen_5f508296550393f9_base (Uint64 -> FFIType Uint64
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Uint64
x0))
lithon_SDL_MS_TO_NS
:: SDL3.Sys.Bindgen.Stdinc.Uint64
-> IO SDL3.Sys.Bindgen.Stdinc.Uint64
lithon_SDL_MS_TO_NS :: Uint64 -> IO Uint64
lithon_SDL_MS_TO_NS = Uint64 -> IO Uint64
hs_bindgen_5f508296550393f9
foreign import ccall unsafe "hs_bindgen_70ba6a3967e18243"
hs_bindgen_70ba6a3967e18243_base
:: HsBindgen.Runtime.LibC.Word64
-> IO HsBindgen.Runtime.LibC.Word64
hs_bindgen_70ba6a3967e18243
:: SDL3.Sys.Bindgen.Stdinc.Uint64
-> IO SDL3.Sys.Bindgen.Stdinc.Uint64
hs_bindgen_70ba6a3967e18243 :: Uint64 -> IO Uint64
hs_bindgen_70ba6a3967e18243 =
\Uint64
x0 ->
(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 (Word64 -> IO Word64
hs_bindgen_70ba6a3967e18243_base (Uint64 -> FFIType Uint64
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Uint64
x0))
lithon_SDL_US_TO_NS
:: SDL3.Sys.Bindgen.Stdinc.Uint64
-> IO SDL3.Sys.Bindgen.Stdinc.Uint64
lithon_SDL_US_TO_NS :: Uint64 -> IO Uint64
lithon_SDL_US_TO_NS = Uint64 -> IO Uint64
hs_bindgen_70ba6a3967e18243