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