Struct WebGPUSurfaceHost
- Namespace
- SixLabors.ImageSharp.Drawing.Processing.Backends
- Assembly
- SixLabors.ImageSharp.Drawing.WebGPU.dll
Describes the externally-owned native drawable that a WebGPUExternalSurface should attach to. Use the factory method that matches the host toolkit or platform that owns the drawable surface.
public readonly struct WebGPUSurfaceHost
- Inherited Members
Remarks
Construct via the platform-specific factory methods. The caller retains ownership of the underlying handles; the external surface never releases them.
Methods
Android(nint, nint)
Creates a host descriptor for an Android native window.
public static WebGPUSurfaceHost Android(nint aNativeWindow, nint eglSurface = 0)
Parameters
aNativeWindownintThe Android native window pointer (
ANativeWindow*).eglSurfacenintThe associated EGL surface (optional).
Returns
- WebGPUSurfaceHost
An Android host descriptor.
Cocoa(nint)
Creates a host descriptor for a Cocoa window.
public static WebGPUSurfaceHost Cocoa(nint nsWindow)
Parameters
nsWindownintThe Cocoa window pointer (
NSWindow*).
Returns
- WebGPUSurfaceHost
A Cocoa host descriptor.
EGL(nint, nint)
Creates a host descriptor for an EGL display and surface.
public static WebGPUSurfaceHost EGL(nint eglDisplay, nint eglSurface)
Parameters
eglDisplaynintThe EGL display handle (Zero if unspecified).
eglSurfacenintThe EGL surface handle (Zero if unspecified).
Returns
- WebGPUSurfaceHost
An EGL host descriptor.
Glfw(nint)
Creates a host descriptor for a GLFW-owned window.
public static WebGPUSurfaceHost Glfw(nint glfwWindow)
Parameters
glfwWindownintThe GLFW window pointer (
GLFWwindow*).
Returns
- WebGPUSurfaceHost
A GLFW host descriptor.
Sdl(nint)
Creates a host descriptor for an SDL-owned window.
public static WebGPUSurfaceHost Sdl(nint sdlWindow)
Parameters
sdlWindownintThe SDL window pointer (
SDL_Window*).
Returns
- WebGPUSurfaceHost
An SDL host descriptor.
UIKit(nint, uint, uint, uint)
Creates a host descriptor for a UIKit window with its framebuffer objects.
public static WebGPUSurfaceHost UIKit(nint uiWindow, uint framebuffer, uint colorbuffer, uint resolveFramebuffer)
Parameters
uiWindownintThe UIKit window pointer (
UIWindow*).framebufferuintThe framebuffer object id.
colorbufferuintThe color buffer object id.
resolveFramebufferuintThe resolve framebuffer object id.
Returns
- WebGPUSurfaceHost
A UIKit host descriptor.
Vivante(nint, nint)
Creates a host descriptor for a Vivante-backed window.
public static WebGPUSurfaceHost Vivante(nint display, nint window)
Parameters
displaynintThe Vivante EGL display type (
EGLNativeDisplayType).windownintThe Vivante EGL window type (
EGLNativeWindowType).
Returns
- WebGPUSurfaceHost
A Vivante host descriptor.
Wayland(nint, nint)
Creates a host descriptor for a Wayland surface.
public static WebGPUSurfaceHost Wayland(nint display, nint surface)
Parameters
displaynintThe Wayland display pointer (
wl_display*).surfacenintThe Wayland surface pointer (
wl_surface*).
Returns
- WebGPUSurfaceHost
A Wayland host descriptor.
Win32(nint, nint, nint)
Creates a host descriptor for a Win32 window. The device context handle is optional; when omitted, the surface layer derives one from the window as needed.
public static WebGPUSurfaceHost Win32(nint hwnd, nint hinstance, nint hdc = 0)
Parameters
hwndnintThe Win32 window handle (
HWND).hinstancenintThe module instance handle (
HINSTANCE) associated with the window.hdcnintThe device context handle (
HDC); pass Zero if unavailable.
Returns
- WebGPUSurfaceHost
A Win32 host descriptor.
WinRT(nint)
Creates a host descriptor for a WinRT window.
public static WebGPUSurfaceHost WinRT(nint inspectable)
Parameters
inspectablenintThe WinRT window's
IInspectable*.
Returns
- WebGPUSurfaceHost
A WinRT host descriptor.
X11(nint, nuint)
Creates a host descriptor for an X11 window.
public static WebGPUSurfaceHost X11(nint display, nuint window)
Parameters
Returns
- WebGPUSurfaceHost
An X11 host descriptor.