source: trunk/src/winmm/mcimm.h@ 10367

Last change on this file since 10367 was 4748, checked in by sandervl, 25 years ago

CW: Ported Wine MCI code

File size: 5.0 KB
Line 
1/* -*- tab-width: 8; c-basic-offset: 4 -*- */
2
3/*****************************************************************************
4 * Copyright 1998, Luiz Otavio L. Zorzella
5 * 1999, Eric Pouech
6 * 2000, Chris Wohlgemuth
7 * File: mcimm.h
8 * Purpose: multimedia declarations (internal to WINMM & MMSYSTEM DLLs)
9 *
10 *****************************************************************************
11 */
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17#include "mmddk.h"
18
19typedef struct tagWINE_MLD {
20/* EPP struct tagWINE_MLD* lpNext; */ /* not used so far */
21 UINT uDeviceID;
22 UINT type;
23 UINT mmdIndex; /* index to low-level driver in MMDrvs table */
24 DWORD dwDriverInstance; /* this value is driver related, as opposed to
25 * opendesc.dwInstance which is client (callback) related */
26 WORD bFrom32;
27 WORD dwFlags;
28 DWORD dwCallback;
29 DWORD dwClientInstance;
30} WINE_MLD, *LPWINE_MLD;
31
32typedef struct {
33 WINE_MLD mld;
34} WINE_WAVE, *LPWINE_WAVE;
35
36typedef struct {
37 WINE_MLD mld;
38 MIDIOPENDESC mod; /* FIXME: should be removed */
39} WINE_MIDI, *LPWINE_MIDI;
40
41typedef struct {
42 WINE_MLD mld;
43} WINE_MIXER, *LPWINE_MIXER;
44
45extern BOOL MMDRV_Init(void);
46extern UINT MMDRV_GetNum(UINT);
47extern LPWINE_MLD MMDRV_Alloc(UINT size, UINT type, LPHANDLE hndl, DWORD* dwFlags,
48 DWORD* dwCallback, DWORD* dwInstance, BOOL bFrom32);
49extern void MMDRV_Free(HANDLE hndl, LPWINE_MLD mld);
50extern DWORD MMDRV_Open(LPWINE_MLD mld, UINT wMsg, DWORD dwParam1, DWORD dwParam2);
51extern DWORD MMDRV_Close(LPWINE_MLD mld, UINT wMsg);
52extern LPWINE_MLD MMDRV_Get(HANDLE hndl, UINT type, BOOL bCanBeID);
53extern LPWINE_MLD MMDRV_GetRelated(HANDLE hndl, UINT srcType, BOOL bSrcCanBeID, UINT dstTyped);
54extern DWORD MMDRV_Message(LPWINE_MLD mld, WORD wMsg, DWORD dwParam1, DWORD dwParam2, BOOL bFrom32);
55extern UINT MMDRV_PhysicalFeatures(LPWINE_MLD mld, UINT uMsg, DWORD dwParam1, DWORD dwParam2);
56
57#define MMDRV_AUX 0
58#define MMDRV_MIXER 1
59#define MMDRV_MIDIIN 2
60#define MMDRV_MIDIOUT 3
61#define MMDRV_WAVEIN 4
62#define MMDRV_WAVEOUT 5
63#define MMDRV_MAX 6
64
65#define WINE_MMTHREAD_CREATED 0x4153494C /* "BSIL" */
66#define WINE_MMTHREAD_DELETED 0xDEADDEAD
67
68typedef struct {
69 DWORD dwSignature; /* 00 "BSIL" when ok, 0xDEADDEAD when being deleted */
70 DWORD dwCounter; /* 04 > 1 when in mmThread functions */
71 HANDLE hThread; /* 08 hThread */
72 DWORD dwThreadID; /* 0C */
73 FARPROC16 fpThread; /* 10 address of thread proc (segptr or lin depending on dwFlags) */
74 DWORD dwThreadPmt; /* 14 parameter to be passed upon thread creation to fpThread */
75 DWORD dwSignalCount; /* 18 counter used for signaling */
76 HANDLE hEvent; /* 1C event */
77 HANDLE hVxD; /* 20 return from OpenVxDHandle */
78 DWORD dwStatus; /* 24 0x00, 0x10, 0x20, 0x30 */
79 DWORD dwFlags; /* 28 dwFlags upon creation */
80 HANDLE16 hTask; /* 2C handle to created task */
81} WINE_MMTHREAD;
82
83typedef struct tagWINE_MCIDRIVER {
84 UINT wDeviceID;
85 UINT wType;
86 LPSTR lpstrElementName;
87 LPSTR lpstrDeviceType;
88 LPSTR lpstrAlias;
89 HDRVR hDrv;
90 DRIVERPROC16 driverProc;
91 DWORD dwPrivate;
92 YIELDPROC lpfnYieldProc;
93 DWORD dwYieldData;
94 BOOL bIs32;
95 HTASK16 hCreatorTask;
96 UINT uTypeCmdTable;
97 UINT uSpecificCmdTable;
98 struct tagWINE_MCIDRIVER*lpNext;
99} WINE_MCIDRIVER, *LPWINE_MCIDRIVER;
100
101#define WINE_TIMER_IS32 0x80
102
103typedef struct tagWINE_TIMERENTRY {
104 UINT wDelay;
105 UINT wResol;
106 FARPROC16 lpFunc;
107 DWORD dwUser;
108 UINT16 wFlags;
109 UINT16 wTimerID;
110 UINT uCurTime;
111 struct tagWINE_TIMERENTRY* lpNext;
112} WINE_TIMERENTRY, *LPWINE_TIMERENTRY;
113
114typedef struct tagWINE_MMIO {
115 MMIOINFO info;
116 struct IOProcList* ioProc;
117 BOOL bTmpIOProc;
118 HANDLE hMem;
119 SEGPTR buffer16;
120 struct tagWINE_MMIO* lpNext;
121 BOOL bBufferLoaded;
122} WINE_MMIO, *LPWINE_MMIO;
123
124typedef struct tagWINE_MM_IDATA {
125 /* iData reference */
126 DWORD dwThisProcess;
127 struct tagWINE_MM_IDATA* lpNextIData;
128 /* winmm part */
129 HANDLE hWinMM32Instance;
130 HANDLE hWinMM16Instance;
131 HANDLE h16Module32;
132 CRITICAL_SECTION cs;
133 /* mm timer part */
134 HANDLE hMMTimer;
135 DWORD mmSysTimeMS;
136 LPWINE_TIMERENTRY lpTimerList;
137 int nSizeLpTimers;
138 LPWINE_TIMERENTRY lpTimers;
139 /* mci part */
140 LPWINE_MCIDRIVER lpMciDrvs;
141 /* low level drivers (unused yet) */
142 /* LPWINE_WAVE lpWave; */
143 /* LPWINE_MIDI lpMidi; */
144 /* LPWINE_MIXER lpMixer; */
145 /* mmio part */
146 LPWINE_MMIO lpMMIO;
147} WINE_MM_IDATA, *LPWINE_MM_IDATA;
148
149/* function prototypes */
150
151typedef LONG (*MCIPROC16)(DWORD, HDRVR16, WORD, DWORD, DWORD);
152typedef LONG (*MCIPROC)(DWORD, HDRVR, DWORD, DWORD, DWORD);
153
154
155#ifdef __cplusplus
156}
157#endif
158
159
160
161
162
163
164
165
166
167
168
169
170
Note: See TracBrowser for help on using the repository browser.