web_sys/features/
gen_VideoColorSpaceInit.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 = VideoColorSpaceInit)]
9    #[derive(Debug, Clone, PartialEq, Eq)]
10    #[doc = "The `VideoColorSpaceInit` dictionary."]
11    #[doc = ""]
12    #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`*"]
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 VideoColorSpaceInit;
17    #[cfg(web_sys_unstable_apis)]
18    #[doc = "Get the `fullRange` field of this object."]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`*"]
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 = "fullRange")]
25    pub fn get_full_range(this: &VideoColorSpaceInit) -> Option<bool>;
26    #[cfg(web_sys_unstable_apis)]
27    #[doc = "Change the `fullRange` field of this object."]
28    #[doc = ""]
29    #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`*"]
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 = "fullRange")]
34    pub fn set_full_range(this: &VideoColorSpaceInit, val: bool);
35    #[cfg(web_sys_unstable_apis)]
36    #[cfg(feature = "VideoMatrixCoefficients")]
37    #[doc = "Get the `matrix` field of this object."]
38    #[doc = ""]
39    #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`, `VideoMatrixCoefficients`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
43    #[wasm_bindgen(method, getter = "matrix")]
44    pub fn get_matrix(this: &VideoColorSpaceInit) -> Option<VideoMatrixCoefficients>;
45    #[cfg(web_sys_unstable_apis)]
46    #[cfg(feature = "VideoMatrixCoefficients")]
47    #[doc = "Change the `matrix` field of this object."]
48    #[doc = ""]
49    #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`, `VideoMatrixCoefficients`*"]
50    #[doc = ""]
51    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
52    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
53    #[wasm_bindgen(method, setter = "matrix")]
54    pub fn set_matrix(this: &VideoColorSpaceInit, val: VideoMatrixCoefficients);
55    #[cfg(web_sys_unstable_apis)]
56    #[cfg(feature = "VideoColorPrimaries")]
57    #[doc = "Get the `primaries` field of this object."]
58    #[doc = ""]
59    #[doc = "*This API requires the following crate features to be activated: `VideoColorPrimaries`, `VideoColorSpaceInit`*"]
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 = "primaries")]
64    pub fn get_primaries(this: &VideoColorSpaceInit) -> Option<VideoColorPrimaries>;
65    #[cfg(web_sys_unstable_apis)]
66    #[cfg(feature = "VideoColorPrimaries")]
67    #[doc = "Change the `primaries` field of this object."]
68    #[doc = ""]
69    #[doc = "*This API requires the following crate features to be activated: `VideoColorPrimaries`, `VideoColorSpaceInit`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
73    #[wasm_bindgen(method, setter = "primaries")]
74    pub fn set_primaries(this: &VideoColorSpaceInit, val: VideoColorPrimaries);
75    #[cfg(web_sys_unstable_apis)]
76    #[cfg(feature = "VideoTransferCharacteristics")]
77    #[doc = "Get the `transfer` field of this object."]
78    #[doc = ""]
79    #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`, `VideoTransferCharacteristics`*"]
80    #[doc = ""]
81    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
82    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
83    #[wasm_bindgen(method, getter = "transfer")]
84    pub fn get_transfer(this: &VideoColorSpaceInit) -> Option<VideoTransferCharacteristics>;
85    #[cfg(web_sys_unstable_apis)]
86    #[cfg(feature = "VideoTransferCharacteristics")]
87    #[doc = "Change the `transfer` field of this object."]
88    #[doc = ""]
89    #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`, `VideoTransferCharacteristics`*"]
90    #[doc = ""]
91    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
92    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
93    #[wasm_bindgen(method, setter = "transfer")]
94    pub fn set_transfer(this: &VideoColorSpaceInit, val: VideoTransferCharacteristics);
95}
96#[cfg(web_sys_unstable_apis)]
97impl VideoColorSpaceInit {
98    #[doc = "Construct a new `VideoColorSpaceInit`."]
99    #[doc = ""]
100    #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`*"]
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    pub fn new() -> Self {
105        #[allow(unused_mut)]
106        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
107        ret
108    }
109    #[cfg(web_sys_unstable_apis)]
110    #[deprecated = "Use `set_full_range()` instead."]
111    pub fn full_range(&mut self, val: bool) -> &mut Self {
112        self.set_full_range(val);
113        self
114    }
115    #[cfg(web_sys_unstable_apis)]
116    #[cfg(feature = "VideoMatrixCoefficients")]
117    #[deprecated = "Use `set_matrix()` instead."]
118    pub fn matrix(&mut self, val: VideoMatrixCoefficients) -> &mut Self {
119        self.set_matrix(val);
120        self
121    }
122    #[cfg(web_sys_unstable_apis)]
123    #[cfg(feature = "VideoColorPrimaries")]
124    #[deprecated = "Use `set_primaries()` instead."]
125    pub fn primaries(&mut self, val: VideoColorPrimaries) -> &mut Self {
126        self.set_primaries(val);
127        self
128    }
129    #[cfg(web_sys_unstable_apis)]
130    #[cfg(feature = "VideoTransferCharacteristics")]
131    #[deprecated = "Use `set_transfer()` instead."]
132    pub fn transfer(&mut self, val: VideoTransferCharacteristics) -> &mut Self {
133        self.set_transfer(val);
134        self
135    }
136}
137#[cfg(web_sys_unstable_apis)]
138impl Default for VideoColorSpaceInit {
139    fn default() -> Self {
140        Self::new()
141    }
142}