1#![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 = EventTarget , extends = :: js_sys :: Object , js_name = HIDDevice , typescript_type = "HIDDevice")]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `HidDevice` class."]
11 #[doc = ""]
12 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice)"]
13 #[doc = ""]
14 #[doc = "*This API requires the following crate features to be activated: `HidDevice`*"]
15 #[doc = ""]
16 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
17 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
18 pub type HidDevice;
19 #[cfg(web_sys_unstable_apis)]
20 # [wasm_bindgen (structural , method , getter , js_class = "HIDDevice" , js_name = oninputreport)]
21 #[doc = "Getter for the `oninputreport` field of this object."]
22 #[doc = ""]
23 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice/oninputreport)"]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `HidDevice`*"]
26 #[doc = ""]
27 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
28 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
29 pub fn oninputreport(this: &HidDevice) -> Option<::js_sys::Function>;
30 #[cfg(web_sys_unstable_apis)]
31 # [wasm_bindgen (structural , method , setter , js_class = "HIDDevice" , js_name = oninputreport)]
32 #[doc = "Setter for the `oninputreport` field of this object."]
33 #[doc = ""]
34 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice/oninputreport)"]
35 #[doc = ""]
36 #[doc = "*This API requires the following crate features to be activated: `HidDevice`*"]
37 #[doc = ""]
38 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
39 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
40 pub fn set_oninputreport(this: &HidDevice, value: Option<&::js_sys::Function>);
41 #[cfg(web_sys_unstable_apis)]
42 # [wasm_bindgen (structural , method , getter , js_class = "HIDDevice" , js_name = opened)]
43 #[doc = "Getter for the `opened` field of this object."]
44 #[doc = ""]
45 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice/opened)"]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `HidDevice`*"]
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 pub fn opened(this: &HidDevice) -> bool;
52 #[cfg(web_sys_unstable_apis)]
53 # [wasm_bindgen (structural , method , getter , js_class = "HIDDevice" , js_name = vendorId)]
54 #[doc = "Getter for the `vendorId` field of this object."]
55 #[doc = ""]
56 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice/vendorId)"]
57 #[doc = ""]
58 #[doc = "*This API requires the following crate features to be activated: `HidDevice`*"]
59 #[doc = ""]
60 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
61 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
62 pub fn vendor_id(this: &HidDevice) -> u16;
63 #[cfg(web_sys_unstable_apis)]
64 # [wasm_bindgen (structural , method , getter , js_class = "HIDDevice" , js_name = productId)]
65 #[doc = "Getter for the `productId` field of this object."]
66 #[doc = ""]
67 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice/productId)"]
68 #[doc = ""]
69 #[doc = "*This API requires the following crate features to be activated: `HidDevice`*"]
70 #[doc = ""]
71 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
72 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
73 pub fn product_id(this: &HidDevice) -> u16;
74 #[cfg(web_sys_unstable_apis)]
75 # [wasm_bindgen (structural , method , getter , js_class = "HIDDevice" , js_name = productName)]
76 #[doc = "Getter for the `productName` field of this object."]
77 #[doc = ""]
78 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice/productName)"]
79 #[doc = ""]
80 #[doc = "*This API requires the following crate features to be activated: `HidDevice`*"]
81 #[doc = ""]
82 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
83 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
84 pub fn product_name(this: &HidDevice) -> ::alloc::string::String;
85 #[cfg(web_sys_unstable_apis)]
86 # [wasm_bindgen (structural , method , getter , js_class = "HIDDevice" , js_name = collections)]
87 #[doc = "Getter for the `collections` field of this object."]
88 #[doc = ""]
89 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice/collections)"]
90 #[doc = ""]
91 #[doc = "*This API requires the following crate features to be activated: `HidDevice`*"]
92 #[doc = ""]
93 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
94 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
95 pub fn collections(this: &HidDevice) -> ::js_sys::Array;
96 #[cfg(web_sys_unstable_apis)]
97 # [wasm_bindgen (method , structural , js_class = "HIDDevice" , js_name = close)]
98 #[doc = "The `close()` method."]
99 #[doc = ""]
100 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice/close)"]
101 #[doc = ""]
102 #[doc = "*This API requires the following crate features to be activated: `HidDevice`*"]
103 #[doc = ""]
104 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
105 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
106 pub fn close(this: &HidDevice) -> ::js_sys::Promise;
107 #[cfg(web_sys_unstable_apis)]
108 # [wasm_bindgen (method , structural , js_class = "HIDDevice" , js_name = open)]
109 #[doc = "The `open()` method."]
110 #[doc = ""]
111 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice/open)"]
112 #[doc = ""]
113 #[doc = "*This API requires the following crate features to be activated: `HidDevice`*"]
114 #[doc = ""]
115 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
116 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
117 pub fn open(this: &HidDevice) -> ::js_sys::Promise;
118 #[cfg(web_sys_unstable_apis)]
119 # [wasm_bindgen (method , structural , js_class = "HIDDevice" , js_name = receiveFeatureReport)]
120 #[doc = "The `receiveFeatureReport()` method."]
121 #[doc = ""]
122 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice/receiveFeatureReport)"]
123 #[doc = ""]
124 #[doc = "*This API requires the following crate features to be activated: `HidDevice`*"]
125 #[doc = ""]
126 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
127 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
128 pub fn receive_feature_report(this: &HidDevice, report_id: u8) -> ::js_sys::Promise;
129 #[cfg(web_sys_unstable_apis)]
130 # [wasm_bindgen (catch , method , structural , js_class = "HIDDevice" , js_name = sendFeatureReport)]
131 #[doc = "The `sendFeatureReport()` method."]
132 #[doc = ""]
133 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice/sendFeatureReport)"]
134 #[doc = ""]
135 #[doc = "*This API requires the following crate features to be activated: `HidDevice`*"]
136 #[doc = ""]
137 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
138 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
139 pub fn send_feature_report_with_buffer_source(
140 this: &HidDevice,
141 report_id: u8,
142 data: &::js_sys::Object,
143 ) -> Result<::js_sys::Promise, JsValue>;
144 #[cfg(web_sys_unstable_apis)]
145 # [wasm_bindgen (catch , method , structural , js_class = "HIDDevice" , js_name = sendFeatureReport)]
146 #[doc = "The `sendFeatureReport()` method."]
147 #[doc = ""]
148 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice/sendFeatureReport)"]
149 #[doc = ""]
150 #[doc = "*This API requires the following crate features to be activated: `HidDevice`*"]
151 #[doc = ""]
152 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
153 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
154 pub fn send_feature_report_with_u8_slice(
155 this: &HidDevice,
156 report_id: u8,
157 data: &mut [u8],
158 ) -> Result<::js_sys::Promise, JsValue>;
159 #[cfg(web_sys_unstable_apis)]
160 # [wasm_bindgen (catch , method , structural , js_class = "HIDDevice" , js_name = sendFeatureReport)]
161 #[doc = "The `sendFeatureReport()` method."]
162 #[doc = ""]
163 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice/sendFeatureReport)"]
164 #[doc = ""]
165 #[doc = "*This API requires the following crate features to be activated: `HidDevice`*"]
166 #[doc = ""]
167 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
168 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
169 pub fn send_feature_report_with_u8_array(
170 this: &HidDevice,
171 report_id: u8,
172 data: &::js_sys::Uint8Array,
173 ) -> Result<::js_sys::Promise, JsValue>;
174 #[cfg(web_sys_unstable_apis)]
175 # [wasm_bindgen (catch , method , structural , js_class = "HIDDevice" , js_name = sendReport)]
176 #[doc = "The `sendReport()` method."]
177 #[doc = ""]
178 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice/sendReport)"]
179 #[doc = ""]
180 #[doc = "*This API requires the following crate features to be activated: `HidDevice`*"]
181 #[doc = ""]
182 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
183 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
184 pub fn send_report_with_buffer_source(
185 this: &HidDevice,
186 report_id: u8,
187 data: &::js_sys::Object,
188 ) -> Result<::js_sys::Promise, JsValue>;
189 #[cfg(web_sys_unstable_apis)]
190 # [wasm_bindgen (catch , method , structural , js_class = "HIDDevice" , js_name = sendReport)]
191 #[doc = "The `sendReport()` method."]
192 #[doc = ""]
193 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice/sendReport)"]
194 #[doc = ""]
195 #[doc = "*This API requires the following crate features to be activated: `HidDevice`*"]
196 #[doc = ""]
197 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
198 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
199 pub fn send_report_with_u8_slice(
200 this: &HidDevice,
201 report_id: u8,
202 data: &mut [u8],
203 ) -> Result<::js_sys::Promise, JsValue>;
204 #[cfg(web_sys_unstable_apis)]
205 # [wasm_bindgen (catch , method , structural , js_class = "HIDDevice" , js_name = sendReport)]
206 #[doc = "The `sendReport()` method."]
207 #[doc = ""]
208 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice/sendReport)"]
209 #[doc = ""]
210 #[doc = "*This API requires the following crate features to be activated: `HidDevice`*"]
211 #[doc = ""]
212 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
213 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
214 pub fn send_report_with_u8_array(
215 this: &HidDevice,
216 report_id: u8,
217 data: &::js_sys::Uint8Array,
218 ) -> Result<::js_sys::Promise, JsValue>;
219}