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