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 = EventTarget , extends = :: js_sys :: Object , js_name = HIDDevice , typescript_type = "HIDDevice")]
8     #[derive(Debug, Clone, PartialEq, Eq)]
9     #[doc = "The `HidDevice` class."]
10     #[doc = ""]
11     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice)"]
12     #[doc = ""]
13     #[doc = "*This API requires the following crate features to be activated: `HidDevice`*"]
14     #[doc = ""]
15     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
16     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
17     pub type HidDevice;
18     #[cfg(web_sys_unstable_apis)]
19     # [wasm_bindgen (structural , method , getter , js_class = "HIDDevice" , js_name = oninputreport)]
20     #[doc = "Getter for the `oninputreport` field of this object."]
21     #[doc = ""]
22     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice/oninputreport)"]
23     #[doc = ""]
24     #[doc = "*This API requires the following crate features to be activated: `HidDevice`*"]
25     #[doc = ""]
26     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
27     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
oninputreport(this: &HidDevice) -> Option<::js_sys::Function>28     pub fn oninputreport(this: &HidDevice) -> Option<::js_sys::Function>;
29     #[cfg(web_sys_unstable_apis)]
30     # [wasm_bindgen (structural , method , setter , js_class = "HIDDevice" , js_name = oninputreport)]
31     #[doc = "Setter for the `oninputreport` field of this object."]
32     #[doc = ""]
33     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice/oninputreport)"]
34     #[doc = ""]
35     #[doc = "*This API requires the following crate features to be activated: `HidDevice`*"]
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)*"]
set_oninputreport(this: &HidDevice, value: Option<&::js_sys::Function>)39     pub fn set_oninputreport(this: &HidDevice, value: Option<&::js_sys::Function>);
40     #[cfg(web_sys_unstable_apis)]
41     # [wasm_bindgen (structural , method , getter , js_class = "HIDDevice" , js_name = opened)]
42     #[doc = "Getter for the `opened` field of this object."]
43     #[doc = ""]
44     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice/opened)"]
45     #[doc = ""]
46     #[doc = "*This API requires the following crate features to be activated: `HidDevice`*"]
47     #[doc = ""]
48     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
49     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
opened(this: &HidDevice) -> bool50     pub fn opened(this: &HidDevice) -> bool;
51     #[cfg(web_sys_unstable_apis)]
52     # [wasm_bindgen (structural , method , getter , js_class = "HIDDevice" , js_name = vendorId)]
53     #[doc = "Getter for the `vendorId` field of this object."]
54     #[doc = ""]
55     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice/vendorId)"]
56     #[doc = ""]
57     #[doc = "*This API requires the following crate features to be activated: `HidDevice`*"]
58     #[doc = ""]
59     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
60     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
vendor_id(this: &HidDevice) -> u1661     pub fn vendor_id(this: &HidDevice) -> u16;
62     #[cfg(web_sys_unstable_apis)]
63     # [wasm_bindgen (structural , method , getter , js_class = "HIDDevice" , js_name = productId)]
64     #[doc = "Getter for the `productId` field of this object."]
65     #[doc = ""]
66     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice/productId)"]
67     #[doc = ""]
68     #[doc = "*This API requires the following crate features to be activated: `HidDevice`*"]
69     #[doc = ""]
70     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
71     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
product_id(this: &HidDevice) -> u1672     pub fn product_id(this: &HidDevice) -> u16;
73     #[cfg(web_sys_unstable_apis)]
74     # [wasm_bindgen (structural , method , getter , js_class = "HIDDevice" , js_name = productName)]
75     #[doc = "Getter for the `productName` field of this object."]
76     #[doc = ""]
77     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice/productName)"]
78     #[doc = ""]
79     #[doc = "*This API requires the following crate features to be activated: `HidDevice`*"]
80     #[doc = ""]
81     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
82     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
product_name(this: &HidDevice) -> String83     pub fn product_name(this: &HidDevice) -> String;
84     #[cfg(web_sys_unstable_apis)]
85     # [wasm_bindgen (structural , method , getter , js_class = "HIDDevice" , js_name = collections)]
86     #[doc = "Getter for the `collections` field of this object."]
87     #[doc = ""]
88     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice/collections)"]
89     #[doc = ""]
90     #[doc = "*This API requires the following crate features to be activated: `HidDevice`*"]
91     #[doc = ""]
92     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
93     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
collections(this: &HidDevice) -> ::js_sys::Array94     pub fn collections(this: &HidDevice) -> ::js_sys::Array;
95     #[cfg(web_sys_unstable_apis)]
96     # [wasm_bindgen (method , structural , js_class = "HIDDevice" , js_name = close)]
97     #[doc = "The `close()` method."]
98     #[doc = ""]
99     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice/close)"]
100     #[doc = ""]
101     #[doc = "*This API requires the following crate features to be activated: `HidDevice`*"]
102     #[doc = ""]
103     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
104     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
close(this: &HidDevice) -> ::js_sys::Promise105     pub fn close(this: &HidDevice) -> ::js_sys::Promise;
106     #[cfg(web_sys_unstable_apis)]
107     # [wasm_bindgen (method , structural , js_class = "HIDDevice" , js_name = open)]
108     #[doc = "The `open()` method."]
109     #[doc = ""]
110     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice/open)"]
111     #[doc = ""]
112     #[doc = "*This API requires the following crate features to be activated: `HidDevice`*"]
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)*"]
open(this: &HidDevice) -> ::js_sys::Promise116     pub fn open(this: &HidDevice) -> ::js_sys::Promise;
117     #[cfg(web_sys_unstable_apis)]
118     # [wasm_bindgen (method , structural , js_class = "HIDDevice" , js_name = receiveFeatureReport)]
119     #[doc = "The `receiveFeatureReport()` method."]
120     #[doc = ""]
121     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice/receiveFeatureReport)"]
122     #[doc = ""]
123     #[doc = "*This API requires the following crate features to be activated: `HidDevice`*"]
124     #[doc = ""]
125     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
126     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
receive_feature_report(this: &HidDevice, report_id: u8) -> ::js_sys::Promise127     pub fn receive_feature_report(this: &HidDevice, report_id: u8) -> ::js_sys::Promise;
128     #[cfg(web_sys_unstable_apis)]
129     # [wasm_bindgen (method , structural , js_class = "HIDDevice" , js_name = sendFeatureReport)]
130     #[doc = "The `sendFeatureReport()` method."]
131     #[doc = ""]
132     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice/sendFeatureReport)"]
133     #[doc = ""]
134     #[doc = "*This API requires the following crate features to be activated: `HidDevice`*"]
135     #[doc = ""]
136     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
137     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
send_feature_report_with_buffer_source( this: &HidDevice, report_id: u8, data: &::js_sys::Object, ) -> ::js_sys::Promise138     pub fn send_feature_report_with_buffer_source(
139         this: &HidDevice,
140         report_id: u8,
141         data: &::js_sys::Object,
142     ) -> ::js_sys::Promise;
143     #[cfg(web_sys_unstable_apis)]
144     # [wasm_bindgen (method , structural , js_class = "HIDDevice" , js_name = sendFeatureReport)]
145     #[doc = "The `sendFeatureReport()` method."]
146     #[doc = ""]
147     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice/sendFeatureReport)"]
148     #[doc = ""]
149     #[doc = "*This API requires the following crate features to be activated: `HidDevice`*"]
150     #[doc = ""]
151     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
152     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
send_feature_report_with_u8_array( this: &HidDevice, report_id: u8, data: &mut [u8], ) -> ::js_sys::Promise153     pub fn send_feature_report_with_u8_array(
154         this: &HidDevice,
155         report_id: u8,
156         data: &mut [u8],
157     ) -> ::js_sys::Promise;
158     #[cfg(web_sys_unstable_apis)]
159     # [wasm_bindgen (method , structural , js_class = "HIDDevice" , js_name = sendReport)]
160     #[doc = "The `sendReport()` method."]
161     #[doc = ""]
162     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice/sendReport)"]
163     #[doc = ""]
164     #[doc = "*This API requires the following crate features to be activated: `HidDevice`*"]
165     #[doc = ""]
166     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
167     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
send_report_with_buffer_source( this: &HidDevice, report_id: u8, data: &::js_sys::Object, ) -> ::js_sys::Promise168     pub fn send_report_with_buffer_source(
169         this: &HidDevice,
170         report_id: u8,
171         data: &::js_sys::Object,
172     ) -> ::js_sys::Promise;
173     #[cfg(web_sys_unstable_apis)]
174     # [wasm_bindgen (method , structural , js_class = "HIDDevice" , js_name = sendReport)]
175     #[doc = "The `sendReport()` method."]
176     #[doc = ""]
177     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice/sendReport)"]
178     #[doc = ""]
179     #[doc = "*This API requires the following crate features to be activated: `HidDevice`*"]
180     #[doc = ""]
181     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
182     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
send_report_with_u8_array( this: &HidDevice, report_id: u8, data: &mut [u8], ) -> ::js_sys::Promise183     pub fn send_report_with_u8_array(
184         this: &HidDevice,
185         report_id: u8,
186         data: &mut [u8],
187     ) -> ::js_sys::Promise;
188 }
189