web_sys/features/
gen_HidInputReportEvent.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 = "HIDInputReportEvent",
12 typescript_type = "HIDInputReportEvent"
13 )]
14 #[derive(Debug, Clone, PartialEq, Eq)]
15 #[doc = "The `HidInputReportEvent` class."]
16 #[doc = ""]
17 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDInputReportEvent)"]
18 #[doc = ""]
19 #[doc = "*This API requires the following crate features to be activated: `HidInputReportEvent`*"]
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 HidInputReportEvent;
24 #[cfg(web_sys_unstable_apis)]
25 #[cfg(feature = "HidDevice")]
26 #[wasm_bindgen(method, getter, js_class = "HIDInputReportEvent", js_name = "device")]
27 #[doc = "Getter for the `device` field of this object."]
28 #[doc = ""]
29 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDInputReportEvent/device)"]
30 #[doc = ""]
31 #[doc = "*This API requires the following crate features to be activated: `HidDevice`, `HidInputReportEvent`*"]
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 device(this: &HidInputReportEvent) -> HidDevice;
36 #[cfg(web_sys_unstable_apis)]
37 #[wasm_bindgen(method, getter, js_class = "HIDInputReportEvent", js_name = "reportId")]
38 #[doc = "Getter for the `reportId` field of this object."]
39 #[doc = ""]
40 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDInputReportEvent/reportId)"]
41 #[doc = ""]
42 #[doc = "*This API requires the following crate features to be activated: `HidInputReportEvent`*"]
43 #[doc = ""]
44 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
45 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
46 pub fn report_id(this: &HidInputReportEvent) -> u8;
47 #[cfg(web_sys_unstable_apis)]
48 #[wasm_bindgen(method, getter, js_class = "HIDInputReportEvent", js_name = "data")]
49 #[doc = "Getter for the `data` field of this object."]
50 #[doc = ""]
51 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDInputReportEvent/data)"]
52 #[doc = ""]
53 #[doc = "*This API requires the following crate features to be activated: `HidInputReportEvent`*"]
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 data(this: &HidInputReportEvent) -> ::js_sys::DataView;
58 #[cfg(web_sys_unstable_apis)]
59 #[cfg(feature = "HidInputReportEventInit")]
60 #[wasm_bindgen(catch, constructor, js_class = "HIDInputReportEvent")]
61 #[doc = "The `new HidInputReportEvent(..)` constructor, creating a new instance of `HidInputReportEvent`."]
62 #[doc = ""]
63 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDInputReportEvent/HIDInputReportEvent)"]
64 #[doc = ""]
65 #[doc = "*This API requires the following crate features to be activated: `HidInputReportEvent`, `HidInputReportEventInit`*"]
66 #[doc = ""]
67 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
68 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
69 pub fn new(
70 type_: &str,
71 event_init_dict: &HidInputReportEventInit,
72 ) -> Result<HidInputReportEvent, JsValue>;
73}