wgpu/backend/webgpu/webgpu_sys/
gen_GpuRenderBundleEncoderDescriptor.rs1#![allow(unused_imports)]
23#![allow(clippy::all)]
24use super::*;
25use wasm_bindgen::prelude::*;
26
27#[wasm_bindgen]
28extern "C" {
29 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = GPURenderBundleEncoderDescriptor)]
30 #[derive(Debug, Clone, PartialEq, Eq)]
31 #[doc = "The `GpuRenderBundleEncoderDescriptor` dictionary."]
32 #[doc = ""]
33 #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"]
34 #[doc = ""]
35 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
36 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
37 pub type GpuRenderBundleEncoderDescriptor;
38
39 #[doc = "Get the `label` field of this object."]
40 #[doc = ""]
41 #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"]
42 #[doc = ""]
43 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
44 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
45 #[wasm_bindgen(method, getter = "label")]
46 pub fn get_label(this: &GpuRenderBundleEncoderDescriptor) -> Option<::alloc::string::String>;
47
48 #[doc = "Change the `label` field of this object."]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
54 #[wasm_bindgen(method, setter = "label")]
55 pub fn set_label(this: &GpuRenderBundleEncoderDescriptor, val: &str);
56
57 #[doc = "Get the `colorFormats` field of this object."]
58 #[doc = ""]
59 #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"]
60 #[doc = ""]
61 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
62 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
63 #[wasm_bindgen(method, getter = "colorFormats")]
64 pub fn get_color_formats(this: &GpuRenderBundleEncoderDescriptor) -> ::js_sys::Array;
65
66 #[doc = "Change the `colorFormats` field of this object."]
67 #[doc = ""]
68 #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"]
69 #[doc = ""]
70 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
71 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
72 #[wasm_bindgen(method, setter = "colorFormats")]
73 pub fn set_color_formats(
74 this: &GpuRenderBundleEncoderDescriptor,
75 val: &::wasm_bindgen::JsValue,
76 );
77
78 #[doc = "Get the `depthStencilFormat` field of this object."]
79 #[doc = ""]
80 #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`, `GpuTextureFormat`*"]
81 #[doc = ""]
82 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
83 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
84 #[wasm_bindgen(method, getter = "depthStencilFormat")]
85 pub fn get_depth_stencil_format(
86 this: &GpuRenderBundleEncoderDescriptor,
87 ) -> Option<GpuTextureFormat>;
88
89 #[doc = "Change the `depthStencilFormat` field of this object."]
90 #[doc = ""]
91 #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`, `GpuTextureFormat`*"]
92 #[doc = ""]
93 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
94 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
95 #[wasm_bindgen(method, setter = "depthStencilFormat")]
96 pub fn set_depth_stencil_format(this: &GpuRenderBundleEncoderDescriptor, val: GpuTextureFormat);
97
98 #[doc = "Get the `sampleCount` field of this object."]
99 #[doc = ""]
100 #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"]
101 #[doc = ""]
102 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
103 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
104 #[wasm_bindgen(method, getter = "sampleCount")]
105 pub fn get_sample_count(this: &GpuRenderBundleEncoderDescriptor) -> Option<u32>;
106
107 #[doc = "Change the `sampleCount` field of this object."]
108 #[doc = ""]
109 #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"]
110 #[doc = ""]
111 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
112 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
113 #[wasm_bindgen(method, setter = "sampleCount")]
114 pub fn set_sample_count(this: &GpuRenderBundleEncoderDescriptor, val: u32);
115
116 #[doc = "Get the `depthReadOnly` field of this object."]
117 #[doc = ""]
118 #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"]
119 #[doc = ""]
120 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
121 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
122 #[wasm_bindgen(method, getter = "depthReadOnly")]
123 pub fn get_depth_read_only(this: &GpuRenderBundleEncoderDescriptor) -> Option<bool>;
124
125 #[doc = "Change the `depthReadOnly` field of this object."]
126 #[doc = ""]
127 #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"]
128 #[doc = ""]
129 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
130 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
131 #[wasm_bindgen(method, setter = "depthReadOnly")]
132 pub fn set_depth_read_only(this: &GpuRenderBundleEncoderDescriptor, val: bool);
133
134 #[doc = "Get the `stencilReadOnly` field of this object."]
135 #[doc = ""]
136 #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"]
137 #[doc = ""]
138 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
139 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
140 #[wasm_bindgen(method, getter = "stencilReadOnly")]
141 pub fn get_stencil_read_only(this: &GpuRenderBundleEncoderDescriptor) -> Option<bool>;
142
143 #[doc = "Change the `stencilReadOnly` field of this object."]
144 #[doc = ""]
145 #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"]
146 #[doc = ""]
147 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
148 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
149 #[wasm_bindgen(method, setter = "stencilReadOnly")]
150 pub fn set_stencil_read_only(this: &GpuRenderBundleEncoderDescriptor, val: bool);
151}
152
153impl GpuRenderBundleEncoderDescriptor {
154 #[doc = "Construct a new `GpuRenderBundleEncoderDescriptor`."]
155 #[doc = ""]
156 #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"]
157 #[doc = ""]
158 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
159 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
160 pub fn new(color_formats: &::wasm_bindgen::JsValue) -> Self {
161 #[allow(unused_mut)]
162 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
163 ret.set_color_formats(color_formats);
164 ret
165 }
166
167 #[deprecated = "Use `set_label()` instead."]
168 pub fn label(&mut self, val: &str) -> &mut Self {
169 self.set_label(val);
170 self
171 }
172
173 #[deprecated = "Use `set_color_formats()` instead."]
174 pub fn color_formats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
175 self.set_color_formats(val);
176 self
177 }
178
179 #[deprecated = "Use `set_depth_stencil_format()` instead."]
180 pub fn depth_stencil_format(&mut self, val: GpuTextureFormat) -> &mut Self {
181 self.set_depth_stencil_format(val);
182 self
183 }
184
185 #[deprecated = "Use `set_sample_count()` instead."]
186 pub fn sample_count(&mut self, val: u32) -> &mut Self {
187 self.set_sample_count(val);
188 self
189 }
190
191 #[deprecated = "Use `set_depth_read_only()` instead."]
192 pub fn depth_read_only(&mut self, val: bool) -> &mut Self {
193 self.set_depth_read_only(val);
194 self
195 }
196
197 #[deprecated = "Use `set_stencil_read_only()` instead."]
198 pub fn stencil_read_only(&mut self, val: bool) -> &mut Self {
199 self.set_stencil_read_only(val);
200 self
201 }
202}