{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE NoFieldSelectors #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_HADDOCK prune #-}
module SDL3.Sys.Bindgen.Messagebox.Unsafe (
SDL3.Sys.Bindgen.Messagebox.Unsafe.sDL_ShowMessageBox,
SDL3.Sys.Bindgen.Messagebox.Unsafe.sDL_ShowSimpleMessageBox,
)
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.Messagebox
import SDL3.Sys.Bindgen.Video 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/SDL_messagebox.h>"
, "_Bool hs_bindgen_6ca41526aad99745 ("
, " SDL_MessageBoxData const *arg1,"
, " signed int *arg2"
, ")"
, "{"
, " return (SDL_ShowMessageBox)(arg1, arg2);"
, "}"
, "_Bool hs_bindgen_e2947f00c756e1c7 ("
, " SDL_MessageBoxFlags arg1,"
, " char const *arg2,"
, " char const *arg3,"
, " SDL_Window *arg4"
, ")"
, "{"
, " return (SDL_ShowSimpleMessageBox)(arg1, arg2, arg3, arg4);"
, "}"
]
)
)
foreign import ccall unsafe "hs_bindgen_6ca41526aad99745"
hs_bindgen_6ca41526aad99745_base
:: BG.Ptr BG.Void
-> BG.Ptr BG.Void
-> IO BG.CBool
hs_bindgen_6ca41526aad99745
:: PtrConst.PtrConst SDL_MessageBoxData
-> BG.Ptr BG.CInt
-> IO BG.CBool
hs_bindgen_6ca41526aad99745 :: PtrConst SDL_MessageBoxData -> Ptr CInt -> IO CBool
hs_bindgen_6ca41526aad99745 =
\PtrConst SDL_MessageBoxData
x0 ->
\Ptr CInt
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_6ca41526aad99745_base (PtrConst SDL_MessageBoxData
-> FFIType (PtrConst SDL_MessageBoxData)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType PtrConst SDL_MessageBoxData
x0) (Ptr CInt -> FFIType (Ptr CInt)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Ptr CInt
x1))
sDL_ShowMessageBox
:: PtrConst.PtrConst SDL_MessageBoxData
-> BG.Ptr BG.CInt
-> IO BG.CBool
sDL_ShowMessageBox :: PtrConst SDL_MessageBoxData -> Ptr CInt -> IO CBool
sDL_ShowMessageBox = PtrConst SDL_MessageBoxData -> Ptr CInt -> IO CBool
hs_bindgen_6ca41526aad99745
foreign import ccall unsafe "hs_bindgen_e2947f00c756e1c7"
hs_bindgen_e2947f00c756e1c7_base
:: HsBindgen.Runtime.LibC.Word32
-> BG.Ptr BG.Void
-> BG.Ptr BG.Void
-> BG.Ptr BG.Void
-> IO BG.CBool
hs_bindgen_e2947f00c756e1c7
:: SDL_MessageBoxFlags
-> PtrConst.PtrConst BG.CChar
-> PtrConst.PtrConst BG.CChar
-> BG.Ptr SDL3.Sys.Bindgen.Video.SDL_Window
-> IO BG.CBool
hs_bindgen_e2947f00c756e1c7 :: SDL_MessageBoxFlags
-> PtrConst CChar -> PtrConst CChar -> Ptr SDL_Window -> IO CBool
hs_bindgen_e2947f00c756e1c7 =
\SDL_MessageBoxFlags
x0 ->
\PtrConst CChar
x1 ->
\PtrConst CChar
x2 ->
\Ptr SDL_Window
x3 ->
(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
( Word32 -> Ptr Void -> Ptr Void -> Ptr Void -> IO CBool
hs_bindgen_e2947f00c756e1c7_base
(SDL_MessageBoxFlags -> FFIType SDL_MessageBoxFlags
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType SDL_MessageBoxFlags
x0)
(PtrConst CChar -> FFIType (PtrConst CChar)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType PtrConst CChar
x1)
(PtrConst CChar -> FFIType (PtrConst CChar)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType PtrConst CChar
x2)
(Ptr SDL_Window -> FFIType (Ptr SDL_Window)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Ptr SDL_Window
x3)
)
sDL_ShowSimpleMessageBox
:: SDL_MessageBoxFlags
-> PtrConst.PtrConst BG.CChar
-> PtrConst.PtrConst BG.CChar
-> BG.Ptr SDL3.Sys.Bindgen.Video.SDL_Window
-> IO BG.CBool
sDL_ShowSimpleMessageBox :: SDL_MessageBoxFlags
-> PtrConst CChar -> PtrConst CChar -> Ptr SDL_Window -> IO CBool
sDL_ShowSimpleMessageBox =
SDL_MessageBoxFlags
-> PtrConst CChar -> PtrConst CChar -> Ptr SDL_Window -> IO CBool
hs_bindgen_e2947f00c756e1c7