{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE NoFieldSelectors #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_HADDOCK prune #-}
module SDL3.Sys.Bindgen.IostreamShims.Unsafe (
SDL3.Sys.Bindgen.IostreamShims.Unsafe.lithon_SDL_IOprintf,
)
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.Iostream 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_iostream_shims.h>"
, "size_t hs_bindgen_761783ccd0be8456 ("
, " SDL_IOStream *arg1,"
, " char const *arg2"
, ")"
, "{"
, " return (lithon_SDL_IOprintf)(arg1, arg2);"
, "}"
]
)
)
foreign import ccall unsafe "hs_bindgen_761783ccd0be8456"
hs_bindgen_761783ccd0be8456_base
:: BG.Ptr BG.Void
-> BG.Ptr BG.Void
-> IO HsBindgen.Runtime.LibC.CSize
hs_bindgen_761783ccd0be8456
:: BG.Ptr SDL3.Sys.Bindgen.Iostream.SDL_IOStream
-> PtrConst.PtrConst BG.CChar
-> IO HsBindgen.Runtime.LibC.CSize
hs_bindgen_761783ccd0be8456 :: Ptr SDL_IOStream -> PtrConst CChar -> IO CSize
hs_bindgen_761783ccd0be8456 =
\Ptr SDL_IOStream
x0 ->
\PtrConst CChar
x1 ->
(CSize -> CSize) -> IO CSize -> IO CSize
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap CSize -> CSize
FFIType CSize -> CSize
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType (Ptr Void -> Ptr Void -> IO CSize
hs_bindgen_761783ccd0be8456_base (Ptr SDL_IOStream -> FFIType (Ptr SDL_IOStream)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Ptr SDL_IOStream
x0) (PtrConst CChar -> FFIType (PtrConst CChar)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType PtrConst CChar
x1))
lithon_SDL_IOprintf
:: BG.Ptr SDL3.Sys.Bindgen.Iostream.SDL_IOStream
-> PtrConst.PtrConst BG.CChar
-> IO HsBindgen.Runtime.LibC.CSize
lithon_SDL_IOprintf :: Ptr SDL_IOStream -> PtrConst CChar -> IO CSize
lithon_SDL_IOprintf = Ptr SDL_IOStream -> PtrConst CChar -> IO CSize
hs_bindgen_761783ccd0be8456