web_sys/features/
gen_VideoFrameBufferInit.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 = VideoFrameBufferInit)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `VideoFrameBufferInit` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"]
13 #[doc = ""]
14 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
15 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
16 pub type VideoFrameBufferInit;
17 #[cfg(web_sys_unstable_apis)]
18 #[doc = "Get the `codedHeight` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"]
21 #[doc = ""]
22 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
23 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
24 #[wasm_bindgen(method, getter = "codedHeight")]
25 pub fn get_coded_height(this: &VideoFrameBufferInit) -> u32;
26 #[cfg(web_sys_unstable_apis)]
27 #[doc = "Change the `codedHeight` field of this object."]
28 #[doc = ""]
29 #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
33 #[wasm_bindgen(method, setter = "codedHeight")]
34 pub fn set_coded_height(this: &VideoFrameBufferInit, val: u32);
35 #[cfg(web_sys_unstable_apis)]
36 #[doc = "Get the `codedWidth` field of this object."]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"]
39 #[doc = ""]
40 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
41 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
42 #[wasm_bindgen(method, getter = "codedWidth")]
43 pub fn get_coded_width(this: &VideoFrameBufferInit) -> u32;
44 #[cfg(web_sys_unstable_apis)]
45 #[doc = "Change the `codedWidth` field of this object."]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
51 #[wasm_bindgen(method, setter = "codedWidth")]
52 pub fn set_coded_width(this: &VideoFrameBufferInit, val: u32);
53 #[cfg(web_sys_unstable_apis)]
54 #[cfg(feature = "VideoColorSpaceInit")]
55 #[doc = "Get the `colorSpace` field of this object."]
56 #[doc = ""]
57 #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`, `VideoFrameBufferInit`*"]
58 #[doc = ""]
59 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
60 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
61 #[wasm_bindgen(method, getter = "colorSpace")]
62 pub fn get_color_space(this: &VideoFrameBufferInit) -> Option<VideoColorSpaceInit>;
63 #[cfg(web_sys_unstable_apis)]
64 #[cfg(feature = "VideoColorSpaceInit")]
65 #[doc = "Change the `colorSpace` field of this object."]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`, `VideoFrameBufferInit`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
71 #[wasm_bindgen(method, setter = "colorSpace")]
72 pub fn set_color_space(this: &VideoFrameBufferInit, val: &VideoColorSpaceInit);
73 #[cfg(web_sys_unstable_apis)]
74 #[doc = "Get the `displayHeight` field of this object."]
75 #[doc = ""]
76 #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"]
77 #[doc = ""]
78 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
79 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
80 #[wasm_bindgen(method, getter = "displayHeight")]
81 pub fn get_display_height(this: &VideoFrameBufferInit) -> Option<u32>;
82 #[cfg(web_sys_unstable_apis)]
83 #[doc = "Change the `displayHeight` field of this object."]
84 #[doc = ""]
85 #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"]
86 #[doc = ""]
87 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
88 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
89 #[wasm_bindgen(method, setter = "displayHeight")]
90 pub fn set_display_height(this: &VideoFrameBufferInit, val: u32);
91 #[cfg(web_sys_unstable_apis)]
92 #[doc = "Get the `displayWidth` field of this object."]
93 #[doc = ""]
94 #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"]
95 #[doc = ""]
96 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
97 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
98 #[wasm_bindgen(method, getter = "displayWidth")]
99 pub fn get_display_width(this: &VideoFrameBufferInit) -> Option<u32>;
100 #[cfg(web_sys_unstable_apis)]
101 #[doc = "Change the `displayWidth` field of this object."]
102 #[doc = ""]
103 #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"]
104 #[doc = ""]
105 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
106 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
107 #[wasm_bindgen(method, setter = "displayWidth")]
108 pub fn set_display_width(this: &VideoFrameBufferInit, val: u32);
109 #[cfg(web_sys_unstable_apis)]
110 #[doc = "Get the `duration` field of this object."]
111 #[doc = ""]
112 #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"]
113 #[doc = ""]
114 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
115 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
116 #[wasm_bindgen(method, getter = "duration")]
117 pub fn get_duration(this: &VideoFrameBufferInit) -> Option<f64>;
118 #[cfg(web_sys_unstable_apis)]
119 #[doc = "Change the `duration` field of this object."]
120 #[doc = ""]
121 #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
125 #[wasm_bindgen(method, setter = "duration")]
126 pub fn set_duration(this: &VideoFrameBufferInit, val: f64);
127 #[cfg(web_sys_unstable_apis)]
128 #[cfg(feature = "VideoPixelFormat")]
129 #[doc = "Get the `format` field of this object."]
130 #[doc = ""]
131 #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`, `VideoPixelFormat`*"]
132 #[doc = ""]
133 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
134 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
135 #[wasm_bindgen(method, getter = "format")]
136 pub fn get_format(this: &VideoFrameBufferInit) -> VideoPixelFormat;
137 #[cfg(web_sys_unstable_apis)]
138 #[cfg(feature = "VideoPixelFormat")]
139 #[doc = "Change the `format` field of this object."]
140 #[doc = ""]
141 #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`, `VideoPixelFormat`*"]
142 #[doc = ""]
143 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
144 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
145 #[wasm_bindgen(method, setter = "format")]
146 pub fn set_format(this: &VideoFrameBufferInit, val: VideoPixelFormat);
147 #[cfg(web_sys_unstable_apis)]
148 #[doc = "Get the `layout` field of this object."]
149 #[doc = ""]
150 #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"]
151 #[doc = ""]
152 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
153 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
154 #[wasm_bindgen(method, getter = "layout")]
155 pub fn get_layout(this: &VideoFrameBufferInit) -> Option<::js_sys::Array>;
156 #[cfg(web_sys_unstable_apis)]
157 #[doc = "Change the `layout` field of this object."]
158 #[doc = ""]
159 #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
163 #[wasm_bindgen(method, setter = "layout")]
164 pub fn set_layout(this: &VideoFrameBufferInit, val: &::wasm_bindgen::JsValue);
165 #[cfg(web_sys_unstable_apis)]
166 #[doc = "Get the `timestamp` field of this object."]
167 #[doc = ""]
168 #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"]
169 #[doc = ""]
170 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
171 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
172 #[wasm_bindgen(method, getter = "timestamp")]
173 pub fn get_timestamp(this: &VideoFrameBufferInit) -> f64;
174 #[cfg(web_sys_unstable_apis)]
175 #[doc = "Change the `timestamp` field of this object."]
176 #[doc = ""]
177 #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"]
178 #[doc = ""]
179 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
180 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
181 #[wasm_bindgen(method, setter = "timestamp")]
182 pub fn set_timestamp(this: &VideoFrameBufferInit, val: f64);
183 #[cfg(web_sys_unstable_apis)]
184 #[cfg(feature = "DomRectInit")]
185 #[doc = "Get the `visibleRect` field of this object."]
186 #[doc = ""]
187 #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `VideoFrameBufferInit`*"]
188 #[doc = ""]
189 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
190 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
191 #[wasm_bindgen(method, getter = "visibleRect")]
192 pub fn get_visible_rect(this: &VideoFrameBufferInit) -> Option<DomRectInit>;
193 #[cfg(web_sys_unstable_apis)]
194 #[cfg(feature = "DomRectInit")]
195 #[doc = "Change the `visibleRect` field of this object."]
196 #[doc = ""]
197 #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `VideoFrameBufferInit`*"]
198 #[doc = ""]
199 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
200 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
201 #[wasm_bindgen(method, setter = "visibleRect")]
202 pub fn set_visible_rect(this: &VideoFrameBufferInit, val: &DomRectInit);
203}
204#[cfg(web_sys_unstable_apis)]
205impl VideoFrameBufferInit {
206 #[cfg(feature = "VideoPixelFormat")]
207 #[doc = "Construct a new `VideoFrameBufferInit`."]
208 #[doc = ""]
209 #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`, `VideoPixelFormat`*"]
210 #[doc = ""]
211 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
212 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
213 pub fn new(
214 coded_height: u32,
215 coded_width: u32,
216 format: VideoPixelFormat,
217 timestamp: f64,
218 ) -> Self {
219 #[allow(unused_mut)]
220 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
221 ret.set_coded_height(coded_height);
222 ret.set_coded_width(coded_width);
223 ret.set_format(format);
224 ret.set_timestamp(timestamp);
225 ret
226 }
227 #[cfg(web_sys_unstable_apis)]
228 #[deprecated = "Use `set_coded_height()` instead."]
229 pub fn coded_height(&mut self, val: u32) -> &mut Self {
230 self.set_coded_height(val);
231 self
232 }
233 #[cfg(web_sys_unstable_apis)]
234 #[deprecated = "Use `set_coded_width()` instead."]
235 pub fn coded_width(&mut self, val: u32) -> &mut Self {
236 self.set_coded_width(val);
237 self
238 }
239 #[cfg(web_sys_unstable_apis)]
240 #[cfg(feature = "VideoColorSpaceInit")]
241 #[deprecated = "Use `set_color_space()` instead."]
242 pub fn color_space(&mut self, val: &VideoColorSpaceInit) -> &mut Self {
243 self.set_color_space(val);
244 self
245 }
246 #[cfg(web_sys_unstable_apis)]
247 #[deprecated = "Use `set_display_height()` instead."]
248 pub fn display_height(&mut self, val: u32) -> &mut Self {
249 self.set_display_height(val);
250 self
251 }
252 #[cfg(web_sys_unstable_apis)]
253 #[deprecated = "Use `set_display_width()` instead."]
254 pub fn display_width(&mut self, val: u32) -> &mut Self {
255 self.set_display_width(val);
256 self
257 }
258 #[cfg(web_sys_unstable_apis)]
259 #[deprecated = "Use `set_duration()` instead."]
260 pub fn duration(&mut self, val: f64) -> &mut Self {
261 self.set_duration(val);
262 self
263 }
264 #[cfg(web_sys_unstable_apis)]
265 #[cfg(feature = "VideoPixelFormat")]
266 #[deprecated = "Use `set_format()` instead."]
267 pub fn format(&mut self, val: VideoPixelFormat) -> &mut Self {
268 self.set_format(val);
269 self
270 }
271 #[cfg(web_sys_unstable_apis)]
272 #[deprecated = "Use `set_layout()` instead."]
273 pub fn layout(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
274 self.set_layout(val);
275 self
276 }
277 #[cfg(web_sys_unstable_apis)]
278 #[deprecated = "Use `set_timestamp()` instead."]
279 pub fn timestamp(&mut self, val: f64) -> &mut Self {
280 self.set_timestamp(val);
281 self
282 }
283 #[cfg(web_sys_unstable_apis)]
284 #[cfg(feature = "DomRectInit")]
285 #[deprecated = "Use `set_visible_rect()` instead."]
286 pub fn visible_rect(&mut self, val: &DomRectInit) -> &mut Self {
287 self.set_visible_rect(val);
288 self
289 }
290}