{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE NoFieldSelectors #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_HADDOCK prune #-}
module SDL3.Sys.Bindgen.Metal.Unsafe (
SDL3.Sys.Bindgen.Metal.Unsafe.sDL_Metal_CreateView,
SDL3.Sys.Bindgen.Metal.Unsafe.sDL_Metal_DestroyView,
SDL3.Sys.Bindgen.Metal.Unsafe.sDL_Metal_GetLayer,
)
where
import Prelude (IO, fmap)
import HsBindgen.Runtime.Support qualified as BG
import HsBindgen.Runtime.Support.CAPI qualified
import SDL3.Sys.Bindgen.Metal
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_metal.h>"
, "SDL_MetalView hs_bindgen_8451a59271a15560 ("
, " SDL_Window *arg1"
, ")"
, "{"
, " return (SDL_Metal_CreateView)(arg1);"
, "}"
, "void hs_bindgen_f80d8baf242eee62 ("
, " SDL_MetalView arg1"
, ")"
, "{"
, " (SDL_Metal_DestroyView)(arg1);"
, "}"
, "void *hs_bindgen_d6bd9b15880590e0 ("
, " SDL_MetalView arg1"
, ")"
, "{"
, " return (SDL_Metal_GetLayer)(arg1);"
, "}"
]
)
)
foreign import ccall unsafe "hs_bindgen_8451a59271a15560"
hs_bindgen_8451a59271a15560_base
:: BG.Ptr BG.Void
-> IO (BG.Ptr BG.Void)
hs_bindgen_8451a59271a15560
:: BG.Ptr SDL3.Sys.Bindgen.Video.SDL_Window
-> IO SDL_MetalView
hs_bindgen_8451a59271a15560 :: Ptr SDL_Window -> IO SDL_MetalView
hs_bindgen_8451a59271a15560 =
\Ptr SDL_Window
x0 ->
(Ptr Void -> SDL_MetalView) -> IO (Ptr Void) -> IO SDL_MetalView
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr Void -> SDL_MetalView
FFIType SDL_MetalView -> SDL_MetalView
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType (Ptr Void -> IO (Ptr Void)
hs_bindgen_8451a59271a15560_base (Ptr SDL_Window -> FFIType (Ptr SDL_Window)
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType Ptr SDL_Window
x0))
sDL_Metal_CreateView
:: BG.Ptr SDL3.Sys.Bindgen.Video.SDL_Window
-> IO SDL_MetalView
sDL_Metal_CreateView :: Ptr SDL_Window -> IO SDL_MetalView
sDL_Metal_CreateView = Ptr SDL_Window -> IO SDL_MetalView
hs_bindgen_8451a59271a15560
foreign import ccall unsafe "hs_bindgen_f80d8baf242eee62"
hs_bindgen_f80d8baf242eee62_base
:: BG.Ptr BG.Void
-> IO ()
hs_bindgen_f80d8baf242eee62
:: SDL_MetalView
-> IO ()
hs_bindgen_f80d8baf242eee62 :: SDL_MetalView -> IO ()
hs_bindgen_f80d8baf242eee62 =
\SDL_MetalView
x0 ->
Ptr Void -> IO ()
hs_bindgen_f80d8baf242eee62_base (SDL_MetalView -> FFIType SDL_MetalView
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType SDL_MetalView
x0)
sDL_Metal_DestroyView
:: SDL_MetalView
-> IO ()
sDL_Metal_DestroyView :: SDL_MetalView -> IO ()
sDL_Metal_DestroyView = SDL_MetalView -> IO ()
hs_bindgen_f80d8baf242eee62
foreign import ccall unsafe "hs_bindgen_d6bd9b15880590e0"
hs_bindgen_d6bd9b15880590e0_base
:: BG.Ptr BG.Void
-> IO (BG.Ptr BG.Void)
hs_bindgen_d6bd9b15880590e0
:: SDL_MetalView
-> IO (BG.Ptr BG.Void)
hs_bindgen_d6bd9b15880590e0 :: SDL_MetalView -> IO (Ptr Void)
hs_bindgen_d6bd9b15880590e0 =
\SDL_MetalView
x0 ->
(Ptr Void -> Ptr Void) -> IO (Ptr Void) -> IO (Ptr Void)
forall a b. (a -> b) -> IO a -> IO b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr Void -> Ptr Void
FFIType (Ptr Void) -> Ptr Void
forall a. HasFFIType a => FFIType a -> a
BG.fromFFIType (Ptr Void -> IO (Ptr Void)
hs_bindgen_d6bd9b15880590e0_base (SDL_MetalView -> FFIType SDL_MetalView
forall a. HasFFIType a => a -> FFIType a
BG.toFFIType SDL_MetalView
x0))
sDL_Metal_GetLayer
:: SDL_MetalView
-> IO (BG.Ptr BG.Void)
sDL_Metal_GetLayer :: SDL_MetalView -> IO (Ptr Void)
sDL_Metal_GetLayer = SDL_MetalView -> IO (Ptr Void)
hs_bindgen_d6bd9b15880590e0