web_sys/features/
gen_DeviceOrientationEventInit.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 = DeviceOrientationEventInit)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `DeviceOrientationEventInit` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"]
12 pub type DeviceOrientationEventInit;
13 #[doc = "Get the `bubbles` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"]
16 #[wasm_bindgen(method, getter = "bubbles")]
17 pub fn get_bubbles(this: &DeviceOrientationEventInit) -> Option<bool>;
18 #[doc = "Change the `bubbles` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"]
21 #[wasm_bindgen(method, setter = "bubbles")]
22 pub fn set_bubbles(this: &DeviceOrientationEventInit, val: bool);
23 #[doc = "Get the `cancelable` field of this object."]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"]
26 #[wasm_bindgen(method, getter = "cancelable")]
27 pub fn get_cancelable(this: &DeviceOrientationEventInit) -> Option<bool>;
28 #[doc = "Change the `cancelable` field of this object."]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"]
31 #[wasm_bindgen(method, setter = "cancelable")]
32 pub fn set_cancelable(this: &DeviceOrientationEventInit, val: bool);
33 #[doc = "Get the `composed` field of this object."]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"]
36 #[wasm_bindgen(method, getter = "composed")]
37 pub fn get_composed(this: &DeviceOrientationEventInit) -> Option<bool>;
38 #[doc = "Change the `composed` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"]
41 #[wasm_bindgen(method, setter = "composed")]
42 pub fn set_composed(this: &DeviceOrientationEventInit, val: bool);
43 #[doc = "Get the `absolute` field of this object."]
44 #[doc = ""]
45 #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"]
46 #[wasm_bindgen(method, getter = "absolute")]
47 pub fn get_absolute(this: &DeviceOrientationEventInit) -> Option<bool>;
48 #[doc = "Change the `absolute` field of this object."]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"]
51 #[wasm_bindgen(method, setter = "absolute")]
52 pub fn set_absolute(this: &DeviceOrientationEventInit, val: bool);
53 #[doc = "Get the `alpha` field of this object."]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"]
56 #[wasm_bindgen(method, getter = "alpha")]
57 pub fn get_alpha(this: &DeviceOrientationEventInit) -> Option<f64>;
58 #[doc = "Change the `alpha` field of this object."]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"]
61 #[wasm_bindgen(method, setter = "alpha")]
62 pub fn set_alpha(this: &DeviceOrientationEventInit, val: Option<f64>);
63 #[doc = "Get the `beta` field of this object."]
64 #[doc = ""]
65 #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"]
66 #[wasm_bindgen(method, getter = "beta")]
67 pub fn get_beta(this: &DeviceOrientationEventInit) -> Option<f64>;
68 #[doc = "Change the `beta` field of this object."]
69 #[doc = ""]
70 #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"]
71 #[wasm_bindgen(method, setter = "beta")]
72 pub fn set_beta(this: &DeviceOrientationEventInit, val: Option<f64>);
73 #[doc = "Get the `gamma` field of this object."]
74 #[doc = ""]
75 #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"]
76 #[wasm_bindgen(method, getter = "gamma")]
77 pub fn get_gamma(this: &DeviceOrientationEventInit) -> Option<f64>;
78 #[doc = "Change the `gamma` field of this object."]
79 #[doc = ""]
80 #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"]
81 #[wasm_bindgen(method, setter = "gamma")]
82 pub fn set_gamma(this: &DeviceOrientationEventInit, val: Option<f64>);
83}
84impl DeviceOrientationEventInit {
85 #[doc = "Construct a new `DeviceOrientationEventInit`."]
86 #[doc = ""]
87 #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"]
88 pub fn new() -> Self {
89 #[allow(unused_mut)]
90 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
91 ret
92 }
93 #[deprecated = "Use `set_bubbles()` instead."]
94 pub fn bubbles(&mut self, val: bool) -> &mut Self {
95 self.set_bubbles(val);
96 self
97 }
98 #[deprecated = "Use `set_cancelable()` instead."]
99 pub fn cancelable(&mut self, val: bool) -> &mut Self {
100 self.set_cancelable(val);
101 self
102 }
103 #[deprecated = "Use `set_composed()` instead."]
104 pub fn composed(&mut self, val: bool) -> &mut Self {
105 self.set_composed(val);
106 self
107 }
108 #[deprecated = "Use `set_absolute()` instead."]
109 pub fn absolute(&mut self, val: bool) -> &mut Self {
110 self.set_absolute(val);
111 self
112 }
113 #[deprecated = "Use `set_alpha()` instead."]
114 pub fn alpha(&mut self, val: Option<f64>) -> &mut Self {
115 self.set_alpha(val);
116 self
117 }
118 #[deprecated = "Use `set_beta()` instead."]
119 pub fn beta(&mut self, val: Option<f64>) -> &mut Self {
120 self.set_beta(val);
121 self
122 }
123 #[deprecated = "Use `set_gamma()` instead."]
124 pub fn gamma(&mut self, val: Option<f64>) -> &mut Self {
125 self.set_gamma(val);
126 self
127 }
128}
129impl Default for DeviceOrientationEventInit {
130 fn default() -> Self {
131 Self::new()
132 }
133}