Skip to main content

web_sys/features/
gen_KeyframeAnimationOptions.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 = KeyframeAnimationOptions)]
9    #[derive(Debug, Clone, PartialEq, Eq)]
10    #[doc = "The `KeyframeAnimationOptions` dictionary."]
11    #[doc = ""]
12    #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"]
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 KeyframeAnimationOptions;
17    #[cfg(web_sys_unstable_apis)]
18    #[doc = "Get the `delay` field of this object."]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"]
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 = "delay")]
25    pub fn get_delay(this: &KeyframeAnimationOptions) -> Option<f64>;
26    #[cfg(web_sys_unstable_apis)]
27    #[doc = "Change the `delay` field of this object."]
28    #[doc = ""]
29    #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
33    #[wasm_bindgen(method, setter = "delay")]
34    pub fn set_delay(this: &KeyframeAnimationOptions, val: f64);
35    #[cfg(web_sys_unstable_apis)]
36    #[cfg(feature = "PlaybackDirection")]
37    #[doc = "Get the `direction` field of this object."]
38    #[doc = ""]
39    #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`, `PlaybackDirection`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
43    #[wasm_bindgen(method, getter = "direction")]
44    pub fn get_direction(this: &KeyframeAnimationOptions) -> Option<PlaybackDirection>;
45    #[cfg(web_sys_unstable_apis)]
46    #[cfg(feature = "PlaybackDirection")]
47    #[doc = "Change the `direction` field of this object."]
48    #[doc = ""]
49    #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`, `PlaybackDirection`*"]
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 = "direction")]
54    pub fn set_direction(this: &KeyframeAnimationOptions, val: PlaybackDirection);
55    #[cfg(web_sys_unstable_apis)]
56    #[doc = "Get the `duration` field of this object."]
57    #[doc = ""]
58    #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"]
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 = "duration")]
63    pub fn get_duration(this: &KeyframeAnimationOptions) -> ::wasm_bindgen::JsValue;
64    #[cfg(web_sys_unstable_apis)]
65    #[doc = "Change the `duration` field of this object."]
66    #[doc = ""]
67    #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"]
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 = "duration")]
72    pub fn set_duration(this: &KeyframeAnimationOptions, val: f64);
73    #[cfg(web_sys_unstable_apis)]
74    #[doc = "Change the `duration` field of this object."]
75    #[doc = ""]
76    #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"]
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, setter = "duration")]
81    pub fn set_duration_str(this: &KeyframeAnimationOptions, val: &str);
82    #[cfg(web_sys_unstable_apis)]
83    #[doc = "Get the `easing` field of this object."]
84    #[doc = ""]
85    #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"]
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, getter = "easing")]
90    pub fn get_easing(this: &KeyframeAnimationOptions) -> Option<::alloc::string::String>;
91    #[cfg(web_sys_unstable_apis)]
92    #[doc = "Change the `easing` field of this object."]
93    #[doc = ""]
94    #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"]
95    #[doc = ""]
96    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
97    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
98    #[wasm_bindgen(method, setter = "easing")]
99    pub fn set_easing(this: &KeyframeAnimationOptions, val: &str);
100    #[cfg(web_sys_unstable_apis)]
101    #[doc = "Get the `endDelay` field of this object."]
102    #[doc = ""]
103    #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"]
104    #[doc = ""]
105    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
106    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
107    #[wasm_bindgen(method, getter = "endDelay")]
108    pub fn get_end_delay(this: &KeyframeAnimationOptions) -> Option<f64>;
109    #[cfg(web_sys_unstable_apis)]
110    #[doc = "Change the `endDelay` field of this object."]
111    #[doc = ""]
112    #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"]
113    #[doc = ""]
114    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
115    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
116    #[wasm_bindgen(method, setter = "endDelay")]
117    pub fn set_end_delay(this: &KeyframeAnimationOptions, val: f64);
118    #[cfg(web_sys_unstable_apis)]
119    #[cfg(feature = "FillMode")]
120    #[doc = "Get the `fill` field of this object."]
121    #[doc = ""]
122    #[doc = "*This API requires the following crate features to be activated: `FillMode`, `KeyframeAnimationOptions`*"]
123    #[doc = ""]
124    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
125    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
126    #[wasm_bindgen(method, getter = "fill")]
127    pub fn get_fill(this: &KeyframeAnimationOptions) -> Option<FillMode>;
128    #[cfg(web_sys_unstable_apis)]
129    #[cfg(feature = "FillMode")]
130    #[doc = "Change the `fill` field of this object."]
131    #[doc = ""]
132    #[doc = "*This API requires the following crate features to be activated: `FillMode`, `KeyframeAnimationOptions`*"]
133    #[doc = ""]
134    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
135    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
136    #[wasm_bindgen(method, setter = "fill")]
137    pub fn set_fill(this: &KeyframeAnimationOptions, val: FillMode);
138    #[cfg(web_sys_unstable_apis)]
139    #[doc = "Get the `iterationStart` field of this object."]
140    #[doc = ""]
141    #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"]
142    #[doc = ""]
143    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
144    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
145    #[wasm_bindgen(method, getter = "iterationStart")]
146    pub fn get_iteration_start(this: &KeyframeAnimationOptions) -> Option<f64>;
147    #[cfg(web_sys_unstable_apis)]
148    #[doc = "Change the `iterationStart` field of this object."]
149    #[doc = ""]
150    #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"]
151    #[doc = ""]
152    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
153    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
154    #[wasm_bindgen(method, setter = "iterationStart")]
155    pub fn set_iteration_start(this: &KeyframeAnimationOptions, val: f64);
156    #[cfg(web_sys_unstable_apis)]
157    #[doc = "Get the `iterations` field of this object."]
158    #[doc = ""]
159    #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"]
160    #[doc = ""]
161    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
162    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
163    #[wasm_bindgen(method, getter = "iterations")]
164    pub fn get_iterations(this: &KeyframeAnimationOptions) -> Option<f64>;
165    #[cfg(web_sys_unstable_apis)]
166    #[doc = "Change the `iterations` field of this object."]
167    #[doc = ""]
168    #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"]
169    #[doc = ""]
170    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
171    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
172    #[wasm_bindgen(method, setter = "iterations")]
173    pub fn set_iterations(this: &KeyframeAnimationOptions, val: f64);
174    #[cfg(web_sys_unstable_apis)]
175    #[cfg(feature = "CompositeOperation")]
176    #[doc = "Get the `composite` field of this object."]
177    #[doc = ""]
178    #[doc = "*This API requires the following crate features to be activated: `CompositeOperation`, `KeyframeAnimationOptions`*"]
179    #[doc = ""]
180    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
181    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
182    #[wasm_bindgen(method, getter = "composite")]
183    pub fn get_composite(this: &KeyframeAnimationOptions) -> Option<CompositeOperation>;
184    #[cfg(web_sys_unstable_apis)]
185    #[cfg(feature = "CompositeOperation")]
186    #[doc = "Change the `composite` field of this object."]
187    #[doc = ""]
188    #[doc = "*This API requires the following crate features to be activated: `CompositeOperation`, `KeyframeAnimationOptions`*"]
189    #[doc = ""]
190    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
191    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
192    #[wasm_bindgen(method, setter = "composite")]
193    pub fn set_composite(this: &KeyframeAnimationOptions, val: CompositeOperation);
194    #[cfg(web_sys_unstable_apis)]
195    #[cfg(feature = "IterationCompositeOperation")]
196    #[doc = "Get the `iterationComposite` field of this object."]
197    #[doc = ""]
198    #[doc = "*This API requires the following crate features to be activated: `IterationCompositeOperation`, `KeyframeAnimationOptions`*"]
199    #[doc = ""]
200    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
201    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
202    #[wasm_bindgen(method, getter = "iterationComposite")]
203    pub fn get_iteration_composite(
204        this: &KeyframeAnimationOptions,
205    ) -> Option<IterationCompositeOperation>;
206    #[cfg(web_sys_unstable_apis)]
207    #[cfg(feature = "IterationCompositeOperation")]
208    #[doc = "Change the `iterationComposite` field of this object."]
209    #[doc = ""]
210    #[doc = "*This API requires the following crate features to be activated: `IterationCompositeOperation`, `KeyframeAnimationOptions`*"]
211    #[doc = ""]
212    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
213    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
214    #[wasm_bindgen(method, setter = "iterationComposite")]
215    pub fn set_iteration_composite(
216        this: &KeyframeAnimationOptions,
217        val: IterationCompositeOperation,
218    );
219    #[cfg(web_sys_unstable_apis)]
220    #[doc = "Get the `id` field of this object."]
221    #[doc = ""]
222    #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"]
223    #[doc = ""]
224    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
225    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
226    #[wasm_bindgen(method, getter = "id")]
227    pub fn get_id(this: &KeyframeAnimationOptions) -> Option<::alloc::string::String>;
228    #[cfg(web_sys_unstable_apis)]
229    #[doc = "Change the `id` field of this object."]
230    #[doc = ""]
231    #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"]
232    #[doc = ""]
233    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
234    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
235    #[wasm_bindgen(method, setter = "id")]
236    pub fn set_id(this: &KeyframeAnimationOptions, val: &str);
237    #[cfg(web_sys_unstable_apis)]
238    #[cfg(feature = "AnimationTimeline")]
239    #[doc = "Get the `timeline` field of this object."]
240    #[doc = ""]
241    #[doc = "*This API requires the following crate features to be activated: `AnimationTimeline`, `KeyframeAnimationOptions`*"]
242    #[doc = ""]
243    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
244    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
245    #[wasm_bindgen(method, getter = "timeline")]
246    pub fn get_timeline(this: &KeyframeAnimationOptions) -> Option<AnimationTimeline>;
247    #[cfg(web_sys_unstable_apis)]
248    #[cfg(feature = "AnimationTimeline")]
249    #[doc = "Change the `timeline` field of this object."]
250    #[doc = ""]
251    #[doc = "*This API requires the following crate features to be activated: `AnimationTimeline`, `KeyframeAnimationOptions`*"]
252    #[doc = ""]
253    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
254    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
255    #[wasm_bindgen(method, setter = "timeline")]
256    pub fn set_timeline(this: &KeyframeAnimationOptions, val: Option<&AnimationTimeline>);
257}
258#[cfg(web_sys_unstable_apis)]
259impl KeyframeAnimationOptions {
260    #[doc = "Construct a new `KeyframeAnimationOptions`."]
261    #[doc = ""]
262    #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"]
263    #[doc = ""]
264    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
265    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
266    pub fn new() -> Self {
267        #[allow(unused_mut)]
268        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
269        ret
270    }
271    #[cfg(web_sys_unstable_apis)]
272    #[deprecated = "Use `set_delay()` instead."]
273    pub fn delay(&mut self, val: f64) -> &mut Self {
274        self.set_delay(val);
275        self
276    }
277    #[cfg(web_sys_unstable_apis)]
278    #[cfg(feature = "PlaybackDirection")]
279    #[deprecated = "Use `set_direction()` instead."]
280    pub fn direction(&mut self, val: PlaybackDirection) -> &mut Self {
281        self.set_direction(val);
282        self
283    }
284    #[cfg(web_sys_unstable_apis)]
285    #[deprecated = "Use `set_duration()` instead."]
286    pub fn duration(&mut self, val: f64) -> &mut Self {
287        self.set_duration(val);
288        self
289    }
290    #[cfg(web_sys_unstable_apis)]
291    #[deprecated = "Use `set_easing()` instead."]
292    pub fn easing(&mut self, val: &str) -> &mut Self {
293        self.set_easing(val);
294        self
295    }
296    #[cfg(web_sys_unstable_apis)]
297    #[deprecated = "Use `set_end_delay()` instead."]
298    pub fn end_delay(&mut self, val: f64) -> &mut Self {
299        self.set_end_delay(val);
300        self
301    }
302    #[cfg(web_sys_unstable_apis)]
303    #[cfg(feature = "FillMode")]
304    #[deprecated = "Use `set_fill()` instead."]
305    pub fn fill(&mut self, val: FillMode) -> &mut Self {
306        self.set_fill(val);
307        self
308    }
309    #[cfg(web_sys_unstable_apis)]
310    #[deprecated = "Use `set_iteration_start()` instead."]
311    pub fn iteration_start(&mut self, val: f64) -> &mut Self {
312        self.set_iteration_start(val);
313        self
314    }
315    #[cfg(web_sys_unstable_apis)]
316    #[deprecated = "Use `set_iterations()` instead."]
317    pub fn iterations(&mut self, val: f64) -> &mut Self {
318        self.set_iterations(val);
319        self
320    }
321    #[cfg(web_sys_unstable_apis)]
322    #[cfg(feature = "CompositeOperation")]
323    #[deprecated = "Use `set_composite()` instead."]
324    pub fn composite(&mut self, val: CompositeOperation) -> &mut Self {
325        self.set_composite(val);
326        self
327    }
328    #[cfg(web_sys_unstable_apis)]
329    #[cfg(feature = "IterationCompositeOperation")]
330    #[deprecated = "Use `set_iteration_composite()` instead."]
331    pub fn iteration_composite(&mut self, val: IterationCompositeOperation) -> &mut Self {
332        self.set_iteration_composite(val);
333        self
334    }
335    #[cfg(web_sys_unstable_apis)]
336    #[deprecated = "Use `set_id()` instead."]
337    pub fn id(&mut self, val: &str) -> &mut Self {
338        self.set_id(val);
339        self
340    }
341    #[cfg(web_sys_unstable_apis)]
342    #[cfg(feature = "AnimationTimeline")]
343    #[deprecated = "Use `set_timeline()` instead."]
344    pub fn timeline(&mut self, val: Option<&AnimationTimeline>) -> &mut Self {
345        self.set_timeline(val);
346        self
347    }
348}
349#[cfg(web_sys_unstable_apis)]
350impl Default for KeyframeAnimationOptions {
351    fn default() -> Self {
352        Self::new()
353    }
354}