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