tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

webmidi.idl (2484B)


      1 // GENERATED CONTENT - DO NOT EDIT
      2 // Content was automatically extracted by Reffy into webref
      3 // (https://github.com/w3c/webref)
      4 // Source: Web MIDI API (https://webaudio.github.io/web-midi-api/)
      5 
      6 dictionary MidiPermissionDescriptor : PermissionDescriptor {
      7  boolean sysex = false;
      8 };
      9 
     10 partial interface Navigator {
     11  [SecureContext]
     12  Promise <MIDIAccess> requestMIDIAccess(optional MIDIOptions options = {});
     13 };
     14 
     15 dictionary MIDIOptions {
     16  boolean sysex;
     17  boolean software;
     18 };
     19 
     20 [SecureContext, Exposed=(Window,Worker)] interface MIDIInputMap {
     21  readonly maplike <DOMString, MIDIInput>;
     22 };
     23 
     24 [SecureContext, Exposed=(Window,Worker)] interface MIDIOutputMap {
     25  readonly maplike <DOMString, MIDIOutput>;
     26 };
     27 
     28 [SecureContext, Exposed=(Window,Worker), Transferable] interface MIDIAccess: EventTarget {
     29  readonly attribute MIDIInputMap inputs;
     30  readonly attribute MIDIOutputMap outputs;
     31  attribute EventHandler onstatechange;
     32  readonly attribute boolean sysexEnabled;
     33 };
     34 
     35 [SecureContext, Exposed=(Window,Worker)] interface MIDIPort: EventTarget {
     36  readonly attribute DOMString id;
     37  readonly attribute DOMString? manufacturer;
     38  readonly attribute DOMString? name;
     39  readonly attribute MIDIPortType type;
     40  readonly attribute DOMString? version;
     41  readonly attribute MIDIPortDeviceState state;
     42  readonly attribute MIDIPortConnectionState connection;
     43  attribute EventHandler onstatechange;
     44  Promise <MIDIPort> open();
     45  Promise <MIDIPort> close();
     46 };
     47 
     48 [SecureContext, Exposed=(Window,Worker)] interface MIDIInput: MIDIPort {
     49  attribute EventHandler onmidimessage;
     50 };
     51 
     52 [SecureContext, Exposed=(Window,Worker)] interface MIDIOutput : MIDIPort {
     53  undefined send(sequence<octet> data, optional DOMHighResTimeStamp timestamp = 0);
     54  undefined clear();
     55 };
     56 
     57 enum MIDIPortType {
     58  "input",
     59  "output",
     60 };
     61 
     62 enum MIDIPortDeviceState {
     63  "disconnected",
     64  "connected",
     65 };
     66 
     67 enum MIDIPortConnectionState {
     68  "open",
     69  "closed",
     70  "pending",
     71 };
     72 
     73 [SecureContext, Exposed=(Window,Worker)]
     74 interface MIDIMessageEvent : Event {
     75  constructor(DOMString type, optional MIDIMessageEventInit eventInitDict = {});
     76  readonly attribute Uint8Array? data;
     77 };
     78 
     79 dictionary MIDIMessageEventInit: EventInit {
     80  Uint8Array data;
     81 };
     82 
     83 [SecureContext, Exposed=(Window,Worker)]
     84 interface MIDIConnectionEvent : Event {
     85  constructor(DOMString type, optional MIDIConnectionEventInit eventInitDict = {});
     86  readonly attribute MIDIPort? port;
     87 };
     88 
     89 dictionary MIDIConnectionEventInit: EventInit {
     90  MIDIPort port;
     91 };