Skip to main content

web_sys/features/
gen_KeyframeEffectOptions.rs

1#![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 = KeyframeEffectOptions)]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `KeyframeEffectOptions` dictionary."]
10    #[doc = ""]
11    #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"]
12    pub type KeyframeEffectOptions;
13    #[doc = "Get the `delay` field of this object."]
14    #[doc = ""]
15    #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"]
16    #[wasm_bindgen(method, getter = "delay")]
17    pub fn get_delay(this: &KeyframeEffectOptions) -> Option<f64>;
18    #[doc = "Change the `delay` field of this object."]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"]
21    #[wasm_bindgen(method, setter = "delay")]
22    pub fn set_delay(this: &KeyframeEffectOptions, val: f64);
23    #[cfg(feature = "PlaybackDirection")]
24    #[doc = "Get the `direction` field of this object."]
25    #[doc = ""]
26    #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`, `PlaybackDirection`*"]
27    #[wasm_bindgen(method, getter = "direction")]
28    pub fn get_direction(this: &KeyframeEffectOptions) -> Option<PlaybackDirection>;
29    #[cfg(feature = "PlaybackDirection")]
30    #[doc = "Change the `direction` field of this object."]
31    #[doc = ""]
32    #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`, `PlaybackDirection`*"]
33    #[wasm_bindgen(method, setter = "direction")]
34    pub fn set_direction(this: &KeyframeEffectOptions, val: PlaybackDirection);
35    #[doc = "Get the `duration` field of this object."]
36    #[doc = ""]
37    #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"]
38    #[wasm_bindgen(method, getter = "duration")]
39    pub fn get_duration(this: &KeyframeEffectOptions) -> ::wasm_bindgen::JsValue;
40    #[doc = "Change the `duration` field of this object."]
41    #[doc = ""]
42    #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"]
43    #[wasm_bindgen(method, setter = "duration")]
44    pub fn set_duration(this: &KeyframeEffectOptions, val: &::wasm_bindgen::JsValue);
45    #[doc = "Change the `duration` field of this object."]
46    #[doc = ""]
47    #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"]
48    #[wasm_bindgen(method, setter = "duration")]
49    pub fn set_duration_f64(this: &KeyframeEffectOptions, val: f64);
50    #[doc = "Change the `duration` field of this object."]
51    #[doc = ""]
52    #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"]
53    #[wasm_bindgen(method, setter = "duration")]
54    pub fn set_duration_str(this: &KeyframeEffectOptions, val: &str);
55    #[doc = "Get the `easing` field of this object."]
56    #[doc = ""]
57    #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"]
58    #[wasm_bindgen(method, getter = "easing")]
59    pub fn get_easing(this: &KeyframeEffectOptions) -> Option<::alloc::string::String>;
60    #[doc = "Change the `easing` field of this object."]
61    #[doc = ""]
62    #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"]
63    #[wasm_bindgen(method, setter = "easing")]
64    pub fn set_easing(this: &KeyframeEffectOptions, val: &str);
65    #[doc = "Get the `endDelay` field of this object."]
66    #[doc = ""]
67    #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"]
68    #[wasm_bindgen(method, getter = "endDelay")]
69    pub fn get_end_delay(this: &KeyframeEffectOptions) -> Option<f64>;
70    #[doc = "Change the `endDelay` field of this object."]
71    #[doc = ""]
72    #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"]
73    #[wasm_bindgen(method, setter = "endDelay")]
74    pub fn set_end_delay(this: &KeyframeEffectOptions, val: f64);
75    #[cfg(feature = "FillMode")]
76    #[doc = "Get the `fill` field of this object."]
77    #[doc = ""]
78    #[doc = "*This API requires the following crate features to be activated: `FillMode`, `KeyframeEffectOptions`*"]
79    #[wasm_bindgen(method, getter = "fill")]
80    pub fn get_fill(this: &KeyframeEffectOptions) -> Option<FillMode>;
81    #[cfg(feature = "FillMode")]
82    #[doc = "Change the `fill` field of this object."]
83    #[doc = ""]
84    #[doc = "*This API requires the following crate features to be activated: `FillMode`, `KeyframeEffectOptions`*"]
85    #[wasm_bindgen(method, setter = "fill")]
86    pub fn set_fill(this: &KeyframeEffectOptions, val: FillMode);
87    #[doc = "Get the `iterationStart` field of this object."]
88    #[doc = ""]
89    #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"]
90    #[wasm_bindgen(method, getter = "iterationStart")]
91    pub fn get_iteration_start(this: &KeyframeEffectOptions) -> Option<f64>;
92    #[doc = "Change the `iterationStart` field of this object."]
93    #[doc = ""]
94    #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"]
95    #[wasm_bindgen(method, setter = "iterationStart")]
96    pub fn set_iteration_start(this: &KeyframeEffectOptions, val: f64);
97    #[doc = "Get the `iterations` field of this object."]
98    #[doc = ""]
99    #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"]
100    #[wasm_bindgen(method, getter = "iterations")]
101    pub fn get_iterations(this: &KeyframeEffectOptions) -> Option<f64>;
102    #[doc = "Change the `iterations` field of this object."]
103    #[doc = ""]
104    #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"]
105    #[wasm_bindgen(method, setter = "iterations")]
106    pub fn set_iterations(this: &KeyframeEffectOptions, val: f64);
107    #[cfg(feature = "CompositeOperation")]
108    #[doc = "Get the `composite` field of this object."]
109    #[doc = ""]
110    #[doc = "*This API requires the following crate features to be activated: `CompositeOperation`, `KeyframeEffectOptions`*"]
111    #[wasm_bindgen(method, getter = "composite")]
112    pub fn get_composite(this: &KeyframeEffectOptions) -> Option<CompositeOperation>;
113    #[cfg(feature = "CompositeOperation")]
114    #[doc = "Change the `composite` field of this object."]
115    #[doc = ""]
116    #[doc = "*This API requires the following crate features to be activated: `CompositeOperation`, `KeyframeEffectOptions`*"]
117    #[wasm_bindgen(method, setter = "composite")]
118    pub fn set_composite(this: &KeyframeEffectOptions, val: CompositeOperation);
119    #[cfg(feature = "IterationCompositeOperation")]
120    #[doc = "Get the `iterationComposite` field of this object."]
121    #[doc = ""]
122    #[doc = "*This API requires the following crate features to be activated: `IterationCompositeOperation`, `KeyframeEffectOptions`*"]
123    #[wasm_bindgen(method, getter = "iterationComposite")]
124    pub fn get_iteration_composite(
125        this: &KeyframeEffectOptions,
126    ) -> Option<IterationCompositeOperation>;
127    #[cfg(feature = "IterationCompositeOperation")]
128    #[doc = "Change the `iterationComposite` field of this object."]
129    #[doc = ""]
130    #[doc = "*This API requires the following crate features to be activated: `IterationCompositeOperation`, `KeyframeEffectOptions`*"]
131    #[wasm_bindgen(method, setter = "iterationComposite")]
132    pub fn set_iteration_composite(this: &KeyframeEffectOptions, val: IterationCompositeOperation);
133}
134impl KeyframeEffectOptions {
135    #[doc = "Construct a new `KeyframeEffectOptions`."]
136    #[doc = ""]
137    #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"]
138    pub fn new() -> Self {
139        #[allow(unused_mut)]
140        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
141        ret
142    }
143    #[deprecated = "Use `set_delay()` instead."]
144    pub fn delay(&mut self, val: f64) -> &mut Self {
145        self.set_delay(val);
146        self
147    }
148    #[cfg(feature = "PlaybackDirection")]
149    #[deprecated = "Use `set_direction()` instead."]
150    pub fn direction(&mut self, val: PlaybackDirection) -> &mut Self {
151        self.set_direction(val);
152        self
153    }
154    #[deprecated = "Use `set_duration()` instead."]
155    pub fn duration(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
156        self.set_duration(val);
157        self
158    }
159    #[deprecated = "Use `set_easing()` instead."]
160    pub fn easing(&mut self, val: &str) -> &mut Self {
161        self.set_easing(val);
162        self
163    }
164    #[deprecated = "Use `set_end_delay()` instead."]
165    pub fn end_delay(&mut self, val: f64) -> &mut Self {
166        self.set_end_delay(val);
167        self
168    }
169    #[cfg(feature = "FillMode")]
170    #[deprecated = "Use `set_fill()` instead."]
171    pub fn fill(&mut self, val: FillMode) -> &mut Self {
172        self.set_fill(val);
173        self
174    }
175    #[deprecated = "Use `set_iteration_start()` instead."]
176    pub fn iteration_start(&mut self, val: f64) -> &mut Self {
177        self.set_iteration_start(val);
178        self
179    }
180    #[deprecated = "Use `set_iterations()` instead."]
181    pub fn iterations(&mut self, val: f64) -> &mut Self {
182        self.set_iterations(val);
183        self
184    }
185    #[cfg(feature = "CompositeOperation")]
186    #[deprecated = "Use `set_composite()` instead."]
187    pub fn composite(&mut self, val: CompositeOperation) -> &mut Self {
188        self.set_composite(val);
189        self
190    }
191    #[cfg(feature = "IterationCompositeOperation")]
192    #[deprecated = "Use `set_iteration_composite()` instead."]
193    pub fn iteration_composite(&mut self, val: IterationCompositeOperation) -> &mut Self {
194        self.set_iteration_composite(val);
195        self
196    }
197}
198impl Default for KeyframeEffectOptions {
199    fn default() -> Self {
200        Self::new()
201    }
202}