web_sys/features/
gen_DeviceOrientationEvent.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "Event",
9 extends = "::js_sys::Object",
10 js_name = "DeviceOrientationEvent",
11 typescript_type = "DeviceOrientationEvent"
12 )]
13 #[derive(Debug, Clone, PartialEq, Eq)]
14 #[doc = "The `DeviceOrientationEvent` class."]
15 #[doc = ""]
16 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent)"]
17 #[doc = ""]
18 #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEvent`*"]
19 pub type DeviceOrientationEvent;
20 #[wasm_bindgen(method, getter, js_class = "DeviceOrientationEvent", js_name = "alpha")]
21 #[doc = "Getter for the `alpha` field of this object."]
22 #[doc = ""]
23 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/alpha)"]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEvent`*"]
26 pub fn alpha(this: &DeviceOrientationEvent) -> Option<f64>;
27 #[wasm_bindgen(method, getter, js_class = "DeviceOrientationEvent", js_name = "beta")]
28 #[doc = "Getter for the `beta` field of this object."]
29 #[doc = ""]
30 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/beta)"]
31 #[doc = ""]
32 #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEvent`*"]
33 pub fn beta(this: &DeviceOrientationEvent) -> Option<f64>;
34 #[wasm_bindgen(method, getter, js_class = "DeviceOrientationEvent", js_name = "gamma")]
35 #[doc = "Getter for the `gamma` field of this object."]
36 #[doc = ""]
37 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/gamma)"]
38 #[doc = ""]
39 #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEvent`*"]
40 pub fn gamma(this: &DeviceOrientationEvent) -> Option<f64>;
41 #[wasm_bindgen(
42 method,
43 getter,
44 js_class = "DeviceOrientationEvent",
45 js_name = "absolute"
46 )]
47 #[doc = "Getter for the `absolute` field of this object."]
48 #[doc = ""]
49 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/absolute)"]
50 #[doc = ""]
51 #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEvent`*"]
52 pub fn absolute(this: &DeviceOrientationEvent) -> bool;
53 #[wasm_bindgen(catch, constructor, js_class = "DeviceOrientationEvent")]
54 #[doc = "The `new DeviceOrientationEvent(..)` constructor, creating a new instance of `DeviceOrientationEvent`."]
55 #[doc = ""]
56 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/DeviceOrientationEvent)"]
57 #[doc = ""]
58 #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEvent`*"]
59 pub fn new(type_: &str) -> Result<DeviceOrientationEvent, JsValue>;
60 #[cfg(feature = "DeviceOrientationEventInit")]
61 #[wasm_bindgen(catch, constructor, js_class = "DeviceOrientationEvent")]
62 #[doc = "The `new DeviceOrientationEvent(..)` constructor, creating a new instance of `DeviceOrientationEvent`."]
63 #[doc = ""]
64 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/DeviceOrientationEvent)"]
65 #[doc = ""]
66 #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEvent`, `DeviceOrientationEventInit`*"]
67 pub fn new_with_event_init_dict(
68 type_: &str,
69 event_init_dict: &DeviceOrientationEventInit,
70 ) -> Result<DeviceOrientationEvent, JsValue>;
71 #[wasm_bindgen(
72 method,
73 js_class = "DeviceOrientationEvent",
74 js_name = "initDeviceOrientationEvent"
75 )]
76 #[doc = "The `initDeviceOrientationEvent()` method."]
77 #[doc = ""]
78 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/initDeviceOrientationEvent)"]
79 #[doc = ""]
80 #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEvent`*"]
81 pub fn init_device_orientation_event(this: &DeviceOrientationEvent, type_: &str);
82 #[wasm_bindgen(
83 method,
84 js_class = "DeviceOrientationEvent",
85 js_name = "initDeviceOrientationEvent"
86 )]
87 #[doc = "The `initDeviceOrientationEvent()` method."]
88 #[doc = ""]
89 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/initDeviceOrientationEvent)"]
90 #[doc = ""]
91 #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEvent`*"]
92 pub fn init_device_orientation_event_with_can_bubble(
93 this: &DeviceOrientationEvent,
94 type_: &str,
95 can_bubble: bool,
96 );
97 #[wasm_bindgen(
98 method,
99 js_class = "DeviceOrientationEvent",
100 js_name = "initDeviceOrientationEvent"
101 )]
102 #[doc = "The `initDeviceOrientationEvent()` method."]
103 #[doc = ""]
104 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/initDeviceOrientationEvent)"]
105 #[doc = ""]
106 #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEvent`*"]
107 pub fn init_device_orientation_event_with_can_bubble_and_cancelable(
108 this: &DeviceOrientationEvent,
109 type_: &str,
110 can_bubble: bool,
111 cancelable: bool,
112 );
113 #[wasm_bindgen(
114 method,
115 js_class = "DeviceOrientationEvent",
116 js_name = "initDeviceOrientationEvent"
117 )]
118 #[doc = "The `initDeviceOrientationEvent()` method."]
119 #[doc = ""]
120 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/initDeviceOrientationEvent)"]
121 #[doc = ""]
122 #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEvent`*"]
123 pub fn init_device_orientation_event_with_can_bubble_and_cancelable_and_alpha(
124 this: &DeviceOrientationEvent,
125 type_: &str,
126 can_bubble: bool,
127 cancelable: bool,
128 alpha: Option<f64>,
129 );
130 #[wasm_bindgen(
131 method,
132 js_class = "DeviceOrientationEvent",
133 js_name = "initDeviceOrientationEvent"
134 )]
135 #[doc = "The `initDeviceOrientationEvent()` method."]
136 #[doc = ""]
137 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/initDeviceOrientationEvent)"]
138 #[doc = ""]
139 #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEvent`*"]
140 pub fn init_device_orientation_event_with_can_bubble_and_cancelable_and_alpha_and_beta(
141 this: &DeviceOrientationEvent,
142 type_: &str,
143 can_bubble: bool,
144 cancelable: bool,
145 alpha: Option<f64>,
146 beta: Option<f64>,
147 );
148 #[wasm_bindgen(
149 method,
150 js_class = "DeviceOrientationEvent",
151 js_name = "initDeviceOrientationEvent"
152 )]
153 #[doc = "The `initDeviceOrientationEvent()` method."]
154 #[doc = ""]
155 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/initDeviceOrientationEvent)"]
156 #[doc = ""]
157 #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEvent`*"]
158 pub fn init_device_orientation_event_with_can_bubble_and_cancelable_and_alpha_and_beta_and_gamma(
159 this: &DeviceOrientationEvent,
160 type_: &str,
161 can_bubble: bool,
162 cancelable: bool,
163 alpha: Option<f64>,
164 beta: Option<f64>,
165 gamma: Option<f64>,
166 );
167 #[wasm_bindgen(
168 method,
169 js_class = "DeviceOrientationEvent",
170 js_name = "initDeviceOrientationEvent"
171 )]
172 #[doc = "The `initDeviceOrientationEvent()` method."]
173 #[doc = ""]
174 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/initDeviceOrientationEvent)"]
175 #[doc = ""]
176 #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEvent`*"]
177 pub fn init_device_orientation_event_with_can_bubble_and_cancelable_and_alpha_and_beta_and_gamma_and_absolute(
178 this: &DeviceOrientationEvent,
179 type_: &str,
180 can_bubble: bool,
181 cancelable: bool,
182 alpha: Option<f64>,
183 beta: Option<f64>,
184 gamma: Option<f64>,
185 absolute: bool,
186 );
187}