| 1 | #![allow (unused_imports)] |
| 2 | #![allow (clippy::all)] |
| 3 | use super::*; |
| 4 | use wasm_bindgen::prelude::*; |
| 5 | #[wasm_bindgen ] |
| 6 | unsafeextern "C" { |
| 7 | # [wasm_bindgen (extends = EventTarget , extends = :: js_sys :: Object , js_name = ScreenOrientation , typescript_type = "ScreenOrientation" )] |
| 8 | #[derive (Debug, Clone, PartialEq, Eq)] |
| 9 | #[doc = "The `ScreenOrientation` class." ] |
| 10 | #[doc = "" ] |
| 11 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation)" ] |
| 12 | #[doc = "" ] |
| 13 | #[doc = "*This API requires the following crate features to be activated: `ScreenOrientation`*" ] |
| 14 | pub type ScreenOrientation; |
| 15 | #[cfg (feature = "OrientationType" )] |
| 16 | # [wasm_bindgen (structural , catch , method , getter , js_class = "ScreenOrientation" , js_name = type)] |
| 17 | #[doc = "Getter for the `type` field of this object." ] |
| 18 | #[doc = "" ] |
| 19 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation/type)" ] |
| 20 | #[doc = "" ] |
| 21 | #[doc = "*This API requires the following crate features to be activated: `OrientationType`, `ScreenOrientation`*" ] |
| 22 | pub unsafefn type_(this: &ScreenOrientation) -> Result<OrientationType, JsValue>; |
| 23 | # [wasm_bindgen (structural , catch , method , getter , js_class = "ScreenOrientation" , js_name = angle)] |
| 24 | #[doc = "Getter for the `angle` field of this object." ] |
| 25 | #[doc = "" ] |
| 26 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation/angle)" ] |
| 27 | #[doc = "" ] |
| 28 | #[doc = "*This API requires the following crate features to be activated: `ScreenOrientation`*" ] |
| 29 | pub unsafefn angle(this: &ScreenOrientation) -> Result<u16, JsValue>; |
| 30 | # [wasm_bindgen (structural , method , getter , js_class = "ScreenOrientation" , js_name = onchange)] |
| 31 | #[doc = "Getter for the `onchange` field of this object." ] |
| 32 | #[doc = "" ] |
| 33 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation/onchange)" ] |
| 34 | #[doc = "" ] |
| 35 | #[doc = "*This API requires the following crate features to be activated: `ScreenOrientation`*" ] |
| 36 | pub unsafefn onchange(this: &ScreenOrientation) -> Option<::js_sys::Function>; |
| 37 | # [wasm_bindgen (structural , method , setter , js_class = "ScreenOrientation" , js_name = onchange)] |
| 38 | #[doc = "Setter for the `onchange` field of this object." ] |
| 39 | #[doc = "" ] |
| 40 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation/onchange)" ] |
| 41 | #[doc = "" ] |
| 42 | #[doc = "*This API requires the following crate features to be activated: `ScreenOrientation`*" ] |
| 43 | pub unsafefn set_onchange(this: &ScreenOrientation, value: Option<&::js_sys::Function>); |
| 44 | #[cfg (feature = "OrientationLockType" )] |
| 45 | # [wasm_bindgen (catch , method , structural , js_class = "ScreenOrientation" , js_name = lock)] |
| 46 | #[doc = "The `lock()` method." ] |
| 47 | #[doc = "" ] |
| 48 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation/lock)" ] |
| 49 | #[doc = "" ] |
| 50 | #[doc = "*This API requires the following crate features to be activated: `OrientationLockType`, `ScreenOrientation`*" ] |
| 51 | pub unsafefn lock( |
| 52 | this: &ScreenOrientation, |
| 53 | orientation: OrientationLockType, |
| 54 | ) -> Result<::js_sys::Promise, JsValue>; |
| 55 | # [wasm_bindgen (catch , method , structural , js_class = "ScreenOrientation" , js_name = unlock)] |
| 56 | #[doc = "The `unlock()` method." ] |
| 57 | #[doc = "" ] |
| 58 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation/unlock)" ] |
| 59 | #[doc = "" ] |
| 60 | #[doc = "*This API requires the following crate features to be activated: `ScreenOrientation`*" ] |
| 61 | pub unsafefn unlock(this: &ScreenOrientation) -> Result<(), JsValue>; |
| 62 | } |
| 63 | |