master
  1/**
  2 * This file has no copyright assigned and is placed in the Public Domain.
  3 * This file is part of the mingw-w64 runtime package.
  4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
  5 */
  6
  7#include <winapifamily.h>
  8
  9#ifndef _INC_MMSYSCOM
 10#define _INC_MMSYSCOM
 11
 12#include <pshpack1.h>
 13
 14#ifdef __cplusplus
 15extern "C" {
 16#endif
 17
 18#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
 19
 20#ifndef _WINMM_
 21#define WINMMAPI DECLSPEC_IMPORT
 22#else
 23#define WINMMAPI
 24#endif
 25#define _loadds
 26#define _huge
 27
 28#define MAXPNAMELEN 32
 29#define MAXERRORLENGTH 256
 30#define MAX_JOYSTICKOEMVXDNAME 260
 31
 32#ifndef MM_MICROSOFT
 33#define MM_MICROSOFT 1
 34#endif
 35
 36#ifndef MM_MIDI_MAPPER
 37#define MM_MIDI_MAPPER 1
 38#define MM_WAVE_MAPPER 2
 39#define MM_SNDBLST_MIDIOUT 3
 40#define MM_SNDBLST_MIDIIN 4
 41#define MM_SNDBLST_SYNTH 5
 42#define MM_SNDBLST_WAVEOUT 6
 43#define MM_SNDBLST_WAVEIN 7
 44#define MM_ADLIB 9
 45#define MM_MPU401_MIDIOUT 10
 46#define MM_MPU401_MIDIIN 11
 47#define MM_PC_JOYSTICK 12
 48#endif
 49
 50typedef UINT MMVERSION;
 51
 52typedef UINT MMRESULT;
 53#define _MMRESULT_
 54typedef UINT *LPUINT;
 55
 56typedef struct mmtime_tag {
 57  UINT wType;
 58  union {
 59    DWORD ms;
 60    DWORD sample;
 61    DWORD cb;
 62    DWORD ticks;
 63    struct {
 64      BYTE hour;
 65      BYTE min;
 66      BYTE sec;
 67      BYTE frame;
 68      BYTE fps;
 69      BYTE dummy;
 70      BYTE pad[2];
 71    } smpte;
 72    struct {
 73      DWORD songptrpos;
 74    } midi;
 75  } u;
 76} MMTIME, *PMMTIME, *NPMMTIME, *LPMMTIME;
 77
 78#define TIME_MS 0x0001
 79#define TIME_SAMPLES 0x0002
 80#define TIME_BYTES 0x0004
 81#define TIME_SMPTE 0x0008
 82#define TIME_MIDI 0x0010
 83#define TIME_TICKS 0x0020
 84
 85#define MAKEFOURCC(ch0, ch1, ch2, ch3) ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
 86
 87#define MM_JOY1MOVE 0x3A0
 88#define MM_JOY2MOVE 0x3A1
 89#define MM_JOY1ZMOVE 0x3A2
 90#define MM_JOY2ZMOVE 0x3A3
 91#define MM_JOY1BUTTONDOWN 0x3B5
 92#define MM_JOY2BUTTONDOWN 0x3B6
 93#define MM_JOY1BUTTONUP 0x3B7
 94#define MM_JOY2BUTTONUP 0x3B8
 95
 96#define MM_MCINOTIFY 0x3B9
 97
 98#define MM_WOM_OPEN 0x3BB
 99#define MM_WOM_CLOSE 0x3BC
100#define MM_WOM_DONE 0x3BD
101
102#define MM_WIM_OPEN 0x3BE
103#define MM_WIM_CLOSE 0x3BF
104#define MM_WIM_DATA 0x3C0
105
106#define MM_MIM_OPEN 0x3C1
107#define MM_MIM_CLOSE 0x3C2
108#define MM_MIM_DATA 0x3C3
109#define MM_MIM_LONGDATA 0x3C4
110#define MM_MIM_ERROR 0x3C5
111#define MM_MIM_LONGERROR 0x3C6
112
113#define MM_MOM_OPEN 0x3C7
114#define MM_MOM_CLOSE 0x3C8
115#define MM_MOM_DONE 0x3C9
116
117#ifndef MM_DRVM_OPEN
118#define MM_DRVM_OPEN 0x3D0
119#define MM_DRVM_CLOSE 0x3D1
120#define MM_DRVM_DATA 0x3D2
121#define MM_DRVM_ERROR 0x3D3
122#endif
123
124#define MM_STREAM_OPEN 0x3D4
125#define MM_STREAM_CLOSE 0x3D5
126#define MM_STREAM_DONE 0x3D6
127#define MM_STREAM_ERROR 0x3D7
128
129#define MM_MOM_POSITIONCB 0x3CA
130
131#ifndef MM_MCISIGNAL
132#define MM_MCISIGNAL 0x3CB
133#endif
134
135#define MM_MIM_MOREDATA 0x3CC
136
137#define MM_MIXM_LINE_CHANGE 0x3D0
138#define MM_MIXM_CONTROL_CHANGE 0x3D1
139
140#define MMSYSERR_BASE 0
141#define WAVERR_BASE 32
142#define MIDIERR_BASE 64
143#define TIMERR_BASE 96
144#define JOYERR_BASE 160
145#define MCIERR_BASE 256
146#define MIXERR_BASE 1024
147
148#define MCI_STRING_OFFSET 512
149#define MCI_VD_OFFSET 1024
150#define MCI_CD_OFFSET 1088
151#define MCI_WAVE_OFFSET 1152
152#define MCI_SEQ_OFFSET 1216
153
154#define MMSYSERR_NOERROR 0
155#define MMSYSERR_ERROR (MMSYSERR_BASE + 1)
156#define MMSYSERR_BADDEVICEID (MMSYSERR_BASE + 2)
157#define MMSYSERR_NOTENABLED (MMSYSERR_BASE + 3)
158#define MMSYSERR_ALLOCATED (MMSYSERR_BASE + 4)
159#define MMSYSERR_INVALHANDLE (MMSYSERR_BASE + 5)
160#define MMSYSERR_NODRIVER (MMSYSERR_BASE + 6)
161#define MMSYSERR_NOMEM (MMSYSERR_BASE + 7)
162#define MMSYSERR_NOTSUPPORTED (MMSYSERR_BASE + 8)
163#define MMSYSERR_BADERRNUM (MMSYSERR_BASE + 9)
164#define MMSYSERR_INVALFLAG (MMSYSERR_BASE + 10)
165#define MMSYSERR_INVALPARAM (MMSYSERR_BASE + 11)
166#define MMSYSERR_HANDLEBUSY (MMSYSERR_BASE + 12)
167#define MMSYSERR_INVALIDALIAS (MMSYSERR_BASE + 13)
168#define MMSYSERR_BADDB (MMSYSERR_BASE + 14)
169#define MMSYSERR_KEYNOTFOUND (MMSYSERR_BASE + 15)
170#define MMSYSERR_READERROR (MMSYSERR_BASE + 16)
171#define MMSYSERR_WRITEERROR (MMSYSERR_BASE + 17)
172#define MMSYSERR_DELETEERROR (MMSYSERR_BASE + 18)
173#define MMSYSERR_VALNOTFOUND (MMSYSERR_BASE + 19)
174#define MMSYSERR_NODRIVERCB (MMSYSERR_BASE + 20)
175#define MMSYSERR_MOREDATA (MMSYSERR_BASE + 21)
176#define MMSYSERR_LASTERROR (MMSYSERR_BASE + 21)
177
178DECLARE_HANDLE(HDRVR);
179
180#define CALLBACK_TYPEMASK __MSABI_LONG(0x00070000)
181#define CALLBACK_NULL __MSABI_LONG(0x00000000)
182#define CALLBACK_WINDOW __MSABI_LONG(0x00010000)
183#define CALLBACK_TASK __MSABI_LONG(0x00020000)
184#define CALLBACK_FUNCTION __MSABI_LONG(0x00030000)
185#define CALLBACK_THREAD (CALLBACK_TASK)
186#define CALLBACK_EVENT __MSABI_LONG(0x00050000)
187typedef void (CALLBACK DRVCALLBACK)(HDRVR hdrvr, UINT uMsg, DWORD_PTR dwUser, DWORD_PTR dw1, DWORD_PTR dw2);
188
189typedef DRVCALLBACK *LPDRVCALLBACK;
190typedef DRVCALLBACK *PDRVCALLBACK;
191
192#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
193
194#ifdef __cplusplus
195}
196#endif
197
198#include <poppack.h>
199
200#endif /* _INC_MMSYSCOM */