1 #![allow(unused_imports)]
2 use super::*;
3 use wasm_bindgen::prelude::*;
4 #[cfg(web_sys_unstable_apis)]
5 #[wasm_bindgen]
6 extern "C" {
7     # [wasm_bindgen (extends = EventTarget , extends = :: js_sys :: Object , js_name = XRSession , typescript_type = "XRSession")]
8     #[derive(Debug, Clone, PartialEq, Eq)]
9     #[doc = "The `XrSession` class."]
10     #[doc = ""]
11     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRSession)"]
12     #[doc = ""]
13     #[doc = "*This API requires the following crate features to be activated: `XrSession`*"]
14     #[doc = ""]
15     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
16     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
17     pub type XrSession;
18     #[cfg(web_sys_unstable_apis)]
19     #[cfg(feature = "XrVisibilityState")]
20     # [wasm_bindgen (structural , method , getter , js_class = "XRSession" , js_name = visibilityState)]
21     #[doc = "Getter for the `visibilityState` field of this object."]
22     #[doc = ""]
23     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRSession/visibilityState)"]
24     #[doc = ""]
25     #[doc = "*This API requires the following crate features to be activated: `XrSession`, `XrVisibilityState`*"]
26     #[doc = ""]
27     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
28     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
visibility_state(this: &XrSession) -> XrVisibilityState29     pub fn visibility_state(this: &XrSession) -> XrVisibilityState;
30     #[cfg(web_sys_unstable_apis)]
31     #[cfg(feature = "XrRenderState")]
32     # [wasm_bindgen (structural , method , getter , js_class = "XRSession" , js_name = renderState)]
33     #[doc = "Getter for the `renderState` field of this object."]
34     #[doc = ""]
35     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRSession/renderState)"]
36     #[doc = ""]
37     #[doc = "*This API requires the following crate features to be activated: `XrRenderState`, `XrSession`*"]
38     #[doc = ""]
39     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
40     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
render_state(this: &XrSession) -> XrRenderState41     pub fn render_state(this: &XrSession) -> XrRenderState;
42     #[cfg(web_sys_unstable_apis)]
43     #[cfg(feature = "XrInputSourceArray")]
44     # [wasm_bindgen (structural , method , getter , js_class = "XRSession" , js_name = inputSources)]
45     #[doc = "Getter for the `inputSources` field of this object."]
46     #[doc = ""]
47     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRSession/inputSources)"]
48     #[doc = ""]
49     #[doc = "*This API requires the following crate features to be activated: `XrInputSourceArray`, `XrSession`*"]
50     #[doc = ""]
51     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
52     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
input_sources(this: &XrSession) -> XrInputSourceArray53     pub fn input_sources(this: &XrSession) -> XrInputSourceArray;
54     #[cfg(web_sys_unstable_apis)]
55     # [wasm_bindgen (structural , method , getter , js_class = "XRSession" , js_name = onend)]
56     #[doc = "Getter for the `onend` field of this object."]
57     #[doc = ""]
58     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRSession/onend)"]
59     #[doc = ""]
60     #[doc = "*This API requires the following crate features to be activated: `XrSession`*"]
61     #[doc = ""]
62     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
63     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
onend(this: &XrSession) -> Option<::js_sys::Function>64     pub fn onend(this: &XrSession) -> Option<::js_sys::Function>;
65     #[cfg(web_sys_unstable_apis)]
66     # [wasm_bindgen (structural , method , setter , js_class = "XRSession" , js_name = onend)]
67     #[doc = "Setter for the `onend` field of this object."]
68     #[doc = ""]
69     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRSession/onend)"]
70     #[doc = ""]
71     #[doc = "*This API requires the following crate features to be activated: `XrSession`*"]
72     #[doc = ""]
73     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
74     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
set_onend(this: &XrSession, value: Option<&::js_sys::Function>)75     pub fn set_onend(this: &XrSession, value: Option<&::js_sys::Function>);
76     #[cfg(web_sys_unstable_apis)]
77     # [wasm_bindgen (structural , method , getter , js_class = "XRSession" , js_name = onselect)]
78     #[doc = "Getter for the `onselect` field of this object."]
79     #[doc = ""]
80     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRSession/onselect)"]
81     #[doc = ""]
82     #[doc = "*This API requires the following crate features to be activated: `XrSession`*"]
83     #[doc = ""]
84     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
85     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
onselect(this: &XrSession) -> Option<::js_sys::Function>86     pub fn onselect(this: &XrSession) -> Option<::js_sys::Function>;
87     #[cfg(web_sys_unstable_apis)]
88     # [wasm_bindgen (structural , method , setter , js_class = "XRSession" , js_name = onselect)]
89     #[doc = "Setter for the `onselect` field of this object."]
90     #[doc = ""]
91     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRSession/onselect)"]
92     #[doc = ""]
93     #[doc = "*This API requires the following crate features to be activated: `XrSession`*"]
94     #[doc = ""]
95     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
96     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
set_onselect(this: &XrSession, value: Option<&::js_sys::Function>)97     pub fn set_onselect(this: &XrSession, value: Option<&::js_sys::Function>);
98     #[cfg(web_sys_unstable_apis)]
99     # [wasm_bindgen (structural , method , getter , js_class = "XRSession" , js_name = oninputsourceschange)]
100     #[doc = "Getter for the `oninputsourceschange` field of this object."]
101     #[doc = ""]
102     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRSession/oninputsourceschange)"]
103     #[doc = ""]
104     #[doc = "*This API requires the following crate features to be activated: `XrSession`*"]
105     #[doc = ""]
106     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
107     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
oninputsourceschange(this: &XrSession) -> Option<::js_sys::Function>108     pub fn oninputsourceschange(this: &XrSession) -> Option<::js_sys::Function>;
109     #[cfg(web_sys_unstable_apis)]
110     # [wasm_bindgen (structural , method , setter , js_class = "XRSession" , js_name = oninputsourceschange)]
111     #[doc = "Setter for the `oninputsourceschange` field of this object."]
112     #[doc = ""]
113     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRSession/oninputsourceschange)"]
114     #[doc = ""]
115     #[doc = "*This API requires the following crate features to be activated: `XrSession`*"]
116     #[doc = ""]
117     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
118     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
set_oninputsourceschange(this: &XrSession, value: Option<&::js_sys::Function>)119     pub fn set_oninputsourceschange(this: &XrSession, value: Option<&::js_sys::Function>);
120     #[cfg(web_sys_unstable_apis)]
121     # [wasm_bindgen (structural , method , getter , js_class = "XRSession" , js_name = onselectstart)]
122     #[doc = "Getter for the `onselectstart` field of this object."]
123     #[doc = ""]
124     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRSession/onselectstart)"]
125     #[doc = ""]
126     #[doc = "*This API requires the following crate features to be activated: `XrSession`*"]
127     #[doc = ""]
128     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
129     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
onselectstart(this: &XrSession) -> Option<::js_sys::Function>130     pub fn onselectstart(this: &XrSession) -> Option<::js_sys::Function>;
131     #[cfg(web_sys_unstable_apis)]
132     # [wasm_bindgen (structural , method , setter , js_class = "XRSession" , js_name = onselectstart)]
133     #[doc = "Setter for the `onselectstart` field of this object."]
134     #[doc = ""]
135     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRSession/onselectstart)"]
136     #[doc = ""]
137     #[doc = "*This API requires the following crate features to be activated: `XrSession`*"]
138     #[doc = ""]
139     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
140     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
set_onselectstart(this: &XrSession, value: Option<&::js_sys::Function>)141     pub fn set_onselectstart(this: &XrSession, value: Option<&::js_sys::Function>);
142     #[cfg(web_sys_unstable_apis)]
143     # [wasm_bindgen (structural , method , getter , js_class = "XRSession" , js_name = onselectend)]
144     #[doc = "Getter for the `onselectend` field of this object."]
145     #[doc = ""]
146     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRSession/onselectend)"]
147     #[doc = ""]
148     #[doc = "*This API requires the following crate features to be activated: `XrSession`*"]
149     #[doc = ""]
150     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
151     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
onselectend(this: &XrSession) -> Option<::js_sys::Function>152     pub fn onselectend(this: &XrSession) -> Option<::js_sys::Function>;
153     #[cfg(web_sys_unstable_apis)]
154     # [wasm_bindgen (structural , method , setter , js_class = "XRSession" , js_name = onselectend)]
155     #[doc = "Setter for the `onselectend` field of this object."]
156     #[doc = ""]
157     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRSession/onselectend)"]
158     #[doc = ""]
159     #[doc = "*This API requires the following crate features to be activated: `XrSession`*"]
160     #[doc = ""]
161     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
162     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
set_onselectend(this: &XrSession, value: Option<&::js_sys::Function>)163     pub fn set_onselectend(this: &XrSession, value: Option<&::js_sys::Function>);
164     #[cfg(web_sys_unstable_apis)]
165     # [wasm_bindgen (structural , method , getter , js_class = "XRSession" , js_name = onvisibilitychange)]
166     #[doc = "Getter for the `onvisibilitychange` field of this object."]
167     #[doc = ""]
168     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRSession/onvisibilitychange)"]
169     #[doc = ""]
170     #[doc = "*This API requires the following crate features to be activated: `XrSession`*"]
171     #[doc = ""]
172     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
173     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
onvisibilitychange(this: &XrSession) -> Option<::js_sys::Function>174     pub fn onvisibilitychange(this: &XrSession) -> Option<::js_sys::Function>;
175     #[cfg(web_sys_unstable_apis)]
176     # [wasm_bindgen (structural , method , setter , js_class = "XRSession" , js_name = onvisibilitychange)]
177     #[doc = "Setter for the `onvisibilitychange` field of this object."]
178     #[doc = ""]
179     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRSession/onvisibilitychange)"]
180     #[doc = ""]
181     #[doc = "*This API requires the following crate features to be activated: `XrSession`*"]
182     #[doc = ""]
183     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
184     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
set_onvisibilitychange(this: &XrSession, value: Option<&::js_sys::Function>)185     pub fn set_onvisibilitychange(this: &XrSession, value: Option<&::js_sys::Function>);
186     #[cfg(web_sys_unstable_apis)]
187     # [wasm_bindgen (method , structural , js_class = "XRSession" , js_name = cancelAnimationFrame)]
188     #[doc = "The `cancelAnimationFrame()` method."]
189     #[doc = ""]
190     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRSession/cancelAnimationFrame)"]
191     #[doc = ""]
192     #[doc = "*This API requires the following crate features to be activated: `XrSession`*"]
193     #[doc = ""]
194     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
195     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
cancel_animation_frame(this: &XrSession, handle: i32)196     pub fn cancel_animation_frame(this: &XrSession, handle: i32);
197     #[cfg(web_sys_unstable_apis)]
198     # [wasm_bindgen (method , structural , js_class = "XRSession" , js_name = end)]
199     #[doc = "The `end()` method."]
200     #[doc = ""]
201     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRSession/end)"]
202     #[doc = ""]
203     #[doc = "*This API requires the following crate features to be activated: `XrSession`*"]
204     #[doc = ""]
205     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
206     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
end(this: &XrSession) -> ::js_sys::Promise207     pub fn end(this: &XrSession) -> ::js_sys::Promise;
208     #[cfg(web_sys_unstable_apis)]
209     # [wasm_bindgen (method , structural , js_class = "XRSession" , js_name = requestAnimationFrame)]
210     #[doc = "The `requestAnimationFrame()` method."]
211     #[doc = ""]
212     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRSession/requestAnimationFrame)"]
213     #[doc = ""]
214     #[doc = "*This API requires the following crate features to be activated: `XrSession`*"]
215     #[doc = ""]
216     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
217     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
request_animation_frame(this: &XrSession, callback: &::js_sys::Function) -> i32218     pub fn request_animation_frame(this: &XrSession, callback: &::js_sys::Function) -> i32;
219     #[cfg(web_sys_unstable_apis)]
220     #[cfg(feature = "XrReferenceSpaceType")]
221     # [wasm_bindgen (method , structural , js_class = "XRSession" , js_name = requestReferenceSpace)]
222     #[doc = "The `requestReferenceSpace()` method."]
223     #[doc = ""]
224     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRSession/requestReferenceSpace)"]
225     #[doc = ""]
226     #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpaceType`, `XrSession`*"]
227     #[doc = ""]
228     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
229     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
request_reference_space( this: &XrSession, type_: XrReferenceSpaceType, ) -> ::js_sys::Promise230     pub fn request_reference_space(
231         this: &XrSession,
232         type_: XrReferenceSpaceType,
233     ) -> ::js_sys::Promise;
234     #[cfg(web_sys_unstable_apis)]
235     # [wasm_bindgen (method , structural , js_class = "XRSession" , js_name = updateRenderState)]
236     #[doc = "The `updateRenderState()` method."]
237     #[doc = ""]
238     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRSession/updateRenderState)"]
239     #[doc = ""]
240     #[doc = "*This API requires the following crate features to be activated: `XrSession`*"]
241     #[doc = ""]
242     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
243     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
update_render_state(this: &XrSession)244     pub fn update_render_state(this: &XrSession);
245     #[cfg(web_sys_unstable_apis)]
246     #[cfg(feature = "XrRenderStateInit")]
247     # [wasm_bindgen (method , structural , js_class = "XRSession" , js_name = updateRenderState)]
248     #[doc = "The `updateRenderState()` method."]
249     #[doc = ""]
250     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRSession/updateRenderState)"]
251     #[doc = ""]
252     #[doc = "*This API requires the following crate features to be activated: `XrRenderStateInit`, `XrSession`*"]
253     #[doc = ""]
254     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
255     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
update_render_state_with_state(this: &XrSession, state: &XrRenderStateInit)256     pub fn update_render_state_with_state(this: &XrSession, state: &XrRenderStateInit);
257 }
258