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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
71 #[wasm_bindgen(method, setter = "duration")]
72 pub fn set_duration(this: &KeyframeAnimationOptions, val: &::wasm_bindgen::JsValue);
73 #[cfg(web_sys_unstable_apis)]
74 #[doc = "Get the `easing` 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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
80 #[wasm_bindgen(method, getter = "easing")]
81 pub fn get_easing(this: &KeyframeAnimationOptions) -> Option<::alloc::string::String>;
82 #[cfg(web_sys_unstable_apis)]
83 #[doc = "Change 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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
89 #[wasm_bindgen(method, setter = "easing")]
90 pub fn set_easing(this: &KeyframeAnimationOptions, val: &str);
91 #[cfg(web_sys_unstable_apis)]
92 #[doc = "Get the `endDelay` 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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
98 #[wasm_bindgen(method, getter = "endDelay")]
99 pub fn get_end_delay(this: &KeyframeAnimationOptions) -> Option<f64>;
100 #[cfg(web_sys_unstable_apis)]
101 #[doc = "Change 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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
107 #[wasm_bindgen(method, setter = "endDelay")]
108 pub fn set_end_delay(this: &KeyframeAnimationOptions, val: f64);
109 #[cfg(web_sys_unstable_apis)]
110 #[cfg(feature = "FillMode")]
111 #[doc = "Get the `fill` field of this object."]
112 #[doc = ""]
113 #[doc = "*This API requires the following crate features to be activated: `FillMode`, `KeyframeAnimationOptions`*"]
114 #[doc = ""]
115 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
116 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
117 #[wasm_bindgen(method, getter = "fill")]
118 pub fn get_fill(this: &KeyframeAnimationOptions) -> Option<FillMode>;
119 #[cfg(web_sys_unstable_apis)]
120 #[cfg(feature = "FillMode")]
121 #[doc = "Change the `fill` field of this object."]
122 #[doc = ""]
123 #[doc = "*This API requires the following crate features to be activated: `FillMode`, `KeyframeAnimationOptions`*"]
124 #[doc = ""]
125 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
126 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
127 #[wasm_bindgen(method, setter = "fill")]
128 pub fn set_fill(this: &KeyframeAnimationOptions, val: FillMode);
129 #[cfg(web_sys_unstable_apis)]
130 #[doc = "Get the `iterationStart` field of this object."]
131 #[doc = ""]
132 #[doc = "*This API requires the following crate features to be activated: `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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
136 #[wasm_bindgen(method, getter = "iterationStart")]
137 pub fn get_iteration_start(this: &KeyframeAnimationOptions) -> Option<f64>;
138 #[cfg(web_sys_unstable_apis)]
139 #[doc = "Change 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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
145 #[wasm_bindgen(method, setter = "iterationStart")]
146 pub fn set_iteration_start(this: &KeyframeAnimationOptions, val: f64);
147 #[cfg(web_sys_unstable_apis)]
148 #[doc = "Get the `iterations` 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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
154 #[wasm_bindgen(method, getter = "iterations")]
155 pub fn get_iterations(this: &KeyframeAnimationOptions) -> Option<f64>;
156 #[cfg(web_sys_unstable_apis)]
157 #[doc = "Change 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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
163 #[wasm_bindgen(method, setter = "iterations")]
164 pub fn set_iterations(this: &KeyframeAnimationOptions, val: f64);
165 #[cfg(web_sys_unstable_apis)]
166 #[cfg(feature = "CompositeOperation")]
167 #[doc = "Get the `composite` field of this object."]
168 #[doc = ""]
169 #[doc = "*This API requires the following crate features to be activated: `CompositeOperation`, `KeyframeAnimationOptions`*"]
170 #[doc = ""]
171 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
172 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
173 #[wasm_bindgen(method, getter = "composite")]
174 pub fn get_composite(this: &KeyframeAnimationOptions) -> Option<CompositeOperation>;
175 #[cfg(web_sys_unstable_apis)]
176 #[cfg(feature = "CompositeOperation")]
177 #[doc = "Change the `composite` field of this object."]
178 #[doc = ""]
179 #[doc = "*This API requires the following crate features to be activated: `CompositeOperation`, `KeyframeAnimationOptions`*"]
180 #[doc = ""]
181 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
182 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
183 #[wasm_bindgen(method, setter = "composite")]
184 pub fn set_composite(this: &KeyframeAnimationOptions, val: CompositeOperation);
185 #[cfg(web_sys_unstable_apis)]
186 #[cfg(feature = "IterationCompositeOperation")]
187 #[doc = "Get the `iterationComposite` field of this object."]
188 #[doc = ""]
189 #[doc = "*This API requires the following crate features to be activated: `IterationCompositeOperation`, `KeyframeAnimationOptions`*"]
190 #[doc = ""]
191 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
192 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
193 #[wasm_bindgen(method, getter = "iterationComposite")]
194 pub fn get_iteration_composite(
195 this: &KeyframeAnimationOptions,
196 ) -> Option<IterationCompositeOperation>;
197 #[cfg(web_sys_unstable_apis)]
198 #[cfg(feature = "IterationCompositeOperation")]
199 #[doc = "Change the `iterationComposite` field of this object."]
200 #[doc = ""]
201 #[doc = "*This API requires the following crate features to be activated: `IterationCompositeOperation`, `KeyframeAnimationOptions`*"]
202 #[doc = ""]
203 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
204 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
205 #[wasm_bindgen(method, setter = "iterationComposite")]
206 pub fn set_iteration_composite(
207 this: &KeyframeAnimationOptions,
208 val: IterationCompositeOperation,
209 );
210 #[cfg(web_sys_unstable_apis)]
211 #[doc = "Get the `id` field of this object."]
212 #[doc = ""]
213 #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"]
214 #[doc = ""]
215 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
216 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
217 #[wasm_bindgen(method, getter = "id")]
218 pub fn get_id(this: &KeyframeAnimationOptions) -> Option<::alloc::string::String>;
219 #[cfg(web_sys_unstable_apis)]
220 #[doc = "Change 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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
226 #[wasm_bindgen(method, setter = "id")]
227 pub fn set_id(this: &KeyframeAnimationOptions, val: &str);
228 #[cfg(web_sys_unstable_apis)]
229 #[cfg(feature = "AnimationTimeline")]
230 #[doc = "Get the `timeline` field of this object."]
231 #[doc = ""]
232 #[doc = "*This API requires the following crate features to be activated: `AnimationTimeline`, `KeyframeAnimationOptions`*"]
233 #[doc = ""]
234 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
235 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
236 #[wasm_bindgen(method, getter = "timeline")]
237 pub fn get_timeline(this: &KeyframeAnimationOptions) -> Option<AnimationTimeline>;
238 #[cfg(web_sys_unstable_apis)]
239 #[cfg(feature = "AnimationTimeline")]
240 #[doc = "Change the `timeline` field of this object."]
241 #[doc = ""]
242 #[doc = "*This API requires the following crate features to be activated: `AnimationTimeline`, `KeyframeAnimationOptions`*"]
243 #[doc = ""]
244 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
245 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
246 #[wasm_bindgen(method, setter = "timeline")]
247 pub fn set_timeline(this: &KeyframeAnimationOptions, val: Option<&AnimationTimeline>);
248}
249#[cfg(web_sys_unstable_apis)]
250impl KeyframeAnimationOptions {
251 #[doc = "Construct a new `KeyframeAnimationOptions`."]
252 #[doc = ""]
253 #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"]
254 #[doc = ""]
255 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
256 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
257 pub fn new() -> Self {
258 #[allow(unused_mut)]
259 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
260 ret
261 }
262 #[cfg(web_sys_unstable_apis)]
263 #[deprecated = "Use `set_delay()` instead."]
264 pub fn delay(&mut self, val: f64) -> &mut Self {
265 self.set_delay(val);
266 self
267 }
268 #[cfg(web_sys_unstable_apis)]
269 #[cfg(feature = "PlaybackDirection")]
270 #[deprecated = "Use `set_direction()` instead."]
271 pub fn direction(&mut self, val: PlaybackDirection) -> &mut Self {
272 self.set_direction(val);
273 self
274 }
275 #[cfg(web_sys_unstable_apis)]
276 #[deprecated = "Use `set_duration()` instead."]
277 pub fn duration(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
278 self.set_duration(val);
279 self
280 }
281 #[cfg(web_sys_unstable_apis)]
282 #[deprecated = "Use `set_easing()` instead."]
283 pub fn easing(&mut self, val: &str) -> &mut Self {
284 self.set_easing(val);
285 self
286 }
287 #[cfg(web_sys_unstable_apis)]
288 #[deprecated = "Use `set_end_delay()` instead."]
289 pub fn end_delay(&mut self, val: f64) -> &mut Self {
290 self.set_end_delay(val);
291 self
292 }
293 #[cfg(web_sys_unstable_apis)]
294 #[cfg(feature = "FillMode")]
295 #[deprecated = "Use `set_fill()` instead."]
296 pub fn fill(&mut self, val: FillMode) -> &mut Self {
297 self.set_fill(val);
298 self
299 }
300 #[cfg(web_sys_unstable_apis)]
301 #[deprecated = "Use `set_iteration_start()` instead."]
302 pub fn iteration_start(&mut self, val: f64) -> &mut Self {
303 self.set_iteration_start(val);
304 self
305 }
306 #[cfg(web_sys_unstable_apis)]
307 #[deprecated = "Use `set_iterations()` instead."]
308 pub fn iterations(&mut self, val: f64) -> &mut Self {
309 self.set_iterations(val);
310 self
311 }
312 #[cfg(web_sys_unstable_apis)]
313 #[cfg(feature = "CompositeOperation")]
314 #[deprecated = "Use `set_composite()` instead."]
315 pub fn composite(&mut self, val: CompositeOperation) -> &mut Self {
316 self.set_composite(val);
317 self
318 }
319 #[cfg(web_sys_unstable_apis)]
320 #[cfg(feature = "IterationCompositeOperation")]
321 #[deprecated = "Use `set_iteration_composite()` instead."]
322 pub fn iteration_composite(&mut self, val: IterationCompositeOperation) -> &mut Self {
323 self.set_iteration_composite(val);
324 self
325 }
326 #[cfg(web_sys_unstable_apis)]
327 #[deprecated = "Use `set_id()` instead."]
328 pub fn id(&mut self, val: &str) -> &mut Self {
329 self.set_id(val);
330 self
331 }
332 #[cfg(web_sys_unstable_apis)]
333 #[cfg(feature = "AnimationTimeline")]
334 #[deprecated = "Use `set_timeline()` instead."]
335 pub fn timeline(&mut self, val: Option<&AnimationTimeline>) -> &mut Self {
336 self.set_timeline(val);
337 self
338 }
339}
340#[cfg(web_sys_unstable_apis)]
341impl Default for KeyframeAnimationOptions {
342 fn default() -> Self {
343 Self::new()
344 }
345}