{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE NoFieldSelectors #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_HADDOCK prune #-}
module SDL3.Sys.Bindgen.Metal.Safe (
SDL3.Sys.Bindgen.Metal.Safe.sDL_Metal_CreateView,
SDL3.Sys.Bindgen.Metal.Safe.sDL_Metal_DestroyView,
SDL3.Sys.Bindgen.Metal.Safe.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_04ce5ab1408c911d ("
, " SDL_Window *arg1"
, ")"
, "{"
, " return (SDL_Metal_CreateView)(arg1);"
, "}"
, "void hs_bindgen_b00215ead799e6c0 ("
, " SDL_MetalView arg1"
, ")"
, "{"
, " (SDL_Metal_DestroyView)(arg1);"
, "}"
, "void *hs_bindgen_4ce54bd94800c4e9 ("
, " SDL_MetalView arg1"
, ")"
, "{"
, " return (SDL_Metal_GetLayer)(arg1);"
, "}"
]
)
)
foreign import ccall safe "hs_bindgen_04ce5ab1408c911d"
hs_bindgen_04ce5ab1408c911d_base
:: BG.Ptr BG.Void
-> IO (BG.Ptr BG.Void)
hs_bindgen_04ce5ab1408c911d
:: BG.Ptr SDL3.Sys.Bindgen.Video.SDL_Window
-> IO SDL_MetalView
hs_bindgen_04ce5ab1408c911d :: Ptr SDL_Window -> IO SDL_MetalView
hs_bindgen_04ce5ab1408c911d =
\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_04ce5ab1408c911d_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_04ce5ab1408c911d
foreign import ccall safe "hs_bindgen_b00215ead799e6c0"
hs_bindgen_b00215ead799e6c0_base
:: BG.Ptr BG.Void
-> IO ()
hs_bindgen_b00215ead799e6c0
:: SDL_MetalView
-> IO ()
hs_bindgen_b00215ead799e6c0 :: SDL_MetalView -> IO ()
hs_bindgen_b00215ead799e6c0 =
\SDL_MetalView
x0 ->
Ptr Void -> IO ()
hs_bindgen_b00215ead799e6c0_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_b00215ead799e6c0
foreign import ccall safe "hs_bindgen_4ce54bd94800c4e9"
hs_bindgen_4ce54bd94800c4e9_base
:: BG.Ptr BG.Void
-> IO (BG.Ptr BG.Void)
hs_bindgen_4ce54bd94800c4e9
:: SDL_MetalView
-> IO (BG.Ptr BG.Void)
hs_bindgen_4ce54bd94800c4e9 :: SDL_MetalView -> IO (Ptr Void)
hs_bindgen_4ce54bd94800c4e9 =
\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_4ce54bd94800c4e9_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_4ce54bd94800c4e9