web_sys/features/
gen_KeyframeEffectOptions.rs1#![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 = "Get the `easing` field of this object."]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"]
48 #[wasm_bindgen(method, getter = "easing")]
49 pub fn get_easing(this: &KeyframeEffectOptions) -> Option<::alloc::string::String>;
50 #[doc = "Change the `easing` field of this object."]
51 #[doc = ""]
52 #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"]
53 #[wasm_bindgen(method, setter = "easing")]
54 pub fn set_easing(this: &KeyframeEffectOptions, val: &str);
55 #[doc = "Get the `endDelay` field of this object."]
56 #[doc = ""]
57 #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"]
58 #[wasm_bindgen(method, getter = "endDelay")]
59 pub fn get_end_delay(this: &KeyframeEffectOptions) -> Option<f64>;
60 #[doc = "Change the `endDelay` field of this object."]
61 #[doc = ""]
62 #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"]
63 #[wasm_bindgen(method, setter = "endDelay")]
64 pub fn set_end_delay(this: &KeyframeEffectOptions, val: f64);
65 #[cfg(feature = "FillMode")]
66 #[doc = "Get the `fill` field of this object."]
67 #[doc = ""]
68 #[doc = "*This API requires the following crate features to be activated: `FillMode`, `KeyframeEffectOptions`*"]
69 #[wasm_bindgen(method, getter = "fill")]
70 pub fn get_fill(this: &KeyframeEffectOptions) -> Option<FillMode>;
71 #[cfg(feature = "FillMode")]
72 #[doc = "Change the `fill` field of this object."]
73 #[doc = ""]
74 #[doc = "*This API requires the following crate features to be activated: `FillMode`, `KeyframeEffectOptions`*"]
75 #[wasm_bindgen(method, setter = "fill")]
76 pub fn set_fill(this: &KeyframeEffectOptions, val: FillMode);
77 #[doc = "Get the `iterationStart` field of this object."]
78 #[doc = ""]
79 #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"]
80 #[wasm_bindgen(method, getter = "iterationStart")]
81 pub fn get_iteration_start(this: &KeyframeEffectOptions) -> Option<f64>;
82 #[doc = "Change the `iterationStart` field of this object."]
83 #[doc = ""]
84 #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"]
85 #[wasm_bindgen(method, setter = "iterationStart")]
86 pub fn set_iteration_start(this: &KeyframeEffectOptions, val: f64);
87 #[doc = "Get the `iterations` field of this object."]
88 #[doc = ""]
89 #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"]
90 #[wasm_bindgen(method, getter = "iterations")]
91 pub fn get_iterations(this: &KeyframeEffectOptions) -> Option<f64>;
92 #[doc = "Change the `iterations` field of this object."]
93 #[doc = ""]
94 #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"]
95 #[wasm_bindgen(method, setter = "iterations")]
96 pub fn set_iterations(this: &KeyframeEffectOptions, val: f64);
97 #[cfg(feature = "CompositeOperation")]
98 #[doc = "Get the `composite` field of this object."]
99 #[doc = ""]
100 #[doc = "*This API requires the following crate features to be activated: `CompositeOperation`, `KeyframeEffectOptions`*"]
101 #[wasm_bindgen(method, getter = "composite")]
102 pub fn get_composite(this: &KeyframeEffectOptions) -> Option<CompositeOperation>;
103 #[cfg(feature = "CompositeOperation")]
104 #[doc = "Change the `composite` field of this object."]
105 #[doc = ""]
106 #[doc = "*This API requires the following crate features to be activated: `CompositeOperation`, `KeyframeEffectOptions`*"]
107 #[wasm_bindgen(method, setter = "composite")]
108 pub fn set_composite(this: &KeyframeEffectOptions, val: CompositeOperation);
109 #[cfg(feature = "IterationCompositeOperation")]
110 #[doc = "Get the `iterationComposite` field of this object."]
111 #[doc = ""]
112 #[doc = "*This API requires the following crate features to be activated: `IterationCompositeOperation`, `KeyframeEffectOptions`*"]
113 #[wasm_bindgen(method, getter = "iterationComposite")]
114 pub fn get_iteration_composite(
115 this: &KeyframeEffectOptions,
116 ) -> Option<IterationCompositeOperation>;
117 #[cfg(feature = "IterationCompositeOperation")]
118 #[doc = "Change the `iterationComposite` field of this object."]
119 #[doc = ""]
120 #[doc = "*This API requires the following crate features to be activated: `IterationCompositeOperation`, `KeyframeEffectOptions`*"]
121 #[wasm_bindgen(method, setter = "iterationComposite")]
122 pub fn set_iteration_composite(this: &KeyframeEffectOptions, val: IterationCompositeOperation);
123}
124impl KeyframeEffectOptions {
125 #[doc = "Construct a new `KeyframeEffectOptions`."]
126 #[doc = ""]
127 #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"]
128 pub fn new() -> Self {
129 #[allow(unused_mut)]
130 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
131 ret
132 }
133 #[deprecated = "Use `set_delay()` instead."]
134 pub fn delay(&mut self, val: f64) -> &mut Self {
135 self.set_delay(val);
136 self
137 }
138 #[cfg(feature = "PlaybackDirection")]
139 #[deprecated = "Use `set_direction()` instead."]
140 pub fn direction(&mut self, val: PlaybackDirection) -> &mut Self {
141 self.set_direction(val);
142 self
143 }
144 #[deprecated = "Use `set_duration()` instead."]
145 pub fn duration(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
146 self.set_duration(val);
147 self
148 }
149 #[deprecated = "Use `set_easing()` instead."]
150 pub fn easing(&mut self, val: &str) -> &mut Self {
151 self.set_easing(val);
152 self
153 }
154 #[deprecated = "Use `set_end_delay()` instead."]
155 pub fn end_delay(&mut self, val: f64) -> &mut Self {
156 self.set_end_delay(val);
157 self
158 }
159 #[cfg(feature = "FillMode")]
160 #[deprecated = "Use `set_fill()` instead."]
161 pub fn fill(&mut self, val: FillMode) -> &mut Self {
162 self.set_fill(val);
163 self
164 }
165 #[deprecated = "Use `set_iteration_start()` instead."]
166 pub fn iteration_start(&mut self, val: f64) -> &mut Self {
167 self.set_iteration_start(val);
168 self
169 }
170 #[deprecated = "Use `set_iterations()` instead."]
171 pub fn iterations(&mut self, val: f64) -> &mut Self {
172 self.set_iterations(val);
173 self
174 }
175 #[cfg(feature = "CompositeOperation")]
176 #[deprecated = "Use `set_composite()` instead."]
177 pub fn composite(&mut self, val: CompositeOperation) -> &mut Self {
178 self.set_composite(val);
179 self
180 }
181 #[cfg(feature = "IterationCompositeOperation")]
182 #[deprecated = "Use `set_iteration_composite()` instead."]
183 pub fn iteration_composite(&mut self, val: IterationCompositeOperation) -> &mut Self {
184 self.set_iteration_composite(val);
185 self
186 }
187}
188impl Default for KeyframeEffectOptions {
189 fn default() -> Self {
190 Self::new()
191 }
192}