web_sys/features/
gen_MidiPort.rs

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