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 = :: js_sys :: Object , js_name = XRReferenceSpaceEventInit ) ]
8     #[derive(Debug, Clone, PartialEq, Eq)]
9     #[doc = "The `XrReferenceSpaceEventInit` dictionary."]
10     #[doc = ""]
11     #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpaceEventInit`*"]
12     #[doc = ""]
13     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
14     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
15     pub type XrReferenceSpaceEventInit;
16 }
17 #[cfg(web_sys_unstable_apis)]
18 impl XrReferenceSpaceEventInit {
19     #[cfg(feature = "XrReferenceSpace")]
20     #[doc = "Construct a new `XrReferenceSpaceEventInit`."]
21     #[doc = ""]
22     #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpace`, `XrReferenceSpaceEventInit`*"]
23     #[doc = ""]
24     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
25     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
26     pub fn new(reference_space: &XrReferenceSpace) -> Self {
27         #[allow(unused_mut)]
28         let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
29         ret.reference_space(reference_space);
30         ret
31     }
32     #[cfg(web_sys_unstable_apis)]
33     #[doc = "Change the `bubbles` field of this object."]
34     #[doc = ""]
35     #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpaceEventInit`*"]
36     #[doc = ""]
37     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
38     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
39     pub fn bubbles(&mut self, val: bool) -> &mut Self {
40         use wasm_bindgen::JsValue;
41         let r = ::js_sys::Reflect::set(
42             self.as_ref(),
43             &JsValue::from("bubbles"),
44             &JsValue::from(val),
45         );
46         debug_assert!(
47             r.is_ok(),
48             "setting properties should never fail on our dictionary objects"
49         );
50         let _ = r;
51         self
52     }
53     #[cfg(web_sys_unstable_apis)]
54     #[doc = "Change the `cancelable` field of this object."]
55     #[doc = ""]
56     #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpaceEventInit`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
60     pub fn cancelable(&mut self, val: bool) -> &mut Self {
61         use wasm_bindgen::JsValue;
62         let r = ::js_sys::Reflect::set(
63             self.as_ref(),
64             &JsValue::from("cancelable"),
65             &JsValue::from(val),
66         );
67         debug_assert!(
68             r.is_ok(),
69             "setting properties should never fail on our dictionary objects"
70         );
71         let _ = r;
72         self
73     }
74     #[cfg(web_sys_unstable_apis)]
75     #[doc = "Change the `composed` field of this object."]
76     #[doc = ""]
77     #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpaceEventInit`*"]
78     #[doc = ""]
79     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
80     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
81     pub fn composed(&mut self, val: bool) -> &mut Self {
82         use wasm_bindgen::JsValue;
83         let r = ::js_sys::Reflect::set(
84             self.as_ref(),
85             &JsValue::from("composed"),
86             &JsValue::from(val),
87         );
88         debug_assert!(
89             r.is_ok(),
90             "setting properties should never fail on our dictionary objects"
91         );
92         let _ = r;
93         self
94     }
95     #[cfg(web_sys_unstable_apis)]
96     #[cfg(feature = "XrReferenceSpace")]
97     #[doc = "Change the `referenceSpace` field of this object."]
98     #[doc = ""]
99     #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpace`, `XrReferenceSpaceEventInit`*"]
100     #[doc = ""]
101     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
102     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
103     pub fn reference_space(&mut self, val: &XrReferenceSpace) -> &mut Self {
104         use wasm_bindgen::JsValue;
105         let r = ::js_sys::Reflect::set(
106             self.as_ref(),
107             &JsValue::from("referenceSpace"),
108             &JsValue::from(val),
109         );
110         debug_assert!(
111             r.is_ok(),
112             "setting properties should never fail on our dictionary objects"
113         );
114         let _ = r;
115         self
116     }
117     #[cfg(web_sys_unstable_apis)]
118     #[cfg(feature = "XrRigidTransform")]
119     #[doc = "Change the `transform` field of this object."]
120     #[doc = ""]
121     #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpaceEventInit`, `XrRigidTransform`*"]
122     #[doc = ""]
123     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
124     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
125     pub fn transform(&mut self, val: &XrRigidTransform) -> &mut Self {
126         use wasm_bindgen::JsValue;
127         let r = ::js_sys::Reflect::set(
128             self.as_ref(),
129             &JsValue::from("transform"),
130             &JsValue::from(val),
131         );
132         debug_assert!(
133             r.is_ok(),
134             "setting properties should never fail on our dictionary objects"
135         );
136         let _ = r;
137         self
138     }
139 }
140