{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE NoFieldSelectors #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_HADDOCK prune #-}
module SDL3.Sys.Bindgen.Time.Safe (
SDL3.Sys.Bindgen.Time.Safe.sDL_GetDateTimeLocalePreferences,
SDL3.Sys.Bindgen.Time.Safe.sDL_GetCurrentTime,
SDL3.Sys.Bindgen.Time.Safe.sDL_TimeToDateTime,
SDL3.Sys.Bindgen.Time.Safe.sDL_DateTimeToTime,
SDL3.Sys.Bindgen.Time.Safe.sDL_TimeToWindows,
SDL3.Sys.Bindgen.Time.Safe.sDL_TimeFromWindows,
SDL3.Sys.Bindgen.Time.Safe.sDL_GetDaysInMonth,
SDL3.Sys.Bindgen.Time.Safe.sDL_GetDayOfYear,
SDL3.Sys.Bindgen.Time.Safe.sDL_GetDayOfWeek,
)
where
import Prelude (IO, fmap)
import HsBindgen.Runtime.LibC qualified
import HsBindgen.Runtime.PtrConst qualified as PtrConst
import HsBindgen.Runtime.Support qualified as BG
import HsBindgen.Runtime.Support.CAPI qualified
import SDL3.Sys.Bindgen.Stdinc qualified
import SDL3.Sys.Bindgen.Time
$( 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_time.h>"
, "_Bool hs_bindgen_35c19e2819b62184 ("
, " SDL_DateFormat *arg1,"
, " SDL_TimeFormat *arg2"
, ")"
, "{"
, " return (SDL_GetDateTimeLocalePreferences)(arg1, arg2);"
, "}"
, "_Bool hs_bindgen_6fb3c3e03b775a52 ("
, " SDL_Time *arg1"
, ")"
, "{"
, " return (SDL_GetCurrentTime)(arg1);"
, "}"
, "_Bool hs_bindgen_89e36f4522d6cda0 ("
, " SDL_Time arg1,"
, " SDL_DateTime *arg2,"
, " _Bool arg3"
, ")"
, "{"
, " return (SDL_TimeToDateTime)(arg1, arg2, arg3);"
, "}"
, "_Bool hs_bindgen_caee0a375b8a5ff2 ("
, " SDL_DateTime const *arg1,"
, " SDL_Time *arg2"
, ")"
, "{"
, " return (SDL_DateTimeToTime)(arg1, arg2);"
, "}"
, "void hs_bindgen_5de74c256e5d982b ("
, " SDL_Time arg1,"
, " Uint32 *arg2,"
, " Uint32 *arg3"
, ")"
, "{"
, " (SDL_TimeToWindows)(arg1, arg2, arg3);"
, "}"
, "SDL_Time hs_bindgen_4499efff303d7db9 ("
, " Uint32 arg1,"
, " Uint32 arg2"
, ")"
, "{"
, " return (SDL_TimeFromWindows)(arg1, arg2);"
, "}"
, "signed int hs_bindgen_730455fde72d5545 ("
, " signed int arg1,"
, " signed int arg2"
, ")"
, "{"
, " return (SDL_GetDaysInMonth)(arg1, arg2);"
, "}"
, "signed int hs_bindgen_9a9db640e42ae3ab ("
, " signed int arg1,"
, " signed int arg2,"
, " signed int arg3"
, ")"
, "{"
, " return (SDL_GetDayOfYear)(arg1, arg2, arg3);"
, "}"
, "signed int hs_bindgen_edb5a4338549d6b2 ("
, " signed int arg1,"
, " signed int arg2,"
, " signed int arg3"
, ")"
, "{"
, " return (SDL_GetDayOfWeek)(arg1, arg2, arg3);"
, "}"
]
)
)
foreign import ccall safe "hs_bindgen_35c19e2819b62184"
hs_bindgen_35c19e2819b62184_base
:: BG.Ptr BG.Void
-> BG.Ptr BG.Void
-> IO BG.CBool
hs_bindgen_35c19e2819b62184
:: BG.Ptr SDL_DateFormat
-> BG.Ptr SDL_TimeFormat
-> IO BG.CBool
hs_bindgen_35c19e2819b62184 :: Ptr SDL_DateFormat -> Ptr SDL_TimeFormat -> IO CBool
hs_bindgen_35c19e2819b62184 =
\Ptr SDL_DateFormat
x0 ->
\Ptr SDL_TimeFormat
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 (Ptr Void -> Ptr Void -> IO CBool
hs_bindgen_35c19e2819b62184_base (Ptr SDL_DateFormat -> FFIType (Ptr SDL_DateFormat)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Ptr SDL_DateFormat
x0) (Ptr SDL_TimeFormat -> FFIType (Ptr SDL_TimeFormat)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Ptr SDL_TimeFormat
x1))
sDL_GetDateTimeLocalePreferences
:: BG.Ptr SDL_DateFormat
-> BG.Ptr SDL_TimeFormat
-> IO BG.CBool
sDL_GetDateTimeLocalePreferences :: Ptr SDL_DateFormat -> Ptr SDL_TimeFormat -> IO CBool
sDL_GetDateTimeLocalePreferences =
Ptr SDL_DateFormat -> Ptr SDL_TimeFormat -> IO CBool
hs_bindgen_35c19e2819b62184
foreign import ccall safe "hs_bindgen_6fb3c3e03b775a52"
hs_bindgen_6fb3c3e03b775a52_base
:: BG.Ptr BG.Void
-> IO BG.CBool
hs_bindgen_6fb3c3e03b775a52
:: BG.Ptr SDL3.Sys.Bindgen.Stdinc.SDL_Time
-> IO BG.CBool
hs_bindgen_6fb3c3e03b775a52 :: Ptr SDL_Time -> IO CBool
hs_bindgen_6fb3c3e03b775a52 =
\Ptr SDL_Time
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 (Ptr Void -> IO CBool
hs_bindgen_6fb3c3e03b775a52_base (Ptr SDL_Time -> FFIType (Ptr SDL_Time)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Ptr SDL_Time
x0))
sDL_GetCurrentTime
:: BG.Ptr SDL3.Sys.Bindgen.Stdinc.SDL_Time
-> IO BG.CBool
sDL_GetCurrentTime :: Ptr SDL_Time -> IO CBool
sDL_GetCurrentTime = Ptr SDL_Time -> IO CBool
hs_bindgen_6fb3c3e03b775a52
foreign import ccall safe "hs_bindgen_89e36f4522d6cda0"
hs_bindgen_89e36f4522d6cda0_base
:: HsBindgen.Runtime.LibC.Int64
-> BG.Ptr BG.Void
-> BG.CBool
-> IO BG.CBool
hs_bindgen_89e36f4522d6cda0
:: SDL3.Sys.Bindgen.Stdinc.SDL_Time
-> BG.Ptr SDL_DateTime
-> BG.CBool
-> IO BG.CBool
hs_bindgen_89e36f4522d6cda0 :: SDL_Time -> Ptr SDL_DateTime -> CBool -> IO CBool
hs_bindgen_89e36f4522d6cda0 =
\SDL_Time
x0 ->
\Ptr SDL_DateTime
x1 ->
\CBool
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 -> Ptr Void -> CBool -> IO CBool
hs_bindgen_89e36f4522d6cda0_base (SDL_Time -> FFIType SDL_Time
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType SDL_Time
x0) (Ptr SDL_DateTime -> FFIType (Ptr SDL_DateTime)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Ptr SDL_DateTime
x1) (CBool -> FFIType CBool
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType CBool
x2))
sDL_TimeToDateTime
:: SDL3.Sys.Bindgen.Stdinc.SDL_Time
-> BG.Ptr SDL_DateTime
-> BG.CBool
-> IO BG.CBool
sDL_TimeToDateTime :: SDL_Time -> Ptr SDL_DateTime -> CBool -> IO CBool
sDL_TimeToDateTime = SDL_Time -> Ptr SDL_DateTime -> CBool -> IO CBool
hs_bindgen_89e36f4522d6cda0
foreign import ccall safe "hs_bindgen_caee0a375b8a5ff2"
hs_bindgen_caee0a375b8a5ff2_base
:: BG.Ptr BG.Void
-> BG.Ptr BG.Void
-> IO BG.CBool
hs_bindgen_caee0a375b8a5ff2
:: PtrConst.PtrConst SDL_DateTime
-> BG.Ptr SDL3.Sys.Bindgen.Stdinc.SDL_Time
-> IO BG.CBool
hs_bindgen_caee0a375b8a5ff2 :: PtrConst SDL_DateTime -> Ptr SDL_Time -> IO CBool
hs_bindgen_caee0a375b8a5ff2 =
\PtrConst SDL_DateTime
x0 ->
\Ptr SDL_Time
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 (Ptr Void -> Ptr Void -> IO CBool
hs_bindgen_caee0a375b8a5ff2_base (PtrConst SDL_DateTime -> FFIType (PtrConst SDL_DateTime)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType PtrConst SDL_DateTime
x0) (Ptr SDL_Time -> FFIType (Ptr SDL_Time)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Ptr SDL_Time
x1))
sDL_DateTimeToTime
:: PtrConst.PtrConst SDL_DateTime
-> BG.Ptr SDL3.Sys.Bindgen.Stdinc.SDL_Time
-> IO BG.CBool
sDL_DateTimeToTime :: PtrConst SDL_DateTime -> Ptr SDL_Time -> IO CBool
sDL_DateTimeToTime = PtrConst SDL_DateTime -> Ptr SDL_Time -> IO CBool
hs_bindgen_caee0a375b8a5ff2
foreign import ccall safe "hs_bindgen_5de74c256e5d982b"
hs_bindgen_5de74c256e5d982b_base
:: HsBindgen.Runtime.LibC.Int64
-> BG.Ptr BG.Void
-> BG.Ptr BG.Void
-> IO ()
hs_bindgen_5de74c256e5d982b
:: SDL3.Sys.Bindgen.Stdinc.SDL_Time
-> BG.Ptr SDL3.Sys.Bindgen.Stdinc.Uint32
-> BG.Ptr SDL3.Sys.Bindgen.Stdinc.Uint32
-> IO ()
hs_bindgen_5de74c256e5d982b :: SDL_Time -> Ptr Uint32 -> Ptr Uint32 -> IO ()
hs_bindgen_5de74c256e5d982b =
\SDL_Time
x0 ->
\Ptr Uint32
x1 ->
\Ptr Uint32
x2 ->
Int64 -> Ptr Void -> Ptr Void -> IO ()
hs_bindgen_5de74c256e5d982b_base (SDL_Time -> FFIType SDL_Time
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType SDL_Time
x0) (Ptr Uint32 -> FFIType (Ptr Uint32)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Ptr Uint32
x1) (Ptr Uint32 -> FFIType (Ptr Uint32)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Ptr Uint32
x2)
sDL_TimeToWindows
:: SDL3.Sys.Bindgen.Stdinc.SDL_Time
-> BG.Ptr SDL3.Sys.Bindgen.Stdinc.Uint32
-> BG.Ptr SDL3.Sys.Bindgen.Stdinc.Uint32
-> IO ()
sDL_TimeToWindows :: SDL_Time -> Ptr Uint32 -> Ptr Uint32 -> IO ()
sDL_TimeToWindows = SDL_Time -> Ptr Uint32 -> Ptr Uint32 -> IO ()
hs_bindgen_5de74c256e5d982b
foreign import ccall safe "hs_bindgen_4499efff303d7db9"
hs_bindgen_4499efff303d7db9_base
:: HsBindgen.Runtime.LibC.Word32
-> HsBindgen.Runtime.LibC.Word32
-> IO HsBindgen.Runtime.LibC.Int64
hs_bindgen_4499efff303d7db9
:: SDL3.Sys.Bindgen.Stdinc.Uint32
-> SDL3.Sys.Bindgen.Stdinc.Uint32
-> IO SDL3.Sys.Bindgen.Stdinc.SDL_Time
hs_bindgen_4499efff303d7db9 :: Uint32 -> Uint32 -> IO SDL_Time
hs_bindgen_4499efff303d7db9 =
\Uint32
x0 ->
\Uint32
x1 ->
(Int64 -> SDL_Time) -> IO Int64 -> IO SDL_Time
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Int64 -> SDL_Time
FFIType SDL_Time -> SDL_Time
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType (Word32 -> Word32 -> IO Int64
hs_bindgen_4499efff303d7db9_base (Uint32 -> FFIType Uint32
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Uint32
x0) (Uint32 -> FFIType Uint32
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Uint32
x1))
sDL_TimeFromWindows
:: SDL3.Sys.Bindgen.Stdinc.Uint32
-> SDL3.Sys.Bindgen.Stdinc.Uint32
-> IO SDL3.Sys.Bindgen.Stdinc.SDL_Time
sDL_TimeFromWindows :: Uint32 -> Uint32 -> IO SDL_Time
sDL_TimeFromWindows = Uint32 -> Uint32 -> IO SDL_Time
hs_bindgen_4499efff303d7db9
foreign import ccall safe "hs_bindgen_730455fde72d5545"
hs_bindgen_730455fde72d5545_base
:: BG.CInt
-> BG.CInt
-> IO BG.CInt
hs_bindgen_730455fde72d5545
:: BG.CInt
-> BG.CInt
-> IO BG.CInt
hs_bindgen_730455fde72d5545 :: CInt -> CInt -> IO CInt
hs_bindgen_730455fde72d5545 =
\CInt
x0 ->
\CInt
x1 ->
(CInt -> CInt) -> IO CInt -> IO CInt
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap CInt -> CInt
FFIType CInt -> CInt
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType (CInt -> CInt -> IO CInt
hs_bindgen_730455fde72d5545_base (CInt -> FFIType CInt
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType CInt
x0) (CInt -> FFIType CInt
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType CInt
x1))
sDL_GetDaysInMonth
:: BG.CInt
-> BG.CInt
-> IO BG.CInt
sDL_GetDaysInMonth :: CInt -> CInt -> IO CInt
sDL_GetDaysInMonth = CInt -> CInt -> IO CInt
hs_bindgen_730455fde72d5545
foreign import ccall safe "hs_bindgen_9a9db640e42ae3ab"
hs_bindgen_9a9db640e42ae3ab_base
:: BG.CInt
-> BG.CInt
-> BG.CInt
-> IO BG.CInt
hs_bindgen_9a9db640e42ae3ab
:: BG.CInt
-> BG.CInt
-> BG.CInt
-> IO BG.CInt
hs_bindgen_9a9db640e42ae3ab :: CInt -> CInt -> CInt -> IO CInt
hs_bindgen_9a9db640e42ae3ab =
\CInt
x0 ->
\CInt
x1 ->
\CInt
x2 ->
(CInt -> CInt) -> IO CInt -> IO CInt
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap
CInt -> CInt
FFIType CInt -> CInt
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType
(CInt -> CInt -> CInt -> IO CInt
hs_bindgen_9a9db640e42ae3ab_base (CInt -> FFIType CInt
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType CInt
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_GetDayOfYear
:: BG.CInt
-> BG.CInt
-> BG.CInt
-> IO BG.CInt
sDL_GetDayOfYear :: CInt -> CInt -> CInt -> IO CInt
sDL_GetDayOfYear = CInt -> CInt -> CInt -> IO CInt
hs_bindgen_9a9db640e42ae3ab
foreign import ccall safe "hs_bindgen_edb5a4338549d6b2"
hs_bindgen_edb5a4338549d6b2_base
:: BG.CInt
-> BG.CInt
-> BG.CInt
-> IO BG.CInt
hs_bindgen_edb5a4338549d6b2
:: BG.CInt
-> BG.CInt
-> BG.CInt
-> IO BG.CInt
hs_bindgen_edb5a4338549d6b2 :: CInt -> CInt -> CInt -> IO CInt
hs_bindgen_edb5a4338549d6b2 =
\CInt
x0 ->
\CInt
x1 ->
\CInt
x2 ->
(CInt -> CInt) -> IO CInt -> IO CInt
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap
CInt -> CInt
FFIType CInt -> CInt
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType
(CInt -> CInt -> CInt -> IO CInt
hs_bindgen_edb5a4338549d6b2_base (CInt -> FFIType CInt
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType CInt
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_GetDayOfWeek
:: BG.CInt
-> BG.CInt
-> BG.CInt
-> IO BG.CInt
sDL_GetDayOfWeek :: CInt -> CInt -> CInt -> IO CInt
sDL_GetDayOfWeek = CInt -> CInt -> CInt -> IO CInt
hs_bindgen_edb5a4338549d6b2