blob: fd3ff349cf6e0ada6df5a37a8eb1949cc6b67355 [file] [log] [blame]
Alexandre Julliard58199531994-04-21 01:20:00 +00001/*
2 * MMSYSTEM - Multimedia Wine Extension ... :-)
3 */
4
Alexandre Julliardc6c09441997-01-12 18:32:19 +00005#ifndef __WINE_MMSYSTEM_H
6#define __WINE_MMSYSTEM_H
Alexandre Julliard58199531994-04-21 01:20:00 +00007
François Gougetf53b0e82001-01-04 19:32:22 +00008#include "windef.h"
9
Alexandre Julliardf4eb65b1999-02-09 14:22:01 +000010#ifdef __cplusplus
11extern "C" {
12#endif
13
Eric Pouecha9ffdcf1999-03-15 15:42:26 +000014typedef LPSTR HPSTR; /* a huge version of LPSTR */
15typedef LPCSTR HPCSTR; /* a huge version of LPCSTR */
16
Patrik Stridvallc7a8dde1999-04-25 12:36:53 +000017#include "pshpack1.h"
Eric Pouecha9ffdcf1999-03-15 15:42:26 +000018
François Gougetf53b0e82001-01-04 19:32:22 +000019typedef LRESULT CALLBACK (*DRIVERPROC)(DWORD,HDRVR,UINT,LPARAM,LPARAM);
20
Alexandre Julliard491502b1997-11-01 19:08:16 +000021#define MAXWAVEDRIVERS 10
22#define MAXMIDIDRIVERS 10
23#define MAXAUXDRIVERS 10
24#define MAXMCIDRIVERS 32
25#define MAXMIXERDRIVERS 10
Eric Pouecha9ffdcf1999-03-15 15:42:26 +000026
Alexandre Julliard58199531994-04-21 01:20:00 +000027#define MAXPNAMELEN 32 /* max product name length (including NULL) */
28#define MAXERRORLENGTH 128 /* max error text length (including NULL) */
Alexandre Julliard44ed71f1997-12-21 19:17:50 +000029#define MAX_JOYSTICKOEMVXDNAME 260
Eric Pouecha9ffdcf1999-03-15 15:42:26 +000030
Alexandre Julliard58199531994-04-21 01:20:00 +000031typedef WORD VERSION; /* major (high byte), minor (low byte) */
32
Eric Pouech28b8ac82001-01-04 20:58:05 +000033#ifndef _MCIERROR_
34#define _MCIERROR_
Francois Gougetf2e65752000-09-22 21:04:30 +000035typedef DWORD MCIERROR;
Eric Pouech28b8ac82001-01-04 20:58:05 +000036#endif
Alexandre Julliarda3960291999-02-26 11:11:13 +000037typedef UINT MMVERSION;
Eric Pouech28b8ac82001-01-04 20:58:05 +000038#ifndef _MCIDEVICEID_
39#define _MCIDEVICEID_
Alexandre Julliarda3960291999-02-26 11:11:13 +000040typedef UINT MCIDEVICEID;
Eric Pouech28b8ac82001-01-04 20:58:05 +000041#endif
Alexandre Julliarda3960291999-02-26 11:11:13 +000042typedef UINT MMRESULT;
Alexandre Julliard491502b1997-11-01 19:08:16 +000043
Alexandre Julliard58199531994-04-21 01:20:00 +000044typedef struct {
Alexandre Julliarda3960291999-02-26 11:11:13 +000045 UINT wType;
Alexandre Julliard491502b1997-11-01 19:08:16 +000046 union {
47 DWORD ms;
48 DWORD sample;
49 DWORD cb;
Eric Pouecha4165ae1999-04-11 12:14:17 +000050 DWORD ticks;
Alexandre Julliard491502b1997-11-01 19:08:16 +000051 struct {
52 BYTE hour;
53 BYTE min;
54 BYTE sec;
55 BYTE frame;
56 BYTE fps;
57 BYTE dummy;
58 BYTE pad[2];
59 } smpte;
60 struct {
61 DWORD songptrpos;
62 } midi;
63 } u;
Alexandre Julliarda3960291999-02-26 11:11:13 +000064} MMTIME, *LPMMTIME;
Alexandre Julliard58199531994-04-21 01:20:00 +000065
66#define TIME_MS 0x0001 /* time in milliseconds */
67#define TIME_SAMPLES 0x0002 /* number of wave samples */
68#define TIME_BYTES 0x0004 /* current byte offset */
69#define TIME_SMPTE 0x0008 /* SMPTE time */
70#define TIME_MIDI 0x0010 /* MIDI time */
Eric Pouecha4165ae1999-04-11 12:14:17 +000071#define TIME_TICKS 0x0020 /* MIDI ticks */
Alexandre Julliard58199531994-04-21 01:20:00 +000072
73#define MM_JOY1MOVE 0x3A0 /* joystick */
74#define MM_JOY2MOVE 0x3A1
75#define MM_JOY1ZMOVE 0x3A2
76#define MM_JOY2ZMOVE 0x3A3
77#define MM_JOY1BUTTONDOWN 0x3B5
78#define MM_JOY2BUTTONDOWN 0x3B6
79#define MM_JOY1BUTTONUP 0x3B7
80#define MM_JOY2BUTTONUP 0x3B8
81
82#define MM_MCINOTIFY 0x3B9 /* MCI */
83
84#define MM_WOM_OPEN 0x3BB /* waveform output */
85#define MM_WOM_CLOSE 0x3BC
86#define MM_WOM_DONE 0x3BD
87
88#define MM_WIM_OPEN 0x3BE /* waveform input */
89#define MM_WIM_CLOSE 0x3BF
90#define MM_WIM_DATA 0x3C0
91
92#define MM_MIM_OPEN 0x3C1 /* MIDI input */
93#define MM_MIM_CLOSE 0x3C2
94#define MM_MIM_DATA 0x3C3
95#define MM_MIM_LONGDATA 0x3C4
96#define MM_MIM_ERROR 0x3C5
97#define MM_MIM_LONGERROR 0x3C6
98
99#define MM_MOM_OPEN 0x3C7 /* MIDI output */
100#define MM_MOM_CLOSE 0x3C8
101#define MM_MOM_DONE 0x3C9
Eric Pouecha4165ae1999-04-11 12:14:17 +0000102#define MM_MOM_POSITIONCB 0x3CA
Alexandre Julliard58199531994-04-21 01:20:00 +0000103
Eric Pouech29ebdb71999-12-05 02:19:24 +0000104#define MM_MIM_MOREDATA 0x3CC
105
Alexandre Julliard58199531994-04-21 01:20:00 +0000106#define MMSYSERR_BASE 0
107#define WAVERR_BASE 32
108#define MIDIERR_BASE 64
109#define TIMERR_BASE 96
110#define JOYERR_BASE 160
111#define MCIERR_BASE 256
112
113#define MCI_STRING_OFFSET 512
114#define MCI_VD_OFFSET 1024
115#define MCI_CD_OFFSET 1088
116#define MCI_WAVE_OFFSET 1152
117#define MCI_SEQ_OFFSET 1216
118
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000119#define MMSYSERR_NOERROR 0 /* no error */
120#define MMSYSERR_ERROR (MMSYSERR_BASE + 1) /* unspecified error */
121#define MMSYSERR_BADDEVICEID (MMSYSERR_BASE + 2) /* device ID out of range */
122#define MMSYSERR_NOTENABLED (MMSYSERR_BASE + 3) /* driver failed enable */
123#define MMSYSERR_ALLOCATED (MMSYSERR_BASE + 4) /* device already allocated */
124#define MMSYSERR_INVALHANDLE (MMSYSERR_BASE + 5) /* device handle is invalid */
125#define MMSYSERR_NODRIVER (MMSYSERR_BASE + 6) /* no device driver present */
126#define MMSYSERR_NOMEM (MMSYSERR_BASE + 7) /* memory allocation error */
127#define MMSYSERR_NOTSUPPORTED (MMSYSERR_BASE + 8) /* function isn't supported */
128#define MMSYSERR_BADERRNUM (MMSYSERR_BASE + 9) /* error value out of range */
129#define MMSYSERR_INVALFLAG (MMSYSERR_BASE + 10) /* invalid flag passed */
130#define MMSYSERR_INVALPARAM (MMSYSERR_BASE + 11) /* invalid parameter passed */
131#define MMSYSERR_LASTERROR (MMSYSERR_BASE + 11) /* last error in range */
Alexandre Julliard58199531994-04-21 01:20:00 +0000132
Eric Pouecha4165ae1999-04-11 12:14:17 +0000133#define CALLBACK_TYPEMASK 0x00070000l /* callback type mask */
134#define CALLBACK_NULL 0x00000000l /* no callback */
135#define CALLBACK_WINDOW 0x00010000l /* dwCallback is a HWND */
136#define CALLBACK_TASK 0x00020000l /* dwCallback is a HTASK */
137#define CALLBACK_THREAD (CALLBACK_TASK) /* dwCallback is a thread ID */
138#define CALLBACK_FUNCTION 0x00030000l /* dwCallback is a FARPROC */
139#define CALLBACK_EVENT 0x00050000l /* dwCallback is an EVENT Handler */
Alexandre Julliard58199531994-04-21 01:20:00 +0000140
Eric Pouech731e9f52000-07-26 18:07:04 +0000141#define DRV_LOAD 0x0001
142#define DRV_ENABLE 0x0002
143#define DRV_OPEN 0x0003
144#define DRV_CLOSE 0x0004
145#define DRV_DISABLE 0x0005
146#define DRV_FREE 0x0006
147#define DRV_CONFIGURE 0x0007
148#define DRV_QUERYCONFIGURE 0x0008
149#define DRV_INSTALL 0x0009
150#define DRV_REMOVE 0x000A
151#define DRV_EXITSESSION 0x000B
152#define DRV_EXITAPPLICATION 0x000C
153#define DRV_POWER 0x000F
154
155#define DRV_RESERVED 0x0800
156#define DRV_USER 0x4000
157
158#define DRVCNF_CANCEL 0x0000
159#define DRVCNF_OK 0x0001
160#define DRVCNF_RESTART 0x0002
161
162#define DRVEA_NORMALEXIT 0x0001
163#define DRVEA_ABNORMALEXIT 0x0002
164
165#define DRV_SUCCESS 0x0001
166#define DRV_FAILURE 0x0000
167
168#define GND_FIRSTINSTANCEONLY 0x00000001
169
170#define GND_FORWARD 0x00000000
171#define GND_REVERSE 0x00000002
172
173typedef struct {
174 DWORD dwDCISize;
Eric Pouech731e9f52000-07-26 18:07:04 +0000175 LPCWSTR lpszDCISectionName;
176 LPCWSTR lpszDCIAliasName;
177} DRVCONFIGINFO, *LPDRVCONFIGINFO;
178
179
Eric Pouech731e9f52000-07-26 18:07:04 +0000180LRESULT WINAPI DefDriverProc(DWORD dwDriverIdentifier, HDRVR hdrvr,
181 UINT Msg, LPARAM lParam1, LPARAM lParam2);
Eric Pouech731e9f52000-07-26 18:07:04 +0000182HDRVR WINAPI OpenDriverA(LPCSTR szDriverName, LPCSTR szSectionName,
183 LPARAM lParam2);
184HDRVR WINAPI OpenDriverW(LPCWSTR szDriverName, LPCWSTR szSectionName,
185 LPARAM lParam2);
186#define OpenDriver WINELIB_NAME_AW(OpenDriver)
Eric Pouech731e9f52000-07-26 18:07:04 +0000187LRESULT WINAPI CloseDriver(HDRVR hDriver, LPARAM lParam1, LPARAM lParam2);
Eric Pouech731e9f52000-07-26 18:07:04 +0000188LRESULT WINAPI SendDriverMessage(HDRVR hDriver, UINT message,
189 LPARAM lParam1, LPARAM lParam2);
Eric Pouech731e9f52000-07-26 18:07:04 +0000190HMODULE WINAPI GetDriverModuleHandle(HDRVR hDriver);
191
Eric Pouech731e9f52000-07-26 18:07:04 +0000192DWORD WINAPI GetDriverFlags(HDRVR hDriver);
193#ifdef __WINE__
194/* this call (GetDriverFlags) is not documented, nor the flags returned.
195 * here are Wine only definitions
196 */
197#define WINE_GDF_EXIST 0x80000000
198#define WINE_GDF_16BIT 0x10000000
199#endif
200
Francois Gougetae41e8c2000-06-11 20:07:58 +0000201typedef void CALLBACK (*LPDRVCALLBACK) (HDRVR h, UINT uMessage, DWORD dwUser, DWORD dw1, DWORD dw2);
Alexandre Julliard58199531994-04-21 01:20:00 +0000202
203#define MM_MICROSOFT 1 /* Microsoft Corp. */
204
205#define MM_MIDI_MAPPER 1 /* MIDI Mapper */
206#define MM_WAVE_MAPPER 2 /* Wave Mapper */
207
208#define MM_SNDBLST_MIDIOUT 3 /* Sound Blaster MIDI output port */
209#define MM_SNDBLST_MIDIIN 4 /* Sound Blaster MIDI input port */
210#define MM_SNDBLST_SYNTH 5 /* Sound Blaster internal synthesizer */
211#define MM_SNDBLST_WAVEOUT 6 /* Sound Blaster waveform output */
212#define MM_SNDBLST_WAVEIN 7 /* Sound Blaster waveform input */
213
214#define MM_ADLIB 9 /* Ad Lib-compatible synthesizer */
215
216#define MM_MPU401_MIDIOUT 10 /* MPU401-compatible MIDI output port */
217#define MM_MPU401_MIDIIN 11 /* MPU401-compatible MIDI input port */
218
219#define MM_PC_JOYSTICK 12 /* Joystick adapter */
220
221
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000222UINT WINAPI mmsystemGetVersion(void);
Eric Pouech668228a1999-09-05 16:39:23 +0000223BOOL WINAPI sndPlaySoundA(LPCSTR lpszSound, UINT fuSound);
224BOOL WINAPI sndPlaySoundW(LPCWSTR lpszSound, UINT fuSound);
225#define sndPlaySound WINELIB_NAME_AW(sndPlaySound)
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000226BOOL WINAPI PlaySoundA(LPCSTR pszSound, HMODULE hmod, DWORD fdwSound);
227BOOL WINAPI PlaySoundW(LPCWSTR pszSound, HMODULE hmod, DWORD fdwSound);
228#define PlaySound WINELIB_NAME_AW(PlaySound)
Alexandre Julliard58199531994-04-21 01:20:00 +0000229
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000230#define SND_SYNC 0x0000 /* play synchronously (default) */
231#define SND_ASYNC 0x0001 /* play asynchronously */
232#define SND_NODEFAULT 0x0002 /* don't use default sound */
233#define SND_MEMORY 0x0004 /* lpszSoundName points to a memory file */
234#define SND_LOOP 0x0008 /* loop the sound until next sndPlaySound */
235#define SND_NOSTOP 0x0010 /* don't stop any currently playing sound */
Alexandre Julliard58199531994-04-21 01:20:00 +0000236
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000237#define SND_NOWAIT 0x00002000L /* don't wait if the driver is busy */
238#define SND_ALIAS 0x00010000L /* name is a registry alias */
239#define SND_ALIAS_ID 0x00110000L /* alias is a predefined ID */
240#define SND_FILENAME 0x00020000L /* name is file name */
241#define SND_RESOURCE 0x00040004L /* name is resource name or atom */
242#define SND_PURGE 0x00000040L /* purge all sounds */
243#define SND_APPLICATION 0x00000080L /* look for application specific association */
Alexandre Julliard3db94ef1997-09-28 17:43:24 +0000244
Alexandre Julliard58199531994-04-21 01:20:00 +0000245/* waveform audio error return values */
246#define WAVERR_BADFORMAT (WAVERR_BASE + 0) /* unsupported wave format */
247#define WAVERR_STILLPLAYING (WAVERR_BASE + 1) /* still something playing */
248#define WAVERR_UNPREPARED (WAVERR_BASE + 2) /* header not prepared */
249#define WAVERR_SYNC (WAVERR_BASE + 3) /* device is synchronous */
250#define WAVERR_LASTERROR (WAVERR_BASE + 3) /* last error in range */
251
Alexandre Julliarda3960291999-02-26 11:11:13 +0000252typedef LPDRVCALLBACK LPWAVECALLBACK;
Alexandre Julliard58199531994-04-21 01:20:00 +0000253
254#define WOM_OPEN MM_WOM_OPEN
255#define WOM_CLOSE MM_WOM_CLOSE
256#define WOM_DONE MM_WOM_DONE
257#define WIM_OPEN MM_WIM_OPEN
258#define WIM_CLOSE MM_WIM_CLOSE
259#define WIM_DATA MM_WIM_DATA
260
261#define WAVE_MAPPER (-1)
262
Eric Pouech668228a1999-09-05 16:39:23 +0000263#define WAVE_FORMAT_QUERY 0x0001
264#define WAVE_ALLOWSYNC 0x0002
265#define WAVE_MAPPED 0x0004
266#define WAVE_FORMAT_DIRECT 0x0008
267#define WAVE_FORMAT_DIRECT_QUERY (WAVE_FORMAT_QUERY | WAVE_FORMAT_DIRECT)
Ove Kaaven849c9302000-06-24 12:54:49 +0000268#ifdef __WINE__
269#define WAVE_DIRECTSOUND 0x0080
270#endif
Alexandre Julliard58199531994-04-21 01:20:00 +0000271
Alexandre Julliard6b81b391994-07-07 16:23:58 +0000272typedef struct wavehdr_tag {
Alexandre Julliard491502b1997-11-01 19:08:16 +0000273 LPSTR lpData; /* pointer to locked data buffer */
274 DWORD dwBufferLength; /* length of data buffer */
275 DWORD dwBytesRecorded;/* used for input only */
276 DWORD dwUser; /* for client's use */
277 DWORD dwFlags; /* assorted flags (see defines) */
278 DWORD dwLoops; /* loop control counter */
279
280 struct wavehdr_tag *lpNext; /* reserved for driver */
281 DWORD reserved; /* reserved for driver */
Francois Gougetf2e65752000-09-22 21:04:30 +0000282} WAVEHDR, *PWAVEHDR, *NPWAVEHDR, *LPWAVEHDR;
Alexandre Julliard58199531994-04-21 01:20:00 +0000283
284#define WHDR_DONE 0x00000001 /* done bit */
285#define WHDR_PREPARED 0x00000002 /* set if this header has been prepared */
286#define WHDR_BEGINLOOP 0x00000004 /* loop start block */
287#define WHDR_ENDLOOP 0x00000008 /* loop end block */
288#define WHDR_INQUEUE 0x00000010 /* reserved for driver */
289
290typedef struct {
Alexandre Julliard491502b1997-11-01 19:08:16 +0000291 WORD wMid; /* manufacturer ID */
292 WORD wPid; /* product ID */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000293 MMVERSION vDriverVersion; /* version of the driver */
Alexandre Julliard491502b1997-11-01 19:08:16 +0000294 CHAR szPname[MAXPNAMELEN]; /* product name (0 terminated string) */
295 DWORD dwFormats; /* formats supported */
296 WORD wChannels; /* number of sources supported */
297 WORD wReserved1; /* padding */
298 DWORD dwSupport; /* functionality supported by driver */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000299} WAVEOUTCAPSA, *LPWAVEOUTCAPSA;
Alexandre Julliard491502b1997-11-01 19:08:16 +0000300
301typedef struct {
302 WORD wMid; /* manufacturer ID */
303 WORD wPid; /* product ID */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000304 MMVERSION vDriverVersion; /* version of the driver */
Alexandre Julliard491502b1997-11-01 19:08:16 +0000305 WCHAR szPname[MAXPNAMELEN]; /* product name (0 terminated string) */
306 DWORD dwFormats; /* formats supported */
307 WORD wChannels; /* number of sources supported */
308 WORD wReserved1; /* padding */
309 DWORD dwSupport; /* functionality supported by driver */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000310} WAVEOUTCAPSW, *LPWAVEOUTCAPSW;
Alexandre Julliarda845b881998-06-01 10:44:35 +0000311DECL_WINELIB_TYPE_AW(WAVEOUTCAPS)
312DECL_WINELIB_TYPE_AW(LPWAVEOUTCAPS)
Alexandre Julliard58199531994-04-21 01:20:00 +0000313
314#define WAVECAPS_PITCH 0x0001 /* supports pitch control */
315#define WAVECAPS_PLAYBACKRATE 0x0002 /* supports playback rate control */
316#define WAVECAPS_VOLUME 0x0004 /* supports volume control */
317#define WAVECAPS_LRVOLUME 0x0008 /* separate left-right volume control */
Eric Pouecha4165ae1999-04-11 12:14:17 +0000318#define WAVECAPS_SYNC 0x0010 /* driver is synchrounous and playing is blocking */
319#define WAVECAPS_SAMPLEACCURATE 0x0020 /* position is sample accurate */
320#define WAVECAPS_DIRECTSOUND 0x0040 /* ? */
Alexandre Julliard58199531994-04-21 01:20:00 +0000321
322typedef struct {
Alexandre Julliard491502b1997-11-01 19:08:16 +0000323 WORD wMid; /* manufacturer ID */
324 WORD wPid; /* product ID */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000325 MMVERSION vDriverVersion; /* version of the driver */
Alexandre Julliard491502b1997-11-01 19:08:16 +0000326 CHAR szPname[MAXPNAMELEN]; /* product name (0 terminated string) */
327 DWORD dwFormats; /* formats supported */
328 WORD wChannels; /* number of channels supported */
329 WORD wReserved1;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000330} WAVEINCAPSA, *LPWAVEINCAPSA;
Alexandre Julliard491502b1997-11-01 19:08:16 +0000331typedef struct {
332 WORD wMid; /* manufacturer ID */
333 WORD wPid; /* product ID */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000334 MMVERSION vDriverVersion; /* version of the driver */
Alexandre Julliard491502b1997-11-01 19:08:16 +0000335 WCHAR szPname[MAXPNAMELEN]; /* product name (0 terminated string) */
336 DWORD dwFormats; /* formats supported */
337 WORD wChannels; /* number of channels supported */
338 WORD wReserved1;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000339} WAVEINCAPSW, *LPWAVEINCAPSW;
Alexandre Julliarda845b881998-06-01 10:44:35 +0000340DECL_WINELIB_TYPE_AW(WAVEINCAPS)
341DECL_WINELIB_TYPE_AW(LPWAVEINCAPS)
Alexandre Julliard58199531994-04-21 01:20:00 +0000342
343#define WAVE_INVALIDFORMAT 0x00000000 /* invalid format */
344#define WAVE_FORMAT_1M08 0x00000001 /* 11.025 kHz, Mono, 8-bit */
345#define WAVE_FORMAT_1S08 0x00000002 /* 11.025 kHz, Stereo, 8-bit */
346#define WAVE_FORMAT_1M16 0x00000004 /* 11.025 kHz, Mono, 16-bit */
347#define WAVE_FORMAT_1S16 0x00000008 /* 11.025 kHz, Stereo, 16-bit */
348#define WAVE_FORMAT_2M08 0x00000010 /* 22.05 kHz, Mono, 8-bit */
349#define WAVE_FORMAT_2S08 0x00000020 /* 22.05 kHz, Stereo, 8-bit */
350#define WAVE_FORMAT_2M16 0x00000040 /* 22.05 kHz, Mono, 16-bit */
351#define WAVE_FORMAT_2S16 0x00000080 /* 22.05 kHz, Stereo, 16-bit */
352#define WAVE_FORMAT_4M08 0x00000100 /* 44.1 kHz, Mono, 8-bit */
353#define WAVE_FORMAT_4S08 0x00000200 /* 44.1 kHz, Stereo, 8-bit */
354#define WAVE_FORMAT_4M16 0x00000400 /* 44.1 kHz, Mono, 16-bit */
355#define WAVE_FORMAT_4S16 0x00000800 /* 44.1 kHz, Stereo, 16-bit */
356
Alexandre Julliard491502b1997-11-01 19:08:16 +0000357/* General format structure common to all formats, same for Win16 and Win32 */
Alexandre Julliard58199531994-04-21 01:20:00 +0000358typedef struct {
Alexandre Julliard491502b1997-11-01 19:08:16 +0000359 WORD wFormatTag; /* format type */
360 WORD nChannels; /* number of channels */
361 DWORD nSamplesPerSec; /* sample rate */
362 DWORD nAvgBytesPerSec;/* for buffer estimation */
363 WORD nBlockAlign; /* block size of data */
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000364} WAVEFORMAT, *LPWAVEFORMAT;
Alexandre Julliard58199531994-04-21 01:20:00 +0000365
366#define WAVE_FORMAT_PCM 1
367
368typedef struct {
Alexandre Julliard491502b1997-11-01 19:08:16 +0000369 WAVEFORMAT wf;
370 WORD wBitsPerSample;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000371} PCMWAVEFORMAT, *LPPCMWAVEFORMAT;
Alexandre Julliard58199531994-04-21 01:20:00 +0000372
Bertho Stultiens27a0ced1999-02-14 09:41:42 +0000373#ifndef _WAVEFORMATEX_
374#define _WAVEFORMATEX_
Alexandre Julliard491502b1997-11-01 19:08:16 +0000375/* dito same for Win16 / Win32 */
376typedef struct {
377 WORD wFormatTag; /* format type */
378 WORD nChannels; /* number of channels (i.e. mono, stereo...) */
379 DWORD nSamplesPerSec; /* sample rate */
380 DWORD nAvgBytesPerSec;/* for buffer estimation */
381 WORD nBlockAlign; /* block size of data */
382 WORD wBitsPerSample; /* number of bits per sample of mono data */
383 WORD cbSize; /* the count in bytes of the size of */
384 /* extra information (after cbSize) */
Bertho Stultiens27a0ced1999-02-14 09:41:42 +0000385} WAVEFORMATEX, *LPWAVEFORMATEX, *NPWAVEFORMATEX, *PWAVEFORMATEX;
386#endif
Alexandre Julliard58199531994-04-21 01:20:00 +0000387
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000388UINT WINAPI waveOutGetNumDevs(void);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000389UINT WINAPI waveOutGetDevCapsA(UINT,LPWAVEOUTCAPSA,UINT);
390UINT WINAPI waveOutGetDevCapsW(UINT,LPWAVEOUTCAPSW,UINT);
391#define waveOutGetDevCaps WINELIB_NAME_AW(waveOutGetDevCaps)
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000392UINT WINAPI waveOutGetVolume(UINT,DWORD*);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000393UINT WINAPI waveOutSetVolume(UINT,DWORD);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000394UINT WINAPI waveOutGetErrorTextA(UINT,LPSTR,UINT);
395UINT WINAPI waveOutGetErrorTextW(UINT,LPWSTR,UINT);
396#define waveOutGetErrorText WINELIB_NAME_AW(waveOutGetErrorText)
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000397UINT WINAPI waveOutOpen(HWAVEOUT*,UINT,const LPWAVEFORMATEX,DWORD,DWORD,DWORD);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000398UINT WINAPI waveOutClose(HWAVEOUT);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000399UINT WINAPI waveOutPrepareHeader(HWAVEOUT,WAVEHDR*,UINT);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000400UINT WINAPI waveOutUnprepareHeader(HWAVEOUT,WAVEHDR*,UINT);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000401UINT WINAPI waveOutWrite(HWAVEOUT,WAVEHDR*,UINT);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000402UINT WINAPI waveOutPause(HWAVEOUT);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000403UINT WINAPI waveOutRestart(HWAVEOUT);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000404UINT WINAPI waveOutReset(HWAVEOUT);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000405UINT WINAPI waveOutBreakLoop(HWAVEOUT);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000406UINT WINAPI waveOutGetPosition(HWAVEOUT,LPMMTIME,UINT);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000407UINT WINAPI waveOutGetPitch(HWAVEOUT,DWORD*);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000408UINT WINAPI waveOutSetPitch(HWAVEOUT,DWORD);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000409UINT WINAPI waveOutGetPlaybackRate(HWAVEOUT,DWORD*);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000410UINT WINAPI waveOutSetPlaybackRate(HWAVEOUT,DWORD);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000411UINT WINAPI waveOutGetID(HWAVEOUT,UINT*);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000412DWORD WINAPI waveOutMessage(HWAVEOUT,UINT,DWORD,DWORD);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000413UINT WINAPI waveInGetNumDevs(void);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000414UINT WINAPI waveInGetDevCapsA(UINT,LPWAVEINCAPSA,UINT);
415UINT WINAPI waveInGetDevCapsW(UINT,LPWAVEINCAPSW,UINT);
416#define waveInGetDevCaps WINELIB_NAME_AW(waveInGetDevCaps)
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000417UINT WINAPI waveInGetErrorTextA(UINT,LPSTR,UINT);
418UINT WINAPI waveInGetErrorTextW(UINT,LPWSTR,UINT);
419#define waveInGetErrorText WINELIB_NAME_AW(waveInGetErrorText)
Eric Pouech668228a1999-09-05 16:39:23 +0000420UINT WINAPI waveInOpen(HWAVEIN*,UINT,const LPWAVEFORMATEX,DWORD,DWORD,DWORD);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000421UINT WINAPI waveInClose(HWAVEIN);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000422UINT WINAPI waveInPrepareHeader(HWAVEIN,WAVEHDR*,UINT);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000423UINT WINAPI waveInUnprepareHeader(HWAVEIN,WAVEHDR*,UINT);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000424UINT WINAPI waveInAddBuffer(HWAVEIN,WAVEHDR*,UINT);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000425UINT WINAPI waveInStart(HWAVEIN);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000426UINT WINAPI waveInStop(HWAVEIN);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000427UINT WINAPI waveInReset(HWAVEIN);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000428UINT WINAPI waveInGetPosition(HWAVEIN,LPMMTIME,UINT);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000429UINT WINAPI waveInGetID(HWAVEIN,UINT*);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000430DWORD WINAPI waveInMessage(HWAVEIN,UINT,DWORD,DWORD);
Alexandre Julliard58199531994-04-21 01:20:00 +0000431
432#define MIDIERR_UNPREPARED (MIDIERR_BASE + 0) /* header not prepared */
433#define MIDIERR_STILLPLAYING (MIDIERR_BASE + 1) /* still something playing */
434#define MIDIERR_NOMAP (MIDIERR_BASE + 2) /* no current map */
435#define MIDIERR_NOTREADY (MIDIERR_BASE + 3) /* hardware is still busy */
436#define MIDIERR_NODEVICE (MIDIERR_BASE + 4) /* port no longer connected */
437#define MIDIERR_INVALIDSETUP (MIDIERR_BASE + 5) /* invalid setup */
438#define MIDIERR_LASTERROR (MIDIERR_BASE + 5) /* last error in range */
439
Alexandre Julliarda3960291999-02-26 11:11:13 +0000440typedef LPDRVCALLBACK LPMIDICALLBACK;
Alexandre Julliard58199531994-04-21 01:20:00 +0000441#define MIDIPATCHSIZE 128
442typedef WORD PATCHARRAY[MIDIPATCHSIZE];
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000443typedef WORD *LPPATCHARRAY;
Alexandre Julliard58199531994-04-21 01:20:00 +0000444typedef WORD KEYARRAY[MIDIPATCHSIZE];
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000445typedef WORD *LPKEYARRAY;
Alexandre Julliard58199531994-04-21 01:20:00 +0000446
447#define MIM_OPEN MM_MIM_OPEN
448#define MIM_CLOSE MM_MIM_CLOSE
449#define MIM_DATA MM_MIM_DATA
450#define MIM_LONGDATA MM_MIM_LONGDATA
451#define MIM_ERROR MM_MIM_ERROR
452#define MIM_LONGERROR MM_MIM_LONGERROR
Eric Pouech843ea291999-09-22 16:46:22 +0000453#define MIM_MOREDATA MM_MIM_MOREDATA
454
Alexandre Julliard58199531994-04-21 01:20:00 +0000455#define MOM_OPEN MM_MOM_OPEN
456#define MOM_CLOSE MM_MOM_CLOSE
457#define MOM_DONE MM_MOM_DONE
Eric Pouech843ea291999-09-22 16:46:22 +0000458#define MOM_POSITIONCB MM_MOM_POSITIONCB
Alexandre Julliard58199531994-04-21 01:20:00 +0000459
Alexandre Julliard54c27111998-03-29 19:44:57 +0000460/* device ID for MIDI mapper */
461
Alexandre Julliard58199531994-04-21 01:20:00 +0000462#define MIDIMAPPER (-1)
463#define MIDI_MAPPER (-1)
464
Eric Pouech29ebdb71999-12-05 02:19:24 +0000465/* Only on Win95 and up */
466#define MIDI_IO_STATUS 0x00000020L
467
Alexandre Julliard58199531994-04-21 01:20:00 +0000468/* flags for wFlags parm of
469 midiOutCachePatches(),
470 midiOutCacheDrumPatches() */
471#define MIDI_CACHE_ALL 1
472#define MIDI_CACHE_BESTFIT 2
473#define MIDI_CACHE_QUERY 3
474#define MIDI_UNCACHE 4
475
476typedef struct {
Alexandre Julliard491502b1997-11-01 19:08:16 +0000477 WORD wMid; /* manufacturer ID */
478 WORD wPid; /* product ID */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000479 MMVERSION vDriverVersion; /* version of the driver */
Alexandre Julliard491502b1997-11-01 19:08:16 +0000480 CHAR szPname[MAXPNAMELEN];/* product name (NULL terminated string) */
481 WORD wTechnology; /* type of device */
482 WORD wVoices; /* # of voices (internal synth only) */
483 WORD wNotes; /* max # of notes (internal synth only) */
484 WORD wChannelMask; /* channels used (internal synth only) */
485 DWORD dwSupport; /* functionality supported by driver */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000486} MIDIOUTCAPSA, *LPMIDIOUTCAPSA;
Alexandre Julliard491502b1997-11-01 19:08:16 +0000487
488typedef struct {
489 WORD wMid; /* manufacturer ID */
490 WORD wPid; /* product ID */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000491 MMVERSION vDriverVersion; /* version of the driver */
Alexandre Julliard491502b1997-11-01 19:08:16 +0000492 WCHAR szPname[MAXPNAMELEN];/* product name (NULL terminated string) */
493 WORD wTechnology; /* type of device */
494 WORD wVoices; /* # of voices (internal synth only) */
495 WORD wNotes; /* max # of notes (internal synth only) */
496 WORD wChannelMask; /* channels used (internal synth only) */
497 DWORD dwSupport; /* functionality supported by driver */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000498} MIDIOUTCAPSW, *LPMIDIOUTCAPSW;
Alexandre Julliard491502b1997-11-01 19:08:16 +0000499
Alexandre Julliarda845b881998-06-01 10:44:35 +0000500DECL_WINELIB_TYPE_AW(MIDIOUTCAPS)
501DECL_WINELIB_TYPE_AW(LPMIDIOUTCAPS)
Alexandre Julliard58199531994-04-21 01:20:00 +0000502
503#define MOD_MIDIPORT 1 /* output port */
504#define MOD_SYNTH 2 /* generic internal synth */
505#define MOD_SQSYNTH 3 /* square wave internal synth */
506#define MOD_FMSYNTH 4 /* FM internal synth */
507#define MOD_MAPPER 5 /* MIDI mapper */
508
Alexandre Julliard491502b1997-11-01 19:08:16 +0000509#define MIDICAPS_VOLUME 0x0001 /* supports volume control */
510#define MIDICAPS_LRVOLUME 0x0002 /* separate left-right volume control */
511#define MIDICAPS_CACHE 0x0004
Eric Pouech9b3801f1998-11-24 14:50:42 +0000512#define MIDICAPS_STREAM 0x0008 /* capable of supporting stream buffer */
Alexandre Julliard58199531994-04-21 01:20:00 +0000513
514typedef struct {
Alexandre Julliard491502b1997-11-01 19:08:16 +0000515 WORD wMid; /* manufacturer ID */
516 WORD wPid; /* product ID */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000517 MMVERSION vDriverVersion; /* version of the driver */
Alexandre Julliard491502b1997-11-01 19:08:16 +0000518 CHAR szPname[MAXPNAMELEN];/* product name (NULL terminated string) */
519 DWORD dwSupport; /* included in win95 and higher */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000520} MIDIINCAPSA, *LPMIDIINCAPSA;
Alexandre Julliard491502b1997-11-01 19:08:16 +0000521
522typedef struct {
523 WORD wMid; /* manufacturer ID */
524 WORD wPid; /* product ID */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000525 MMVERSION vDriverVersion; /* version of the driver */
Alexandre Julliard491502b1997-11-01 19:08:16 +0000526 WCHAR szPname[MAXPNAMELEN];/* product name (NULL terminated string) */
527 DWORD dwSupport; /* included in win95 and higher */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000528} MIDIINCAPSW, *LPMIDIINCAPSW;
Alexandre Julliard491502b1997-11-01 19:08:16 +0000529
Alexandre Julliarda845b881998-06-01 10:44:35 +0000530DECL_WINELIB_TYPE_AW(MIDIINCAPS)
531DECL_WINELIB_TYPE_AW(LPMIDIINCAPS)
Alexandre Julliard491502b1997-11-01 19:08:16 +0000532
Eric Pouech9b3801f1998-11-24 14:50:42 +0000533/* It seems that Win32 has a slightly different structure than Win 16.
534 * sigh....
535 */
Eric Pouech28237782000-01-04 01:04:48 +0000536typedef struct midihdr_tag {
Eric Pouech9b3801f1998-11-24 14:50:42 +0000537 LPSTR lpData; /* pointer to locked data block */
538 DWORD dwBufferLength; /* length of data in data block */
539 DWORD dwBytesRecorded;/* used for input only */
540 DWORD dwUser; /* for client's use */
541 DWORD dwFlags; /* assorted flags (see defines) */
542 struct midihdr_tag *lpNext; /* reserved for driver */
543 DWORD reserved; /* reserved for driver */
544 DWORD dwOffset; /* offset of playback in case of
545 * MIDISTRM buffer */
546 DWORD dwReserved[4]; /* reserved for driver */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000547} MIDIHDR, *LPMIDIHDR;
Eric Pouech9b3801f1998-11-24 14:50:42 +0000548
Alexandre Julliard58199531994-04-21 01:20:00 +0000549#define MHDR_DONE 0x00000001 /* done bit */
550#define MHDR_PREPARED 0x00000002 /* set if header prepared */
551#define MHDR_INQUEUE 0x00000004 /* reserved for driver */
Eric Pouecha4165ae1999-04-11 12:14:17 +0000552#define MHDR_ISSTRM 0x00000008 /* data is sent by Stream functions */
553
Eric Pouech9b3801f1998-11-24 14:50:42 +0000554typedef struct {
555 DWORD cbStruct;
556 DWORD dwTempo;
557} MIDIPROPTEMPO, *LPMIDIPROPTEMPO;
558
559typedef struct {
560 DWORD cbStruct;
561 DWORD dwTimeDiv;
562} MIDIPROPTIMEDIV, *LPMIDIPROPTIMEDIV;
563
564#define MIDIPROP_GET 0x40000000
565#define MIDIPROP_SET 0x80000000
566#define MIDIPROP_TEMPO 0x00000002
567#define MIDIPROP_TIMEDIV 0x00000001
568
569typedef struct {
570 DWORD dwDeltaTime; /* Time, in MIDI ticks, between the previous
571 * event and the current event. */
572 DWORD dwStreamID; /* Reserved; must be zero. */
573 DWORD dwEvent; /* event => see MEVT_XXX macros */
Alexandre Julliardab170a92000-09-27 00:25:24 +0000574 DWORD dwParms[1]; /* extra pmts to dwEvent if F_LONG is set */
Eric Pouech9b3801f1998-11-24 14:50:42 +0000575} MIDIEVENT, *LPMIDIEVENT;
576
577#define MEVT_EVENTTYPE(x) ((BYTE) (((x)>>24)&0xFF))
578#define MEVT_EVENTPARM(x) ((DWORD) ((x)&0x00FFFFFFL))
579
Eric Pouecha4165ae1999-04-11 12:14:17 +0000580#define MEVT_F_CALLBACK 0x40000000l
581#define MEVT_F_LONG 0x80000000l
582#define MEVT_F_SHORT 0x00000000l
583#define MEVT_COMMENT ((BYTE)0x82)
584#define MEVT_LONGMSG ((BYTE)0x80)
585#define MEVT_NOP ((BYTE)0x02)
586#define MEVT_SHORTMSG ((BYTE)0x00)
587#define MEVT_TEMPO ((BYTE)0x01)
588#define MEVT_VERSION ((BYTE)0x84)
Alexandre Julliard58199531994-04-21 01:20:00 +0000589
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000590UINT WINAPI midiOutGetNumDevs(void);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000591UINT WINAPI midiOutGetDevCapsA(UINT,LPMIDIOUTCAPSA,UINT);
592UINT WINAPI midiOutGetDevCapsW(UINT,LPMIDIOUTCAPSW,UINT);
593#define midiOutGetDevCaps WINELIB_NAME_AW(midiOutGetDevCaps)
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000594UINT WINAPI midiOutGetVolume(UINT,DWORD*);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000595UINT WINAPI midiOutSetVolume(UINT,DWORD);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000596UINT WINAPI midiOutGetErrorTextA(UINT,LPSTR,UINT);
597UINT WINAPI midiOutGetErrorTextW(UINT,LPWSTR,UINT);
598#define midiOutGetErrorText WINELIB_NAME_AW(midiOutGetErrorText)
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000599UINT WINAPI midiOutOpen(HMIDIOUT*,UINT,DWORD,DWORD,DWORD);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000600UINT WINAPI midiOutClose(HMIDIOUT);
Eric Pouecha4165ae1999-04-11 12:14:17 +0000601UINT WINAPI midiOutPrepareHeader(HMIDIOUT,MIDIHDR*,UINT);
Eric Pouecha4165ae1999-04-11 12:14:17 +0000602UINT WINAPI midiOutUnprepareHeader(HMIDIOUT,MIDIHDR*,UINT);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000603UINT WINAPI midiOutShortMsg(HMIDIOUT,DWORD);
Eric Pouecha4165ae1999-04-11 12:14:17 +0000604UINT WINAPI midiOutLongMsg(HMIDIOUT,MIDIHDR*,UINT);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000605UINT WINAPI midiOutReset(HMIDIOUT);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000606UINT WINAPI midiOutCachePatches(HMIDIOUT,UINT,WORD*,UINT);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000607UINT WINAPI midiOutCacheDrumPatches(HMIDIOUT,UINT,WORD*,UINT);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000608UINT WINAPI midiOutGetID(HMIDIOUT,UINT*);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000609DWORD WINAPI midiOutMessage(HMIDIOUT,UINT,DWORD,DWORD);
Alexandre Julliard58199531994-04-21 01:20:00 +0000610
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000611UINT WINAPI midiInGetNumDevs(void);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000612UINT WINAPI midiInGetDevCapsA(UINT,LPMIDIINCAPSA,UINT);
613UINT WINAPI midiInGetDevCapsW(UINT,LPMIDIINCAPSW,UINT);
614#define midiInGetDevCaps WINELIB_NAME_AW(midiInGetDevCaps)
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000615UINT WINAPI midiInGetErrorTextA(UINT,LPSTR,UINT);
616UINT WINAPI midiInGetErrorTextW(UINT,LPWSTR,UINT);
617#define midiInGetErrorText WINELIB_NAME_AW(midiInGetErrorText)
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000618UINT WINAPI midiInOpen(HMIDIIN*,UINT,DWORD,DWORD,DWORD);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000619UINT WINAPI midiInClose(HMIDIIN);
Eric Pouecha4165ae1999-04-11 12:14:17 +0000620UINT WINAPI midiInPrepareHeader(HMIDIIN,MIDIHDR*,UINT);
Eric Pouecha4165ae1999-04-11 12:14:17 +0000621UINT WINAPI midiInUnprepareHeader(HMIDIIN,MIDIHDR*,UINT);
Eric Pouecha4165ae1999-04-11 12:14:17 +0000622UINT WINAPI midiInAddBuffer(HMIDIIN,MIDIHDR*,UINT);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000623UINT WINAPI midiInStart(HMIDIIN);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000624UINT WINAPI midiInStop(HMIDIIN);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000625UINT WINAPI midiInReset(HMIDIIN);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000626UINT WINAPI midiInGetID(HMIDIIN,UINT*);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000627DWORD WINAPI midiInMessage(HMIDIIN,UINT,DWORD,DWORD);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000628MMRESULT WINAPI midiStreamClose(HMIDISTRM hms);
629MMRESULT WINAPI midiStreamOpen(HMIDISTRM* phms, LPUINT uDeviceID, DWORD cMidi,
630 DWORD dwCallback, DWORD dwInstance, DWORD fdwOpen);
Eric Pouecha4165ae1999-04-11 12:14:17 +0000631MMRESULT WINAPI midiStreamOut(HMIDISTRM hms, LPMIDIHDR lpMidiHdr, UINT cbMidiHdr);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000632MMRESULT WINAPI midiStreamPause(HMIDISTRM hms);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000633MMRESULT WINAPI midiStreamPosition(HMIDISTRM hms, LPMMTIME lpmmt, UINT cbmmt);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000634MMRESULT WINAPI midiStreamProperty(HMIDISTRM hms, LPBYTE lpPropData, DWORD dwProperty);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000635MMRESULT WINAPI midiStreamRestart(HMIDISTRM hms);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000636MMRESULT WINAPI midiStreamStop(HMIDISTRM hms);
Eric Pouech9b3801f1998-11-24 14:50:42 +0000637
Alexandre Julliard58199531994-04-21 01:20:00 +0000638#define AUX_MAPPER (-1)
639
640typedef struct {
Alexandre Julliard491502b1997-11-01 19:08:16 +0000641 WORD wMid; /* manufacturer ID */
642 WORD wPid; /* product ID */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000643 MMVERSION vDriverVersion; /* version of the driver */
Alexandre Julliard491502b1997-11-01 19:08:16 +0000644 CHAR szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
645 WORD wTechnology; /* type of device */
646 WORD wReserved1; /* padding */
647 DWORD dwSupport; /* functionality supported by driver */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000648} AUXCAPSA, *LPAUXCAPSA;
Alexandre Julliard491502b1997-11-01 19:08:16 +0000649
650typedef struct {
651 WORD wMid; /* manufacturer ID */
652 WORD wPid; /* product ID */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000653 MMVERSION vDriverVersion; /* version of the driver */
Alexandre Julliard491502b1997-11-01 19:08:16 +0000654 WCHAR szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
655 WORD wTechnology; /* type of device */
656 WORD wReserved1; /* padding */
657 DWORD dwSupport; /* functionality supported by driver */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000658} AUXCAPSW, *LPAUXCAPSW;
Alexandre Julliard58199531994-04-21 01:20:00 +0000659
Steve Langasekc0dabf02000-01-12 04:57:38 +0000660DECL_WINELIB_TYPE_AW(AUXCAPS)
661DECL_WINELIB_TYPE_AW(LPAUXCAPS)
662
Alexandre Julliard58199531994-04-21 01:20:00 +0000663#define AUXCAPS_CDAUDIO 1 /* audio from internal CD-ROM drive */
664#define AUXCAPS_AUXIN 2 /* audio from auxiliary input jacks */
665
666#define AUXCAPS_VOLUME 0x0001 /* supports volume control */
667#define AUXCAPS_LRVOLUME 0x0002 /* separate left-right volume control */
668
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000669UINT WINAPI auxGetNumDevs(void);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000670UINT WINAPI auxGetDevCapsA(UINT,LPAUXCAPSA,UINT);
671UINT WINAPI auxGetDevCapsW(UINT,LPAUXCAPSW,UINT);
672#define auxGetDevCaps WINELIB_NAME_AW(auxGetDevCaps)
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000673UINT WINAPI auxSetVolume(UINT,DWORD);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000674UINT WINAPI auxGetVolume(UINT,LPDWORD);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000675DWORD WINAPI auxOutMessage(UINT,UINT,DWORD,DWORD);
Alexandre Julliard58199531994-04-21 01:20:00 +0000676
677#define TIMERR_NOERROR (0) /* no error */
678#define TIMERR_NOCANDO (TIMERR_BASE+1) /* request not completed */
679#define TIMERR_STRUCT (TIMERR_BASE+33) /* time struct size */
680
Francois Gougetae41e8c2000-06-11 20:07:58 +0000681typedef void CALLBACK (*LPTIMECALLBACK)(UINT uTimerID, UINT uMessage, DWORD dwUser, DWORD dw1, DWORD dw2);
Alexandre Julliard58199531994-04-21 01:20:00 +0000682
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000683#define TIME_ONESHOT 0x0000 /* program timer for single event */
684#define TIME_PERIODIC 0x0001 /* program for continuous periodic event */
685#define TIME_CALLBACK_FUNCTION 0x0000 /* callback is function */
686#define TIME_CALLBACK_EVENT_SET 0x0010 /* callback is event - use SetEvent */
687#define TIME_CALLBACK_EVENT_PULSE 0x0020 /* callback is event - use PulseEvent */
Alexandre Julliard58199531994-04-21 01:20:00 +0000688
689typedef struct {
Alexandre Julliarda3960291999-02-26 11:11:13 +0000690 UINT wPeriodMin;
691 UINT wPeriodMax;
692} TIMECAPS, *LPTIMECAPS;
Alexandre Julliard44ed71f1997-12-21 19:17:50 +0000693
Alexandre Julliard44ed71f1997-12-21 19:17:50 +0000694
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000695MMRESULT WINAPI timeGetSystemTime(LPMMTIME,UINT);
696DWORD WINAPI timeGetTime(void); /* same for win32/win16 */
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000697MMRESULT WINAPI timeSetEvent(UINT,UINT,LPTIMECALLBACK,DWORD,UINT);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000698MMRESULT WINAPI timeKillEvent(UINT);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000699MMRESULT WINAPI timeGetDevCaps(LPTIMECAPS,UINT);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000700MMRESULT WINAPI timeBeginPeriod(UINT);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000701MMRESULT WINAPI timeEndPeriod(UINT);
Alexandre Julliard58199531994-04-21 01:20:00 +0000702
703#define JOYERR_NOERROR (0) /* no error */
704#define JOYERR_PARMS (JOYERR_BASE+5) /* bad parameters */
705#define JOYERR_NOCANDO (JOYERR_BASE+6) /* request not completed */
706#define JOYERR_UNPLUGGED (JOYERR_BASE+7) /* joystick is unplugged */
707
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000708/* JOYINFO, JOYINFOEX, MM_JOY* */
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000709#define JOY_BUTTON1 0x0001
710#define JOY_BUTTON2 0x0002
711#define JOY_BUTTON3 0x0004
712#define JOY_BUTTON4 0x0008
713#define JOY_BUTTON1CHG 0x0100
714#define JOY_BUTTON2CHG 0x0200
715#define JOY_BUTTON3CHG 0x0400
716#define JOY_BUTTON4CHG 0x0800
Alexandre Julliard58199531994-04-21 01:20:00 +0000717
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000718#define JOYSTICKID1 0
719#define JOYSTICKID2 1
Alexandre Julliard58199531994-04-21 01:20:00 +0000720
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000721/* JOYCAPS.wCaps */
722#define JOYCAPS_HASZ 0x0001
723#define JOYCAPS_HASR 0x0002
724#define JOYCAPS_HASU 0x0004
725#define JOYCAPS_HASV 0x0008
726#define JOYCAPS_HASPOV 0x0010
727#define JOYCAPS_POV4DIR 0x0020
728#define JOYCAPS_POVCTS 0x0040
729
730/* JOYINFOEX stuff */
731#define JOY_POVCENTERED (WORD) -1
732#define JOY_POVFORWARD 0
733#define JOY_POVRIGHT 9000
734#define JOY_POVBACKWARD 18000
735#define JOY_POVLEFT 27000
736
737#define JOY_RETURNX 0x00000001
738#define JOY_RETURNY 0x00000002
739#define JOY_RETURNZ 0x00000004
740#define JOY_RETURNR 0x00000008
741#define JOY_RETURNU 0x00000010
742#define JOY_RETURNV 0x00000020
743#define JOY_RETURNPOV 0x00000040
744#define JOY_RETURNBUTTONS 0x00000080
745#define JOY_RETURNRAWDATA 0x00000100
746#define JOY_RETURNPOVCTS 0x00000200
747#define JOY_RETURNCENTERED 0x00000400
748#define JOY_USEDEADZONE 0x00000800
749#define JOY_RETURNALL (JOY_RETURNX | JOY_RETURNY | JOY_RETURNZ | \
750 JOY_RETURNR | JOY_RETURNU | JOY_RETURNV | \
751 JOY_RETURNPOV | JOY_RETURNBUTTONS)
752#define JOY_CAL_READALWAYS 0x00010000
753#define JOY_CAL_READXYONLY 0x00020000
754#define JOY_CAL_READ3 0x00040000
755#define JOY_CAL_READ4 0x00080000
756#define JOY_CAL_READXONLY 0x00100000
757#define JOY_CAL_READYONLY 0x00200000
758#define JOY_CAL_READ5 0x00400000
759#define JOY_CAL_READ6 0x00800000
760#define JOY_CAL_READZONLY 0x01000000
761#define JOY_CAL_READRONLY 0x02000000
762#define JOY_CAL_READUONLY 0x04000000
763#define JOY_CAL_READVONLY 0x08000000
764
Alexandre Julliard58199531994-04-21 01:20:00 +0000765typedef struct {
Alexandre Julliard44ed71f1997-12-21 19:17:50 +0000766 WORD wMid;
767 WORD wPid;
768 CHAR szPname[MAXPNAMELEN];
Alexandre Julliarda3960291999-02-26 11:11:13 +0000769 UINT wXmin;
770 UINT wXmax;
771 UINT wYmin;
772 UINT wYmax;
773 UINT wZmin;
774 UINT wZmax;
775 UINT wNumButtons;
776 UINT wPeriodMin;
777 UINT wPeriodMax;
778 UINT wRmin;
779 UINT wRmax;
780 UINT wUmin;
781 UINT wUmax;
782 UINT wVmin;
783 UINT wVmax;
784 UINT wCaps;
785 UINT wMaxAxes;
786 UINT wNumAxes;
787 UINT wMaxButtons;
Alexandre Julliard44ed71f1997-12-21 19:17:50 +0000788 CHAR szRegKey[MAXPNAMELEN];
789 CHAR szOEMVxD[MAX_JOYSTICKOEMVXDNAME];
Alexandre Julliarda3960291999-02-26 11:11:13 +0000790} JOYCAPSA, *LPJOYCAPSA;
Alexandre Julliard44ed71f1997-12-21 19:17:50 +0000791
792typedef struct {
793 WORD wMid;
794 WORD wPid;
795 WCHAR szPname[MAXPNAMELEN];
Alexandre Julliarda3960291999-02-26 11:11:13 +0000796 UINT wXmin;
797 UINT wXmax;
798 UINT wYmin;
799 UINT wYmax;
800 UINT wZmin;
801 UINT wZmax;
802 UINT wNumButtons;
803 UINT wPeriodMin;
804 UINT wPeriodMax;
805 UINT wRmin;
806 UINT wRmax;
807 UINT wUmin;
808 UINT wUmax;
809 UINT wVmin;
810 UINT wVmax;
811 UINT wCaps;
812 UINT wMaxAxes;
813 UINT wNumAxes;
814 UINT wMaxButtons;
Alexandre Julliard44ed71f1997-12-21 19:17:50 +0000815 WCHAR szRegKey[MAXPNAMELEN];
816 WCHAR szOEMVxD[MAX_JOYSTICKOEMVXDNAME];
Alexandre Julliarda3960291999-02-26 11:11:13 +0000817} JOYCAPSW, *LPJOYCAPSW;
Alexandre Julliarda845b881998-06-01 10:44:35 +0000818DECL_WINELIB_TYPE_AW(JOYCAPS)
819DECL_WINELIB_TYPE_AW(LPJOYCAPS)
Alexandre Julliard58199531994-04-21 01:20:00 +0000820
821typedef struct {
Alexandre Julliarda3960291999-02-26 11:11:13 +0000822 UINT wXpos;
823 UINT wYpos;
824 UINT wZpos;
825 UINT wButtons;
826} JOYINFO, *LPJOYINFO;
Alexandre Julliard44ed71f1997-12-21 19:17:50 +0000827
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000828typedef struct {
829 DWORD dwSize; /* size of structure */
830 DWORD dwFlags; /* flags to indicate what to return */
831 DWORD dwXpos; /* x position */
832 DWORD dwYpos; /* y position */
833 DWORD dwZpos; /* z position */
834 DWORD dwRpos; /* rudder/4th axis position */
835 DWORD dwUpos; /* 5th axis position */
836 DWORD dwVpos; /* 6th axis position */
837 DWORD dwButtons; /* button states */
838 DWORD dwButtonNumber; /* current button number pressed */
839 DWORD dwPOV; /* point of view state */
840 DWORD dwReserved1; /* reserved for communication between winmm & driver */
841 DWORD dwReserved2; /* reserved for future expansion */
842} JOYINFOEX,*LPJOYINFOEX;
843
Alexandre Julliard44ed71f1997-12-21 19:17:50 +0000844
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000845MMRESULT WINAPI joyGetDevCapsA(UINT,LPJOYCAPSA,UINT);
846MMRESULT WINAPI joyGetDevCapsW(UINT,LPJOYCAPSW,UINT);
Alexandre Julliard44ed71f1997-12-21 19:17:50 +0000847#define joyGetDevCaps WINELIB_NAME_AW(joyGetDevCaps)
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000848UINT WINAPI joyGetNumDevs(void);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000849MMRESULT WINAPI joyGetPos(UINT,LPJOYINFO);
850MMRESULT WINAPI joyGetPosEx(UINT,LPJOYINFOEX);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000851MMRESULT WINAPI joyGetThreshold(UINT,UINT*);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000852MMRESULT WINAPI joyReleaseCapture(UINT);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000853MMRESULT WINAPI joySetCapture(HWND,UINT,UINT,BOOL);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000854MMRESULT WINAPI joySetThreshold(UINT,UINT);
Alexandre Julliard58199531994-04-21 01:20:00 +0000855
Eric Pouechad863111999-03-22 14:48:40 +0000856#define MIXERR_BASE 1024
857#define MIXERR_INVALLINE (MIXERR_BASE + 0)
858#define MIXERR_INVALCONTROL (MIXERR_BASE + 1)
859#define MIXERR_INVALVALUE (MIXERR_BASE + 2)
860#define MIXERR_LASTERROR (MIXERR_BASE + 2)
861
Alexandre Julliard491502b1997-11-01 19:08:16 +0000862typedef struct {
Alexandre Julliard491502b1997-11-01 19:08:16 +0000863 WORD wMid;
864 WORD wPid;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000865 MMVERSION vDriverVersion;
Alexandre Julliard491502b1997-11-01 19:08:16 +0000866 CHAR szPname[MAXPNAMELEN];
867 DWORD fdwSupport;
868 DWORD cDestinations;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000869} MIXERCAPSA,*LPMIXERCAPSA;
Alexandre Julliard491502b1997-11-01 19:08:16 +0000870
871typedef struct {
872 WORD wMid;
873 WORD wPid;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000874 MMVERSION vDriverVersion;
Alexandre Julliard491502b1997-11-01 19:08:16 +0000875 WCHAR szPname[MAXPNAMELEN];
876 DWORD fdwSupport;
877 DWORD cDestinations;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000878} MIXERCAPSW,*LPMIXERCAPSW;
Alexandre Julliard491502b1997-11-01 19:08:16 +0000879
Alexandre Julliarda845b881998-06-01 10:44:35 +0000880DECL_WINELIB_TYPE_AW(MIXERCAPS)
881DECL_WINELIB_TYPE_AW(LPMIXERCAPS)
Alexandre Julliard491502b1997-11-01 19:08:16 +0000882
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000883#define MIXER_SHORT_NAME_CHARS 16
884#define MIXER_LONG_NAME_CHARS 64
Alexandre Julliard491502b1997-11-01 19:08:16 +0000885
886/* MIXERLINE.fdwLine */
887#define MIXERLINE_LINEF_ACTIVE 0x00000001
888#define MIXERLINE_LINEF_DISCONNECTED 0x00008000
889#define MIXERLINE_LINEF_SOURCE 0x80000000
890
Eric Pouech668228a1999-09-05 16:39:23 +0000891/* Mixer flags */
892#define MIXER_OBJECTF_HANDLE 0x80000000L
893#define MIXER_OBJECTF_MIXER 0x00000000L
894#define MIXER_OBJECTF_HMIXER (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_MIXER)
895#define MIXER_OBJECTF_WAVEOUT 0x10000000L
896#define MIXER_OBJECTF_HWAVEOUT (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_WAVEOUT)
897#define MIXER_OBJECTF_WAVEIN 0x20000000L
898#define MIXER_OBJECTF_HWAVEIN (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_WAVEIN)
899#define MIXER_OBJECTF_MIDIOUT 0x30000000L
900#define MIXER_OBJECTF_HMIDIOUT (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_MIDIOUT)
901#define MIXER_OBJECTF_MIDIIN 0x40000000L
902#define MIXER_OBJECTF_HMIDIIN (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_MIDIIN)
903#define MIXER_OBJECTF_AUX 0x50000000L
904
Alexandre Julliard491502b1997-11-01 19:08:16 +0000905/* MIXERLINE.dwComponentType */
906/* component types for destinations and sources */
907#define MIXERLINE_COMPONENTTYPE_DST_FIRST 0x00000000L
908#define MIXERLINE_COMPONENTTYPE_DST_UNDEFINED (MIXERLINE_COMPONENTTYPE_DST_FIRST + 0)
909#define MIXERLINE_COMPONENTTYPE_DST_DIGITAL (MIXERLINE_COMPONENTTYPE_DST_FIRST + 1)
910#define MIXERLINE_COMPONENTTYPE_DST_LINE (MIXERLINE_COMPONENTTYPE_DST_FIRST + 2)
911#define MIXERLINE_COMPONENTTYPE_DST_MONITOR (MIXERLINE_COMPONENTTYPE_DST_FIRST + 3)
912#define MIXERLINE_COMPONENTTYPE_DST_SPEAKERS (MIXERLINE_COMPONENTTYPE_DST_FIRST + 4)
913#define MIXERLINE_COMPONENTTYPE_DST_HEADPHONES (MIXERLINE_COMPONENTTYPE_DST_FIRST + 5)
914#define MIXERLINE_COMPONENTTYPE_DST_TELEPHONE (MIXERLINE_COMPONENTTYPE_DST_FIRST + 6)
915#define MIXERLINE_COMPONENTTYPE_DST_WAVEIN (MIXERLINE_COMPONENTTYPE_DST_FIRST + 7)
916#define MIXERLINE_COMPONENTTYPE_DST_VOICEIN (MIXERLINE_COMPONENTTYPE_DST_FIRST + 8)
917#define MIXERLINE_COMPONENTTYPE_DST_LAST (MIXERLINE_COMPONENTTYPE_DST_FIRST + 8)
918
919#define MIXERLINE_COMPONENTTYPE_SRC_FIRST 0x00001000L
920#define MIXERLINE_COMPONENTTYPE_SRC_UNDEFINED (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 0)
921#define MIXERLINE_COMPONENTTYPE_SRC_DIGITAL (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 1)
922#define MIXERLINE_COMPONENTTYPE_SRC_LINE (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 2)
923#define MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 3)
924#define MIXERLINE_COMPONENTTYPE_SRC_SYNTHESIZER (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 4)
925#define MIXERLINE_COMPONENTTYPE_SRC_COMPACTDISC (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 5)
926#define MIXERLINE_COMPONENTTYPE_SRC_TELEPHONE (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 6)
927#define MIXERLINE_COMPONENTTYPE_SRC_PCSPEAKER (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 7)
928#define MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 8)
929#define MIXERLINE_COMPONENTTYPE_SRC_AUXILIARY (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 9)
930#define MIXERLINE_COMPONENTTYPE_SRC_ANALOG (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 10)
931#define MIXERLINE_COMPONENTTYPE_SRC_LAST (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 10)
932
933/* MIXERLINE.Target.dwType */
934#define MIXERLINE_TARGETTYPE_UNDEFINED 0
935#define MIXERLINE_TARGETTYPE_WAVEOUT 1
936#define MIXERLINE_TARGETTYPE_WAVEIN 2
937#define MIXERLINE_TARGETTYPE_MIDIOUT 3
938#define MIXERLINE_TARGETTYPE_MIDIIN 4
939#define MIXERLINE_TARGETTYPE_AUX 5
940
941typedef struct {
Alexandre Julliard491502b1997-11-01 19:08:16 +0000942 DWORD cbStruct;
943 DWORD dwDestination;
944 DWORD dwSource;
945 DWORD dwLineID;
946 DWORD fdwLine;
947 DWORD dwUser;
948 DWORD dwComponentType;
949 DWORD cChannels;
950 DWORD cConnections;
951 DWORD cControls;
952 CHAR szShortName[MIXER_SHORT_NAME_CHARS];
953 CHAR szName[MIXER_LONG_NAME_CHARS];
954 struct {
955 DWORD dwType;
956 DWORD dwDeviceID;
957 WORD wMid;
958 WORD wPid;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000959 MMVERSION vDriverVersion;
Alexandre Julliard491502b1997-11-01 19:08:16 +0000960 CHAR szPname[MAXPNAMELEN];
961 } Target;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000962} MIXERLINEA, *LPMIXERLINEA;
Alexandre Julliard491502b1997-11-01 19:08:16 +0000963
964typedef struct {
965 DWORD cbStruct;
966 DWORD dwDestination;
967 DWORD dwSource;
968 DWORD dwLineID;
969 DWORD fdwLine;
970 DWORD dwUser;
971 DWORD dwComponentType;
972 DWORD cChannels;
973 DWORD cConnections;
974 DWORD cControls;
975 WCHAR szShortName[MIXER_SHORT_NAME_CHARS];
976 WCHAR szName[MIXER_LONG_NAME_CHARS];
977 struct {
978 DWORD dwType;
979 DWORD dwDeviceID;
980 WORD wMid;
981 WORD wPid;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000982 MMVERSION vDriverVersion;
Alexandre Julliard491502b1997-11-01 19:08:16 +0000983 WCHAR szPname[MAXPNAMELEN];
984 } Target;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000985} MIXERLINEW, *LPMIXERLINEW;
Alexandre Julliard491502b1997-11-01 19:08:16 +0000986
Alexandre Julliarda845b881998-06-01 10:44:35 +0000987DECL_WINELIB_TYPE_AW(MIXERLINE)
988DECL_WINELIB_TYPE_AW(LPMIXERLINE)
Alexandre Julliard491502b1997-11-01 19:08:16 +0000989
990/* MIXERCONTROL.fdwControl */
Eric Pouecha9ffdcf1999-03-15 15:42:26 +0000991#define MIXERCONTROL_CONTROLF_UNIFORM 0x00000001L
992#define MIXERCONTROL_CONTROLF_MULTIPLE 0x00000002L
993#define MIXERCONTROL_CONTROLF_DISABLED 0x80000000L
Alexandre Julliard491502b1997-11-01 19:08:16 +0000994
995/* MIXERCONTROL_CONTROLTYPE_xxx building block defines */
996#define MIXERCONTROL_CT_CLASS_MASK 0xF0000000L
997#define MIXERCONTROL_CT_CLASS_CUSTOM 0x00000000L
998#define MIXERCONTROL_CT_CLASS_METER 0x10000000L
999#define MIXERCONTROL_CT_CLASS_SWITCH 0x20000000L
1000#define MIXERCONTROL_CT_CLASS_NUMBER 0x30000000L
1001#define MIXERCONTROL_CT_CLASS_SLIDER 0x40000000L
1002#define MIXERCONTROL_CT_CLASS_FADER 0x50000000L
1003#define MIXERCONTROL_CT_CLASS_TIME 0x60000000L
1004#define MIXERCONTROL_CT_CLASS_LIST 0x70000000L
1005
1006#define MIXERCONTROL_CT_SUBCLASS_MASK 0x0F000000L
1007
1008#define MIXERCONTROL_CT_SC_SWITCH_BOOLEAN 0x00000000L
1009#define MIXERCONTROL_CT_SC_SWITCH_BUTTON 0x01000000L
1010
1011#define MIXERCONTROL_CT_SC_METER_POLLED 0x00000000L
1012
1013#define MIXERCONTROL_CT_SC_TIME_MICROSECS 0x00000000L
1014#define MIXERCONTROL_CT_SC_TIME_MILLISECS 0x01000000L
1015
1016#define MIXERCONTROL_CT_SC_LIST_SINGLE 0x00000000L
1017#define MIXERCONTROL_CT_SC_LIST_MULTIPLE 0x01000000L
1018
1019#define MIXERCONTROL_CT_UNITS_MASK 0x00FF0000L
1020#define MIXERCONTROL_CT_UNITS_CUSTOM 0x00000000L
1021#define MIXERCONTROL_CT_UNITS_BOOLEAN 0x00010000L
1022#define MIXERCONTROL_CT_UNITS_SIGNED 0x00020000L
1023#define MIXERCONTROL_CT_UNITS_UNSIGNED 0x00030000L
1024#define MIXERCONTROL_CT_UNITS_DECIBELS 0x00040000L /* in 10ths */
1025#define MIXERCONTROL_CT_UNITS_PERCENT 0x00050000L /* in 10ths */
1026
1027/* Commonly used control types for specifying MIXERCONTROL.dwControlType */
1028#define MIXERCONTROL_CONTROLTYPE_CUSTOM (MIXERCONTROL_CT_CLASS_CUSTOM | MIXERCONTROL_CT_UNITS_CUSTOM)
1029#define MIXERCONTROL_CONTROLTYPE_BOOLEANMETER (MIXERCONTROL_CT_CLASS_METER | MIXERCONTROL_CT_SC_METER_POLLED | MIXERCONTROL_CT_UNITS_BOOLEAN)
1030#define MIXERCONTROL_CONTROLTYPE_SIGNEDMETER (MIXERCONTROL_CT_CLASS_METER | MIXERCONTROL_CT_SC_METER_POLLED | MIXERCONTROL_CT_UNITS_SIGNED)
1031#define MIXERCONTROL_CONTROLTYPE_PEAKMETER (MIXERCONTROL_CONTROLTYPE_SIGNEDMETER + 1)
1032#define MIXERCONTROL_CONTROLTYPE_UNSIGNEDMETER (MIXERCONTROL_CT_CLASS_METER | MIXERCONTROL_CT_SC_METER_POLLED | MIXERCONTROL_CT_UNITS_UNSIGNED)
1033#define MIXERCONTROL_CONTROLTYPE_BOOLEAN (MIXERCONTROL_CT_CLASS_SWITCH | MIXERCONTROL_CT_SC_SWITCH_BOOLEAN | MIXERCONTROL_CT_UNITS_BOOLEAN)
1034#define MIXERCONTROL_CONTROLTYPE_ONOFF (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 1)
1035#define MIXERCONTROL_CONTROLTYPE_MUTE (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 2)
1036#define MIXERCONTROL_CONTROLTYPE_MONO (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 3)
1037#define MIXERCONTROL_CONTROLTYPE_LOUDNESS (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 4)
1038#define MIXERCONTROL_CONTROLTYPE_STEREOENH (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 5)
1039#define MIXERCONTROL_CONTROLTYPE_BUTTON (MIXERCONTROL_CT_CLASS_SWITCH | MIXERCONTROL_CT_SC_SWITCH_BUTTON | MIXERCONTROL_CT_UNITS_BOOLEAN)
1040#define MIXERCONTROL_CONTROLTYPE_DECIBELS (MIXERCONTROL_CT_CLASS_NUMBER | MIXERCONTROL_CT_UNITS_DECIBELS)
1041#define MIXERCONTROL_CONTROLTYPE_SIGNED (MIXERCONTROL_CT_CLASS_NUMBER | MIXERCONTROL_CT_UNITS_SIGNED)
1042#define MIXERCONTROL_CONTROLTYPE_UNSIGNED (MIXERCONTROL_CT_CLASS_NUMBER | MIXERCONTROL_CT_UNITS_UNSIGNED)
1043#define MIXERCONTROL_CONTROLTYPE_PERCENT (MIXERCONTROL_CT_CLASS_NUMBER | MIXERCONTROL_CT_UNITS_PERCENT)
1044#define MIXERCONTROL_CONTROLTYPE_SLIDER (MIXERCONTROL_CT_CLASS_SLIDER | MIXERCONTROL_CT_UNITS_SIGNED)
1045#define MIXERCONTROL_CONTROLTYPE_PAN (MIXERCONTROL_CONTROLTYPE_SLIDER + 1)
1046#define MIXERCONTROL_CONTROLTYPE_QSOUNDPAN (MIXERCONTROL_CONTROLTYPE_SLIDER + 2)
1047#define MIXERCONTROL_CONTROLTYPE_FADER (MIXERCONTROL_CT_CLASS_FADER | MIXERCONTROL_CT_UNITS_UNSIGNED)
1048#define MIXERCONTROL_CONTROLTYPE_VOLUME (MIXERCONTROL_CONTROLTYPE_FADER + 1)
1049#define MIXERCONTROL_CONTROLTYPE_BASS (MIXERCONTROL_CONTROLTYPE_FADER + 2)
1050#define MIXERCONTROL_CONTROLTYPE_TREBLE (MIXERCONTROL_CONTROLTYPE_FADER + 3)
1051#define MIXERCONTROL_CONTROLTYPE_EQUALIZER (MIXERCONTROL_CONTROLTYPE_FADER + 4)
1052#define MIXERCONTROL_CONTROLTYPE_SINGLESELECT (MIXERCONTROL_CT_CLASS_LIST | MIXERCONTROL_CT_SC_LIST_SINGLE | MIXERCONTROL_CT_UNITS_BOOLEAN)
1053#define MIXERCONTROL_CONTROLTYPE_MUX (MIXERCONTROL_CONTROLTYPE_SINGLESELECT + 1)
1054#define MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT (MIXERCONTROL_CT_CLASS_LIST | MIXERCONTROL_CT_SC_LIST_MULTIPLE | MIXERCONTROL_CT_UNITS_BOOLEAN)
1055#define MIXERCONTROL_CONTROLTYPE_MIXER (MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT + 1)
1056#define MIXERCONTROL_CONTROLTYPE_MICROTIME (MIXERCONTROL_CT_CLASS_TIME | MIXERCONTROL_CT_SC_TIME_MICROSECS | MIXERCONTROL_CT_UNITS_UNSIGNED)
1057#define MIXERCONTROL_CONTROLTYPE_MILLITIME (MIXERCONTROL_CT_CLASS_TIME | MIXERCONTROL_CT_SC_TIME_MILLISECS | MIXERCONTROL_CT_UNITS_UNSIGNED)
1058
1059
1060typedef struct {
Alexandre Julliard491502b1997-11-01 19:08:16 +00001061 DWORD cbStruct;
1062 DWORD dwControlID;
1063 DWORD dwControlType;
1064 DWORD fdwControl;
1065 DWORD cMultipleItems;
1066 CHAR szShortName[MIXER_SHORT_NAME_CHARS];
1067 CHAR szName[MIXER_LONG_NAME_CHARS];
1068 union {
1069 struct {
1070 LONG lMinimum;
1071 LONG lMaximum;
Patrik Stridvall32b43251999-09-14 07:52:16 +00001072 } DUMMYSTRUCTNAME;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001073 struct {
1074 DWORD dwMinimum;
1075 DWORD dwMaximum;
Patrik Stridvall32b43251999-09-14 07:52:16 +00001076 } DUMMYSTRUCTNAME1;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001077 DWORD dwReserved[6];
1078 } Bounds;
1079 union {
1080 DWORD cSteps;
1081 DWORD cbCustomData;
1082 DWORD dwReserved[6];
1083 } Metrics;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001084} MIXERCONTROLA, *LPMIXERCONTROLA;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001085
1086typedef struct {
1087 DWORD cbStruct;
1088 DWORD dwControlID;
1089 DWORD dwControlType;
1090 DWORD fdwControl;
1091 DWORD cMultipleItems;
1092 WCHAR szShortName[MIXER_SHORT_NAME_CHARS];
1093 WCHAR szName[MIXER_LONG_NAME_CHARS];
1094 union {
1095 struct {
1096 LONG lMinimum;
1097 LONG lMaximum;
Patrik Stridvall32b43251999-09-14 07:52:16 +00001098 } DUMMYSTRUCTNAME;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001099 struct {
1100 DWORD dwMinimum;
1101 DWORD dwMaximum;
Patrik Stridvall32b43251999-09-14 07:52:16 +00001102 } DUMMYSTRUCTNAME1;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001103 DWORD dwReserved[6];
1104 } Bounds;
1105 union {
1106 DWORD cSteps;
1107 DWORD cbCustomData;
1108 DWORD dwReserved[6];
1109 } Metrics;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001110} MIXERCONTROLW, *LPMIXERCONTROLW;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001111
Alexandre Julliarda845b881998-06-01 10:44:35 +00001112DECL_WINELIB_TYPE_AW(MIXERCONTROL)
1113DECL_WINELIB_TYPE_AW(LPMIXERCONTROL)
Alexandre Julliard491502b1997-11-01 19:08:16 +00001114
1115typedef struct {
Alexandre Julliard491502b1997-11-01 19:08:16 +00001116 DWORD cbStruct;
1117 DWORD dwLineID;
1118 union {
1119 DWORD dwControlID;
1120 DWORD dwControlType;
Patrik Stridvall32b43251999-09-14 07:52:16 +00001121 } DUMMYUNIONNAME;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001122 DWORD cControls;
1123 DWORD cbmxctrl;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001124 LPMIXERCONTROLA pamxctrl;
1125} MIXERLINECONTROLSA, *LPMIXERLINECONTROLSA;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001126
1127typedef struct {
1128 DWORD cbStruct;
1129 DWORD dwLineID;
1130 union {
1131 DWORD dwControlID;
1132 DWORD dwControlType;
Patrik Stridvall32b43251999-09-14 07:52:16 +00001133 } DUMMYUNIONNAME;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001134 DWORD cControls;
1135 DWORD cbmxctrl;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001136 LPMIXERCONTROLW pamxctrl;
1137} MIXERLINECONTROLSW, *LPMIXERLINECONTROLSW;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001138
Alexandre Julliarda845b881998-06-01 10:44:35 +00001139DECL_WINELIB_TYPE_AW(MIXERLINECONTROLS)
1140DECL_WINELIB_TYPE_AW(LPMIXERLINECONTROLS)
Alexandre Julliard491502b1997-11-01 19:08:16 +00001141
1142typedef struct {
Alexandre Julliard491502b1997-11-01 19:08:16 +00001143 DWORD cbStruct;
1144 DWORD dwControlID;
1145 DWORD cChannels;
1146 union {
Alexandre Julliarda3960291999-02-26 11:11:13 +00001147 HWND hwndOwner;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001148 DWORD cMultipleItems;
Patrik Stridvall32b43251999-09-14 07:52:16 +00001149 } DUMMYUNIONNAME;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001150 DWORD cbDetails;
1151 LPVOID paDetails;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001152} MIXERCONTROLDETAILS,*LPMIXERCONTROLDETAILS;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001153
Alexandre Julliard491502b1997-11-01 19:08:16 +00001154typedef struct {
1155 DWORD dwParam1;
1156 DWORD dwParam2;
1157 CHAR szName[MIXER_LONG_NAME_CHARS];
Alexandre Julliarda3960291999-02-26 11:11:13 +00001158} MIXERCONTROLDETAILS_LISTTEXTA,*LPMIXERCONTROLDETAILS_LISTTEXTA;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001159
1160typedef struct {
1161 DWORD dwParam1;
1162 DWORD dwParam2;
1163 WCHAR szName[MIXER_LONG_NAME_CHARS];
Alexandre Julliarda3960291999-02-26 11:11:13 +00001164} MIXERCONTROLDETAILS_LISTTEXTW,*LPMIXERCONTROLDETAILS_LISTTEXTW;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001165
Alexandre Julliarda845b881998-06-01 10:44:35 +00001166DECL_WINELIB_TYPE_AW(MIXERCONTROLDETAILS_LISTTEXT)
1167DECL_WINELIB_TYPE_AW(LPMIXERCONTROLDETAILS_LISTTEXT)
Alexandre Julliard491502b1997-11-01 19:08:16 +00001168
1169/* MIXER_GETCONTROLDETAILSF_VALUE */
1170typedef struct {
1171 LONG fValue;
1172} MIXERCONTROLDETAILS_BOOLEAN,*LPMIXERCONTROLDETAILS_BOOLEAN;
1173
1174typedef struct {
1175 LONG lValue;
1176} MIXERCONTROLDETAILS_SIGNED,*LPMIXERCONTROLDETAILS_SIGNED;
1177
1178typedef struct {
1179 DWORD dwValue;
1180} MIXERCONTROLDETAILS_UNSIGNED,*LPMIXERCONTROLDETAILS_UNSIGNED;
1181
1182/* bits passed to mixerGetLineInfo.fdwInfo */
1183#define MIXER_GETLINEINFOF_DESTINATION 0x00000000L
1184#define MIXER_GETLINEINFOF_SOURCE 0x00000001L
1185#define MIXER_GETLINEINFOF_LINEID 0x00000002L
1186#define MIXER_GETLINEINFOF_COMPONENTTYPE 0x00000003L
1187#define MIXER_GETLINEINFOF_TARGETTYPE 0x00000004L
1188#define MIXER_GETLINEINFOF_QUERYMASK 0x0000000FL
1189
1190/* bitmask passed to mixerGetLineControl */
1191#define MIXER_GETLINECONTROLSF_ALL 0x00000000L
1192#define MIXER_GETLINECONTROLSF_ONEBYID 0x00000001L
1193#define MIXER_GETLINECONTROLSF_ONEBYTYPE 0x00000002L
1194#define MIXER_GETLINECONTROLSF_QUERYMASK 0x0000000FL
1195
1196/* bitmask passed to mixerGetControlDetails */
1197#define MIXER_GETCONTROLDETAILSF_VALUE 0x00000000L
1198#define MIXER_GETCONTROLDETAILSF_LISTTEXT 0x00000001L
1199#define MIXER_GETCONTROLDETAILSF_QUERYMASK 0x0000000FL
1200
1201/* bitmask passed to mixerSetControlDetails */
1202#define MIXER_SETCONTROLDETAILSF_VALUE 0x00000000L
1203#define MIXER_SETCONTROLDETAILSF_CUSTOM 0x00000001L
1204#define MIXER_SETCONTROLDETAILSF_QUERYMASK 0x0000000FL
1205
Eric Pouecha9ffdcf1999-03-15 15:42:26 +00001206UINT WINAPI mixerGetNumDevs(void);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +00001207UINT WINAPI mixerOpen(LPHMIXER,UINT,DWORD,DWORD,DWORD);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +00001208UINT WINAPI mixerClose(HMIXER);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +00001209UINT WINAPI mixerMessage(HMIXER,UINT,DWORD,DWORD);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +00001210UINT WINAPI mixerGetDevCapsA(UINT,LPMIXERCAPSA,UINT);
1211UINT WINAPI mixerGetDevCapsW(UINT,LPMIXERCAPSW,UINT);
1212#define mixerGetDevCaps WINELIB_NAME_AW(mixerGetDevCaps)
Eric Pouecha9ffdcf1999-03-15 15:42:26 +00001213UINT WINAPI mixerGetLineInfoA(HMIXEROBJ,LPMIXERLINEA,DWORD);
1214UINT WINAPI mixerGetLineInfoW(HMIXEROBJ,LPMIXERLINEW,DWORD);
1215#define mixerGetLineInfo WINELIB_NAME_AW(mixerGetLineInfo)
Eric Pouecha9ffdcf1999-03-15 15:42:26 +00001216UINT WINAPI mixerGetID(HMIXEROBJ,LPUINT,DWORD);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +00001217UINT WINAPI mixerGetLineControlsA(HMIXEROBJ,LPMIXERLINECONTROLSA,DWORD);
1218UINT WINAPI mixerGetLineControlsW(HMIXEROBJ,LPMIXERLINECONTROLSW,DWORD);
Eric Pouechad863111999-03-22 14:48:40 +00001219#define mixerGetLineControls WINELIB_NAME_AW(mixerGetLineControls)
Eric Pouecha9ffdcf1999-03-15 15:42:26 +00001220UINT WINAPI mixerGetControlDetailsA(HMIXEROBJ,LPMIXERCONTROLDETAILS,DWORD);
1221UINT WINAPI mixerGetControlDetailsW(HMIXEROBJ,LPMIXERCONTROLDETAILS,DWORD);
1222#define mixerGetControlDetails WINELIB_NAME_AW(mixerGetControlDetails)
Eric Pouecha9ffdcf1999-03-15 15:42:26 +00001223UINT WINAPI mixerSetControlDetails(HMIXEROBJ,LPMIXERCONTROLDETAILS,DWORD);
Alexandre Julliard491502b1997-11-01 19:08:16 +00001224
Alexandre Julliard58199531994-04-21 01:20:00 +00001225#define MMIOERR_BASE 256
1226#define MMIOERR_FILENOTFOUND (MMIOERR_BASE + 1) /* file not found */
1227#define MMIOERR_OUTOFMEMORY (MMIOERR_BASE + 2) /* out of memory */
1228#define MMIOERR_CANNOTOPEN (MMIOERR_BASE + 3) /* cannot open */
1229#define MMIOERR_CANNOTCLOSE (MMIOERR_BASE + 4) /* cannot close */
1230#define MMIOERR_CANNOTREAD (MMIOERR_BASE + 5) /* cannot read */
1231#define MMIOERR_CANNOTWRITE (MMIOERR_BASE + 6) /* cannot write */
1232#define MMIOERR_CANNOTSEEK (MMIOERR_BASE + 7) /* cannot seek */
1233#define MMIOERR_CANNOTEXPAND (MMIOERR_BASE + 8) /* cannot expand file */
1234#define MMIOERR_CHUNKNOTFOUND (MMIOERR_BASE + 9) /* chunk not found */
1235#define MMIOERR_UNBUFFERED (MMIOERR_BASE + 10) /* file is unbuffered */
1236
1237#define CFSEPCHAR '+' /* compound file name separator char. */
1238
1239typedef DWORD FOURCC; /* a four character code */
Eric Pouech737db5f2000-06-25 12:50:11 +00001240typedef LRESULT CALLBACK (*LPMMIOPROC) (LPSTR lpmmioinfo, UINT uMessage,
1241 LPARAM lParam1, LPARAM lParam2);
Alexandre Julliard58199531994-04-21 01:20:00 +00001242
1243typedef struct {
Alexandre Julliard491502b1997-11-01 19:08:16 +00001244 DWORD dwFlags;
1245 FOURCC fccIOProc;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001246 LPMMIOPROC pIOProc;
1247 UINT wErrorRet;
Eric Pouechf8fe3662000-03-19 21:16:37 +00001248 HTASK hTask;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001249 /* fields maintained by MMIO functions during buffered I/O */
1250 LONG cchBuffer;
1251 HPSTR pchBuffer;
1252 HPSTR pchNext;
1253 HPSTR pchEndRead;
1254 HPSTR pchEndWrite;
1255 LONG lBufOffset;
1256 /* fields maintained by I/O procedure */
1257 LONG lDiskOffset;
1258 DWORD adwInfo[3];
1259 /* other fields maintained by MMIO */
1260 DWORD dwReserved1;
1261 DWORD dwReserved2;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001262 HMMIO hmmio;
1263} MMIOINFO, *PMMIOINFO, *LPMMIOINFO;
Alexandre Julliardf4eb65b1999-02-09 14:22:01 +00001264
Alexandre Julliard58199531994-04-21 01:20:00 +00001265
1266typedef struct _MMCKINFO
1267{
1268 FOURCC ckid; /* chunk ID */
1269 DWORD cksize; /* chunk size */
1270 FOURCC fccType; /* form type or list type */
1271 DWORD dwDataOffset; /* offset of data portion of chunk */
1272 DWORD dwFlags; /* flags used by MMIO functions */
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001273} MMCKINFO, *LPMMCKINFO;
Alexandre Julliard58199531994-04-21 01:20:00 +00001274
1275#define MMIO_RWMODE 0x00000003 /* open file for reading/writing/both */
1276#define MMIO_SHAREMODE 0x00000070 /* file sharing mode number */
1277
1278#define MMIO_CREATE 0x00001000 /* create new file (or truncate file) */
1279#define MMIO_PARSE 0x00000100 /* parse new file returning path */
1280#define MMIO_DELETE 0x00000200 /* create new file (or truncate file) */
1281#define MMIO_EXIST 0x00004000 /* checks for existence of file */
1282#define MMIO_ALLOCBUF 0x00010000 /* mmioOpen() should allocate a buffer */
1283#define MMIO_GETTEMP 0x00020000 /* mmioOpen() should retrieve temp name */
1284
1285#define MMIO_DIRTY 0x10000000 /* I/O buffer is dirty */
1286
1287#define MMIO_READ 0x00000000 /* open file for reading only */
1288#define MMIO_WRITE 0x00000001 /* open file for writing only */
1289#define MMIO_READWRITE 0x00000002 /* open file for reading and writing */
1290
1291#define MMIO_COMPAT 0x00000000 /* compatibility mode */
1292#define MMIO_EXCLUSIVE 0x00000010 /* exclusive-access mode */
1293#define MMIO_DENYWRITE 0x00000020 /* deny writing to other processes */
1294#define MMIO_DENYREAD 0x00000030 /* deny reading to other processes */
1295#define MMIO_DENYNONE 0x00000040 /* deny nothing to other processes */
1296
1297#define MMIO_FHOPEN 0x0010 /* mmioClose: keep file handle open */
1298#define MMIO_EMPTYBUF 0x0010 /* mmioFlush: empty the I/O buffer */
1299#define MMIO_TOUPPER 0x0010 /* mmioStringToFOURCC: to u-case */
1300#define MMIO_INSTALLPROC 0x00010000 /* mmioInstallIOProc: install MMIOProc */
1301#define MMIO_GLOBALPROC 0x10000000 /* mmioInstallIOProc: install globally */
1302#define MMIO_REMOVEPROC 0x00020000 /* mmioInstallIOProc: remove MMIOProc */
1303#define MMIO_FINDPROC 0x00040000 /* mmioInstallIOProc: find an MMIOProc */
1304#define MMIO_FINDCHUNK 0x0010 /* mmioDescend: find a chunk by ID */
1305#define MMIO_FINDRIFF 0x0020 /* mmioDescend: find a LIST chunk */
1306#define MMIO_FINDLIST 0x0040 /* mmioDescend: find a RIFF chunk */
1307#define MMIO_CREATERIFF 0x0020 /* mmioCreateChunk: make a LIST chunk */
1308#define MMIO_CREATELIST 0x0040 /* mmioCreateChunk: make a RIFF chunk */
1309
Alexandre Julliard7e50df31994-08-06 11:22:41 +00001310#define SEEK_SET 0
1311#define SEEK_CUR 1
1312#define SEEK_END 2
1313
Alexandre Julliard58199531994-04-21 01:20:00 +00001314#define MMIOM_READ MMIO_READ /* read */
1315#define MMIOM_WRITE MMIO_WRITE /* write */
1316#define MMIOM_SEEK 2 /* seek to a new position in file */
1317#define MMIOM_OPEN 3 /* open file */
1318#define MMIOM_CLOSE 4 /* close file */
1319#define MMIOM_WRITEFLUSH 5 /* write and flush */
1320
1321#define MMIOM_RENAME 6 /* rename specified file */
1322
1323#define MMIOM_USER 0x8000 /* beginning of user-defined messages */
1324
1325#define FOURCC_RIFF mmioFOURCC('R', 'I', 'F', 'F')
1326#define FOURCC_LIST mmioFOURCC('L', 'I', 'S', 'T')
1327
1328#define FOURCC_DOS mmioFOURCC('D', 'O', 'S', ' ')
1329#define FOURCC_MEM mmioFOURCC('M', 'E', 'M', ' ')
1330
1331#define MMIO_DEFAULTBUFFER 8192 /* default buffer size */
1332
1333#define mmioFOURCC( ch0, ch1, ch2, ch3 ) \
1334 ( (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ) | \
1335 ( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) )
1336
Eric Pouecha9ffdcf1999-03-15 15:42:26 +00001337LPMMIOPROC WINAPI mmioInstallIOProcA(FOURCC,LPMMIOPROC,DWORD);
1338LPMMIOPROC WINAPI mmioInstallIOProcW(FOURCC,LPMMIOPROC,DWORD);
1339#define mmioInstallIOProc WINELIB_NAME_AW(mmioInstallIOProc)
Alexandre Julliard3db94ef1997-09-28 17:43:24 +00001340
Eric Pouecha9ffdcf1999-03-15 15:42:26 +00001341FOURCC WINAPI mmioStringToFOURCCA(LPCSTR,UINT);
1342FOURCC WINAPI mmioStringToFOURCCW(LPCWSTR,UINT);
1343#define mmioStringToFOURCC WINELIB_NAME_AW(mmioStringToFOURCC)
Eric Pouechf8fe3662000-03-19 21:16:37 +00001344HMMIO WINAPI mmioOpenA(LPSTR,MMIOINFO*,DWORD);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +00001345HMMIO WINAPI mmioOpenW(LPWSTR,MMIOINFO*,DWORD);
1346#define mmioOpen WINELIB_NAME_AW(mmioOpen)
Alexandre Julliard58199531994-04-21 01:20:00 +00001347
Eric Pouecha9ffdcf1999-03-15 15:42:26 +00001348UINT WINAPI mmioRenameA(LPCSTR szFileName, LPCSTR szNewFileName,
1349 MMIOINFO * lpmmioinfo, DWORD dwRenameFlags);
1350UINT WINAPI mmioRenameW(LPCWSTR szFileName, LPCWSTR szNewFileName,
1351 MMIOINFO * lpmmioinfo, DWORD dwRenameFlags);
1352#define mmioRename WINELIB_NAME_AW(mmioRename)
Alexandre Julliard58199531994-04-21 01:20:00 +00001353
Eric Pouecha9ffdcf1999-03-15 15:42:26 +00001354MMRESULT WINAPI mmioClose(HMMIO,UINT);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +00001355LONG WINAPI mmioRead(HMMIO,HPSTR,LONG);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +00001356LONG WINAPI mmioWrite(HMMIO,HPCSTR,LONG);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +00001357LONG WINAPI mmioSeek(HMMIO,LONG,INT);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +00001358MMRESULT WINAPI mmioGetInfo(HMMIO,MMIOINFO*,UINT);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +00001359MMRESULT WINAPI mmioSetInfo(HMMIO,const MMIOINFO*,UINT);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +00001360UINT WINAPI mmioSetBuffer(HMMIO,LPSTR,LONG,UINT);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +00001361UINT WINAPI mmioFlush(HMMIO,UINT);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +00001362UINT WINAPI mmioAdvance(HMMIO,MMIOINFO*,UINT);
Eric Pouechf8fe3662000-03-19 21:16:37 +00001363LONG WINAPI mmioSendMessage(HMMIO,UINT,LPARAM,LPARAM);
Eric Pouechf8fe3662000-03-19 21:16:37 +00001364UINT WINAPI mmioDescend(HMMIO,MMCKINFO*,const MMCKINFO*,UINT);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +00001365UINT WINAPI mmioAscend(HMMIO,MMCKINFO*,UINT);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +00001366UINT WINAPI mmioCreateChunk(HMMIO,MMCKINFO*,UINT);
Alexandre Julliardf90efa91998-06-14 15:24:15 +00001367
Alexandre Julliard83f52d12000-09-26 22:20:14 +00001368typedef UINT CALLBACK (*YIELDPROC)(MCIDEVICEID,DWORD);
Alexandre Julliardf90efa91998-06-14 15:24:15 +00001369
Eric Pouecha9ffdcf1999-03-15 15:42:26 +00001370DWORD WINAPI mciSendCommandA(UINT,UINT,DWORD,DWORD);
1371DWORD WINAPI mciSendCommandW(UINT,UINT,DWORD,DWORD);
1372#define mciSendCommand WINELIB_NAME_AW(mciSendCommand)
Eric Pouecha9ffdcf1999-03-15 15:42:26 +00001373DWORD WINAPI mciSendStringA(LPCSTR,LPSTR,UINT,HWND);
1374DWORD WINAPI mciSendStringW(LPCWSTR,LPSTR,UINT,HWND);
1375#define mciSendString WINELIB_NAME_AW(mciSendString)
Eric Pouecha9ffdcf1999-03-15 15:42:26 +00001376UINT WINAPI mciGetDeviceIDA(LPCSTR);
1377UINT WINAPI mciGetDeviceIDW(LPCWSTR);
1378#define mciGetDeviceID WINELIB_NAME_AW(mciGetDeviceID)
Eric Pouecha9ffdcf1999-03-15 15:42:26 +00001379BOOL WINAPI mciGetErrorStringA(DWORD,LPSTR,UINT);
1380BOOL WINAPI mciGetErrorStringW(DWORD,LPWSTR,UINT);
1381#define mciGetErrorString WINELIB_NAME_AW(mciGetErrorString)
Eric Pouecha9ffdcf1999-03-15 15:42:26 +00001382BOOL WINAPI mciSetYieldProc(UINT,YIELDPROC,DWORD);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +00001383HTASK WINAPI mciGetCreatorTask(UINT);
Eric Pouecha9ffdcf1999-03-15 15:42:26 +00001384YIELDPROC WINAPI mciGetYieldProc(UINT,DWORD*);
Alexandre Julliard58199531994-04-21 01:20:00 +00001385
1386#define MCIERR_INVALID_DEVICE_ID (MCIERR_BASE + 1)
1387#define MCIERR_UNRECOGNIZED_KEYWORD (MCIERR_BASE + 3)
1388#define MCIERR_UNRECOGNIZED_COMMAND (MCIERR_BASE + 5)
1389#define MCIERR_HARDWARE (MCIERR_BASE + 6)
1390#define MCIERR_INVALID_DEVICE_NAME (MCIERR_BASE + 7)
1391#define MCIERR_OUT_OF_MEMORY (MCIERR_BASE + 8)
1392#define MCIERR_DEVICE_OPEN (MCIERR_BASE + 9)
1393#define MCIERR_CANNOT_LOAD_DRIVER (MCIERR_BASE + 10)
1394#define MCIERR_MISSING_COMMAND_STRING (MCIERR_BASE + 11)
1395#define MCIERR_PARAM_OVERFLOW (MCIERR_BASE + 12)
1396#define MCIERR_MISSING_STRING_ARGUMENT (MCIERR_BASE + 13)
1397#define MCIERR_BAD_INTEGER (MCIERR_BASE + 14)
1398#define MCIERR_PARSER_INTERNAL (MCIERR_BASE + 15)
1399#define MCIERR_DRIVER_INTERNAL (MCIERR_BASE + 16)
1400#define MCIERR_MISSING_PARAMETER (MCIERR_BASE + 17)
1401#define MCIERR_UNSUPPORTED_FUNCTION (MCIERR_BASE + 18)
1402#define MCIERR_FILE_NOT_FOUND (MCIERR_BASE + 19)
1403#define MCIERR_DEVICE_NOT_READY (MCIERR_BASE + 20)
1404#define MCIERR_INTERNAL (MCIERR_BASE + 21)
1405#define MCIERR_DRIVER (MCIERR_BASE + 22)
1406#define MCIERR_CANNOT_USE_ALL (MCIERR_BASE + 23)
1407#define MCIERR_MULTIPLE (MCIERR_BASE + 24)
1408#define MCIERR_EXTENSION_NOT_FOUND (MCIERR_BASE + 25)
1409#define MCIERR_OUTOFRANGE (MCIERR_BASE + 26)
1410#define MCIERR_FLAGS_NOT_COMPATIBLE (MCIERR_BASE + 28)
1411#define MCIERR_FILE_NOT_SAVED (MCIERR_BASE + 30)
1412#define MCIERR_DEVICE_TYPE_REQUIRED (MCIERR_BASE + 31)
1413#define MCIERR_DEVICE_LOCKED (MCIERR_BASE + 32)
1414#define MCIERR_DUPLICATE_ALIAS (MCIERR_BASE + 33)
1415#define MCIERR_BAD_CONSTANT (MCIERR_BASE + 34)
1416#define MCIERR_MUST_USE_SHAREABLE (MCIERR_BASE + 35)
1417#define MCIERR_MISSING_DEVICE_NAME (MCIERR_BASE + 36)
1418#define MCIERR_BAD_TIME_FORMAT (MCIERR_BASE + 37)
1419#define MCIERR_NO_CLOSING_QUOTE (MCIERR_BASE + 38)
1420#define MCIERR_DUPLICATE_FLAGS (MCIERR_BASE + 39)
1421#define MCIERR_INVALID_FILE (MCIERR_BASE + 40)
1422#define MCIERR_NULL_PARAMETER_BLOCK (MCIERR_BASE + 41)
1423#define MCIERR_UNNAMED_RESOURCE (MCIERR_BASE + 42)
1424#define MCIERR_NEW_REQUIRES_ALIAS (MCIERR_BASE + 43)
1425#define MCIERR_NOTIFY_ON_AUTO_OPEN (MCIERR_BASE + 44)
1426#define MCIERR_NO_ELEMENT_ALLOWED (MCIERR_BASE + 45)
1427#define MCIERR_NONAPPLICABLE_FUNCTION (MCIERR_BASE + 46)
1428#define MCIERR_ILLEGAL_FOR_AUTO_OPEN (MCIERR_BASE + 47)
1429#define MCIERR_FILENAME_REQUIRED (MCIERR_BASE + 48)
1430#define MCIERR_EXTRA_CHARACTERS (MCIERR_BASE + 49)
1431#define MCIERR_DEVICE_NOT_INSTALLED (MCIERR_BASE + 50)
1432#define MCIERR_GET_CD (MCIERR_BASE + 51)
1433#define MCIERR_SET_CD (MCIERR_BASE + 52)
1434#define MCIERR_SET_DRIVE (MCIERR_BASE + 53)
1435#define MCIERR_DEVICE_LENGTH (MCIERR_BASE + 54)
1436#define MCIERR_DEVICE_ORD_LENGTH (MCIERR_BASE + 55)
1437#define MCIERR_NO_INTEGER (MCIERR_BASE + 56)
1438
1439#define MCIERR_WAVE_OUTPUTSINUSE (MCIERR_BASE + 64)
1440#define MCIERR_WAVE_SETOUTPUTINUSE (MCIERR_BASE + 65)
1441#define MCIERR_WAVE_INPUTSINUSE (MCIERR_BASE + 66)
1442#define MCIERR_WAVE_SETINPUTINUSE (MCIERR_BASE + 67)
1443#define MCIERR_WAVE_OUTPUTUNSPECIFIED (MCIERR_BASE + 68)
1444#define MCIERR_WAVE_INPUTUNSPECIFIED (MCIERR_BASE + 69)
1445#define MCIERR_WAVE_OUTPUTSUNSUITABLE (MCIERR_BASE + 70)
1446#define MCIERR_WAVE_SETOUTPUTUNSUITABLE (MCIERR_BASE + 71)
1447#define MCIERR_WAVE_INPUTSUNSUITABLE (MCIERR_BASE + 72)
1448#define MCIERR_WAVE_SETINPUTUNSUITABLE (MCIERR_BASE + 73)
1449
1450#define MCIERR_SEQ_DIV_INCOMPATIBLE (MCIERR_BASE + 80)
1451#define MCIERR_SEQ_PORT_INUSE (MCIERR_BASE + 81)
1452#define MCIERR_SEQ_PORT_NONEXISTENT (MCIERR_BASE + 82)
1453#define MCIERR_SEQ_PORT_MAPNODEVICE (MCIERR_BASE + 83)
1454#define MCIERR_SEQ_PORT_MISCERROR (MCIERR_BASE + 84)
1455#define MCIERR_SEQ_TIMER (MCIERR_BASE + 85)
1456#define MCIERR_SEQ_PORTUNSPECIFIED (MCIERR_BASE + 86)
1457#define MCIERR_SEQ_NOMIDIPRESENT (MCIERR_BASE + 87)
1458
1459#define MCIERR_NO_WINDOW (MCIERR_BASE + 90)
1460#define MCIERR_CREATEWINDOW (MCIERR_BASE + 91)
1461#define MCIERR_FILE_READ (MCIERR_BASE + 92)
1462#define MCIERR_FILE_WRITE (MCIERR_BASE + 93)
1463
Eric Pouechf919cf31999-12-25 22:54:11 +00001464#define MCIERR_NO_IDENTITY (MCIERR_BASE + 94)
1465
Alexandre Julliard58199531994-04-21 01:20:00 +00001466#define MCIERR_CUSTOM_DRIVER_BASE (MCIERR_BASE + 256)
1467
Eric Pouecha9ffdcf1999-03-15 15:42:26 +00001468#define MCI_OPEN_DRIVER 0x0801
1469#define MCI_CLOSE_DRIVER 0x0802
1470#define MCI_OPEN 0x0803
1471#define MCI_CLOSE 0x0804
Alexandre Julliard58199531994-04-21 01:20:00 +00001472#define MCI_ESCAPE 0x0805
1473#define MCI_PLAY 0x0806
1474#define MCI_SEEK 0x0807
1475#define MCI_STOP 0x0808
1476#define MCI_PAUSE 0x0809
1477#define MCI_INFO 0x080A
1478#define MCI_GETDEVCAPS 0x080B
1479#define MCI_SPIN 0x080C
1480#define MCI_SET 0x080D
1481#define MCI_STEP 0x080E
1482#define MCI_RECORD 0x080F
1483#define MCI_SYSINFO 0x0810
1484#define MCI_BREAK 0x0811
1485#define MCI_SOUND 0x0812
1486#define MCI_SAVE 0x0813
1487#define MCI_STATUS 0x0814
1488#define MCI_CUE 0x0830
1489#define MCI_REALIZE 0x0840
1490#define MCI_WINDOW 0x0841
1491#define MCI_PUT 0x0842
1492#define MCI_WHERE 0x0843
1493#define MCI_FREEZE 0x0844
1494#define MCI_UNFREEZE 0x0845
1495#define MCI_LOAD 0x0850
1496#define MCI_CUT 0x0851
1497#define MCI_COPY 0x0852
1498#define MCI_PASTE 0x0853
1499#define MCI_UPDATE 0x0854
1500#define MCI_RESUME 0x0855
1501#define MCI_DELETE 0x0856
1502
1503#define MCI_USER_MESSAGES (0x400 + DRV_MCI_FIRST)
1504
1505#define MCI_ALL_DEVICE_ID 0xFFFF
1506
1507#define MCI_DEVTYPE_VCR (MCI_STRING_OFFSET + 1)
1508#define MCI_DEVTYPE_VIDEODISC (MCI_STRING_OFFSET + 2)
1509#define MCI_DEVTYPE_OVERLAY (MCI_STRING_OFFSET + 3)
1510#define MCI_DEVTYPE_CD_AUDIO (MCI_STRING_OFFSET + 4)
1511#define MCI_DEVTYPE_DAT (MCI_STRING_OFFSET + 5)
1512#define MCI_DEVTYPE_SCANNER (MCI_STRING_OFFSET + 6)
1513#define MCI_DEVTYPE_ANIMATION (MCI_STRING_OFFSET + 7)
1514#define MCI_DEVTYPE_DIGITAL_VIDEO (MCI_STRING_OFFSET + 8)
1515#define MCI_DEVTYPE_OTHER (MCI_STRING_OFFSET + 9)
1516#define MCI_DEVTYPE_WAVEFORM_AUDIO (MCI_STRING_OFFSET + 10)
1517#define MCI_DEVTYPE_SEQUENCER (MCI_STRING_OFFSET + 11)
1518
1519#define MCI_DEVTYPE_FIRST MCI_DEVTYPE_VCR
1520#define MCI_DEVTYPE_LAST MCI_DEVTYPE_SEQUENCER
1521
1522#define MCI_MODE_NOT_READY (MCI_STRING_OFFSET + 12)
1523#define MCI_MODE_STOP (MCI_STRING_OFFSET + 13)
1524#define MCI_MODE_PLAY (MCI_STRING_OFFSET + 14)
1525#define MCI_MODE_RECORD (MCI_STRING_OFFSET + 15)
1526#define MCI_MODE_SEEK (MCI_STRING_OFFSET + 16)
1527#define MCI_MODE_PAUSE (MCI_STRING_OFFSET + 17)
1528#define MCI_MODE_OPEN (MCI_STRING_OFFSET + 18)
1529
1530#define MCI_FORMAT_MILLISECONDS 0
1531#define MCI_FORMAT_HMS 1
1532#define MCI_FORMAT_MSF 2
1533#define MCI_FORMAT_FRAMES 3
1534#define MCI_FORMAT_SMPTE_24 4
1535#define MCI_FORMAT_SMPTE_25 5
1536#define MCI_FORMAT_SMPTE_30 6
1537#define MCI_FORMAT_SMPTE_30DROP 7
1538#define MCI_FORMAT_BYTES 8
1539#define MCI_FORMAT_SAMPLES 9
1540#define MCI_FORMAT_TMSF 10
1541
1542#define MCI_MSF_MINUTE(msf) ((BYTE)(msf))
1543#define MCI_MSF_SECOND(msf) ((BYTE)(((WORD)(msf)) >> 8))
1544#define MCI_MSF_FRAME(msf) ((BYTE)((msf)>>16))
1545
1546#define MCI_MAKE_MSF(m, s, f) ((DWORD)(((BYTE)(m) | \
1547 ((WORD)(s)<<8)) | \
1548 (((DWORD)(BYTE)(f))<<16)))
1549
1550#define MCI_TMSF_TRACK(tmsf) ((BYTE)(tmsf))
1551#define MCI_TMSF_MINUTE(tmsf) ((BYTE)(((WORD)(tmsf)) >> 8))
1552#define MCI_TMSF_SECOND(tmsf) ((BYTE)((tmsf)>>16))
1553#define MCI_TMSF_FRAME(tmsf) ((BYTE)((tmsf)>>24))
1554
1555#define MCI_MAKE_TMSF(t, m, s, f) ((DWORD)(((BYTE)(t) | \
1556 ((WORD)(m)<<8)) | \
1557 (((DWORD)(BYTE)(s) | \
1558 ((WORD)(f)<<8))<<16)))
1559
1560#define MCI_HMS_HOUR(hms) ((BYTE)(hms))
1561#define MCI_HMS_MINUTE(hms) ((BYTE)(((WORD)(hms)) >> 8))
1562#define MCI_HMS_SECOND(hms) ((BYTE)((hms)>>16))
1563
1564#define MCI_MAKE_HMS(h, m, s) ((DWORD)(((BYTE)(h) | \
1565 ((WORD)(m)<<8)) | \
1566 (((DWORD)(BYTE)(s))<<16)))
1567
1568#define MCI_NOTIFY_SUCCESSFUL 0x0001
1569#define MCI_NOTIFY_SUPERSEDED 0x0002
1570#define MCI_NOTIFY_ABORTED 0x0004
1571#define MCI_NOTIFY_FAILURE 0x0008
1572
1573#define MCI_NOTIFY 0x00000001L
1574#define MCI_WAIT 0x00000002L
1575#define MCI_FROM 0x00000004L
1576#define MCI_TO 0x00000008L
1577#define MCI_TRACK 0x00000010L
1578
1579#define MCI_OPEN_SHAREABLE 0x00000100L
1580#define MCI_OPEN_ELEMENT 0x00000200L
1581#define MCI_OPEN_ALIAS 0x00000400L
1582#define MCI_OPEN_ELEMENT_ID 0x00000800L
1583#define MCI_OPEN_TYPE_ID 0x00001000L
1584#define MCI_OPEN_TYPE 0x00002000L
1585
1586#define MCI_SEEK_TO_START 0x00000100L
1587#define MCI_SEEK_TO_END 0x00000200L
1588
1589#define MCI_STATUS_ITEM 0x00000100L
1590#define MCI_STATUS_START 0x00000200L
1591
1592#define MCI_STATUS_LENGTH 0x00000001L
1593#define MCI_STATUS_POSITION 0x00000002L
1594#define MCI_STATUS_NUMBER_OF_TRACKS 0x00000003L
1595#define MCI_STATUS_MODE 0x00000004L
1596#define MCI_STATUS_MEDIA_PRESENT 0x00000005L
1597#define MCI_STATUS_TIME_FORMAT 0x00000006L
1598#define MCI_STATUS_READY 0x00000007L
1599#define MCI_STATUS_CURRENT_TRACK 0x00000008L
1600
1601#define MCI_INFO_PRODUCT 0x00000100L
1602#define MCI_INFO_FILE 0x00000200L
Eric Pouechf919cf31999-12-25 22:54:11 +00001603#define MCI_INFO_MEDIA_UPC 0x00000400L
1604#define MCI_INFO_MEDIA_IDENTITY 0x00000800L
1605#define MCI_INFO_NAME 0x00001000L
1606#define MCI_INFO_COPYRIGHT 0x00002000L
Alexandre Julliard58199531994-04-21 01:20:00 +00001607
1608#define MCI_GETDEVCAPS_ITEM 0x00000100L
1609
1610#define MCI_GETDEVCAPS_CAN_RECORD 0x00000001L
1611#define MCI_GETDEVCAPS_HAS_AUDIO 0x00000002L
1612#define MCI_GETDEVCAPS_HAS_VIDEO 0x00000003L
1613#define MCI_GETDEVCAPS_DEVICE_TYPE 0x00000004L
1614#define MCI_GETDEVCAPS_USES_FILES 0x00000005L
1615#define MCI_GETDEVCAPS_COMPOUND_DEVICE 0x00000006L
1616#define MCI_GETDEVCAPS_CAN_EJECT 0x00000007L
1617#define MCI_GETDEVCAPS_CAN_PLAY 0x00000008L
1618#define MCI_GETDEVCAPS_CAN_SAVE 0x00000009L
1619
1620#define MCI_SYSINFO_QUANTITY 0x00000100L
1621#define MCI_SYSINFO_OPEN 0x00000200L
1622#define MCI_SYSINFO_NAME 0x00000400L
1623#define MCI_SYSINFO_INSTALLNAME 0x00000800L
1624
1625#define MCI_SET_DOOR_OPEN 0x00000100L
1626#define MCI_SET_DOOR_CLOSED 0x00000200L
1627#define MCI_SET_TIME_FORMAT 0x00000400L
1628#define MCI_SET_AUDIO 0x00000800L
1629#define MCI_SET_VIDEO 0x00001000L
1630#define MCI_SET_ON 0x00002000L
1631#define MCI_SET_OFF 0x00004000L
1632
1633#define MCI_SET_AUDIO_ALL 0x00000000L
1634#define MCI_SET_AUDIO_LEFT 0x00000001L
1635#define MCI_SET_AUDIO_RIGHT 0x00000002L
1636
1637#define MCI_BREAK_KEY 0x00000100L
1638#define MCI_BREAK_HWND 0x00000200L
1639#define MCI_BREAK_OFF 0x00000400L
1640
1641#define MCI_RECORD_INSERT 0x00000100L
1642#define MCI_RECORD_OVERWRITE 0x00000200L
1643
1644#define MCI_SOUND_NAME 0x00000100L
1645
1646#define MCI_SAVE_FILE 0x00000100L
1647
1648#define MCI_LOAD_FILE 0x00000100L
1649
1650typedef struct {
1651 DWORD dwCallback;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001652} MCI_GENERIC_PARMS, *LPMCI_GENERIC_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00001653
1654typedef struct {
Alexandre Julliard491502b1997-11-01 19:08:16 +00001655 DWORD dwCallback;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001656 MCIDEVICEID wDeviceID;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001657 LPSTR lpstrDeviceType;
1658 LPSTR lpstrElementName;
1659 LPSTR lpstrAlias;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001660} MCI_OPEN_PARMSA, *LPMCI_OPEN_PARMSA;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001661
1662typedef struct {
1663 DWORD dwCallback;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001664 MCIDEVICEID wDeviceID;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001665 LPWSTR lpstrDeviceType;
1666 LPWSTR lpstrElementName;
1667 LPWSTR lpstrAlias;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001668} MCI_OPEN_PARMSW, *LPMCI_OPEN_PARMSW;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001669
Alexandre Julliarda845b881998-06-01 10:44:35 +00001670DECL_WINELIB_TYPE_AW(MCI_OPEN_PARMS)
1671DECL_WINELIB_TYPE_AW(LPMCI_OPEN_PARMS)
Alexandre Julliard58199531994-04-21 01:20:00 +00001672
1673typedef struct {
1674 DWORD dwCallback;
1675 DWORD dwFrom;
1676 DWORD dwTo;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001677} MCI_PLAY_PARMS, *LPMCI_PLAY_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00001678
1679typedef struct {
1680 DWORD dwCallback;
1681 DWORD dwTo;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001682} MCI_SEEK_PARMS, *LPMCI_SEEK_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00001683
1684typedef struct {
1685 DWORD dwCallback;
1686 DWORD dwReturn;
1687 DWORD dwItem;
1688 DWORD dwTrack;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001689} MCI_STATUS_PARMS, *LPMCI_STATUS_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00001690
1691typedef struct {
1692 DWORD dwCallback;
1693 LPSTR lpstrReturn;
1694 DWORD dwRetSize;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001695} MCI_INFO_PARMSA, *LPMCI_INFO_PARMSA;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001696
1697typedef struct {
1698 DWORD dwCallback;
1699 LPSTR lpstrReturn;
1700 DWORD dwRetSize;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001701} MCI_INFO_PARMSW, *LPMCI_INFO_PARMSW;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001702
Alexandre Julliarda845b881998-06-01 10:44:35 +00001703DECL_WINELIB_TYPE_AW(MCI_INFO_PARMS)
1704DECL_WINELIB_TYPE_AW(LPMCI_INFO_PARMS)
Alexandre Julliard58199531994-04-21 01:20:00 +00001705
1706typedef struct {
1707 DWORD dwCallback;
1708 DWORD dwReturn;
1709 DWORD dwItem;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001710} MCI_GETDEVCAPS_PARMS, *LPMCI_GETDEVCAPS_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00001711
1712typedef struct {
Alexandre Julliard491502b1997-11-01 19:08:16 +00001713 DWORD dwCallback;
1714 LPSTR lpstrReturn;
1715 DWORD dwRetSize;
1716 DWORD dwNumber;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001717 UINT wDeviceType;
1718} MCI_SYSINFO_PARMSA, *LPMCI_SYSINFO_PARMSA;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001719
1720typedef struct {
1721 DWORD dwCallback;
1722 LPWSTR lpstrReturn;
1723 DWORD dwRetSize;
1724 DWORD dwNumber;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001725 UINT wDeviceType;
1726} MCI_SYSINFO_PARMSW, *LPMCI_SYSINFO_PARMSW;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001727
Alexandre Julliarda845b881998-06-01 10:44:35 +00001728DECL_WINELIB_TYPE_AW(MCI_SYSINFO_PARMS)
1729DECL_WINELIB_TYPE_AW(LPMCI_SYSINFO_PARMS)
Alexandre Julliard58199531994-04-21 01:20:00 +00001730
1731typedef struct {
1732 DWORD dwCallback;
1733 DWORD dwTimeFormat;
1734 DWORD dwAudio;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001735} MCI_SET_PARMS, *LPMCI_SET_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00001736
1737typedef struct {
Alexandre Julliard491502b1997-11-01 19:08:16 +00001738 DWORD dwCallback;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001739 INT nVirtKey;
1740 HWND hwndBreak;
1741} MCI_BREAK_PARMS, *LPMCI_BREAK_PARMS;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001742
Alexandre Julliard58199531994-04-21 01:20:00 +00001743
1744typedef struct {
1745 DWORD dwCallback;
1746 LPCSTR lpstrSoundName;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001747} MCI_SOUND_PARMS, *LPMCI_SOUND_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00001748
1749typedef struct {
1750 DWORD dwCallback;
1751 LPCSTR lpfilename;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001752} MCI_SAVE_PARMS, *LPMCI_SAVE_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00001753
1754typedef struct {
Alexandre Julliard491502b1997-11-01 19:08:16 +00001755 DWORD dwCallback;
1756 LPCSTR lpfilename;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001757} MCI_LOAD_PARMSA, *LPMCI_LOAD_PARMSA;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001758
1759typedef struct {
1760 DWORD dwCallback;
1761 LPCWSTR lpfilename;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001762} MCI_LOAD_PARMSW, *LPMCI_LOAD_PARMSW;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001763
Alexandre Julliarda845b881998-06-01 10:44:35 +00001764DECL_WINELIB_TYPE_AW(MCI_LOAD_PARMS)
1765DECL_WINELIB_TYPE_AW(LPMCI_LOAD_PARMS)
Alexandre Julliard58199531994-04-21 01:20:00 +00001766
1767typedef struct {
1768 DWORD dwCallback;
1769 DWORD dwFrom;
1770 DWORD dwTo;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001771} MCI_RECORD_PARMS, *LPMCI_RECORD_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00001772
Eric Pouech9b3801f1998-11-24 14:50:42 +00001773#define MCI_CDA_STATUS_TYPE_TRACK 0x00004001
1774
Eric Pouecha4165ae1999-04-11 12:14:17 +00001775#define MCI_CDA_TRACK_AUDIO (MCI_CD_OFFSET + 0)
1776#define MCI_CDA_TRACK_OTHER (MCI_CD_OFFSET + 1)
Eric Pouech9b3801f1998-11-24 14:50:42 +00001777
Alexandre Julliard58199531994-04-21 01:20:00 +00001778#define MCI_VD_MODE_PARK (MCI_VD_OFFSET + 1)
1779
1780#define MCI_VD_MEDIA_CLV (MCI_VD_OFFSET + 2)
1781#define MCI_VD_MEDIA_CAV (MCI_VD_OFFSET + 3)
1782#define MCI_VD_MEDIA_OTHER (MCI_VD_OFFSET + 4)
1783
1784#define MCI_VD_FORMAT_TRACK 0x4001
1785
1786#define MCI_VD_PLAY_REVERSE 0x00010000L
1787#define MCI_VD_PLAY_FAST 0x00020000L
1788#define MCI_VD_PLAY_SPEED 0x00040000L
1789#define MCI_VD_PLAY_SCAN 0x00080000L
1790#define MCI_VD_PLAY_SLOW 0x00100000L
1791
1792#define MCI_VD_SEEK_REVERSE 0x00010000L
1793
1794#define MCI_VD_STATUS_SPEED 0x00004002L
1795#define MCI_VD_STATUS_FORWARD 0x00004003L
1796#define MCI_VD_STATUS_MEDIA_TYPE 0x00004004L
1797#define MCI_VD_STATUS_SIDE 0x00004005L
1798#define MCI_VD_STATUS_DISC_SIZE 0x00004006L
1799
1800#define MCI_VD_GETDEVCAPS_CLV 0x00010000L
1801#define MCI_VD_GETDEVCAPS_CAV 0x00020000L
1802
1803#define MCI_VD_SPIN_UP 0x00010000L
1804#define MCI_VD_SPIN_DOWN 0x00020000L
1805
1806#define MCI_VD_GETDEVCAPS_CAN_REVERSE 0x00004002L
1807#define MCI_VD_GETDEVCAPS_FAST_RATE 0x00004003L
1808#define MCI_VD_GETDEVCAPS_SLOW_RATE 0x00004004L
1809#define MCI_VD_GETDEVCAPS_NORMAL_RATE 0x00004005L
1810
1811#define MCI_VD_STEP_FRAMES 0x00010000L
1812#define MCI_VD_STEP_REVERSE 0x00020000L
1813
1814#define MCI_VD_ESCAPE_STRING 0x00000100L
1815
1816typedef struct {
1817 DWORD dwCallback;
1818 DWORD dwFrom;
1819 DWORD dwTo;
1820 DWORD dwSpeed;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001821} MCI_VD_PLAY_PARMS, *LPMCI_VD_PLAY_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00001822
1823typedef struct {
1824 DWORD dwCallback;
1825 DWORD dwFrames;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001826} MCI_VD_STEP_PARMS, *LPMCI_VD_STEP_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00001827
1828typedef struct {
Alexandre Julliard491502b1997-11-01 19:08:16 +00001829 DWORD dwCallback;
1830 LPCSTR lpstrCommand;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001831} MCI_VD_ESCAPE_PARMSA, *LPMCI_VD_ESCAPE_PARMSA;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001832
1833typedef struct {
1834 DWORD dwCallback;
1835 LPCWSTR lpstrCommand;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001836} MCI_VD_ESCAPE_PARMSW, *LPMCI_VD_ESCAPE_PARMSW;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001837
Alexandre Julliarda845b881998-06-01 10:44:35 +00001838DECL_WINELIB_TYPE_AW(MCI_VD_ESCAPE_PARMS)
1839DECL_WINELIB_TYPE_AW(LPMCI_VD_ESCAPE_PARMS)
Alexandre Julliard58199531994-04-21 01:20:00 +00001840
1841#define MCI_WAVE_OPEN_BUFFER 0x00010000L
1842
1843#define MCI_WAVE_SET_FORMATTAG 0x00010000L
1844#define MCI_WAVE_SET_CHANNELS 0x00020000L
1845#define MCI_WAVE_SET_SAMPLESPERSEC 0x00040000L
1846#define MCI_WAVE_SET_AVGBYTESPERSEC 0x00080000L
1847#define MCI_WAVE_SET_BLOCKALIGN 0x00100000L
1848#define MCI_WAVE_SET_BITSPERSAMPLE 0x00200000L
1849
1850#define MCI_WAVE_INPUT 0x00400000L
1851#define MCI_WAVE_OUTPUT 0x00800000L
1852
1853#define MCI_WAVE_STATUS_FORMATTAG 0x00004001L
1854#define MCI_WAVE_STATUS_CHANNELS 0x00004002L
1855#define MCI_WAVE_STATUS_SAMPLESPERSEC 0x00004003L
1856#define MCI_WAVE_STATUS_AVGBYTESPERSEC 0x00004004L
1857#define MCI_WAVE_STATUS_BLOCKALIGN 0x00004005L
1858#define MCI_WAVE_STATUS_BITSPERSAMPLE 0x00004006L
1859#define MCI_WAVE_STATUS_LEVEL 0x00004007L
1860
1861#define MCI_WAVE_SET_ANYINPUT 0x04000000L
1862#define MCI_WAVE_SET_ANYOUTPUT 0x08000000L
1863
1864#define MCI_WAVE_GETDEVCAPS_INPUTS 0x00004001L
1865#define MCI_WAVE_GETDEVCAPS_OUTPUTS 0x00004002L
1866
1867typedef struct {
Alexandre Julliard491502b1997-11-01 19:08:16 +00001868 DWORD dwCallback;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001869 MCIDEVICEID wDeviceID;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001870 LPCSTR lpstrDeviceType;
1871 LPCSTR lpstrElementName;
1872 LPCSTR lpstrAlias;
1873 DWORD dwBufferSeconds;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001874} MCI_WAVE_OPEN_PARMSA, *LPMCI_WAVE_OPEN_PARMSA;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001875
1876typedef struct {
1877 DWORD dwCallback;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001878 MCIDEVICEID wDeviceID;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001879 LPCWSTR lpstrDeviceType;
1880 LPCWSTR lpstrElementName;
1881 LPCWSTR lpstrAlias;
1882 DWORD dwBufferSeconds;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001883} MCI_WAVE_OPEN_PARMSW, *LPMCI_WAVE_OPEN_PARMSW;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001884
Alexandre Julliarda845b881998-06-01 10:44:35 +00001885DECL_WINELIB_TYPE_AW(MCI_WAVE_OPEN_PARMS)
1886DECL_WINELIB_TYPE_AW(LPMCI_WAVE_OPEN_PARMS)
Alexandre Julliard58199531994-04-21 01:20:00 +00001887
1888typedef struct {
1889 DWORD dwCallback;
1890 DWORD dwFrom;
1891 DWORD dwTo;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001892} MCI_WAVE_DELETE_PARMS, *LPMCI_WAVE_DELETE_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00001893
1894typedef struct {
Alexandre Julliard491502b1997-11-01 19:08:16 +00001895 DWORD dwCallback;
1896 DWORD dwTimeFormat;
1897 DWORD dwAudio;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001898 UINT wInput;
1899 UINT wOutput;
1900 UINT wFormatTag;
1901 UINT nChannels;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001902 DWORD nSamplesPerSec;
1903 DWORD nAvgBytesPerSec;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001904 UINT nBlockAlign;
1905 UINT wBitsPerSample;
1906} MCI_WAVE_SET_PARMS, * LPMCI_WAVE_SET_PARMS;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001907
Alexandre Julliard58199531994-04-21 01:20:00 +00001908
1909#define MCI_SEQ_DIV_PPQN (0 + MCI_SEQ_OFFSET)
1910#define MCI_SEQ_DIV_SMPTE_24 (1 + MCI_SEQ_OFFSET)
1911#define MCI_SEQ_DIV_SMPTE_25 (2 + MCI_SEQ_OFFSET)
1912#define MCI_SEQ_DIV_SMPTE_30DROP (3 + MCI_SEQ_OFFSET)
1913#define MCI_SEQ_DIV_SMPTE_30 (4 + MCI_SEQ_OFFSET)
1914
1915#define MCI_SEQ_FORMAT_SONGPTR 0x4001
1916#define MCI_SEQ_FILE 0x4002
1917#define MCI_SEQ_MIDI 0x4003
1918#define MCI_SEQ_SMPTE 0x4004
1919#define MCI_SEQ_NONE 65533
1920
1921#define MCI_SEQ_STATUS_TEMPO 0x00004002L
1922#define MCI_SEQ_STATUS_PORT 0x00004003L
1923#define MCI_SEQ_STATUS_SLAVE 0x00004007L
1924#define MCI_SEQ_STATUS_MASTER 0x00004008L
1925#define MCI_SEQ_STATUS_OFFSET 0x00004009L
1926#define MCI_SEQ_STATUS_DIVTYPE 0x0000400AL
1927
1928#define MCI_SEQ_SET_TEMPO 0x00010000L
1929#define MCI_SEQ_SET_PORT 0x00020000L
1930#define MCI_SEQ_SET_SLAVE 0x00040000L
1931#define MCI_SEQ_SET_MASTER 0x00080000L
1932#define MCI_SEQ_SET_OFFSET 0x01000000L
1933
1934typedef struct {
1935 DWORD dwCallback;
1936 DWORD dwTimeFormat;
1937 DWORD dwAudio;
1938 DWORD dwTempo;
1939 DWORD dwPort;
1940 DWORD dwSlave;
1941 DWORD dwMaster;
1942 DWORD dwOffset;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00001943} MCI_SEQ_SET_PARMS, *LPMCI_SEQ_SET_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00001944
1945#define MCI_ANIM_OPEN_WS 0x00010000L
1946#define MCI_ANIM_OPEN_PARENT 0x00020000L
1947#define MCI_ANIM_OPEN_NOSTATIC 0x00040000L
1948
1949#define MCI_ANIM_PLAY_SPEED 0x00010000L
1950#define MCI_ANIM_PLAY_REVERSE 0x00020000L
1951#define MCI_ANIM_PLAY_FAST 0x00040000L
1952#define MCI_ANIM_PLAY_SLOW 0x00080000L
1953#define MCI_ANIM_PLAY_SCAN 0x00100000L
1954
1955#define MCI_ANIM_STEP_REVERSE 0x00010000L
1956#define MCI_ANIM_STEP_FRAMES 0x00020000L
1957
1958#define MCI_ANIM_STATUS_SPEED 0x00004001L
1959#define MCI_ANIM_STATUS_FORWARD 0x00004002L
1960#define MCI_ANIM_STATUS_HWND 0x00004003L
1961#define MCI_ANIM_STATUS_HPAL 0x00004004L
1962#define MCI_ANIM_STATUS_STRETCH 0x00004005L
1963
1964#define MCI_ANIM_INFO_TEXT 0x00010000L
1965
1966#define MCI_ANIM_GETDEVCAPS_CAN_REVERSE 0x00004001L
1967#define MCI_ANIM_GETDEVCAPS_FAST_RATE 0x00004002L
1968#define MCI_ANIM_GETDEVCAPS_SLOW_RATE 0x00004003L
1969#define MCI_ANIM_GETDEVCAPS_NORMAL_RATE 0x00004004L
1970#define MCI_ANIM_GETDEVCAPS_PALETTES 0x00004006L
1971#define MCI_ANIM_GETDEVCAPS_CAN_STRETCH 0x00004007L
1972#define MCI_ANIM_GETDEVCAPS_MAX_WINDOWS 0x00004008L
1973
1974#define MCI_ANIM_REALIZE_NORM 0x00010000L
1975#define MCI_ANIM_REALIZE_BKGD 0x00020000L
1976
1977#define MCI_ANIM_WINDOW_HWND 0x00010000L
1978#define MCI_ANIM_WINDOW_STATE 0x00040000L
1979#define MCI_ANIM_WINDOW_TEXT 0x00080000L
1980#define MCI_ANIM_WINDOW_ENABLE_STRETCH 0x00100000L
1981#define MCI_ANIM_WINDOW_DISABLE_STRETCH 0x00200000L
1982
1983#define MCI_ANIM_WINDOW_DEFAULT 0x00000000L
1984
1985#define MCI_ANIM_RECT 0x00010000L
1986#define MCI_ANIM_PUT_SOURCE 0x00020000L
1987#define MCI_ANIM_PUT_DESTINATION 0x00040000L
1988
1989#define MCI_ANIM_WHERE_SOURCE 0x00020000L
1990#define MCI_ANIM_WHERE_DESTINATION 0x00040000L
1991
1992#define MCI_ANIM_UPDATE_HDC 0x00020000L
1993
1994typedef struct {
Alexandre Julliard491502b1997-11-01 19:08:16 +00001995 DWORD dwCallback;
Alexandre Julliarda3960291999-02-26 11:11:13 +00001996 MCIDEVICEID wDeviceID;
Alexandre Julliard491502b1997-11-01 19:08:16 +00001997 LPCSTR lpstrDeviceType;
1998 LPCSTR lpstrElementName;
1999 LPCSTR lpstrAlias;
2000 DWORD dwStyle;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002001 HWND hWndParent;
2002} MCI_ANIM_OPEN_PARMSA, *LPMCI_ANIM_OPEN_PARMSA;
Alexandre Julliard491502b1997-11-01 19:08:16 +00002003
2004typedef struct {
2005 DWORD dwCallback;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002006 MCIDEVICEID wDeviceID;
Marcus Meissner89b1fc91999-05-01 10:39:28 +00002007 LPCWSTR lpstrDeviceType;
2008 LPCWSTR lpstrElementName;
2009 LPCWSTR lpstrAlias;
Alexandre Julliard491502b1997-11-01 19:08:16 +00002010 DWORD dwStyle;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002011 HWND hWndParent;
2012} MCI_ANIM_OPEN_PARMSW, *LPMCI_ANIM_OPEN_PARMSW;
Alexandre Julliard491502b1997-11-01 19:08:16 +00002013
Alexandre Julliarda845b881998-06-01 10:44:35 +00002014DECL_WINELIB_TYPE_AW(MCI_ANIM_OPEN_PARMS)
2015DECL_WINELIB_TYPE_AW(LPMCI_ANIM_OPEN_PARMS)
Alexandre Julliard58199531994-04-21 01:20:00 +00002016
2017typedef struct {
2018 DWORD dwCallback;
2019 DWORD dwFrom;
2020 DWORD dwTo;
2021 DWORD dwSpeed;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00002022} MCI_ANIM_PLAY_PARMS, *LPMCI_ANIM_PLAY_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00002023
2024typedef struct {
2025 DWORD dwCallback;
2026 DWORD dwFrames;
Alexandre Julliard1285c2f1996-05-06 16:06:24 +00002027} MCI_ANIM_STEP_PARMS, *LPMCI_ANIM_STEP_PARMS;
Alexandre Julliard58199531994-04-21 01:20:00 +00002028
2029typedef struct {
Alexandre Julliard491502b1997-11-01 19:08:16 +00002030 DWORD dwCallback;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002031 HWND hWnd;
2032 UINT nCmdShow;
Alexandre Julliard491502b1997-11-01 19:08:16 +00002033 LPCSTR lpstrText;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002034} MCI_ANIM_WINDOW_PARMSA, *LPMCI_ANIM_WINDOW_PARMSA;
Alexandre Julliard491502b1997-11-01 19:08:16 +00002035
2036typedef struct {
2037 DWORD dwCallback;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002038 HWND hWnd;
2039 UINT nCmdShow;
Alexandre Julliard491502b1997-11-01 19:08:16 +00002040 LPCWSTR lpstrText;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002041} MCI_ANIM_WINDOW_PARMSW, *LPMCI_ANIM_WINDOW_PARMSW;
Alexandre Julliard491502b1997-11-01 19:08:16 +00002042
Alexandre Julliarda845b881998-06-01 10:44:35 +00002043DECL_WINELIB_TYPE_AW(MCI_ANIM_WINDOW_PARMS)
2044DECL_WINELIB_TYPE_AW(LPMCI_ANIM_WINDOW_PARMS)
Alexandre Julliard58199531994-04-21 01:20:00 +00002045
2046typedef struct {
Alexandre Julliard491502b1997-11-01 19:08:16 +00002047 DWORD dwCallback;
2048#ifdef MCI_USE_OFFEXT
Alexandre Julliarda3960291999-02-26 11:11:13 +00002049 POINT ptOffset;
2050 POINT ptExtent;
Alexandre Julliard491502b1997-11-01 19:08:16 +00002051#else /* ifdef MCI_USE_OFFEXT */
Alexandre Julliarda3960291999-02-26 11:11:13 +00002052 RECT rc;
Alexandre Julliard491502b1997-11-01 19:08:16 +00002053#endif /* ifdef MCI_USE_OFFEXT */
Alexandre Julliarda3960291999-02-26 11:11:13 +00002054} MCI_ANIM_RECT_PARMS, *LPMCI_ANIM_RECT_PARMS;
Alexandre Julliard491502b1997-11-01 19:08:16 +00002055
Alexandre Julliard58199531994-04-21 01:20:00 +00002056
2057typedef struct {
2058 DWORD dwCallback;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002059 RECT rc;
2060 HDC hDC;
2061} MCI_ANIM_UPDATE_PARMS, *LPMCI_ANIM_UPDATE_PARMS;
Alexandre Julliard491502b1997-11-01 19:08:16 +00002062
Alexandre Julliard58199531994-04-21 01:20:00 +00002063
2064#define MCI_OVLY_OPEN_WS 0x00010000L
2065#define MCI_OVLY_OPEN_PARENT 0x00020000L
2066
2067#define MCI_OVLY_STATUS_HWND 0x00004001L
2068#define MCI_OVLY_STATUS_STRETCH 0x00004002L
2069
2070#define MCI_OVLY_INFO_TEXT 0x00010000L
2071
2072#define MCI_OVLY_GETDEVCAPS_CAN_STRETCH 0x00004001L
2073#define MCI_OVLY_GETDEVCAPS_CAN_FREEZE 0x00004002L
2074#define MCI_OVLY_GETDEVCAPS_MAX_WINDOWS 0x00004003L
2075
2076#define MCI_OVLY_WINDOW_HWND 0x00010000L
2077#define MCI_OVLY_WINDOW_STATE 0x00040000L
2078#define MCI_OVLY_WINDOW_TEXT 0x00080000L
2079#define MCI_OVLY_WINDOW_ENABLE_STRETCH 0x00100000L
2080#define MCI_OVLY_WINDOW_DISABLE_STRETCH 0x00200000L
2081
2082#define MCI_OVLY_WINDOW_DEFAULT 0x00000000L
2083
2084#define MCI_OVLY_RECT 0x00010000L
2085#define MCI_OVLY_PUT_SOURCE 0x00020000L
2086#define MCI_OVLY_PUT_DESTINATION 0x00040000L
2087#define MCI_OVLY_PUT_FRAME 0x00080000L
2088#define MCI_OVLY_PUT_VIDEO 0x00100000L
2089
2090#define MCI_OVLY_WHERE_SOURCE 0x00020000L
2091#define MCI_OVLY_WHERE_DESTINATION 0x00040000L
2092#define MCI_OVLY_WHERE_FRAME 0x00080000L
2093#define MCI_OVLY_WHERE_VIDEO 0x00100000L
2094
2095typedef struct {
Alexandre Julliard491502b1997-11-01 19:08:16 +00002096 DWORD dwCallback;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002097 MCIDEVICEID wDeviceID;
Alexandre Julliard491502b1997-11-01 19:08:16 +00002098 LPCSTR lpstrDeviceType;
2099 LPCSTR lpstrElementName;
2100 LPCSTR lpstrAlias;
2101 DWORD dwStyle;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002102 HWND hWndParent;
2103} MCI_OVLY_OPEN_PARMSA, *LPMCI_OVLY_OPEN_PARMSA;
Alexandre Julliard491502b1997-11-01 19:08:16 +00002104
2105typedef struct {
2106 DWORD dwCallback;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002107 MCIDEVICEID wDeviceID;
Alexandre Julliard491502b1997-11-01 19:08:16 +00002108 LPCWSTR lpstrDeviceType;
2109 LPCWSTR lpstrElementName;
2110 LPCWSTR lpstrAlias;
2111 DWORD dwStyle;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002112 HWND hWndParent;
2113} MCI_OVLY_OPEN_PARMSW, *LPMCI_OVLY_OPEN_PARMSW;
Alexandre Julliard491502b1997-11-01 19:08:16 +00002114
Alexandre Julliarda845b881998-06-01 10:44:35 +00002115DECL_WINELIB_TYPE_AW(MCI_OVLY_OPEN_PARMS)
2116DECL_WINELIB_TYPE_AW(LPMCI_OVLY_OPEN_PARMS)
Alexandre Julliard491502b1997-11-01 19:08:16 +00002117
2118typedef struct {
2119 DWORD dwCallback;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002120 HWND hWnd;
2121 UINT nCmdShow;
Alexandre Julliard491502b1997-11-01 19:08:16 +00002122 LPCSTR lpstrText;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002123} MCI_OVLY_WINDOW_PARMSA, *LPMCI_OVLY_WINDOW_PARMSA;
Alexandre Julliard491502b1997-11-01 19:08:16 +00002124
2125typedef struct {
2126 DWORD dwCallback;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002127 HWND hWnd;
2128 UINT nCmdShow;
Alexandre Julliard491502b1997-11-01 19:08:16 +00002129 LPCWSTR lpstrText;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002130} MCI_OVLY_WINDOW_PARMSW, *LPMCI_OVLY_WINDOW_PARMSW;
Alexandre Julliard491502b1997-11-01 19:08:16 +00002131
Alexandre Julliarda845b881998-06-01 10:44:35 +00002132DECL_WINELIB_TYPE_AW(MCI_OVLY_WINDOW_PARMS)
2133DECL_WINELIB_TYPE_AW(LPMCI_OVLY_WINDOW_PARMS)
Alexandre Julliard58199531994-04-21 01:20:00 +00002134
2135typedef struct {
2136 DWORD dwCallback;
2137#ifdef MCI_USE_OFFEXT
Alexandre Julliarda3960291999-02-26 11:11:13 +00002138 POINT ptOffset;
2139 POINT ptExtent;
Alexandre Julliard491502b1997-11-01 19:08:16 +00002140#else /* ifdef MCI_USE_OFFEXT */
Alexandre Julliarda3960291999-02-26 11:11:13 +00002141 RECT rc;
Alexandre Julliard491502b1997-11-01 19:08:16 +00002142#endif /* ifdef MCI_USE_OFFEXT */
Alexandre Julliarda3960291999-02-26 11:11:13 +00002143} MCI_OVLY_RECT_PARMS, *LPMCI_OVLY_RECT_PARMS;
Alexandre Julliard491502b1997-11-01 19:08:16 +00002144
Alexandre Julliard58199531994-04-21 01:20:00 +00002145
2146typedef struct {
2147 DWORD dwCallback;
2148 LPCSTR lpfilename;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002149 RECT rc;
2150} MCI_OVLY_SAVE_PARMSA, *LPMCI_OVLY_SAVE_PARMSA;
Alexandre Julliard58199531994-04-21 01:20:00 +00002151
Alexandre Julliard491502b1997-11-01 19:08:16 +00002152typedef struct {
2153 DWORD dwCallback;
2154 LPCWSTR lpfilename;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002155 RECT rc;
2156} MCI_OVLY_SAVE_PARMSW, *LPMCI_OVLY_SAVE_PARMSW;
Alexandre Julliard491502b1997-11-01 19:08:16 +00002157
Alexandre Julliarda845b881998-06-01 10:44:35 +00002158DECL_WINELIB_TYPE_AW(MCI_OVLY_SAVE_PARMS)
2159DECL_WINELIB_TYPE_AW(LPMCI_OVLY_SAVE_PARMS)
Alexandre Julliard491502b1997-11-01 19:08:16 +00002160
2161typedef struct {
2162 DWORD dwCallback;
2163 LPCSTR lpfilename;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002164 RECT rc;
2165} MCI_OVLY_LOAD_PARMSA, *LPMCI_OVLY_LOAD_PARMSA;
Alexandre Julliard491502b1997-11-01 19:08:16 +00002166
2167typedef struct {
2168 DWORD dwCallback;
2169 LPCWSTR lpfilename;
Alexandre Julliarda3960291999-02-26 11:11:13 +00002170 RECT rc;
2171} MCI_OVLY_LOAD_PARMSW, *LPMCI_OVLY_LOAD_PARMSW;
Alexandre Julliard491502b1997-11-01 19:08:16 +00002172
Alexandre Julliarda845b881998-06-01 10:44:35 +00002173DECL_WINELIB_TYPE_AW(MCI_OVLY_LOAD_PARMS)
2174DECL_WINELIB_TYPE_AW(LPMCI_OVLY_LOAD_PARMS)
Alexandre Julliard58199531994-04-21 01:20:00 +00002175
Patrik Stridvallc7a8dde1999-04-25 12:36:53 +00002176#include "poppack.h"
Alexandre Julliard36ca1361994-06-02 22:38:20 +00002177
Alexandre Julliardf4eb65b1999-02-09 14:22:01 +00002178#ifdef __cplusplus
2179}
2180#endif
2181
Alexandre Julliardc6c09441997-01-12 18:32:19 +00002182#endif /* __WINE_MMSYSTEM_H */