| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
SDL3.Sys.Bindgen.Metal.FunPtr
Synopsis
- sDL_Metal_CreateView :: FunPtr (Ptr SDL_Window -> IO SDL_MetalView)
- sDL_Metal_DestroyView :: FunPtr (SDL_MetalView -> IO ())
- sDL_Metal_GetLayer :: FunPtr (SDL_MetalView -> IO (Ptr Void))
Documentation
sDL_Metal_CreateView :: FunPtr (Ptr SDL_Window -> IO SDL_MetalView) Source #
Create a CAMetalLayer-backed NSView/UIView and attach it to the specified window.
On macOS, this does not associate a MTLDevice with the CAMetalLayer on its own. It is up to user code to do that.
The returned handle can be casted directly to a NSView or UIView. To access the backing CAMetalLayer, call SDL_Metal_GetLayer().
window- the window.
- Returns
- handle NSView or UIView.
- Thread safety
- This function should only be called on the main thread.
- See also
sDL_Metal_DestroyView,sDL_Metal_GetLayer- C declaration
SDL_Metal_CreateView, defined atSDL3/SDL_metal.h 75:43
Since: 3.2.0
sDL_Metal_DestroyView :: FunPtr (SDL_MetalView -> IO ()) Source #
Destroy an existing SDL_MetalView object.
This should be called before SDL_DestroyWindow, if SDL_Metal_CreateView was called after SDL_CreateWindow.
view- the
SDL_MetalViewobject. - Thread safety
- This function should only be called on the main thread.
- See also
sDL_Metal_CreateView- C declaration
SDL_Metal_DestroyView, defined atSDL3/SDL_metal.h 91:34
Since: 3.2.0
sDL_Metal_GetLayer :: FunPtr (SDL_MetalView -> IO (Ptr Void)) Source #
Get a pointer to the backing CAMetalLayer for the given view.
view- the
SDL_MetalViewobject. - Returns
- a pointer.
- Thread safety
- This function should only be called on the main thread.
- C declaration
SDL_Metal_GetLayer, defined atSDL3/SDL_metal.h 103:36
Since: 3.2.0