Skip to main content

web_sys/features/
gen_GpuTexture.rs

1#![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(
9        extends = "::js_sys::Object",
10        js_name = "GPUTexture",
11        typescript_type = "GPUTexture"
12    )]
13    #[derive(Debug, Clone, PartialEq, Eq)]
14    #[doc = "The `GpuTexture` class."]
15    #[doc = ""]
16    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUTexture)"]
17    #[doc = ""]
18    #[doc = "*This API requires the following crate features to be activated: `GpuTexture`*"]
19    #[doc = ""]
20    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
21    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
22    pub type GpuTexture;
23    #[cfg(web_sys_unstable_apis)]
24    #[wasm_bindgen(method, getter, js_class = "GPUTexture", js_name = "width")]
25    #[doc = "Getter for the `width` field of this object."]
26    #[doc = ""]
27    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUTexture/width)"]
28    #[doc = ""]
29    #[doc = "*This API requires the following crate features to be activated: `GpuTexture`*"]
30    #[doc = ""]
31    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
32    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
33    pub fn width(this: &GpuTexture) -> u32;
34    #[cfg(web_sys_unstable_apis)]
35    #[wasm_bindgen(method, getter, js_class = "GPUTexture", js_name = "height")]
36    #[doc = "Getter for the `height` field of this object."]
37    #[doc = ""]
38    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUTexture/height)"]
39    #[doc = ""]
40    #[doc = "*This API requires the following crate features to be activated: `GpuTexture`*"]
41    #[doc = ""]
42    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
43    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
44    pub fn height(this: &GpuTexture) -> u32;
45    #[cfg(web_sys_unstable_apis)]
46    #[wasm_bindgen(
47        method,
48        getter,
49        js_class = "GPUTexture",
50        js_name = "depthOrArrayLayers"
51    )]
52    #[doc = "Getter for the `depthOrArrayLayers` field of this object."]
53    #[doc = ""]
54    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUTexture/depthOrArrayLayers)"]
55    #[doc = ""]
56    #[doc = "*This API requires the following crate features to be activated: `GpuTexture`*"]
57    #[doc = ""]
58    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
59    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
60    pub fn depth_or_array_layers(this: &GpuTexture) -> u32;
61    #[cfg(web_sys_unstable_apis)]
62    #[wasm_bindgen(method, getter, js_class = "GPUTexture", js_name = "mipLevelCount")]
63    #[doc = "Getter for the `mipLevelCount` field of this object."]
64    #[doc = ""]
65    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUTexture/mipLevelCount)"]
66    #[doc = ""]
67    #[doc = "*This API requires the following crate features to be activated: `GpuTexture`*"]
68    #[doc = ""]
69    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
70    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
71    pub fn mip_level_count(this: &GpuTexture) -> u32;
72    #[cfg(web_sys_unstable_apis)]
73    #[wasm_bindgen(method, getter, js_class = "GPUTexture", js_name = "sampleCount")]
74    #[doc = "Getter for the `sampleCount` field of this object."]
75    #[doc = ""]
76    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUTexture/sampleCount)"]
77    #[doc = ""]
78    #[doc = "*This API requires the following crate features to be activated: `GpuTexture`*"]
79    #[doc = ""]
80    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
81    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
82    pub fn sample_count(this: &GpuTexture) -> u32;
83    #[cfg(web_sys_unstable_apis)]
84    #[cfg(feature = "GpuTextureDimension")]
85    #[wasm_bindgen(method, getter, js_class = "GPUTexture", js_name = "dimension")]
86    #[doc = "Getter for the `dimension` field of this object."]
87    #[doc = ""]
88    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUTexture/dimension)"]
89    #[doc = ""]
90    #[doc = "*This API requires the following crate features to be activated: `GpuTexture`, `GpuTextureDimension`*"]
91    #[doc = ""]
92    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
93    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
94    pub fn dimension(this: &GpuTexture) -> GpuTextureDimension;
95    #[cfg(web_sys_unstable_apis)]
96    #[cfg(feature = "GpuTextureFormat")]
97    #[wasm_bindgen(method, getter, js_class = "GPUTexture", js_name = "format")]
98    #[doc = "Getter for the `format` field of this object."]
99    #[doc = ""]
100    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUTexture/format)"]
101    #[doc = ""]
102    #[doc = "*This API requires the following crate features to be activated: `GpuTexture`, `GpuTextureFormat`*"]
103    #[doc = ""]
104    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
105    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
106    pub fn format(this: &GpuTexture) -> GpuTextureFormat;
107    #[cfg(web_sys_unstable_apis)]
108    #[wasm_bindgen(method, getter, js_class = "GPUTexture", js_name = "usage")]
109    #[doc = "Getter for the `usage` field of this object."]
110    #[doc = ""]
111    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUTexture/usage)"]
112    #[doc = ""]
113    #[doc = "*This API requires the following crate features to be activated: `GpuTexture`*"]
114    #[doc = ""]
115    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
116    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
117    pub fn usage(this: &GpuTexture) -> u32;
118    #[cfg(web_sys_unstable_apis)]
119    #[wasm_bindgen(
120        method,
121        getter,
122        js_class = "GPUTexture",
123        js_name = "textureBindingViewDimension"
124    )]
125    #[doc = "Getter for the `textureBindingViewDimension` field of this object."]
126    #[doc = ""]
127    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUTexture/textureBindingViewDimension)"]
128    #[doc = ""]
129    #[doc = "*This API requires the following crate features to be activated: `GpuTexture`*"]
130    #[doc = ""]
131    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
132    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
133    pub fn texture_binding_view_dimension(this: &GpuTexture) -> ::wasm_bindgen::JsValue;
134    #[cfg(web_sys_unstable_apis)]
135    #[wasm_bindgen(method, getter, js_class = "GPUTexture", js_name = "label")]
136    #[doc = "Getter for the `label` field of this object."]
137    #[doc = ""]
138    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUTexture/label)"]
139    #[doc = ""]
140    #[doc = "*This API requires the following crate features to be activated: `GpuTexture`*"]
141    #[doc = ""]
142    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
143    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
144    pub fn label(this: &GpuTexture) -> ::alloc::string::String;
145    #[cfg(web_sys_unstable_apis)]
146    #[wasm_bindgen(method, setter, js_class = "GPUTexture", js_name = "label")]
147    #[doc = "Setter for the `label` field of this object."]
148    #[doc = ""]
149    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUTexture/label)"]
150    #[doc = ""]
151    #[doc = "*This API requires the following crate features to be activated: `GpuTexture`*"]
152    #[doc = ""]
153    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
154    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
155    pub fn set_label(this: &GpuTexture, value: &str);
156    #[cfg(web_sys_unstable_apis)]
157    #[cfg(feature = "GpuTextureView")]
158    #[wasm_bindgen(catch, method, js_class = "GPUTexture", js_name = "createView")]
159    #[doc = "The `createView()` method."]
160    #[doc = ""]
161    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUTexture/createView)"]
162    #[doc = ""]
163    #[doc = "*This API requires the following crate features to be activated: `GpuTexture`, `GpuTextureView`*"]
164    #[doc = ""]
165    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
166    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
167    pub fn create_view(this: &GpuTexture) -> Result<GpuTextureView, JsValue>;
168    #[cfg(web_sys_unstable_apis)]
169    #[cfg(all(feature = "GpuTextureView", feature = "GpuTextureViewDescriptor",))]
170    #[wasm_bindgen(catch, method, js_class = "GPUTexture", js_name = "createView")]
171    #[doc = "The `createView()` method."]
172    #[doc = ""]
173    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUTexture/createView)"]
174    #[doc = ""]
175    #[doc = "*This API requires the following crate features to be activated: `GpuTexture`, `GpuTextureView`, `GpuTextureViewDescriptor`*"]
176    #[doc = ""]
177    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
178    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
179    pub fn create_view_with_descriptor(
180        this: &GpuTexture,
181        descriptor: &GpuTextureViewDescriptor,
182    ) -> Result<GpuTextureView, JsValue>;
183    #[cfg(web_sys_unstable_apis)]
184    #[wasm_bindgen(method, js_class = "GPUTexture")]
185    #[doc = "The `destroy()` method."]
186    #[doc = ""]
187    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUTexture/destroy)"]
188    #[doc = ""]
189    #[doc = "*This API requires the following crate features to be activated: `GpuTexture`*"]
190    #[doc = ""]
191    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
192    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
193    pub fn destroy(this: &GpuTexture);
194}