maxcountryman_web_sys/features/
gen_DeviceOrientationEvent.rs

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