web_sys/features/
gen_AnimationPropertyValueDetails.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 = AnimationPropertyValueDetails)]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `AnimationPropertyValueDetails` dictionary."]
10    #[doc = ""]
11    #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"]
12    pub type AnimationPropertyValueDetails;
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: `AnimationPropertyValueDetails`, `CompositeOperation`*"]
17    #[wasm_bindgen(method, getter = "composite")]
18    pub fn get_composite(this: &AnimationPropertyValueDetails) -> 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: `AnimationPropertyValueDetails`, `CompositeOperation`*"]
23    #[wasm_bindgen(method, setter = "composite")]
24    pub fn set_composite(this: &AnimationPropertyValueDetails, val: CompositeOperation);
25    #[doc = "Get the `easing` field of this object."]
26    #[doc = ""]
27    #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"]
28    #[wasm_bindgen(method, getter = "easing")]
29    pub fn get_easing(this: &AnimationPropertyValueDetails) -> 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: `AnimationPropertyValueDetails`*"]
33    #[wasm_bindgen(method, setter = "easing")]
34    pub fn set_easing(this: &AnimationPropertyValueDetails, 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: `AnimationPropertyValueDetails`*"]
38    #[wasm_bindgen(method, getter = "offset")]
39    pub fn get_offset(this: &AnimationPropertyValueDetails) -> f64;
40    #[doc = "Change the `offset` field of this object."]
41    #[doc = ""]
42    #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"]
43    #[wasm_bindgen(method, setter = "offset")]
44    pub fn set_offset(this: &AnimationPropertyValueDetails, val: f64);
45    #[doc = "Get the `value` field of this object."]
46    #[doc = ""]
47    #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"]
48    #[wasm_bindgen(method, getter = "value")]
49    pub fn get_value(this: &AnimationPropertyValueDetails) -> Option<::alloc::string::String>;
50    #[doc = "Change the `value` field of this object."]
51    #[doc = ""]
52    #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"]
53    #[wasm_bindgen(method, setter = "value")]
54    pub fn set_value(this: &AnimationPropertyValueDetails, val: &str);
55}
56impl AnimationPropertyValueDetails {
57    #[cfg(feature = "CompositeOperation")]
58    #[doc = "Construct a new `AnimationPropertyValueDetails`."]
59    #[doc = ""]
60    #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`, `CompositeOperation`*"]
61    pub fn new(composite: CompositeOperation, offset: f64) -> Self {
62        #[allow(unused_mut)]
63        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
64        ret.set_composite(composite);
65        ret.set_offset(offset);
66        ret
67    }
68    #[cfg(feature = "CompositeOperation")]
69    #[deprecated = "Use `set_composite()` instead."]
70    pub fn composite(&mut self, val: CompositeOperation) -> &mut Self {
71        self.set_composite(val);
72        self
73    }
74    #[deprecated = "Use `set_easing()` instead."]
75    pub fn easing(&mut self, val: &str) -> &mut Self {
76        self.set_easing(val);
77        self
78    }
79    #[deprecated = "Use `set_offset()` instead."]
80    pub fn offset(&mut self, val: f64) -> &mut Self {
81        self.set_offset(val);
82        self
83    }
84    #[deprecated = "Use `set_value()` instead."]
85    pub fn value(&mut self, val: &str) -> &mut Self {
86        self.set_value(val);
87        self
88    }
89}