web_sys/features/
gen_BaseComputedKeyframe.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 = BaseComputedKeyframe)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `BaseComputedKeyframe` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"]
12 pub type BaseComputedKeyframe;
13 #[cfg(feature = "CompositeOperation")]
14 #[doc = "Get the `composite` field of this object."]
15 #[doc = ""]
16 #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`, `CompositeOperation`*"]
17 #[wasm_bindgen(method, getter = "composite")]
18 pub fn get_composite(this: &BaseComputedKeyframe) -> Option<CompositeOperation>;
19 #[cfg(feature = "CompositeOperation")]
20 #[doc = "Change the `composite` field of this object."]
21 #[doc = ""]
22 #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`, `CompositeOperation`*"]
23 #[wasm_bindgen(method, setter = "composite")]
24 pub fn set_composite(this: &BaseComputedKeyframe, val: Option<CompositeOperation>);
25 #[doc = "Get the `easing` field of this object."]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"]
28 #[wasm_bindgen(method, getter = "easing")]
29 pub fn get_easing(this: &BaseComputedKeyframe) -> Option<::alloc::string::String>;
30 #[doc = "Change the `easing` field of this object."]
31 #[doc = ""]
32 #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"]
33 #[wasm_bindgen(method, setter = "easing")]
34 pub fn set_easing(this: &BaseComputedKeyframe, val: &str);
35 #[doc = "Get the `offset` field of this object."]
36 #[doc = ""]
37 #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"]
38 #[wasm_bindgen(method, getter = "offset")]
39 pub fn get_offset(this: &BaseComputedKeyframe) -> Option<f64>;
40 #[doc = "Change the `offset` field of this object."]
41 #[doc = ""]
42 #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"]
43 #[wasm_bindgen(method, setter = "offset")]
44 pub fn set_offset(this: &BaseComputedKeyframe, val: Option<f64>);
45 #[doc = "Get the `simulateComputeValuesFailure` field of this object."]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"]
48 #[wasm_bindgen(method, getter = "simulateComputeValuesFailure")]
49 pub fn get_simulate_compute_values_failure(this: &BaseComputedKeyframe) -> Option<bool>;
50 #[doc = "Change the `simulateComputeValuesFailure` field of this object."]
51 #[doc = ""]
52 #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"]
53 #[wasm_bindgen(method, setter = "simulateComputeValuesFailure")]
54 pub fn set_simulate_compute_values_failure(this: &BaseComputedKeyframe, val: bool);
55 #[doc = "Get the `computedOffset` field of this object."]
56 #[doc = ""]
57 #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"]
58 #[wasm_bindgen(method, getter = "computedOffset")]
59 pub fn get_computed_offset(this: &BaseComputedKeyframe) -> Option<f64>;
60 #[doc = "Change the `computedOffset` field of this object."]
61 #[doc = ""]
62 #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"]
63 #[wasm_bindgen(method, setter = "computedOffset")]
64 pub fn set_computed_offset(this: &BaseComputedKeyframe, val: f64);
65}
66impl BaseComputedKeyframe {
67 #[doc = "Construct a new `BaseComputedKeyframe`."]
68 #[doc = ""]
69 #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"]
70 pub fn new() -> Self {
71 #[allow(unused_mut)]
72 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
73 ret
74 }
75 #[cfg(feature = "CompositeOperation")]
76 #[deprecated = "Use `set_composite()` instead."]
77 pub fn composite(&mut self, val: Option<CompositeOperation>) -> &mut Self {
78 self.set_composite(val);
79 self
80 }
81 #[deprecated = "Use `set_easing()` instead."]
82 pub fn easing(&mut self, val: &str) -> &mut Self {
83 self.set_easing(val);
84 self
85 }
86 #[deprecated = "Use `set_offset()` instead."]
87 pub fn offset(&mut self, val: Option<f64>) -> &mut Self {
88 self.set_offset(val);
89 self
90 }
91 #[deprecated = "Use `set_simulate_compute_values_failure()` instead."]
92 pub fn simulate_compute_values_failure(&mut self, val: bool) -> &mut Self {
93 self.set_simulate_compute_values_failure(val);
94 self
95 }
96 #[deprecated = "Use `set_computed_offset()` instead."]
97 pub fn computed_offset(&mut self, val: f64) -> &mut Self {
98 self.set_computed_offset(val);
99 self
100 }
101}
102impl Default for BaseComputedKeyframe {
103 fn default() -> Self {
104 Self::new()
105 }
106}