{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE NoFieldSelectors #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_HADDOCK prune #-}
module SDL3.Sys.Bindgen.AudioShims.Unsafe (
SDL3.Sys.Bindgen.AudioShims.Unsafe.lithon_SDL_AUDIO_FRAMESIZE,
SDL3.Sys.Bindgen.AudioShims.Unsafe.lithon_SDL_DEFINE_AUDIO_FORMAT,
)
where
import Prelude (IO, fmap)
import HsBindgen.Runtime.LibC qualified
import HsBindgen.Runtime.PtrConst qualified as PtrConst
import HsBindgen.Runtime.Support qualified
import HsBindgen.Runtime.Support qualified as BG
import HsBindgen.Runtime.Support.CAPI qualified
import SDL3.Sys.Bindgen.Audio 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_audio_shims.h>"
, "signed int hs_bindgen_9c912e2fea22e125 ("
, " SDL_AudioSpec const *arg1"
, ")"
, "{"
, " return (lithon_SDL_AUDIO_FRAMESIZE)(arg1);"
, "}"
, "SDL_AudioFormat hs_bindgen_862e8c5060edfe5f ("
, " _Bool arg1,"
, " _Bool arg2,"
, " _Bool arg3,"
, " Uint8 arg4"
, ")"
, "{"
, " return (lithon_SDL_DEFINE_AUDIO_FORMAT)(arg1, arg2, arg3, arg4);"
, "}"
]
)
)
foreign import ccall unsafe "hs_bindgen_9c912e2fea22e125"
hs_bindgen_9c912e2fea22e125_base
:: BG.Ptr BG.Void
-> IO BG.CInt
hs_bindgen_9c912e2fea22e125
:: PtrConst.PtrConst SDL3.Sys.Bindgen.Audio.SDL_AudioSpec
-> IO BG.CInt
hs_bindgen_9c912e2fea22e125 :: PtrConst SDL_AudioSpec -> IO CInt
hs_bindgen_9c912e2fea22e125 =
\PtrConst SDL_AudioSpec
x0 ->
(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 (Ptr Void -> IO CInt
hs_bindgen_9c912e2fea22e125_base (PtrConst SDL_AudioSpec -> FFIType (PtrConst SDL_AudioSpec)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType PtrConst SDL_AudioSpec
x0))
lithon_SDL_AUDIO_FRAMESIZE
:: PtrConst.PtrConst SDL3.Sys.Bindgen.Audio.SDL_AudioSpec
-> IO BG.CInt
lithon_SDL_AUDIO_FRAMESIZE :: PtrConst SDL_AudioSpec -> IO CInt
lithon_SDL_AUDIO_FRAMESIZE =
PtrConst SDL_AudioSpec -> IO CInt
hs_bindgen_9c912e2fea22e125
foreign import ccall unsafe "hs_bindgen_862e8c5060edfe5f"
hs_bindgen_862e8c5060edfe5f_base
:: BG.CBool
-> BG.CBool
-> BG.CBool
-> HsBindgen.Runtime.LibC.Word8
-> IO HsBindgen.Runtime.Support.CUInt
hs_bindgen_862e8c5060edfe5f
:: BG.CBool
-> BG.CBool
-> BG.CBool
-> SDL3.Sys.Bindgen.Stdinc.Uint8
-> IO SDL3.Sys.Bindgen.Audio.SDL_AudioFormat
hs_bindgen_862e8c5060edfe5f :: CBool -> CBool -> CBool -> Uint8 -> IO SDL_AudioFormat
hs_bindgen_862e8c5060edfe5f =
\CBool
x0 ->
\CBool
x1 ->
\CBool
x2 ->
\Uint8
x3 ->
(CUInt -> SDL_AudioFormat) -> IO CUInt -> IO SDL_AudioFormat
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap
CUInt -> SDL_AudioFormat
FFIType SDL_AudioFormat -> SDL_AudioFormat
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType
( CBool -> CBool -> CBool -> Word8 -> IO CUInt
hs_bindgen_862e8c5060edfe5f_base
(CBool -> FFIType CBool
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType CBool
x0)
(CBool -> FFIType CBool
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType CBool
x1)
(CBool -> FFIType CBool
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType CBool
x2)
(Uint8 -> FFIType Uint8
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Uint8
x3)
)
lithon_SDL_DEFINE_AUDIO_FORMAT
:: BG.CBool
-> BG.CBool
-> BG.CBool
-> SDL3.Sys.Bindgen.Stdinc.Uint8
-> IO SDL3.Sys.Bindgen.Audio.SDL_AudioFormat
lithon_SDL_DEFINE_AUDIO_FORMAT :: CBool -> CBool -> CBool -> Uint8 -> IO SDL_AudioFormat
lithon_SDL_DEFINE_AUDIO_FORMAT =
CBool -> CBool -> CBool -> Uint8 -> IO SDL_AudioFormat
hs_bindgen_862e8c5060edfe5f