Skip to main content

web_sys/features/
gen_XrInputSourcesChangeEventInit.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(
9        extends = "::js_sys::Object",
10        js_name = "XRInputSourcesChangeEventInit"
11    )]
12    #[derive(Debug, Clone, PartialEq, Eq)]
13    #[doc = "The `XrInputSourcesChangeEventInit` dictionary."]
14    #[doc = ""]
15    #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"]
16    #[doc = ""]
17    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
18    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
19    pub type XrInputSourcesChangeEventInit;
20    #[cfg(web_sys_unstable_apis)]
21    #[doc = "Get the `bubbles` field of this object."]
22    #[doc = ""]
23    #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"]
24    #[doc = ""]
25    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
26    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
27    #[wasm_bindgen(method, getter = "bubbles")]
28    pub fn get_bubbles(this: &XrInputSourcesChangeEventInit) -> Option<bool>;
29    #[cfg(web_sys_unstable_apis)]
30    #[doc = "Change the `bubbles` field of this object."]
31    #[doc = ""]
32    #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"]
33    #[doc = ""]
34    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
35    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
36    #[wasm_bindgen(method, setter = "bubbles")]
37    pub fn set_bubbles(this: &XrInputSourcesChangeEventInit, val: bool);
38    #[cfg(web_sys_unstable_apis)]
39    #[doc = "Get the `cancelable` field of this object."]
40    #[doc = ""]
41    #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"]
42    #[doc = ""]
43    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
44    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
45    #[wasm_bindgen(method, getter = "cancelable")]
46    pub fn get_cancelable(this: &XrInputSourcesChangeEventInit) -> Option<bool>;
47    #[cfg(web_sys_unstable_apis)]
48    #[doc = "Change the `cancelable` field of this object."]
49    #[doc = ""]
50    #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"]
51    #[doc = ""]
52    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
53    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
54    #[wasm_bindgen(method, setter = "cancelable")]
55    pub fn set_cancelable(this: &XrInputSourcesChangeEventInit, val: bool);
56    #[cfg(web_sys_unstable_apis)]
57    #[doc = "Get the `composed` field of this object."]
58    #[doc = ""]
59    #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"]
60    #[doc = ""]
61    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
62    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
63    #[wasm_bindgen(method, getter = "composed")]
64    pub fn get_composed(this: &XrInputSourcesChangeEventInit) -> Option<bool>;
65    #[cfg(web_sys_unstable_apis)]
66    #[doc = "Change the `composed` field of this object."]
67    #[doc = ""]
68    #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"]
69    #[doc = ""]
70    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
71    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
72    #[wasm_bindgen(method, setter = "composed")]
73    pub fn set_composed(this: &XrInputSourcesChangeEventInit, val: bool);
74    #[cfg(web_sys_unstable_apis)]
75    #[cfg(feature = "XrInputSource")]
76    #[doc = "Get the `added` field of this object."]
77    #[doc = ""]
78    #[doc = "*This API requires the following crate features to be activated: `XrInputSource`, `XrInputSourcesChangeEventInit`*"]
79    #[doc = ""]
80    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
81    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
82    #[wasm_bindgen(method, getter = "added")]
83    pub fn get_added(this: &XrInputSourcesChangeEventInit) -> ::js_sys::Array<XrInputSource>;
84    #[cfg(web_sys_unstable_apis)]
85    #[cfg(feature = "XrInputSource")]
86    #[doc = "Change the `added` field of this object."]
87    #[doc = ""]
88    #[doc = "*This API requires the following crate features to be activated: `XrInputSource`, `XrInputSourcesChangeEventInit`*"]
89    #[doc = ""]
90    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
91    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
92    #[wasm_bindgen(method, setter = "added")]
93    pub fn set_added(this: &XrInputSourcesChangeEventInit, val: &[XrInputSource]);
94    #[cfg(web_sys_unstable_apis)]
95    #[cfg(feature = "XrInputSource")]
96    #[doc = "Get the `removed` field of this object."]
97    #[doc = ""]
98    #[doc = "*This API requires the following crate features to be activated: `XrInputSource`, `XrInputSourcesChangeEventInit`*"]
99    #[doc = ""]
100    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
101    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
102    #[wasm_bindgen(method, getter = "removed")]
103    pub fn get_removed(this: &XrInputSourcesChangeEventInit) -> ::js_sys::Array<XrInputSource>;
104    #[cfg(web_sys_unstable_apis)]
105    #[cfg(feature = "XrInputSource")]
106    #[doc = "Change the `removed` field of this object."]
107    #[doc = ""]
108    #[doc = "*This API requires the following crate features to be activated: `XrInputSource`, `XrInputSourcesChangeEventInit`*"]
109    #[doc = ""]
110    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
111    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
112    #[wasm_bindgen(method, setter = "removed")]
113    pub fn set_removed(this: &XrInputSourcesChangeEventInit, val: &[XrInputSource]);
114    #[cfg(web_sys_unstable_apis)]
115    #[cfg(feature = "XrSession")]
116    #[doc = "Get the `session` field of this object."]
117    #[doc = ""]
118    #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`, `XrSession`*"]
119    #[doc = ""]
120    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
121    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
122    #[wasm_bindgen(method, getter = "session")]
123    pub fn get_session(this: &XrInputSourcesChangeEventInit) -> XrSession;
124    #[cfg(web_sys_unstable_apis)]
125    #[cfg(feature = "XrSession")]
126    #[doc = "Change the `session` field of this object."]
127    #[doc = ""]
128    #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`, `XrSession`*"]
129    #[doc = ""]
130    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
131    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
132    #[wasm_bindgen(method, setter = "session")]
133    pub fn set_session(this: &XrInputSourcesChangeEventInit, val: &XrSession);
134}
135#[cfg(web_sys_unstable_apis)]
136impl XrInputSourcesChangeEventInit {
137    #[cfg(all(feature = "XrInputSource", feature = "XrSession",))]
138    #[doc = "Construct a new `XrInputSourcesChangeEventInit`."]
139    #[doc = ""]
140    #[doc = "*This API requires the following crate features to be activated: `XrInputSource`, `XrInputSourcesChangeEventInit`, `XrSession`*"]
141    #[doc = ""]
142    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
143    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
144    pub fn new(added: &[XrInputSource], removed: &[XrInputSource], session: &XrSession) -> Self {
145        #[allow(unused_mut)]
146        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
147        ret.set_added(added);
148        ret.set_removed(removed);
149        ret.set_session(session);
150        ret
151    }
152    #[cfg(web_sys_unstable_apis)]
153    #[deprecated = "Use `set_bubbles()` instead."]
154    pub fn bubbles(&mut self, val: bool) -> &mut Self {
155        self.set_bubbles(val);
156        self
157    }
158    #[cfg(web_sys_unstable_apis)]
159    #[deprecated = "Use `set_cancelable()` instead."]
160    pub fn cancelable(&mut self, val: bool) -> &mut Self {
161        self.set_cancelable(val);
162        self
163    }
164    #[cfg(web_sys_unstable_apis)]
165    #[deprecated = "Use `set_composed()` instead."]
166    pub fn composed(&mut self, val: bool) -> &mut Self {
167        self.set_composed(val);
168        self
169    }
170    #[cfg(web_sys_unstable_apis)]
171    #[cfg(feature = "XrInputSource")]
172    #[deprecated = "Use `set_added()` instead."]
173    pub fn added(&mut self, val: &[XrInputSource]) -> &mut Self {
174        self.set_added(val);
175        self
176    }
177    #[cfg(web_sys_unstable_apis)]
178    #[cfg(feature = "XrInputSource")]
179    #[deprecated = "Use `set_removed()` instead."]
180    pub fn removed(&mut self, val: &[XrInputSource]) -> &mut Self {
181        self.set_removed(val);
182        self
183    }
184    #[cfg(web_sys_unstable_apis)]
185    #[cfg(feature = "XrSession")]
186    #[deprecated = "Use `set_session()` instead."]
187    pub fn session(&mut self, val: &XrSession) -> &mut Self {
188        self.set_session(val);
189        self
190    }
191}