{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE NoFieldSelectors #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_HADDOCK prune #-}
module SDL3.Sys.Bindgen.TimerShims.Safe (
SDL3.Sys.Bindgen.TimerShims.Safe.lithon_SDL_SECONDS_TO_NS,
SDL3.Sys.Bindgen.TimerShims.Safe.lithon_SDL_MS_TO_NS,
SDL3.Sys.Bindgen.TimerShims.Safe.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_50109c3230bdd074 ("
, " Uint64 arg1"
, ")"
, "{"
, " return (lithon_SDL_SECONDS_TO_NS)(arg1);"
, "}"
, "Uint64 hs_bindgen_d8988511c30941de ("
, " Uint64 arg1"
, ")"
, "{"
, " return (lithon_SDL_MS_TO_NS)(arg1);"
, "}"
, "Uint64 hs_bindgen_7ebf8cc80dec18d5 ("
, " Uint64 arg1"
, ")"
, "{"
, " return (lithon_SDL_US_TO_NS)(arg1);"
, "}"
]
)
)
foreign import ccall safe "hs_bindgen_50109c3230bdd074"
hs_bindgen_50109c3230bdd074_base
:: HsBindgen.Runtime.LibC.Word64
-> IO HsBindgen.Runtime.LibC.Word64
hs_bindgen_50109c3230bdd074
:: SDL3.Sys.Bindgen.Stdinc.Uint64
-> IO SDL3.Sys.Bindgen.Stdinc.Uint64
hs_bindgen_50109c3230bdd074 :: Uint64 -> IO Uint64
hs_bindgen_50109c3230bdd074 =
\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_50109c3230bdd074_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_50109c3230bdd074
foreign import ccall safe "hs_bindgen_d8988511c30941de"
hs_bindgen_d8988511c30941de_base
:: HsBindgen.Runtime.LibC.Word64
-> IO HsBindgen.Runtime.LibC.Word64
hs_bindgen_d8988511c30941de
:: SDL3.Sys.Bindgen.Stdinc.Uint64
-> IO SDL3.Sys.Bindgen.Stdinc.Uint64
hs_bindgen_d8988511c30941de :: Uint64 -> IO Uint64
hs_bindgen_d8988511c30941de =
\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_d8988511c30941de_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_d8988511c30941de
foreign import ccall safe "hs_bindgen_7ebf8cc80dec18d5"
hs_bindgen_7ebf8cc80dec18d5_base
:: HsBindgen.Runtime.LibC.Word64
-> IO HsBindgen.Runtime.LibC.Word64
hs_bindgen_7ebf8cc80dec18d5
:: SDL3.Sys.Bindgen.Stdinc.Uint64
-> IO SDL3.Sys.Bindgen.Stdinc.Uint64
hs_bindgen_7ebf8cc80dec18d5 :: Uint64 -> IO Uint64
hs_bindgen_7ebf8cc80dec18d5 =
\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_7ebf8cc80dec18d5_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_7ebf8cc80dec18d5