mshtml: Added partial IHTMLDocument2::put_designMode implementation.
[wine] / dlls / winecoreaudio.drv / coremidi.h
1 /*
2  * Wine Midi driver for Mac OS X
3  *
4  * Copyright 2006 Emmanuel Maillard
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  */
20
21 #ifndef WINE_COREMIDI_H
22 #define WINE_COREMIDI_H
23
24 #include <CoreFoundation/CoreFoundation.h>
25
26 #ifdef WINE_DEFINITIONS
27 /*
28  * Due to CoreMIDI headers conflict redefine some types for Wine
29  */
30 typedef void *MIDIClientRef;
31 typedef void *MIDIEndpointRef;
32 typedef void *MIDIPortRef;
33 typedef void *MIDIObjectRef;
34
35 typedef struct MIDIPacketList MIDIPacketList;
36
37 /*
38  * functions
39  */
40 extern OSStatus MIDIClientDispose(MIDIClientRef client);
41 extern unsigned MIDIGetNumberOfDestinations(void);
42 extern MIDIEndpointRef MIDIGetDestination(unsigned i);
43 extern unsigned MIDIGetNumberOfSources(void);
44 extern MIDIEndpointRef MIDIGetSource(unsigned i);
45 extern OSStatus MIDIOutputPortCreate(MIDIClientRef client, CFStringRef portName, MIDIPortRef *outPort);
46
47 typedef void (*MIDIReadProc)(const MIDIPacketList *pktlist, void *readProcRefCon, void *srcConnRefCon);
48 extern OSStatus MIDIInputPortCreate(MIDIClientRef client, CFStringRef portName, MIDIReadProc readProc, void *refCon, MIDIPortRef *outPort);
49
50 extern OSStatus MIDIObjectGetProperties(MIDIObjectRef obj, CFPropertyListRef *outProperties, Boolean deep);
51
52 extern OSStatus MIDIPortConnectSource(MIDIPortRef port, MIDIEndpointRef source, void *connRefCon);
53
54 /*
55  * Due to AudioUnit headers conflict redefine some types.
56  */
57 typedef void *AudioUnit;
58 typedef void *AUGraph;
59
60 extern OSStatus MusicDeviceMIDIEvent(AudioUnit au, UInt32 inStatus, UInt32 inData1, UInt32 inData2, UInt32 inOffsetSampleFrame);
61 extern OSStatus MusicDeviceSysEx(AudioUnit au, const UInt8 *inData, UInt32 inLength);
62
63 /* audiounit.c */
64 extern int AudioUnit_SetVolume(AudioUnit au, float left, float right);
65 extern int AudioUnit_GetVolume(AudioUnit au, float *left, float *right);
66 #endif
67
68 typedef struct {
69     UInt16 devID;
70     UInt16 length;
71     Byte data[256];
72 } MIDIMessage;
73
74 /* coremidi.c */
75 extern MIDIClientRef CoreMIDI_CreateClient(CFStringRef name);
76 extern void CoreMIDI_GetObjectName(MIDIObjectRef obj, char *name, int size);
77 extern void MIDIIn_ReadProc(const MIDIPacketList *pktlist, void *refCon, void *connRefCon);
78
79 extern void MIDIOut_Send(MIDIPortRef port, MIDIEndpointRef dest, UInt8 *buffer, unsigned length);
80
81 /* midi.c */
82 void MIDIIn_SendMessage(MIDIMessage msg);
83
84 #endif