Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / trace-viewer / third_party / tvcm / third_party / Promises / reworked_APIs / WebMIDI / after.idl
1 partial interface Navigator {
2     Future requestMIDIAccess (optional boolean systemExclusiveSupportRequested = false );
3 };
4
5 interface MIDIAccess : EventTarget {
6     sequence<MIDIPort> getInputs ();
7     sequence<MIDIPort> getOutputs ();
8     MIDIInput          getInput (MIDIPort or DOMString or short target);
9     MIDIOutput         getOutput (MIDIPort or DOMString or short target);
10                 attribute EventHandler onconnect;
11                 attribute EventHandler ondisconnect;
12 };
13
14 enum MIDIPortType {
15     "input",
16     "output"
17 };
18
19 interface MIDIPort : EventTarget {
20     readonly    attribute DOMString    id;
21     readonly    attribute DOMString?   manufacturer;
22     readonly    attribute DOMString?   name;
23     readonly    attribute MIDIPortType type;
24     readonly    attribute DOMString?   version;
25                 attribute EventHandler ondisconnect;
26 };
27
28 interface MIDIInput : MIDIPort {
29                 attribute EventHandler onmessage;
30 };
31
32 interface MIDIOutput : MIDIPort {
33     void send (sequence<octet> data, optional double timestamp);
34 };
35
36 interface MIDIMessageEvent : Event {
37     readonly    attribute double     receivedTime;
38     readonly    attribute Uint8Array data;
39 };
40
41 interface MIDIConnectionEvent : Event {
42     readonly    attribute MIDIPort port;
43 };