1 #![allow(unused_imports)]
2 use super::*;
3 use wasm_bindgen::prelude::*;
4 #[cfg(web_sys_unstable_apis)]
5 #[wasm_bindgen]
6 extern "C" {
7     # [wasm_bindgen (extends = :: js_sys :: Object , js_name = GPUCanvasContext , typescript_type = "GPUCanvasContext")]
8     #[derive(Debug, Clone, PartialEq, Eq)]
9     #[doc = "The `GpuCanvasContext` class."]
10     #[doc = ""]
11     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUCanvasContext)"]
12     #[doc = ""]
13     #[doc = "*This API requires the following crate features to be activated: `GpuCanvasContext`*"]
14     #[doc = ""]
15     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
16     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
17     pub type GpuCanvasContext;
18     #[cfg(web_sys_unstable_apis)]
19     # [wasm_bindgen (structural , method , getter , js_class = "GPUCanvasContext" , js_name = canvas)]
20     #[doc = "Getter for the `canvas` field of this object."]
21     #[doc = ""]
22     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUCanvasContext/canvas)"]
23     #[doc = ""]
24     #[doc = "*This API requires the following crate features to be activated: `GpuCanvasContext`*"]
25     #[doc = ""]
26     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
27     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
canvas(this: &GpuCanvasContext) -> ::js_sys::Object28     pub fn canvas(this: &GpuCanvasContext) -> ::js_sys::Object;
29     #[cfg(web_sys_unstable_apis)]
30     #[cfg(feature = "GpuCanvasConfiguration")]
31     # [wasm_bindgen (method , structural , js_class = "GPUCanvasContext" , js_name = configure)]
32     #[doc = "The `configure()` method."]
33     #[doc = ""]
34     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUCanvasContext/configure)"]
35     #[doc = ""]
36     #[doc = "*This API requires the following crate features to be activated: `GpuCanvasConfiguration`, `GpuCanvasContext`*"]
37     #[doc = ""]
38     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
39     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
configure(this: &GpuCanvasContext, configuration: &GpuCanvasConfiguration)40     pub fn configure(this: &GpuCanvasContext, configuration: &GpuCanvasConfiguration);
41     #[cfg(web_sys_unstable_apis)]
42     #[cfg(feature = "GpuTexture")]
43     # [wasm_bindgen (method , structural , js_class = "GPUCanvasContext" , js_name = getCurrentTexture)]
44     #[doc = "The `getCurrentTexture()` method."]
45     #[doc = ""]
46     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUCanvasContext/getCurrentTexture)"]
47     #[doc = ""]
48     #[doc = "*This API requires the following crate features to be activated: `GpuCanvasContext`, `GpuTexture`*"]
49     #[doc = ""]
50     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
51     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
get_current_texture(this: &GpuCanvasContext) -> GpuTexture52     pub fn get_current_texture(this: &GpuCanvasContext) -> GpuTexture;
53     #[cfg(web_sys_unstable_apis)]
54     #[cfg(all(feature = "GpuAdapter", feature = "GpuTextureFormat",))]
55     # [wasm_bindgen (method , structural , js_class = "GPUCanvasContext" , js_name = getPreferredFormat)]
56     #[doc = "The `getPreferredFormat()` method."]
57     #[doc = ""]
58     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUCanvasContext/getPreferredFormat)"]
59     #[doc = ""]
60     #[doc = "*This API requires the following crate features to be activated: `GpuAdapter`, `GpuCanvasContext`, `GpuTextureFormat`*"]
61     #[doc = ""]
62     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
63     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
get_preferred_format(this: &GpuCanvasContext, adapter: &GpuAdapter) -> GpuTextureFormat64     pub fn get_preferred_format(this: &GpuCanvasContext, adapter: &GpuAdapter) -> GpuTextureFormat;
65     #[cfg(web_sys_unstable_apis)]
66     # [wasm_bindgen (method , structural , js_class = "GPUCanvasContext" , js_name = unconfigure)]
67     #[doc = "The `unconfigure()` method."]
68     #[doc = ""]
69     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUCanvasContext/unconfigure)"]
70     #[doc = ""]
71     #[doc = "*This API requires the following crate features to be activated: `GpuCanvasContext`*"]
72     #[doc = ""]
73     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
74     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
unconfigure(this: &GpuCanvasContext)75     pub fn unconfigure(this: &GpuCanvasContext);
76 }
77