{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE NoFieldSelectors #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_HADDOCK prune #-}
module SDL3.Sys.Bindgen.EndianShims.Safe (
SDL3.Sys.Bindgen.EndianShims.Safe.lithon_SDL_Swap16,
SDL3.Sys.Bindgen.EndianShims.Safe.lithon_SDL_Swap32,
SDL3.Sys.Bindgen.EndianShims.Safe.lithon_SDL_Swap64,
SDL3.Sys.Bindgen.EndianShims.Safe.lithon_SDL_Swap16LE,
SDL3.Sys.Bindgen.EndianShims.Safe.lithon_SDL_Swap32LE,
SDL3.Sys.Bindgen.EndianShims.Safe.lithon_SDL_Swap64LE,
SDL3.Sys.Bindgen.EndianShims.Safe.lithon_SDL_SwapFloatLE,
SDL3.Sys.Bindgen.EndianShims.Safe.lithon_SDL_Swap16BE,
SDL3.Sys.Bindgen.EndianShims.Safe.lithon_SDL_Swap32BE,
SDL3.Sys.Bindgen.EndianShims.Safe.lithon_SDL_Swap64BE,
SDL3.Sys.Bindgen.EndianShims.Safe.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_2ea637caeefe4aa3 ("
, " Uint16 arg1"
, ")"
, "{"
, " return (lithon_SDL_Swap16)(arg1);"
, "}"
, "Uint32 hs_bindgen_d8dafdb03a84dea6 ("
, " Uint32 arg1"
, ")"
, "{"
, " return (lithon_SDL_Swap32)(arg1);"
, "}"
, "Uint64 hs_bindgen_2a59fd2cead65c85 ("
, " Uint64 arg1"
, ")"
, "{"
, " return (lithon_SDL_Swap64)(arg1);"
, "}"
, "Uint16 hs_bindgen_1f4c504e2d406d5d ("
, " Uint16 arg1"
, ")"
, "{"
, " return (lithon_SDL_Swap16LE)(arg1);"
, "}"
, "Uint32 hs_bindgen_83c800b17676e351 ("
, " Uint32 arg1"
, ")"
, "{"
, " return (lithon_SDL_Swap32LE)(arg1);"
, "}"
, "Uint64 hs_bindgen_a8299e2a08d3f0eb ("
, " Uint64 arg1"
, ")"
, "{"
, " return (lithon_SDL_Swap64LE)(arg1);"
, "}"
, "float hs_bindgen_3cbb3bb4c5039011 ("
, " float arg1"
, ")"
, "{"
, " return (lithon_SDL_SwapFloatLE)(arg1);"
, "}"
, "Uint16 hs_bindgen_3821b24e3d8e81ce ("
, " Uint16 arg1"
, ")"
, "{"
, " return (lithon_SDL_Swap16BE)(arg1);"
, "}"
, "Uint32 hs_bindgen_e3aaa35768c646a0 ("
, " Uint32 arg1"
, ")"
, "{"
, " return (lithon_SDL_Swap32BE)(arg1);"
, "}"
, "Uint64 hs_bindgen_6201a0f0896f9116 ("
, " Uint64 arg1"
, ")"
, "{"
, " return (lithon_SDL_Swap64BE)(arg1);"
, "}"
, "float hs_bindgen_770a79534d696eb6 ("
, " float arg1"
, ")"
, "{"
, " return (lithon_SDL_SwapFloatBE)(arg1);"
, "}"
]
)
)
foreign import ccall safe "hs_bindgen_2ea637caeefe4aa3"
hs_bindgen_2ea637caeefe4aa3_base
:: HsBindgen.Runtime.LibC.Word16
-> IO HsBindgen.Runtime.LibC.Word16
hs_bindgen_2ea637caeefe4aa3
:: SDL3.Sys.Bindgen.Stdinc.Uint16
-> IO SDL3.Sys.Bindgen.Stdinc.Uint16
hs_bindgen_2ea637caeefe4aa3 :: Uint16 -> IO Uint16
hs_bindgen_2ea637caeefe4aa3 =
\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_2ea637caeefe4aa3_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_2ea637caeefe4aa3
foreign import ccall safe "hs_bindgen_d8dafdb03a84dea6"
hs_bindgen_d8dafdb03a84dea6_base
:: HsBindgen.Runtime.LibC.Word32
-> IO HsBindgen.Runtime.LibC.Word32
hs_bindgen_d8dafdb03a84dea6
:: SDL3.Sys.Bindgen.Stdinc.Uint32
-> IO SDL3.Sys.Bindgen.Stdinc.Uint32
hs_bindgen_d8dafdb03a84dea6 :: Uint32 -> IO Uint32
hs_bindgen_d8dafdb03a84dea6 =
\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_d8dafdb03a84dea6_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_d8dafdb03a84dea6
foreign import ccall safe "hs_bindgen_2a59fd2cead65c85"
hs_bindgen_2a59fd2cead65c85_base
:: HsBindgen.Runtime.LibC.Word64
-> IO HsBindgen.Runtime.LibC.Word64
hs_bindgen_2a59fd2cead65c85
:: SDL3.Sys.Bindgen.Stdinc.Uint64
-> IO SDL3.Sys.Bindgen.Stdinc.Uint64
hs_bindgen_2a59fd2cead65c85 :: Uint64 -> IO Uint64
hs_bindgen_2a59fd2cead65c85 =
\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_2a59fd2cead65c85_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_2a59fd2cead65c85
foreign import ccall safe "hs_bindgen_1f4c504e2d406d5d"
hs_bindgen_1f4c504e2d406d5d_base
:: HsBindgen.Runtime.LibC.Word16
-> IO HsBindgen.Runtime.LibC.Word16
hs_bindgen_1f4c504e2d406d5d
:: SDL3.Sys.Bindgen.Stdinc.Uint16
-> IO SDL3.Sys.Bindgen.Stdinc.Uint16
hs_bindgen_1f4c504e2d406d5d :: Uint16 -> IO Uint16
hs_bindgen_1f4c504e2d406d5d =
\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_1f4c504e2d406d5d_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_1f4c504e2d406d5d
foreign import ccall safe "hs_bindgen_83c800b17676e351"
hs_bindgen_83c800b17676e351_base
:: HsBindgen.Runtime.LibC.Word32
-> IO HsBindgen.Runtime.LibC.Word32
hs_bindgen_83c800b17676e351
:: SDL3.Sys.Bindgen.Stdinc.Uint32
-> IO SDL3.Sys.Bindgen.Stdinc.Uint32
hs_bindgen_83c800b17676e351 :: Uint32 -> IO Uint32
hs_bindgen_83c800b17676e351 =
\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_83c800b17676e351_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_83c800b17676e351
foreign import ccall safe "hs_bindgen_a8299e2a08d3f0eb"
hs_bindgen_a8299e2a08d3f0eb_base
:: HsBindgen.Runtime.LibC.Word64
-> IO HsBindgen.Runtime.LibC.Word64
hs_bindgen_a8299e2a08d3f0eb
:: SDL3.Sys.Bindgen.Stdinc.Uint64
-> IO SDL3.Sys.Bindgen.Stdinc.Uint64
hs_bindgen_a8299e2a08d3f0eb :: Uint64 -> IO Uint64
hs_bindgen_a8299e2a08d3f0eb =
\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_a8299e2a08d3f0eb_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_a8299e2a08d3f0eb
foreign import ccall safe "hs_bindgen_3cbb3bb4c5039011"
hs_bindgen_3cbb3bb4c5039011_base
:: BG.CFloat
-> IO BG.CFloat
hs_bindgen_3cbb3bb4c5039011
:: BG.CFloat
-> IO BG.CFloat
hs_bindgen_3cbb3bb4c5039011 :: CFloat -> IO CFloat
hs_bindgen_3cbb3bb4c5039011 =
\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_3cbb3bb4c5039011_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_3cbb3bb4c5039011
foreign import ccall safe "hs_bindgen_3821b24e3d8e81ce"
hs_bindgen_3821b24e3d8e81ce_base
:: HsBindgen.Runtime.LibC.Word16
-> IO HsBindgen.Runtime.LibC.Word16
hs_bindgen_3821b24e3d8e81ce
:: SDL3.Sys.Bindgen.Stdinc.Uint16
-> IO SDL3.Sys.Bindgen.Stdinc.Uint16
hs_bindgen_3821b24e3d8e81ce :: Uint16 -> IO Uint16
hs_bindgen_3821b24e3d8e81ce =
\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_3821b24e3d8e81ce_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_3821b24e3d8e81ce
foreign import ccall safe "hs_bindgen_e3aaa35768c646a0"
hs_bindgen_e3aaa35768c646a0_base
:: HsBindgen.Runtime.LibC.Word32
-> IO HsBindgen.Runtime.LibC.Word32
hs_bindgen_e3aaa35768c646a0
:: SDL3.Sys.Bindgen.Stdinc.Uint32
-> IO SDL3.Sys.Bindgen.Stdinc.Uint32
hs_bindgen_e3aaa35768c646a0 :: Uint32 -> IO Uint32
hs_bindgen_e3aaa35768c646a0 =
\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_e3aaa35768c646a0_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_e3aaa35768c646a0
foreign import ccall safe "hs_bindgen_6201a0f0896f9116"
hs_bindgen_6201a0f0896f9116_base
:: HsBindgen.Runtime.LibC.Word64
-> IO HsBindgen.Runtime.LibC.Word64
hs_bindgen_6201a0f0896f9116
:: SDL3.Sys.Bindgen.Stdinc.Uint64
-> IO SDL3.Sys.Bindgen.Stdinc.Uint64
hs_bindgen_6201a0f0896f9116 :: Uint64 -> IO Uint64
hs_bindgen_6201a0f0896f9116 =
\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_6201a0f0896f9116_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_6201a0f0896f9116
foreign import ccall safe "hs_bindgen_770a79534d696eb6"
hs_bindgen_770a79534d696eb6_base
:: BG.CFloat
-> IO BG.CFloat
hs_bindgen_770a79534d696eb6
:: BG.CFloat
-> IO BG.CFloat
hs_bindgen_770a79534d696eb6 :: CFloat -> IO CFloat
hs_bindgen_770a79534d696eb6 =
\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_770a79534d696eb6_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_770a79534d696eb6