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