falco/midiwire/mmsystem.h

38 lines
1.7 KiB
C
Raw Normal View History

2019-10-11 15:50:06 +00:00
// TCC has no mmsystem.h, so I needed to write my own :-(
// don't try this at home
// see https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-dtyp/cca27429-5689-4a16-b2b4-9325d93e4ba2
2019-10-11 13:24:59 +00:00
typedef char CHAR, *PCHAR;
typedef unsigned short WORD, *PWORD, *LPWORD;
typedef unsigned long DWORD, *PDWORD, *LPDWORD;
2019-10-11 15:50:06 +00:00
typedef void* HANDLE;
2019-10-11 13:24:59 +00:00
typedef unsigned int MMVERSION;
2019-10-11 15:50:06 +00:00
typedef HANDLE HMIDIOUT;
2019-10-11 13:24:59 +00:00
// derived from https://github.com/wilkie/djehuty/blob/master/binding/win32/mmsystem.d
#define MAXPNAMELEN 32
2019-10-11 15:50:06 +00:00
const CALLBACK_TYPEMASK = 0x00070000 ; /* callback type mask */
const CALLBACK_NULL = 0x00000000 ; /* no callback */
const CALLBACK_WINDOW = 0x00010000 ; /* dwCallback is a HWND */
const CALLBACK_TASK = 0x00020000 ; /* dwCallback is a HTASK */
const CALLBACK_FUNCTION = 0x00030000 ; /* dwCallback is a FARPROC */
//const CALLBACK_THREAD = (CALLBACK_TASK); /* thread ID replaces 16 bit task */
const CALLBACK_EVENT = 0x00050000 ; /* dwCallback is an EVENT Handle */
2019-10-11 13:24:59 +00:00
typedef struct midi_out_capsa {
WORD wMid; /* manufacturer ID */
WORD wPid; /* product ID */
MMVERSION vDriverVersion; /* version of the driver */
CHAR szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
WORD wTechnology; /* type of device */
WORD wVoices; /* # of voices (internal synth only) */
WORD wNotes; /* max # of notes (internal synth only) */
WORD wChannelMask; /* channels used (internal synth only) */
DWORD dwSupport; /* functionality supported by driver */
} MIDIOUTCAPSA;