| 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 = MediaQueryList , typescript_type = "MediaQueryList" )] |
| 8 | #[derive (Debug, Clone, PartialEq, Eq)] |
| 9 | #[doc = "The `MediaQueryList` class." ] |
| 10 | #[doc = "" ] |
| 11 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList)" ] |
| 12 | #[doc = "" ] |
| 13 | #[doc = "*This API requires the following crate features to be activated: `MediaQueryList`*" ] |
| 14 | pub type MediaQueryList; |
| 15 | # [wasm_bindgen (structural , method , getter , js_class = "MediaQueryList" , js_name = media)] |
| 16 | #[doc = "Getter for the `media` field of this object." ] |
| 17 | #[doc = "" ] |
| 18 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/media)" ] |
| 19 | #[doc = "" ] |
| 20 | #[doc = "*This API requires the following crate features to be activated: `MediaQueryList`*" ] |
| 21 | pub unsafefn media(this: &MediaQueryList) -> ::alloc::string::String; |
| 22 | # [wasm_bindgen (structural , method , getter , js_class = "MediaQueryList" , js_name = matches)] |
| 23 | #[doc = "Getter for the `matches` field of this object." ] |
| 24 | #[doc = "" ] |
| 25 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/matches)" ] |
| 26 | #[doc = "" ] |
| 27 | #[doc = "*This API requires the following crate features to be activated: `MediaQueryList`*" ] |
| 28 | pub unsafefn matches(this: &MediaQueryList) -> bool; |
| 29 | # [wasm_bindgen (structural , method , getter , js_class = "MediaQueryList" , js_name = onchange)] |
| 30 | #[doc = "Getter for the `onchange` field of this object." ] |
| 31 | #[doc = "" ] |
| 32 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/onchange)" ] |
| 33 | #[doc = "" ] |
| 34 | #[doc = "*This API requires the following crate features to be activated: `MediaQueryList`*" ] |
| 35 | pub unsafefn onchange(this: &MediaQueryList) -> Option<::js_sys::Function>; |
| 36 | # [wasm_bindgen (structural , method , setter , js_class = "MediaQueryList" , js_name = onchange)] |
| 37 | #[doc = "Setter for the `onchange` field of this object." ] |
| 38 | #[doc = "" ] |
| 39 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/onchange)" ] |
| 40 | #[doc = "" ] |
| 41 | #[doc = "*This API requires the following crate features to be activated: `MediaQueryList`*" ] |
| 42 | pub unsafefn set_onchange(this: &MediaQueryList, value: Option<&::js_sys::Function>); |
| 43 | # [wasm_bindgen (catch , method , structural , js_class = "MediaQueryList" , js_name = addListener)] |
| 44 | #[doc = "The `addListener()` method." ] |
| 45 | #[doc = "" ] |
| 46 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/addListener)" ] |
| 47 | #[doc = "" ] |
| 48 | #[doc = "*This API requires the following crate features to be activated: `MediaQueryList`*" ] |
| 49 | pub unsafefn add_listener_with_opt_callback( |
| 50 | this: &MediaQueryList, |
| 51 | listener: Option<&::js_sys::Function>, |
| 52 | ) -> Result<(), JsValue>; |
| 53 | #[cfg (feature = "EventListener" )] |
| 54 | # [wasm_bindgen (catch , method , structural , js_class = "MediaQueryList" , js_name = addListener)] |
| 55 | #[doc = "The `addListener()` method." ] |
| 56 | #[doc = "" ] |
| 57 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/addListener)" ] |
| 58 | #[doc = "" ] |
| 59 | #[doc = "*This API requires the following crate features to be activated: `EventListener`, `MediaQueryList`*" ] |
| 60 | pub fn add_listener_with_opt_event_listener( |
| 61 | this: &MediaQueryList, |
| 62 | listener: Option<&EventListener>, |
| 63 | ) -> Result<(), JsValue>; |
| 64 | # [wasm_bindgen (catch , method , structural , js_class = "MediaQueryList" , js_name = removeListener)] |
| 65 | #[doc = "The `removeListener()` method." ] |
| 66 | #[doc = "" ] |
| 67 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/removeListener)" ] |
| 68 | #[doc = "" ] |
| 69 | #[doc = "*This API requires the following crate features to be activated: `MediaQueryList`*" ] |
| 70 | pub unsafefn remove_listener_with_opt_callback( |
| 71 | this: &MediaQueryList, |
| 72 | listener: Option<&::js_sys::Function>, |
| 73 | ) -> Result<(), JsValue>; |
| 74 | #[cfg (feature = "EventListener" )] |
| 75 | # [wasm_bindgen (catch , method , structural , js_class = "MediaQueryList" , js_name = removeListener)] |
| 76 | #[doc = "The `removeListener()` method." ] |
| 77 | #[doc = "" ] |
| 78 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/removeListener)" ] |
| 79 | #[doc = "" ] |
| 80 | #[doc = "*This API requires the following crate features to be activated: `EventListener`, `MediaQueryList`*" ] |
| 81 | pub fn remove_listener_with_opt_event_listener( |
| 82 | this: &MediaQueryList, |
| 83 | listener: Option<&EventListener>, |
| 84 | ) -> Result<(), JsValue>; |
| 85 | } |
| 86 | |