web_sys/features/
gen_PhotoCapabilities.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 = PhotoCapabilities)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `PhotoCapabilities` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `PhotoCapabilities`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
16 pub type PhotoCapabilities;
17 #[cfg(web_sys_unstable_apis)]
18 #[doc = "Get the `fillLightMode` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `PhotoCapabilities`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
24 #[wasm_bindgen(method, getter = "fillLightMode")]
25 pub fn get_fill_light_mode(
26 this: &PhotoCapabilities,
27 ) -> Option<::js_sys::Array<::js_sys::JsString>>;
28 #[cfg(web_sys_unstable_apis)]
29 #[doc = "Change the `fillLightMode` field of this object."]
30 #[doc = ""]
31 #[doc = "*This API requires the following crate features to be activated: `PhotoCapabilities`*"]
32 #[doc = ""]
33 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
34 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
35 #[wasm_bindgen(method, setter = "fillLightMode")]
36 pub fn set_fill_light_mode(this: &PhotoCapabilities, val: &[::js_sys::JsString]);
37 #[cfg(web_sys_unstable_apis)]
38 #[cfg(feature = "MediaSettingsRange")]
39 #[doc = "Get the `imageHeight` field of this object."]
40 #[doc = ""]
41 #[doc = "*This API requires the following crate features to be activated: `MediaSettingsRange`, `PhotoCapabilities`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
45 #[wasm_bindgen(method, getter = "imageHeight")]
46 pub fn get_image_height(this: &PhotoCapabilities) -> Option<MediaSettingsRange>;
47 #[cfg(web_sys_unstable_apis)]
48 #[cfg(feature = "MediaSettingsRange")]
49 #[doc = "Change the `imageHeight` field of this object."]
50 #[doc = ""]
51 #[doc = "*This API requires the following crate features to be activated: `MediaSettingsRange`, `PhotoCapabilities`*"]
52 #[doc = ""]
53 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
54 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
55 #[wasm_bindgen(method, setter = "imageHeight")]
56 pub fn set_image_height(this: &PhotoCapabilities, val: &MediaSettingsRange);
57 #[cfg(web_sys_unstable_apis)]
58 #[cfg(feature = "MediaSettingsRange")]
59 #[doc = "Get the `imageWidth` field of this object."]
60 #[doc = ""]
61 #[doc = "*This API requires the following crate features to be activated: `MediaSettingsRange`, `PhotoCapabilities`*"]
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 #[wasm_bindgen(method, getter = "imageWidth")]
66 pub fn get_image_width(this: &PhotoCapabilities) -> Option<MediaSettingsRange>;
67 #[cfg(web_sys_unstable_apis)]
68 #[cfg(feature = "MediaSettingsRange")]
69 #[doc = "Change the `imageWidth` field of this object."]
70 #[doc = ""]
71 #[doc = "*This API requires the following crate features to be activated: `MediaSettingsRange`, `PhotoCapabilities`*"]
72 #[doc = ""]
73 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
74 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
75 #[wasm_bindgen(method, setter = "imageWidth")]
76 pub fn set_image_width(this: &PhotoCapabilities, val: &MediaSettingsRange);
77 #[cfg(web_sys_unstable_apis)]
78 #[cfg(feature = "RedEyeReduction")]
79 #[doc = "Get the `redEyeReduction` field of this object."]
80 #[doc = ""]
81 #[doc = "*This API requires the following crate features to be activated: `PhotoCapabilities`, `RedEyeReduction`*"]
82 #[doc = ""]
83 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
84 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
85 #[wasm_bindgen(method, getter = "redEyeReduction")]
86 pub fn get_red_eye_reduction(this: &PhotoCapabilities) -> Option<RedEyeReduction>;
87 #[cfg(web_sys_unstable_apis)]
88 #[cfg(feature = "RedEyeReduction")]
89 #[doc = "Change the `redEyeReduction` field of this object."]
90 #[doc = ""]
91 #[doc = "*This API requires the following crate features to be activated: `PhotoCapabilities`, `RedEyeReduction`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
95 #[wasm_bindgen(method, setter = "redEyeReduction")]
96 pub fn set_red_eye_reduction(this: &PhotoCapabilities, val: RedEyeReduction);
97}
98#[cfg(web_sys_unstable_apis)]
99impl PhotoCapabilities {
100 #[doc = "Construct a new `PhotoCapabilities`."]
101 #[doc = ""]
102 #[doc = "*This API requires the following crate features to be activated: `PhotoCapabilities`*"]
103 #[doc = ""]
104 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
105 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
106 pub fn new() -> Self {
107 #[allow(unused_mut)]
108 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
109 ret
110 }
111 #[cfg(web_sys_unstable_apis)]
112 #[deprecated = "Use `set_fill_light_mode()` instead."]
113 pub fn fill_light_mode(&mut self, val: &[::js_sys::JsString]) -> &mut Self {
114 self.set_fill_light_mode(val);
115 self
116 }
117 #[cfg(web_sys_unstable_apis)]
118 #[cfg(feature = "MediaSettingsRange")]
119 #[deprecated = "Use `set_image_height()` instead."]
120 pub fn image_height(&mut self, val: &MediaSettingsRange) -> &mut Self {
121 self.set_image_height(val);
122 self
123 }
124 #[cfg(web_sys_unstable_apis)]
125 #[cfg(feature = "MediaSettingsRange")]
126 #[deprecated = "Use `set_image_width()` instead."]
127 pub fn image_width(&mut self, val: &MediaSettingsRange) -> &mut Self {
128 self.set_image_width(val);
129 self
130 }
131 #[cfg(web_sys_unstable_apis)]
132 #[cfg(feature = "RedEyeReduction")]
133 #[deprecated = "Use `set_red_eye_reduction()` instead."]
134 pub fn red_eye_reduction(&mut self, val: RedEyeReduction) -> &mut Self {
135 self.set_red_eye_reduction(val);
136 self
137 }
138}
139#[cfg(web_sys_unstable_apis)]
140impl Default for PhotoCapabilities {
141 fn default() -> Self {
142 Self::new()
143 }
144}