Skip to main content

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