web_sys/features/
gen_VideoColorSpaceInit.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = VideoColorSpaceInit)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `VideoColorSpaceInit` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`*"]
12 pub type VideoColorSpaceInit;
13 #[doc = "Get the `fullRange` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`*"]
16 #[wasm_bindgen(method, getter = "fullRange")]
17 pub fn get_full_range(this: &VideoColorSpaceInit) -> Option<bool>;
18 #[doc = "Change the `fullRange` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`*"]
21 #[wasm_bindgen(method, setter = "fullRange")]
22 pub fn set_full_range(this: &VideoColorSpaceInit, val: Option<bool>);
23 #[cfg(feature = "VideoMatrixCoefficients")]
24 #[doc = "Get the `matrix` field of this object."]
25 #[doc = ""]
26 #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`, `VideoMatrixCoefficients`*"]
27 #[wasm_bindgen(method, getter = "matrix")]
28 pub fn get_matrix(this: &VideoColorSpaceInit) -> Option<VideoMatrixCoefficients>;
29 #[cfg(feature = "VideoMatrixCoefficients")]
30 #[doc = "Change the `matrix` field of this object."]
31 #[doc = ""]
32 #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`, `VideoMatrixCoefficients`*"]
33 #[wasm_bindgen(method, setter = "matrix")]
34 pub fn set_matrix(this: &VideoColorSpaceInit, val: Option<VideoMatrixCoefficients>);
35 #[cfg(feature = "VideoColorPrimaries")]
36 #[doc = "Get the `primaries` field of this object."]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `VideoColorPrimaries`, `VideoColorSpaceInit`*"]
39 #[wasm_bindgen(method, getter = "primaries")]
40 pub fn get_primaries(this: &VideoColorSpaceInit) -> Option<VideoColorPrimaries>;
41 #[cfg(feature = "VideoColorPrimaries")]
42 #[doc = "Change the `primaries` field of this object."]
43 #[doc = ""]
44 #[doc = "*This API requires the following crate features to be activated: `VideoColorPrimaries`, `VideoColorSpaceInit`*"]
45 #[wasm_bindgen(method, setter = "primaries")]
46 pub fn set_primaries(this: &VideoColorSpaceInit, val: Option<VideoColorPrimaries>);
47 #[cfg(feature = "VideoTransferCharacteristics")]
48 #[doc = "Get the `transfer` field of this object."]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`, `VideoTransferCharacteristics`*"]
51 #[wasm_bindgen(method, getter = "transfer")]
52 pub fn get_transfer(this: &VideoColorSpaceInit) -> Option<VideoTransferCharacteristics>;
53 #[cfg(feature = "VideoTransferCharacteristics")]
54 #[doc = "Change the `transfer` field of this object."]
55 #[doc = ""]
56 #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`, `VideoTransferCharacteristics`*"]
57 #[wasm_bindgen(method, setter = "transfer")]
58 pub fn set_transfer(this: &VideoColorSpaceInit, val: Option<VideoTransferCharacteristics>);
59}
60impl VideoColorSpaceInit {
61 #[doc = "Construct a new `VideoColorSpaceInit`."]
62 #[doc = ""]
63 #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`*"]
64 pub fn new() -> Self {
65 #[allow(unused_mut)]
66 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
67 ret
68 }
69 #[deprecated = "Use `set_full_range()` instead."]
70 pub fn full_range(&mut self, val: Option<bool>) -> &mut Self {
71 self.set_full_range(val);
72 self
73 }
74 #[cfg(feature = "VideoMatrixCoefficients")]
75 #[deprecated = "Use `set_matrix()` instead."]
76 pub fn matrix(&mut self, val: Option<VideoMatrixCoefficients>) -> &mut Self {
77 self.set_matrix(val);
78 self
79 }
80 #[cfg(feature = "VideoColorPrimaries")]
81 #[deprecated = "Use `set_primaries()` instead."]
82 pub fn primaries(&mut self, val: Option<VideoColorPrimaries>) -> &mut Self {
83 self.set_primaries(val);
84 self
85 }
86 #[cfg(feature = "VideoTransferCharacteristics")]
87 #[deprecated = "Use `set_transfer()` instead."]
88 pub fn transfer(&mut self, val: Option<VideoTransferCharacteristics>) -> &mut Self {
89 self.set_transfer(val);
90 self
91 }
92}
93impl Default for VideoColorSpaceInit {
94 fn default() -> Self {
95 Self::new()
96 }
97}