web_sys/features/
gen_XrInputSourceEvent.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 = "Event",
10 extends = "::js_sys::Object",
11 js_name = "XRInputSourceEvent",
12 typescript_type = "XRInputSourceEvent"
13 )]
14 #[derive(Debug, Clone, PartialEq, Eq)]
15 #[doc = "The `XrInputSourceEvent` class."]
16 #[doc = ""]
17 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRInputSourceEvent)"]
18 #[doc = ""]
19 #[doc = "*This API requires the following crate features to be activated: `XrInputSourceEvent`*"]
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 XrInputSourceEvent;
24 #[cfg(web_sys_unstable_apis)]
25 #[cfg(feature = "XrFrame")]
26 #[wasm_bindgen(method, getter, js_class = "XRInputSourceEvent", js_name = "frame")]
27 #[doc = "Getter for the `frame` field of this object."]
28 #[doc = ""]
29 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRInputSourceEvent/frame)"]
30 #[doc = ""]
31 #[doc = "*This API requires the following crate features to be activated: `XrFrame`, `XrInputSourceEvent`*"]
32 #[doc = ""]
33 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
34 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
35 pub fn frame(this: &XrInputSourceEvent) -> XrFrame;
36 #[cfg(web_sys_unstable_apis)]
37 #[cfg(feature = "XrInputSource")]
38 #[wasm_bindgen(
39 method,
40 getter,
41 js_class = "XRInputSourceEvent",
42 js_name = "inputSource"
43 )]
44 #[doc = "Getter for the `inputSource` field of this object."]
45 #[doc = ""]
46 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRInputSourceEvent/inputSource)"]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `XrInputSource`, `XrInputSourceEvent`*"]
49 #[doc = ""]
50 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
51 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
52 pub fn input_source(this: &XrInputSourceEvent) -> XrInputSource;
53 #[cfg(web_sys_unstable_apis)]
54 #[cfg(feature = "XrInputSourceEventInit")]
55 #[wasm_bindgen(catch, constructor, js_class = "XRInputSourceEvent")]
56 #[doc = "The `new XrInputSourceEvent(..)` constructor, creating a new instance of `XrInputSourceEvent`."]
57 #[doc = ""]
58 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRInputSourceEvent/XRInputSourceEvent)"]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `XrInputSourceEvent`, `XrInputSourceEventInit`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
64 pub fn new(
65 type_: &str,
66 event_init_dict: &XrInputSourceEventInit,
67 ) -> Result<XrInputSourceEvent, JsValue>;
68}