web_sys/features/
gen_XrSystem.rs1#![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 = "EventTarget",
10 extends = "::js_sys::Object",
11 js_name = "XRSystem",
12 typescript_type = "XRSystem"
13 )]
14 #[derive(Debug, Clone, PartialEq, Eq)]
15 #[doc = "The `XrSystem` class."]
16 #[doc = ""]
17 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRSystem)"]
18 #[doc = ""]
19 #[doc = "*This API requires the following crate features to be activated: `XrSystem`*"]
20 #[doc = ""]
21 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
22 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
23 pub type XrSystem;
24 #[cfg(web_sys_unstable_apis)]
25 #[wasm_bindgen(method, getter, js_class = "XRSystem", js_name = "ondevicechange")]
26 #[doc = "Getter for the `ondevicechange` field of this object."]
27 #[doc = ""]
28 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRSystem/ondevicechange)"]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `XrSystem`*"]
31 #[doc = ""]
32 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
33 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
34 pub fn ondevicechange(this: &XrSystem) -> Option<::js_sys::Function>;
35 #[cfg(web_sys_unstable_apis)]
36 #[wasm_bindgen(method, setter, js_class = "XRSystem", js_name = "ondevicechange")]
37 #[doc = "Setter for the `ondevicechange` field of this object."]
38 #[doc = ""]
39 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRSystem/ondevicechange)"]
40 #[doc = ""]
41 #[doc = "*This API requires the following crate features to be activated: `XrSystem`*"]
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 pub fn set_ondevicechange(this: &XrSystem, value: Option<&::js_sys::Function>);
46 #[cfg(web_sys_unstable_apis)]
47 #[cfg(feature = "XrSessionMode")]
48 #[wasm_bindgen(method, js_class = "XRSystem", js_name = "isSessionSupported")]
49 #[doc = "The `isSessionSupported()` method."]
50 #[doc = ""]
51 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRSystem/isSessionSupported)"]
52 #[doc = ""]
53 #[doc = "*This API requires the following crate features to be activated: `XrSessionMode`, `XrSystem`*"]
54 #[doc = ""]
55 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
56 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
57 pub fn is_session_supported(
58 this: &XrSystem,
59 mode: XrSessionMode,
60 ) -> ::js_sys::Promise<::js_sys::Boolean>;
61 #[cfg(web_sys_unstable_apis)]
62 #[cfg(all(feature = "XrSession", feature = "XrSessionMode",))]
63 #[wasm_bindgen(method, js_class = "XRSystem", js_name = "requestSession")]
64 #[doc = "The `requestSession()` method."]
65 #[doc = ""]
66 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRSystem/requestSession)"]
67 #[doc = ""]
68 #[doc = "*This API requires the following crate features to be activated: `XrSession`, `XrSessionMode`, `XrSystem`*"]
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 pub fn request_session(this: &XrSystem, mode: XrSessionMode) -> ::js_sys::Promise<XrSession>;
73 #[cfg(web_sys_unstable_apis)]
74 #[cfg(all(
75 feature = "XrSession",
76 feature = "XrSessionInit",
77 feature = "XrSessionMode",
78 ))]
79 #[wasm_bindgen(method, js_class = "XRSystem", js_name = "requestSession")]
80 #[doc = "The `requestSession()` method."]
81 #[doc = ""]
82 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRSystem/requestSession)"]
83 #[doc = ""]
84 #[doc = "*This API requires the following crate features to be activated: `XrSession`, `XrSessionInit`, `XrSessionMode`, `XrSystem`*"]
85 #[doc = ""]
86 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
87 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
88 pub fn request_session_with_options(
89 this: &XrSystem,
90 mode: XrSessionMode,
91 options: &XrSessionInit,
92 ) -> ::js_sys::Promise<XrSession>;
93}