{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE NoFieldSelectors #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_HADDOCK prune #-}
module SDL3.Sys.Bindgen.Vulkan.Safe (
SDL3.Sys.Bindgen.Vulkan.Safe.sDL_Vulkan_LoadLibrary,
SDL3.Sys.Bindgen.Vulkan.Safe.sDL_Vulkan_GetVkGetInstanceProcAddr,
SDL3.Sys.Bindgen.Vulkan.Safe.sDL_Vulkan_UnloadLibrary,
SDL3.Sys.Bindgen.Vulkan.Safe.sDL_Vulkan_GetInstanceExtensions,
SDL3.Sys.Bindgen.Vulkan.Safe.sDL_Vulkan_CreateSurface,
SDL3.Sys.Bindgen.Vulkan.Safe.sDL_Vulkan_DestroySurface,
SDL3.Sys.Bindgen.Vulkan.Safe.sDL_Vulkan_GetPresentationSupport,
)
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.Stdinc qualified
import SDL3.Sys.Bindgen.Video qualified
import SDL3.Sys.Bindgen.Vulkan
$( 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_vulkan.h>"
, "_Bool hs_bindgen_ef9e83627c649a75 ("
, " char const *arg1"
, ")"
, "{"
, " return (SDL_Vulkan_LoadLibrary)(arg1);"
, "}"
, "SDL_FunctionPointer hs_bindgen_eda99f289265681d (void)"
, "{"
, " return (SDL_Vulkan_GetVkGetInstanceProcAddr)();"
, "}"
, "void hs_bindgen_ba0b6a1db50d1914 (void)"
, "{"
, " (SDL_Vulkan_UnloadLibrary)();"
, "}"
, "char const *const *hs_bindgen_282c9f5ce4ea1600 ("
, " Uint32 *arg1"
, ")"
, "{"
, " return (SDL_Vulkan_GetInstanceExtensions)(arg1);"
, "}"
, "_Bool hs_bindgen_6e90d5d762dab7a4 ("
, " SDL_Window *arg1,"
, " VkInstance arg2,"
, " struct VkAllocationCallbacks const *arg3,"
, " VkSurfaceKHR *arg4"
, ")"
, "{"
, " return (SDL_Vulkan_CreateSurface)(arg1, arg2, arg3, arg4);"
, "}"
, "void hs_bindgen_584b3250cc77055d ("
, " VkInstance arg1,"
, " VkSurfaceKHR arg2,"
, " struct VkAllocationCallbacks const *arg3"
, ")"
, "{"
, " (SDL_Vulkan_DestroySurface)(arg1, arg2, arg3);"
, "}"
, "_Bool hs_bindgen_861d49977f9c657e ("
, " VkInstance arg1,"
, " VkPhysicalDevice arg2,"
, " Uint32 arg3"
, ")"
, "{"
, " return (SDL_Vulkan_GetPresentationSupport)(arg1, arg2, arg3);"
, "}"
]
)
)
foreign import ccall safe "hs_bindgen_ef9e83627c649a75"
hs_bindgen_ef9e83627c649a75_base
:: BG.Ptr BG.Void
-> IO BG.CBool
hs_bindgen_ef9e83627c649a75
:: PtrConst.PtrConst BG.CChar
-> IO BG.CBool
hs_bindgen_ef9e83627c649a75 :: PtrConst CChar -> IO CBool
hs_bindgen_ef9e83627c649a75 =
\PtrConst CChar
x0 ->
(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 -> IO CBool
hs_bindgen_ef9e83627c649a75_base (PtrConst CChar -> FFIType (PtrConst CChar)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType PtrConst CChar
x0))
sDL_Vulkan_LoadLibrary
:: PtrConst.PtrConst BG.CChar
-> IO BG.CBool
sDL_Vulkan_LoadLibrary :: PtrConst CChar -> IO CBool
sDL_Vulkan_LoadLibrary = PtrConst CChar -> IO CBool
hs_bindgen_ef9e83627c649a75
foreign import ccall safe "hs_bindgen_eda99f289265681d"
hs_bindgen_eda99f289265681d_base
:: IO HsBindgen.Runtime.Support.FunPtrVoid
hs_bindgen_eda99f289265681d :: IO SDL3.Sys.Bindgen.Stdinc.SDL_FunctionPointer
hs_bindgen_eda99f289265681d :: IO SDL_FunctionPointer
hs_bindgen_eda99f289265681d =
(FunPtrVoid -> SDL_FunctionPointer)
-> IO FunPtrVoid -> IO SDL_FunctionPointer
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap FunPtrVoid -> SDL_FunctionPointer
FFIType SDL_FunctionPointer -> SDL_FunctionPointer
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType IO FunPtrVoid
hs_bindgen_eda99f289265681d_base
sDL_Vulkan_GetVkGetInstanceProcAddr :: IO SDL3.Sys.Bindgen.Stdinc.SDL_FunctionPointer
sDL_Vulkan_GetVkGetInstanceProcAddr :: IO SDL_FunctionPointer
sDL_Vulkan_GetVkGetInstanceProcAddr =
IO SDL_FunctionPointer
hs_bindgen_eda99f289265681d
foreign import ccall safe "hs_bindgen_ba0b6a1db50d1914"
hs_bindgen_ba0b6a1db50d1914_base
:: IO ()
hs_bindgen_ba0b6a1db50d1914 :: IO ()
hs_bindgen_ba0b6a1db50d1914 :: IO ()
hs_bindgen_ba0b6a1db50d1914 =
IO ()
hs_bindgen_ba0b6a1db50d1914_base
sDL_Vulkan_UnloadLibrary :: IO ()
sDL_Vulkan_UnloadLibrary :: IO ()
sDL_Vulkan_UnloadLibrary =
IO ()
hs_bindgen_ba0b6a1db50d1914
foreign import ccall safe "hs_bindgen_282c9f5ce4ea1600"
hs_bindgen_282c9f5ce4ea1600_base
:: BG.Ptr BG.Void
-> IO (BG.Ptr BG.Void)
hs_bindgen_282c9f5ce4ea1600
:: BG.Ptr SDL3.Sys.Bindgen.Stdinc.Uint32
-> IO (PtrConst.PtrConst (PtrConst.PtrConst BG.CChar))
hs_bindgen_282c9f5ce4ea1600 :: Ptr Uint32 -> IO (PtrConst (PtrConst CChar))
hs_bindgen_282c9f5ce4ea1600 =
\Ptr Uint32
x0 ->
(Ptr Void -> PtrConst (PtrConst CChar))
-> IO (Ptr Void) -> IO (PtrConst (PtrConst CChar))
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr Void -> PtrConst (PtrConst CChar)
FFIType (PtrConst (PtrConst CChar)) -> PtrConst (PtrConst CChar)
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType (Ptr Void -> IO (Ptr Void)
hs_bindgen_282c9f5ce4ea1600_base (Ptr Uint32 -> FFIType (Ptr Uint32)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Ptr Uint32
x0))
sDL_Vulkan_GetInstanceExtensions
:: BG.Ptr SDL3.Sys.Bindgen.Stdinc.Uint32
-> IO (PtrConst.PtrConst (PtrConst.PtrConst BG.CChar))
sDL_Vulkan_GetInstanceExtensions :: Ptr Uint32 -> IO (PtrConst (PtrConst CChar))
sDL_Vulkan_GetInstanceExtensions =
Ptr Uint32 -> IO (PtrConst (PtrConst CChar))
hs_bindgen_282c9f5ce4ea1600
foreign import ccall safe "hs_bindgen_6e90d5d762dab7a4"
hs_bindgen_6e90d5d762dab7a4_base
:: BG.Ptr BG.Void
-> BG.Ptr BG.Void
-> BG.Ptr BG.Void
-> BG.Ptr BG.Void
-> IO BG.CBool
hs_bindgen_6e90d5d762dab7a4
:: BG.Ptr SDL3.Sys.Bindgen.Video.SDL_Window
-> VkInstance
-> PtrConst.PtrConst VkAllocationCallbacks
-> BG.Ptr VkSurfaceKHR
-> IO BG.CBool
hs_bindgen_6e90d5d762dab7a4 :: Ptr SDL_Window
-> VkInstance
-> PtrConst VkAllocationCallbacks
-> Ptr VkSurfaceKHR
-> IO CBool
hs_bindgen_6e90d5d762dab7a4 =
\Ptr SDL_Window
x0 ->
\VkInstance
x1 ->
\PtrConst VkAllocationCallbacks
x2 ->
\Ptr VkSurfaceKHR
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
( Ptr Void -> Ptr Void -> Ptr Void -> Ptr Void -> IO CBool
hs_bindgen_6e90d5d762dab7a4_base
(Ptr SDL_Window -> FFIType (Ptr SDL_Window)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Ptr SDL_Window
x0)
(VkInstance -> FFIType VkInstance
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType VkInstance
x1)
(PtrConst VkAllocationCallbacks
-> FFIType (PtrConst VkAllocationCallbacks)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType PtrConst VkAllocationCallbacks
x2)
(Ptr VkSurfaceKHR -> FFIType (Ptr VkSurfaceKHR)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Ptr VkSurfaceKHR
x3)
)
sDL_Vulkan_CreateSurface
:: BG.Ptr SDL3.Sys.Bindgen.Video.SDL_Window
-> VkInstance
-> PtrConst.PtrConst VkAllocationCallbacks
-> BG.Ptr VkSurfaceKHR
-> IO BG.CBool
sDL_Vulkan_CreateSurface :: Ptr SDL_Window
-> VkInstance
-> PtrConst VkAllocationCallbacks
-> Ptr VkSurfaceKHR
-> IO CBool
sDL_Vulkan_CreateSurface =
Ptr SDL_Window
-> VkInstance
-> PtrConst VkAllocationCallbacks
-> Ptr VkSurfaceKHR
-> IO CBool
hs_bindgen_6e90d5d762dab7a4
foreign import ccall safe "hs_bindgen_584b3250cc77055d"
hs_bindgen_584b3250cc77055d_base
:: BG.Ptr BG.Void
-> BG.Ptr BG.Void
-> BG.Ptr BG.Void
-> IO ()
hs_bindgen_584b3250cc77055d
:: VkInstance
-> VkSurfaceKHR
-> PtrConst.PtrConst VkAllocationCallbacks
-> IO ()
hs_bindgen_584b3250cc77055d :: VkInstance
-> VkSurfaceKHR -> PtrConst VkAllocationCallbacks -> IO ()
hs_bindgen_584b3250cc77055d =
\VkInstance
x0 ->
\VkSurfaceKHR
x1 ->
\PtrConst VkAllocationCallbacks
x2 ->
Ptr Void -> Ptr Void -> Ptr Void -> IO ()
hs_bindgen_584b3250cc77055d_base (VkInstance -> FFIType VkInstance
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType VkInstance
x0) (VkSurfaceKHR -> FFIType VkSurfaceKHR
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType VkSurfaceKHR
x1) (PtrConst VkAllocationCallbacks
-> FFIType (PtrConst VkAllocationCallbacks)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType PtrConst VkAllocationCallbacks
x2)
sDL_Vulkan_DestroySurface
:: VkInstance
-> VkSurfaceKHR
-> PtrConst.PtrConst VkAllocationCallbacks
-> IO ()
sDL_Vulkan_DestroySurface :: VkInstance
-> VkSurfaceKHR -> PtrConst VkAllocationCallbacks -> IO ()
sDL_Vulkan_DestroySurface =
VkInstance
-> VkSurfaceKHR -> PtrConst VkAllocationCallbacks -> IO ()
hs_bindgen_584b3250cc77055d
foreign import ccall safe "hs_bindgen_861d49977f9c657e"
hs_bindgen_861d49977f9c657e_base
:: BG.Ptr BG.Void
-> BG.Ptr BG.Void
-> HsBindgen.Runtime.LibC.Word32
-> IO BG.CBool
hs_bindgen_861d49977f9c657e
:: VkInstance
-> VkPhysicalDevice
-> SDL3.Sys.Bindgen.Stdinc.Uint32
-> IO BG.CBool
hs_bindgen_861d49977f9c657e :: VkInstance -> VkPhysicalDevice -> Uint32 -> IO CBool
hs_bindgen_861d49977f9c657e =
\VkInstance
x0 ->
\VkPhysicalDevice
x1 ->
\Uint32
x2 ->
(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 -> Word32 -> IO CBool
hs_bindgen_861d49977f9c657e_base (VkInstance -> FFIType VkInstance
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType VkInstance
x0) (VkPhysicalDevice -> FFIType VkPhysicalDevice
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType VkPhysicalDevice
x1) (Uint32 -> FFIType Uint32
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Uint32
x2))
sDL_Vulkan_GetPresentationSupport
:: VkInstance
-> VkPhysicalDevice
-> SDL3.Sys.Bindgen.Stdinc.Uint32
-> IO BG.CBool
sDL_Vulkan_GetPresentationSupport :: VkInstance -> VkPhysicalDevice -> Uint32 -> IO CBool
sDL_Vulkan_GetPresentationSupport =
VkInstance -> VkPhysicalDevice -> Uint32 -> IO CBool
hs_bindgen_861d49977f9c657e