{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE NoFieldSelectors #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_HADDOCK prune #-}
module SDL3.Sys.Bindgen.EndianShims.Unsafe (
SDL3.Sys.Bindgen.EndianShims.Unsafe.lithon_SDL_Swap16,
SDL3.Sys.Bindgen.EndianShims.Unsafe.lithon_SDL_Swap32,
SDL3.Sys.Bindgen.EndianShims.Unsafe.lithon_SDL_Swap64,
SDL3.Sys.Bindgen.EndianShims.Unsafe.lithon_SDL_Swap16LE,
SDL3.Sys.Bindgen.EndianShims.Unsafe.lithon_SDL_Swap32LE,
SDL3.Sys.Bindgen.EndianShims.Unsafe.lithon_SDL_Swap64LE,
SDL3.Sys.Bindgen.EndianShims.Unsafe.lithon_SDL_SwapFloatLE,
SDL3.Sys.Bindgen.EndianShims.Unsafe.lithon_SDL_Swap16BE,
SDL3.Sys.Bindgen.EndianShims.Unsafe.lithon_SDL_Swap32BE,
SDL3.Sys.Bindgen.EndianShims.Unsafe.lithon_SDL_Swap64BE,
SDL3.Sys.Bindgen.EndianShims.Unsafe.lithon_SDL_SwapFloatBE,
)
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_endian_shims.h>"
, "Uint16 hs_bindgen_882f703cb333be29 ("
, " Uint16 arg1"
, ")"
, "{"
, " return (lithon_SDL_Swap16)(arg1);"
, "}"
, "Uint32 hs_bindgen_af9f92ac0160930e ("
, " Uint32 arg1"
, ")"
, "{"
, " return (lithon_SDL_Swap32)(arg1);"
, "}"
, "Uint64 hs_bindgen_a76e576373ba9315 ("
, " Uint64 arg1"
, ")"
, "{"
, " return (lithon_SDL_Swap64)(arg1);"
, "}"
, "Uint16 hs_bindgen_ba2e727e2251e74a ("
, " Uint16 arg1"
, ")"
, "{"
, " return (lithon_SDL_Swap16LE)(arg1);"
, "}"
, "Uint32 hs_bindgen_534b6cb79f9a53da ("
, " Uint32 arg1"
, ")"
, "{"
, " return (lithon_SDL_Swap32LE)(arg1);"
, "}"
, "Uint64 hs_bindgen_1138811e72133911 ("
, " Uint64 arg1"
, ")"
, "{"
, " return (lithon_SDL_Swap64LE)(arg1);"
, "}"
, "float hs_bindgen_14edd560fa30714a ("
, " float arg1"
, ")"
, "{"
, " return (lithon_SDL_SwapFloatLE)(arg1);"
, "}"
, "Uint16 hs_bindgen_cfef4dbd360a587e ("
, " Uint16 arg1"
, ")"
, "{"
, " return (lithon_SDL_Swap16BE)(arg1);"
, "}"
, "Uint32 hs_bindgen_fef82eb9028f9b73 ("
, " Uint32 arg1"
, ")"
, "{"
, " return (lithon_SDL_Swap32BE)(arg1);"
, "}"
, "Uint64 hs_bindgen_617e37704da5f1a9 ("
, " Uint64 arg1"
, ")"
, "{"
, " return (lithon_SDL_Swap64BE)(arg1);"
, "}"
, "float hs_bindgen_1ba0c9ba8563300f ("
, " float arg1"
, ")"
, "{"
, " return (lithon_SDL_SwapFloatBE)(arg1);"
, "}"
]
)
)
foreign import ccall unsafe "hs_bindgen_882f703cb333be29"
hs_bindgen_882f703cb333be29_base
:: HsBindgen.Runtime.LibC.Word16
-> IO HsBindgen.Runtime.LibC.Word16
hs_bindgen_882f703cb333be29
:: SDL3.Sys.Bindgen.Stdinc.Uint16
-> IO SDL3.Sys.Bindgen.Stdinc.Uint16
hs_bindgen_882f703cb333be29 :: Uint16 -> IO Uint16
hs_bindgen_882f703cb333be29 =
\Uint16
x0 ->
(Word16 -> Uint16) -> IO Word16 -> IO Uint16
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Word16 -> Uint16
FFIType Uint16 -> Uint16
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType (Word16 -> IO Word16
hs_bindgen_882f703cb333be29_base (Uint16 -> FFIType Uint16
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Uint16
x0))
lithon_SDL_Swap16
:: SDL3.Sys.Bindgen.Stdinc.Uint16
-> IO SDL3.Sys.Bindgen.Stdinc.Uint16
lithon_SDL_Swap16 :: Uint16 -> IO Uint16
lithon_SDL_Swap16 = Uint16 -> IO Uint16
hs_bindgen_882f703cb333be29
foreign import ccall unsafe "hs_bindgen_af9f92ac0160930e"
hs_bindgen_af9f92ac0160930e_base
:: HsBindgen.Runtime.LibC.Word32
-> IO HsBindgen.Runtime.LibC.Word32
hs_bindgen_af9f92ac0160930e
:: SDL3.Sys.Bindgen.Stdinc.Uint32
-> IO SDL3.Sys.Bindgen.Stdinc.Uint32
hs_bindgen_af9f92ac0160930e :: Uint32 -> IO Uint32
hs_bindgen_af9f92ac0160930e =
\Uint32
x0 ->
(Word32 -> Uint32) -> IO Word32 -> IO Uint32
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Word32 -> Uint32
FFIType Uint32 -> Uint32
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType (Word32 -> IO Word32
hs_bindgen_af9f92ac0160930e_base (Uint32 -> FFIType Uint32
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Uint32
x0))
lithon_SDL_Swap32
:: SDL3.Sys.Bindgen.Stdinc.Uint32
-> IO SDL3.Sys.Bindgen.Stdinc.Uint32
lithon_SDL_Swap32 :: Uint32 -> IO Uint32
lithon_SDL_Swap32 = Uint32 -> IO Uint32
hs_bindgen_af9f92ac0160930e
foreign import ccall unsafe "hs_bindgen_a76e576373ba9315"
hs_bindgen_a76e576373ba9315_base
:: HsBindgen.Runtime.LibC.Word64
-> IO HsBindgen.Runtime.LibC.Word64
hs_bindgen_a76e576373ba9315
:: SDL3.Sys.Bindgen.Stdinc.Uint64
-> IO SDL3.Sys.Bindgen.Stdinc.Uint64
hs_bindgen_a76e576373ba9315 :: Uint64 -> IO Uint64
hs_bindgen_a76e576373ba9315 =
\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_a76e576373ba9315_base (Uint64 -> FFIType Uint64
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Uint64
x0))
lithon_SDL_Swap64
:: SDL3.Sys.Bindgen.Stdinc.Uint64
-> IO SDL3.Sys.Bindgen.Stdinc.Uint64
lithon_SDL_Swap64 :: Uint64 -> IO Uint64
lithon_SDL_Swap64 = Uint64 -> IO Uint64
hs_bindgen_a76e576373ba9315
foreign import ccall unsafe "hs_bindgen_ba2e727e2251e74a"
hs_bindgen_ba2e727e2251e74a_base
:: HsBindgen.Runtime.LibC.Word16
-> IO HsBindgen.Runtime.LibC.Word16
hs_bindgen_ba2e727e2251e74a
:: SDL3.Sys.Bindgen.Stdinc.Uint16
-> IO SDL3.Sys.Bindgen.Stdinc.Uint16
hs_bindgen_ba2e727e2251e74a :: Uint16 -> IO Uint16
hs_bindgen_ba2e727e2251e74a =
\Uint16
x0 ->
(Word16 -> Uint16) -> IO Word16 -> IO Uint16
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Word16 -> Uint16
FFIType Uint16 -> Uint16
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType (Word16 -> IO Word16
hs_bindgen_ba2e727e2251e74a_base (Uint16 -> FFIType Uint16
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Uint16
x0))
lithon_SDL_Swap16LE
:: SDL3.Sys.Bindgen.Stdinc.Uint16
-> IO SDL3.Sys.Bindgen.Stdinc.Uint16
lithon_SDL_Swap16LE :: Uint16 -> IO Uint16
lithon_SDL_Swap16LE = Uint16 -> IO Uint16
hs_bindgen_ba2e727e2251e74a
foreign import ccall unsafe "hs_bindgen_534b6cb79f9a53da"
hs_bindgen_534b6cb79f9a53da_base
:: HsBindgen.Runtime.LibC.Word32
-> IO HsBindgen.Runtime.LibC.Word32
hs_bindgen_534b6cb79f9a53da
:: SDL3.Sys.Bindgen.Stdinc.Uint32
-> IO SDL3.Sys.Bindgen.Stdinc.Uint32
hs_bindgen_534b6cb79f9a53da :: Uint32 -> IO Uint32
hs_bindgen_534b6cb79f9a53da =
\Uint32
x0 ->
(Word32 -> Uint32) -> IO Word32 -> IO Uint32
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Word32 -> Uint32
FFIType Uint32 -> Uint32
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType (Word32 -> IO Word32
hs_bindgen_534b6cb79f9a53da_base (Uint32 -> FFIType Uint32
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Uint32
x0))
lithon_SDL_Swap32LE
:: SDL3.Sys.Bindgen.Stdinc.Uint32
-> IO SDL3.Sys.Bindgen.Stdinc.Uint32
lithon_SDL_Swap32LE :: Uint32 -> IO Uint32
lithon_SDL_Swap32LE = Uint32 -> IO Uint32
hs_bindgen_534b6cb79f9a53da
foreign import ccall unsafe "hs_bindgen_1138811e72133911"
hs_bindgen_1138811e72133911_base
:: HsBindgen.Runtime.LibC.Word64
-> IO HsBindgen.Runtime.LibC.Word64
hs_bindgen_1138811e72133911
:: SDL3.Sys.Bindgen.Stdinc.Uint64
-> IO SDL3.Sys.Bindgen.Stdinc.Uint64
hs_bindgen_1138811e72133911 :: Uint64 -> IO Uint64
hs_bindgen_1138811e72133911 =
\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_1138811e72133911_base (Uint64 -> FFIType Uint64
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Uint64
x0))
lithon_SDL_Swap64LE
:: SDL3.Sys.Bindgen.Stdinc.Uint64
-> IO SDL3.Sys.Bindgen.Stdinc.Uint64
lithon_SDL_Swap64LE :: Uint64 -> IO Uint64
lithon_SDL_Swap64LE = Uint64 -> IO Uint64
hs_bindgen_1138811e72133911
foreign import ccall unsafe "hs_bindgen_14edd560fa30714a"
hs_bindgen_14edd560fa30714a_base
:: BG.CFloat
-> IO BG.CFloat
hs_bindgen_14edd560fa30714a
:: BG.CFloat
-> IO BG.CFloat
hs_bindgen_14edd560fa30714a :: CFloat -> IO CFloat
hs_bindgen_14edd560fa30714a =
\CFloat
x0 ->
(CFloat -> CFloat) -> IO CFloat -> IO CFloat
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap CFloat -> CFloat
FFIType CFloat -> CFloat
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType (CFloat -> IO CFloat
hs_bindgen_14edd560fa30714a_base (CFloat -> FFIType CFloat
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType CFloat
x0))
lithon_SDL_SwapFloatLE
:: BG.CFloat
-> IO BG.CFloat
lithon_SDL_SwapFloatLE :: CFloat -> IO CFloat
lithon_SDL_SwapFloatLE = CFloat -> IO CFloat
hs_bindgen_14edd560fa30714a
foreign import ccall unsafe "hs_bindgen_cfef4dbd360a587e"
hs_bindgen_cfef4dbd360a587e_base
:: HsBindgen.Runtime.LibC.Word16
-> IO HsBindgen.Runtime.LibC.Word16
hs_bindgen_cfef4dbd360a587e
:: SDL3.Sys.Bindgen.Stdinc.Uint16
-> IO SDL3.Sys.Bindgen.Stdinc.Uint16
hs_bindgen_cfef4dbd360a587e :: Uint16 -> IO Uint16
hs_bindgen_cfef4dbd360a587e =
\Uint16
x0 ->
(Word16 -> Uint16) -> IO Word16 -> IO Uint16
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Word16 -> Uint16
FFIType Uint16 -> Uint16
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType (Word16 -> IO Word16
hs_bindgen_cfef4dbd360a587e_base (Uint16 -> FFIType Uint16
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Uint16
x0))
lithon_SDL_Swap16BE
:: SDL3.Sys.Bindgen.Stdinc.Uint16
-> IO SDL3.Sys.Bindgen.Stdinc.Uint16
lithon_SDL_Swap16BE :: Uint16 -> IO Uint16
lithon_SDL_Swap16BE = Uint16 -> IO Uint16
hs_bindgen_cfef4dbd360a587e
foreign import ccall unsafe "hs_bindgen_fef82eb9028f9b73"
hs_bindgen_fef82eb9028f9b73_base
:: HsBindgen.Runtime.LibC.Word32
-> IO HsBindgen.Runtime.LibC.Word32
hs_bindgen_fef82eb9028f9b73
:: SDL3.Sys.Bindgen.Stdinc.Uint32
-> IO SDL3.Sys.Bindgen.Stdinc.Uint32
hs_bindgen_fef82eb9028f9b73 :: Uint32 -> IO Uint32
hs_bindgen_fef82eb9028f9b73 =
\Uint32
x0 ->
(Word32 -> Uint32) -> IO Word32 -> IO Uint32
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Word32 -> Uint32
FFIType Uint32 -> Uint32
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType (Word32 -> IO Word32
hs_bindgen_fef82eb9028f9b73_base (Uint32 -> FFIType Uint32
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Uint32
x0))
lithon_SDL_Swap32BE
:: SDL3.Sys.Bindgen.Stdinc.Uint32
-> IO SDL3.Sys.Bindgen.Stdinc.Uint32
lithon_SDL_Swap32BE :: Uint32 -> IO Uint32
lithon_SDL_Swap32BE = Uint32 -> IO Uint32
hs_bindgen_fef82eb9028f9b73
foreign import ccall unsafe "hs_bindgen_617e37704da5f1a9"
hs_bindgen_617e37704da5f1a9_base
:: HsBindgen.Runtime.LibC.Word64
-> IO HsBindgen.Runtime.LibC.Word64
hs_bindgen_617e37704da5f1a9
:: SDL3.Sys.Bindgen.Stdinc.Uint64
-> IO SDL3.Sys.Bindgen.Stdinc.Uint64
hs_bindgen_617e37704da5f1a9 :: Uint64 -> IO Uint64
hs_bindgen_617e37704da5f1a9 =
\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_617e37704da5f1a9_base (Uint64 -> FFIType Uint64
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Uint64
x0))
lithon_SDL_Swap64BE
:: SDL3.Sys.Bindgen.Stdinc.Uint64
-> IO SDL3.Sys.Bindgen.Stdinc.Uint64
lithon_SDL_Swap64BE :: Uint64 -> IO Uint64
lithon_SDL_Swap64BE = Uint64 -> IO Uint64
hs_bindgen_617e37704da5f1a9
foreign import ccall unsafe "hs_bindgen_1ba0c9ba8563300f"
hs_bindgen_1ba0c9ba8563300f_base
:: BG.CFloat
-> IO BG.CFloat
hs_bindgen_1ba0c9ba8563300f
:: BG.CFloat
-> IO BG.CFloat
hs_bindgen_1ba0c9ba8563300f :: CFloat -> IO CFloat
hs_bindgen_1ba0c9ba8563300f =
\CFloat
x0 ->
(CFloat -> CFloat) -> IO CFloat -> IO CFloat
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap CFloat -> CFloat
FFIType CFloat -> CFloat
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType (CFloat -> IO CFloat
hs_bindgen_1ba0c9ba8563300f_base (CFloat -> FFIType CFloat
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType CFloat
x0))
lithon_SDL_SwapFloatBE
:: BG.CFloat
-> IO BG.CFloat
lithon_SDL_SwapFloatBE :: CFloat -> IO CFloat
lithon_SDL_SwapFloatBE = CFloat -> IO CFloat
hs_bindgen_1ba0c9ba8563300f