maxcountryman_web_sys/features/
gen_MidiPort.rs1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6 # [wasm_bindgen (extends = EventTarget , extends = :: js_sys :: Object , js_name = MIDIPort , typescript_type = "MIDIPort")]
7 #[derive(Debug, Clone, PartialEq, Eq)]
8 #[doc = "The `MidiPort` class."]
9 #[doc = ""]
10 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MIDIPort)"]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `MidiPort`*"]
13 pub type MidiPort;
14 # [wasm_bindgen (structural , method , getter , js_class = "MIDIPort" , js_name = id)]
15 #[doc = "Getter for the `id` field of this object."]
16 #[doc = ""]
17 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MIDIPort/id)"]
18 #[doc = ""]
19 #[doc = "*This API requires the following crate features to be activated: `MidiPort`*"]
20 pub fn id(this: &MidiPort) -> String;
21 # [wasm_bindgen (structural , method , getter , js_class = "MIDIPort" , js_name = manufacturer)]
22 #[doc = "Getter for the `manufacturer` field of this object."]
23 #[doc = ""]
24 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MIDIPort/manufacturer)"]
25 #[doc = ""]
26 #[doc = "*This API requires the following crate features to be activated: `MidiPort`*"]
27 pub fn manufacturer(this: &MidiPort) -> Option<String>;
28 # [wasm_bindgen (structural , method , getter , js_class = "MIDIPort" , js_name = name)]
29 #[doc = "Getter for the `name` field of this object."]
30 #[doc = ""]
31 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MIDIPort/name)"]
32 #[doc = ""]
33 #[doc = "*This API requires the following crate features to be activated: `MidiPort`*"]
34 pub fn name(this: &MidiPort) -> Option<String>;
35 # [wasm_bindgen (structural , method , getter , js_class = "MIDIPort" , js_name = version)]
36 #[doc = "Getter for the `version` field of this object."]
37 #[doc = ""]
38 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MIDIPort/version)"]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `MidiPort`*"]
41 pub fn version(this: &MidiPort) -> Option<String>;
42 #[cfg(feature = "MidiPortType")]
43 # [wasm_bindgen (structural , method , getter , js_class = "MIDIPort" , js_name = type)]
44 #[doc = "Getter for the `type` field of this object."]
45 #[doc = ""]
46 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MIDIPort/type)"]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `MidiPort`, `MidiPortType`*"]
49 pub fn type_(this: &MidiPort) -> MidiPortType;
50 #[cfg(feature = "MidiPortDeviceState")]
51 # [wasm_bindgen (structural , method , getter , js_class = "MIDIPort" , js_name = state)]
52 #[doc = "Getter for the `state` field of this object."]
53 #[doc = ""]
54 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MIDIPort/state)"]
55 #[doc = ""]
56 #[doc = "*This API requires the following crate features to be activated: `MidiPort`, `MidiPortDeviceState`*"]
57 pub fn state(this: &MidiPort) -> MidiPortDeviceState;
58 #[cfg(feature = "MidiPortConnectionState")]
59 # [wasm_bindgen (structural , method , getter , js_class = "MIDIPort" , js_name = connection)]
60 #[doc = "Getter for the `connection` field of this object."]
61 #[doc = ""]
62 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MIDIPort/connection)"]
63 #[doc = ""]
64 #[doc = "*This API requires the following crate features to be activated: `MidiPort`, `MidiPortConnectionState`*"]
65 pub fn connection(this: &MidiPort) -> MidiPortConnectionState;
66 # [wasm_bindgen (structural , method , getter , js_class = "MIDIPort" , js_name = onstatechange)]
67 #[doc = "Getter for the `onstatechange` field of this object."]
68 #[doc = ""]
69 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MIDIPort/onstatechange)"]
70 #[doc = ""]
71 #[doc = "*This API requires the following crate features to be activated: `MidiPort`*"]
72 pub fn onstatechange(this: &MidiPort) -> Option<::js_sys::Function>;
73 # [wasm_bindgen (structural , method , setter , js_class = "MIDIPort" , js_name = onstatechange)]
74 #[doc = "Setter for the `onstatechange` field of this object."]
75 #[doc = ""]
76 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MIDIPort/onstatechange)"]
77 #[doc = ""]
78 #[doc = "*This API requires the following crate features to be activated: `MidiPort`*"]
79 pub fn set_onstatechange(this: &MidiPort, value: Option<&::js_sys::Function>);
80 # [wasm_bindgen (method , structural , js_class = "MIDIPort" , js_name = close)]
81 #[doc = "The `close()` method."]
82 #[doc = ""]
83 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MIDIPort/close)"]
84 #[doc = ""]
85 #[doc = "*This API requires the following crate features to be activated: `MidiPort`*"]
86 pub fn close(this: &MidiPort) -> ::js_sys::Promise;
87 # [wasm_bindgen (method , structural , js_class = "MIDIPort" , js_name = open)]
88 #[doc = "The `open()` method."]
89 #[doc = ""]
90 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MIDIPort/open)"]
91 #[doc = ""]
92 #[doc = "*This API requires the following crate features to be activated: `MidiPort`*"]
93 pub fn open(this: &MidiPort) -> ::js_sys::Promise;
94}