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