web_sys/features/
gen_HidInputReportEventInit.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 (extends = :: js_sys :: Object , js_name = HIDInputReportEventInit)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `HidInputReportEventInit` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `HidInputReportEventInit`*"]
13 #[doc = ""]
14 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
15 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
16 pub type HidInputReportEventInit;
17 #[cfg(web_sys_unstable_apis)]
18 #[doc = "Get the `bubbles` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `HidInputReportEventInit`*"]
21 #[doc = ""]
22 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
23 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
24 #[wasm_bindgen(method, getter = "bubbles")]
25 pub fn get_bubbles(this: &HidInputReportEventInit) -> Option<bool>;
26 #[cfg(web_sys_unstable_apis)]
27 #[doc = "Change the `bubbles` field of this object."]
28 #[doc = ""]
29 #[doc = "*This API requires the following crate features to be activated: `HidInputReportEventInit`*"]
30 #[doc = ""]
31 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
32 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
33 #[wasm_bindgen(method, setter = "bubbles")]
34 pub fn set_bubbles(this: &HidInputReportEventInit, val: bool);
35 #[cfg(web_sys_unstable_apis)]
36 #[doc = "Get the `cancelable` field of this object."]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `HidInputReportEventInit`*"]
39 #[doc = ""]
40 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
41 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
42 #[wasm_bindgen(method, getter = "cancelable")]
43 pub fn get_cancelable(this: &HidInputReportEventInit) -> Option<bool>;
44 #[cfg(web_sys_unstable_apis)]
45 #[doc = "Change the `cancelable` field of this object."]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `HidInputReportEventInit`*"]
48 #[doc = ""]
49 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
50 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
51 #[wasm_bindgen(method, setter = "cancelable")]
52 pub fn set_cancelable(this: &HidInputReportEventInit, val: bool);
53 #[cfg(web_sys_unstable_apis)]
54 #[doc = "Get the `composed` field of this object."]
55 #[doc = ""]
56 #[doc = "*This API requires the following crate features to be activated: `HidInputReportEventInit`*"]
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 #[wasm_bindgen(method, getter = "composed")]
61 pub fn get_composed(this: &HidInputReportEventInit) -> Option<bool>;
62 #[cfg(web_sys_unstable_apis)]
63 #[doc = "Change the `composed` field of this object."]
64 #[doc = ""]
65 #[doc = "*This API requires the following crate features to be activated: `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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
69 #[wasm_bindgen(method, setter = "composed")]
70 pub fn set_composed(this: &HidInputReportEventInit, val: bool);
71 #[cfg(web_sys_unstable_apis)]
72 #[doc = "Get the `data` field of this object."]
73 #[doc = ""]
74 #[doc = "*This API requires the following crate features to be activated: `HidInputReportEventInit`*"]
75 #[doc = ""]
76 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
77 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
78 #[wasm_bindgen(method, getter = "data")]
79 pub fn get_data(this: &HidInputReportEventInit) -> ::js_sys::DataView;
80 #[cfg(web_sys_unstable_apis)]
81 #[doc = "Change the `data` field of this object."]
82 #[doc = ""]
83 #[doc = "*This API requires the following crate features to be activated: `HidInputReportEventInit`*"]
84 #[doc = ""]
85 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
86 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
87 #[wasm_bindgen(method, setter = "data")]
88 pub fn set_data(this: &HidInputReportEventInit, val: &::js_sys::DataView);
89 #[cfg(web_sys_unstable_apis)]
90 #[cfg(feature = "HidDevice")]
91 #[doc = "Get the `device` field of this object."]
92 #[doc = ""]
93 #[doc = "*This API requires the following crate features to be activated: `HidDevice`, `HidInputReportEventInit`*"]
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)*"]
97 #[wasm_bindgen(method, getter = "device")]
98 pub fn get_device(this: &HidInputReportEventInit) -> HidDevice;
99 #[cfg(web_sys_unstable_apis)]
100 #[cfg(feature = "HidDevice")]
101 #[doc = "Change the `device` field of this object."]
102 #[doc = ""]
103 #[doc = "*This API requires the following crate features to be activated: `HidDevice`, `HidInputReportEventInit`*"]
104 #[doc = ""]
105 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
106 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
107 #[wasm_bindgen(method, setter = "device")]
108 pub fn set_device(this: &HidInputReportEventInit, val: &HidDevice);
109 #[cfg(web_sys_unstable_apis)]
110 #[doc = "Get the `reportId` field of this object."]
111 #[doc = ""]
112 #[doc = "*This API requires the following crate features to be activated: `HidInputReportEventInit`*"]
113 #[doc = ""]
114 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
115 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
116 #[wasm_bindgen(method, getter = "reportId")]
117 pub fn get_report_id(this: &HidInputReportEventInit) -> u8;
118 #[cfg(web_sys_unstable_apis)]
119 #[doc = "Change the `reportId` field of this object."]
120 #[doc = ""]
121 #[doc = "*This API requires the following crate features to be activated: `HidInputReportEventInit`*"]
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 #[wasm_bindgen(method, setter = "reportId")]
126 pub fn set_report_id(this: &HidInputReportEventInit, val: u8);
127}
128#[cfg(web_sys_unstable_apis)]
129impl HidInputReportEventInit {
130 #[cfg(feature = "HidDevice")]
131 #[doc = "Construct a new `HidInputReportEventInit`."]
132 #[doc = ""]
133 #[doc = "*This API requires the following crate features to be activated: `HidDevice`, `HidInputReportEventInit`*"]
134 #[doc = ""]
135 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
136 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
137 pub fn new(data: &::js_sys::DataView, device: &HidDevice, report_id: u8) -> Self {
138 #[allow(unused_mut)]
139 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
140 ret.set_data(data);
141 ret.set_device(device);
142 ret.set_report_id(report_id);
143 ret
144 }
145 #[cfg(web_sys_unstable_apis)]
146 #[deprecated = "Use `set_bubbles()` instead."]
147 pub fn bubbles(&mut self, val: bool) -> &mut Self {
148 self.set_bubbles(val);
149 self
150 }
151 #[cfg(web_sys_unstable_apis)]
152 #[deprecated = "Use `set_cancelable()` instead."]
153 pub fn cancelable(&mut self, val: bool) -> &mut Self {
154 self.set_cancelable(val);
155 self
156 }
157 #[cfg(web_sys_unstable_apis)]
158 #[deprecated = "Use `set_composed()` instead."]
159 pub fn composed(&mut self, val: bool) -> &mut Self {
160 self.set_composed(val);
161 self
162 }
163 #[cfg(web_sys_unstable_apis)]
164 #[deprecated = "Use `set_data()` instead."]
165 pub fn data(&mut self, val: &::js_sys::DataView) -> &mut Self {
166 self.set_data(val);
167 self
168 }
169 #[cfg(web_sys_unstable_apis)]
170 #[cfg(feature = "HidDevice")]
171 #[deprecated = "Use `set_device()` instead."]
172 pub fn device(&mut self, val: &HidDevice) -> &mut Self {
173 self.set_device(val);
174 self
175 }
176 #[cfg(web_sys_unstable_apis)]
177 #[deprecated = "Use `set_report_id()` instead."]
178 pub fn report_id(&mut self, val: u8) -> &mut Self {
179 self.set_report_id(val);
180 self
181 }
182}