web_sys/features/
gen_PictureInPictureEventInit.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[cfg(web_sys_unstable_apis)]
6#[wasm_bindgen]
7extern "C" {
8    # [wasm_bindgen (extends = :: js_sys :: Object , js_name = PictureInPictureEventInit)]
9    #[derive(Debug, Clone, PartialEq, Eq)]
10    #[doc = "The `PictureInPictureEventInit` dictionary."]
11    #[doc = ""]
12    #[doc = "*This API requires the following crate features to be activated: `PictureInPictureEventInit`*"]
13    #[doc = ""]
14    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
15    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
16    pub type PictureInPictureEventInit;
17    #[cfg(web_sys_unstable_apis)]
18    #[doc = "Get the `bubbles` field of this object."]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `PictureInPictureEventInit`*"]
21    #[doc = ""]
22    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
23    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
24    #[wasm_bindgen(method, getter = "bubbles")]
25    pub fn get_bubbles(this: &PictureInPictureEventInit) -> Option<bool>;
26    #[cfg(web_sys_unstable_apis)]
27    #[doc = "Change the `bubbles` field of this object."]
28    #[doc = ""]
29    #[doc = "*This API requires the following crate features to be activated: `PictureInPictureEventInit`*"]
30    #[doc = ""]
31    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
32    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
33    #[wasm_bindgen(method, setter = "bubbles")]
34    pub fn set_bubbles(this: &PictureInPictureEventInit, val: bool);
35    #[cfg(web_sys_unstable_apis)]
36    #[doc = "Get the `cancelable` field of this object."]
37    #[doc = ""]
38    #[doc = "*This API requires the following crate features to be activated: `PictureInPictureEventInit`*"]
39    #[doc = ""]
40    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
41    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
42    #[wasm_bindgen(method, getter = "cancelable")]
43    pub fn get_cancelable(this: &PictureInPictureEventInit) -> Option<bool>;
44    #[cfg(web_sys_unstable_apis)]
45    #[doc = "Change the `cancelable` field of this object."]
46    #[doc = ""]
47    #[doc = "*This API requires the following crate features to be activated: `PictureInPictureEventInit`*"]
48    #[doc = ""]
49    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
50    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
51    #[wasm_bindgen(method, setter = "cancelable")]
52    pub fn set_cancelable(this: &PictureInPictureEventInit, val: bool);
53    #[cfg(web_sys_unstable_apis)]
54    #[doc = "Get the `composed` field of this object."]
55    #[doc = ""]
56    #[doc = "*This API requires the following crate features to be activated: `PictureInPictureEventInit`*"]
57    #[doc = ""]
58    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
59    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
60    #[wasm_bindgen(method, getter = "composed")]
61    pub fn get_composed(this: &PictureInPictureEventInit) -> Option<bool>;
62    #[cfg(web_sys_unstable_apis)]
63    #[doc = "Change the `composed` field of this object."]
64    #[doc = ""]
65    #[doc = "*This API requires the following crate features to be activated: `PictureInPictureEventInit`*"]
66    #[doc = ""]
67    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
68    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
69    #[wasm_bindgen(method, setter = "composed")]
70    pub fn set_composed(this: &PictureInPictureEventInit, val: bool);
71    #[cfg(web_sys_unstable_apis)]
72    #[cfg(feature = "PictureInPictureWindow")]
73    #[doc = "Get the `pictureInPictureWindow` field of this object."]
74    #[doc = ""]
75    #[doc = "*This API requires the following crate features to be activated: `PictureInPictureEventInit`, `PictureInPictureWindow`*"]
76    #[doc = ""]
77    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
78    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
79    #[wasm_bindgen(method, getter = "pictureInPictureWindow")]
80    pub fn get_picture_in_picture_window(
81        this: &PictureInPictureEventInit,
82    ) -> PictureInPictureWindow;
83    #[cfg(web_sys_unstable_apis)]
84    #[cfg(feature = "PictureInPictureWindow")]
85    #[doc = "Change the `pictureInPictureWindow` field of this object."]
86    #[doc = ""]
87    #[doc = "*This API requires the following crate features to be activated: `PictureInPictureEventInit`, `PictureInPictureWindow`*"]
88    #[doc = ""]
89    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
90    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
91    #[wasm_bindgen(method, setter = "pictureInPictureWindow")]
92    pub fn set_picture_in_picture_window(
93        this: &PictureInPictureEventInit,
94        val: &PictureInPictureWindow,
95    );
96}
97#[cfg(web_sys_unstable_apis)]
98impl PictureInPictureEventInit {
99    #[cfg(feature = "PictureInPictureWindow")]
100    #[doc = "Construct a new `PictureInPictureEventInit`."]
101    #[doc = ""]
102    #[doc = "*This API requires the following crate features to be activated: `PictureInPictureEventInit`, `PictureInPictureWindow`*"]
103    #[doc = ""]
104    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
105    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
106    pub fn new(picture_in_picture_window: &PictureInPictureWindow) -> Self {
107        #[allow(unused_mut)]
108        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
109        ret.set_picture_in_picture_window(picture_in_picture_window);
110        ret
111    }
112    #[cfg(web_sys_unstable_apis)]
113    #[deprecated = "Use `set_bubbles()` instead."]
114    pub fn bubbles(&mut self, val: bool) -> &mut Self {
115        self.set_bubbles(val);
116        self
117    }
118    #[cfg(web_sys_unstable_apis)]
119    #[deprecated = "Use `set_cancelable()` instead."]
120    pub fn cancelable(&mut self, val: bool) -> &mut Self {
121        self.set_cancelable(val);
122        self
123    }
124    #[cfg(web_sys_unstable_apis)]
125    #[deprecated = "Use `set_composed()` instead."]
126    pub fn composed(&mut self, val: bool) -> &mut Self {
127        self.set_composed(val);
128        self
129    }
130    #[cfg(web_sys_unstable_apis)]
131    #[cfg(feature = "PictureInPictureWindow")]
132    #[deprecated = "Use `set_picture_in_picture_window()` instead."]
133    pub fn picture_in_picture_window(&mut self, val: &PictureInPictureWindow) -> &mut Self {
134        self.set_picture_in_picture_window(val);
135        self
136    }
137}