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