web_sys/features/
gen_DeviceOrientationEvent.rs

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