web_sys/features/
gen_MidiAccess.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 = MIDIAccess , typescript_type = "MIDIAccess")]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `MidiAccess` class."]
10    #[doc = ""]
11    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MIDIAccess)"]
12    #[doc = ""]
13    #[doc = "*This API requires the following crate features to be activated: `MidiAccess`*"]
14    pub type MidiAccess;
15    #[cfg(feature = "MidiInputMap")]
16    # [wasm_bindgen (structural , method , getter , js_class = "MIDIAccess" , js_name = inputs)]
17    #[doc = "Getter for the `inputs` field of this object."]
18    #[doc = ""]
19    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MIDIAccess/inputs)"]
20    #[doc = ""]
21    #[doc = "*This API requires the following crate features to be activated: `MidiAccess`, `MidiInputMap`*"]
22    pub fn inputs(this: &MidiAccess) -> MidiInputMap;
23    #[cfg(feature = "MidiOutputMap")]
24    # [wasm_bindgen (structural , method , getter , js_class = "MIDIAccess" , js_name = outputs)]
25    #[doc = "Getter for the `outputs` field of this object."]
26    #[doc = ""]
27    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MIDIAccess/outputs)"]
28    #[doc = ""]
29    #[doc = "*This API requires the following crate features to be activated: `MidiAccess`, `MidiOutputMap`*"]
30    pub fn outputs(this: &MidiAccess) -> MidiOutputMap;
31    # [wasm_bindgen (structural , method , getter , js_class = "MIDIAccess" , js_name = onstatechange)]
32    #[doc = "Getter for the `onstatechange` field of this object."]
33    #[doc = ""]
34    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MIDIAccess/onstatechange)"]
35    #[doc = ""]
36    #[doc = "*This API requires the following crate features to be activated: `MidiAccess`*"]
37    pub fn onstatechange(this: &MidiAccess) -> Option<::js_sys::Function>;
38    # [wasm_bindgen (structural , method , setter , js_class = "MIDIAccess" , js_name = onstatechange)]
39    #[doc = "Setter for the `onstatechange` field of this object."]
40    #[doc = ""]
41    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MIDIAccess/onstatechange)"]
42    #[doc = ""]
43    #[doc = "*This API requires the following crate features to be activated: `MidiAccess`*"]
44    pub fn set_onstatechange(this: &MidiAccess, value: Option<&::js_sys::Function>);
45    # [wasm_bindgen (structural , method , getter , js_class = "MIDIAccess" , js_name = sysexEnabled)]
46    #[doc = "Getter for the `sysexEnabled` field of this object."]
47    #[doc = ""]
48    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MIDIAccess/sysexEnabled)"]
49    #[doc = ""]
50    #[doc = "*This API requires the following crate features to be activated: `MidiAccess`*"]
51    pub fn sysex_enabled(this: &MidiAccess) -> bool;
52}