From 1b9f0cb452e672c187233de23cd74c7f8a3f773b Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Mon, 22 Jan 2024 02:21:45 +0530 Subject: chore: add types for `Deno.UnsafeWindowSurface` (#22010) --- cli/tsc/dts/lib.deno.unstable.d.ts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'cli/tsc/dts/lib.deno.unstable.d.ts') diff --git a/cli/tsc/dts/lib.deno.unstable.d.ts b/cli/tsc/dts/lib.deno.unstable.d.ts index 827c95556..f0f6f4571 100644 --- a/cli/tsc/dts/lib.deno.unstable.d.ts +++ b/cli/tsc/dts/lib.deno.unstable.d.ts @@ -3,6 +3,7 @@ /// /// /// +/// /// /// @@ -764,6 +765,31 @@ declare namespace Deno { symbols: Const, ): DynamicLibrary; + /** **UNSTABLE**: New API, yet to be vetted. + * + * Creates a presentable WebGPU surface from given window and + * display handles. + * + * The parameters correspond to the table below: + * + * | system | winHandle | displayHandle | + * | ----------------- | ------------- | --------------- | + * | "cocoa" (macOS) | `NSView*` | - | + * | "win32" (Windows) | `HWND` | `HINSTANCE` | + * | "x11" (Linux) | Xlib `Window` | Xlib `Display*` | + * + * @category WebGPU + */ + export class UnsafeWindowSurface { + constructor( + system: "cocoa" | "win32" | "x11", + windowHandle: UnsafePointerView, + displayHandle: UnsafePointerView | null, + ); + getContext(context: "webgpu"): GPUCanvasContext; + present(): void; + } + /** **UNSTABLE**: New API, yet to be vetted. * * These are unstable options which can be used with {@linkcode Deno.run}. -- cgit v1.2.3