Add stubs around ScriptStringAnalyse to avoid PAF crash.
[wine.git] / dlls / dmime / dmime_private.h
blob6fe3fb55edf2faadab68300f53a6c94010833b6a
1 /* DirectMusicInteractiveEngine Private Include
3 * Copyright (C) 2003-2004 Rok Mandeljc
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Library General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 #ifndef __WINE_DMIME_PRIVATE_H
21 #define __WINE_DMIME_PRIVATE_H
23 #include <stdio.h>
24 #include <stdarg.h>
25 #include <string.h>
27 #define COBJMACROS
29 #include "windef.h"
30 #include "winbase.h"
31 #include "winnt.h"
32 #include "wingdi.h"
33 #include "winuser.h"
35 #include "wine/debug.h"
36 #include "wine/list.h"
37 #include "wine/unicode.h"
38 #include "winreg.h"
39 #include "objbase.h"
41 #include "dmusici.h"
42 #include "dmusicf.h"
43 #include "dmusics.h"
45 /*****************************************************************************
46 * Interfaces
48 typedef struct IDirectMusicPerformance8Impl IDirectMusicPerformance8Impl;
49 typedef struct IDirectMusicSegment8Impl IDirectMusicSegment8Impl;
50 typedef struct IDirectMusicSegmentState8Impl IDirectMusicSegmentState8Impl;
51 typedef struct IDirectMusicGraphImpl IDirectMusicGraphImpl;
52 typedef struct IDirectMusicAudioPathImpl IDirectMusicAudioPathImpl;
53 typedef struct IDirectMusicTool8Impl IDirectMusicTool8Impl;
54 typedef struct IDirectMusicPatternTrackImpl IDirectMusicPatternTrackImpl;
56 typedef struct IDirectMusicLyricsTrack IDirectMusicLyricsTrack;
57 typedef struct IDirectMusicMarkerTrack IDirectMusicMarkerTrack;
58 typedef struct IDirectMusicParamControlTrack IDirectMusicParamControlTrack;
59 typedef struct IDirectMusicSegTriggerTrack IDirectMusicSegTriggerTrack;
60 typedef struct IDirectMusicSeqTrack IDirectMusicSeqTrack;
61 typedef struct IDirectMusicSysExTrack IDirectMusicSysExTrack;
62 typedef struct IDirectMusicTempoTrack IDirectMusicTempoTrack;
63 typedef struct IDirectMusicTimeSigTrack IDirectMusicTimeSigTrack;
64 typedef struct IDirectMusicWaveTrack IDirectMusicWaveTrack;
66 /*****************************************************************************
67 * ClassFactory
69 extern HRESULT WINAPI DMUSIC_CreateDirectMusicPerformanceImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter);
70 extern HRESULT WINAPI DMUSIC_CreateDirectMusicSegmentImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter);
71 extern HRESULT WINAPI DMUSIC_CreateDirectMusicSegmentStateImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter);
72 extern HRESULT WINAPI DMUSIC_CreateDirectMusicGraphImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter);
73 extern HRESULT WINAPI DMUSIC_CreateDirectMusicAudioPathImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter);
74 extern HRESULT WINAPI DMUSIC_CreateDirectMusicToolImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter);
75 extern HRESULT WINAPI DMUSIC_CreateDirectMusicPatternTrackImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter);
77 extern HRESULT WINAPI DMUSIC_CreateDirectMusicLyricsTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
78 extern HRESULT WINAPI DMUSIC_CreateDirectMusicMarkerTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
79 extern HRESULT WINAPI DMUSIC_CreateDirectMusicParamControlTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
80 extern HRESULT WINAPI DMUSIC_CreateDirectMusicSegTriggerTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
81 extern HRESULT WINAPI DMUSIC_CreateDirectMusicSeqTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
82 extern HRESULT WINAPI DMUSIC_CreateDirectMusicSysExTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
83 extern HRESULT WINAPI DMUSIC_CreateDirectMusicTempoTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
84 extern HRESULT WINAPI DMUSIC_CreateDirectMusicTimeSigTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
85 extern HRESULT WINAPI DMUSIC_CreateDirectMusicWaveTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
88 /*****************************************************************************
89 * Auxiliary definitions
91 typedef struct _DMUS_PRIVATE_SEGMENT_TRACK {
92 struct list entry; /* for listing elements */
93 DWORD dwGroupBits;
94 IDirectMusicTrack* pTrack;
95 } DMUS_PRIVATE_SEGMENT_TRACK, *LPDMUS_PRIVATE_SEGMENT_TRACK;
97 typedef struct _DMUS_PRIVATE_TEMPO_ITEM {
98 struct list entry; /* for listing elements */
99 DMUS_IO_TEMPO_ITEM item;
100 } DMUS_PRIVATE_TEMPO_ITEM, *LPDMUS_PRIVATE_TEMPO_ITEM;
102 typedef struct _DMUS_PRIVATE_SEGMENT_ITEM {
103 struct list entry; /* for listing elements */
104 DMUS_IO_SEGMENT_ITEM_HEADER header;
105 IDirectMusicObject* pObject;
106 WCHAR wszName[DMUS_MAX_NAME];
107 } DMUS_PRIVATE_SEGMENT_ITEM, *LPDMUS_PRIVATE_SEGMENT_ITEM;
109 typedef struct _DMUS_PRIVATE_GRAPH_TOOL {
110 struct list entry; /* for listing elements */
111 DWORD dwIndex;
112 IDirectMusicTool* pTool;
113 } DMUS_PRIVATE_GRAPH_TOOL, *LPDMUS_PRIVATE_GRAPH_TOOL;
115 typedef struct _DMUS_PRIVATE_TEMPO_PLAY_STATE {
116 DWORD dummy;
117 } DMUS_PRIVATE_TEMPO_PLAY_STATE, *LPDMUS_PRIVATE_TEMPO_PLAY_STATE;
119 /* some sort of aux. performance channel: as far as i can understand, these are
120 used to represent a particular midi channel in particular group at particular
121 group; so all we need to do is to fill it with parent port, group and midi
122 channel ? */
123 typedef struct DMUSIC_PRIVATE_PCHANNEL_ {
124 DWORD channel; /* map to this channel... */
125 DWORD group; /* ... in this group ... */
126 IDirectMusicPort *port; /* ... at this port */
127 } DMUSIC_PRIVATE_PCHANNEL, *LPDMUSIC_PRIVATE_PCHANNEL;
129 /*****************************************************************************
130 * IDirectMusicPerformance8Impl implementation structure
132 struct IDirectMusicPerformance8Impl {
133 /* IUnknown fields */
134 const IDirectMusicPerformance8Vtbl *lpVtbl;
135 LONG ref;
137 /* IDirectMusicPerformanceImpl fields */
138 IDirectMusic8* pDirectMusic;
139 IDirectSound* pDirectSound;
140 IDirectMusicGraph* pToolGraph;
141 DMUS_AUDIOPARAMS pParams;
143 /* global parameters */
144 BOOL fAutoDownload;
145 char cMasterGrooveLevel;
146 float fMasterTempo;
147 long lMasterVolume;
149 /* performance channels */
150 DMUSIC_PRIVATE_PCHANNEL PChannel[1];
152 /* IDirectMusicPerformance8Impl fields */
153 IDirectMusicAudioPath* pDefaultPath;
154 HANDLE hNotification;
155 REFERENCE_TIME rtMinimum;
157 REFERENCE_TIME rtLatencyTime;
158 DWORD dwBumperLength;
159 DWORD dwPrepareTime;
160 /** Message Processing */
161 HANDLE procThread;
162 DWORD procThreadId;
163 REFERENCE_TIME procThreadStartTime;
164 BOOL procThreadTicStarted;
165 CRITICAL_SECTION safe;
166 struct DMUS_PMSGItem* head;
167 struct DMUS_PMSGItem* imm_head;
170 /*****************************************************************************
171 * IDirectMusicSegment8Impl implementation structure
173 struct IDirectMusicSegment8Impl {
174 /* IUnknown fields */
175 const IUnknownVtbl *UnknownVtbl;
176 const IDirectMusicSegment8Vtbl *SegmentVtbl;
177 const IDirectMusicObjectVtbl *ObjectVtbl;
178 const IPersistStreamVtbl *PersistStreamVtbl;
179 LONG ref;
181 /* IDirectMusicSegment8Impl fields */
182 LPDMUS_OBJECTDESC pDesc;
183 DMUS_IO_SEGMENT_HEADER header;
184 IDirectMusicGraph* pGraph;
185 struct list Tracks;
188 /*****************************************************************************
189 * IDirectMusicSegmentState8Impl implementation structure
191 struct IDirectMusicSegmentState8Impl {
192 /* IUnknown fields */
193 const IDirectMusicSegmentState8Vtbl *lpVtbl;
194 LONG ref;
196 /* IDirectMusicSegmentState8Impl fields */
199 /*****************************************************************************
200 * IDirectMusicGraphImpl implementation structure
202 struct IDirectMusicGraphImpl {
203 /* IUnknown fields */
204 const IUnknownVtbl *UnknownVtbl;
205 const IDirectMusicGraphVtbl *GraphVtbl;
206 const IDirectMusicObjectVtbl *ObjectVtbl;
207 const IPersistStreamVtbl *PersistStreamVtbl;
208 LONG ref;
210 /* IDirectMusicGraphImpl fields */
211 LPDMUS_OBJECTDESC pDesc;
212 WORD num_tools;
213 struct list Tools;
216 /*****************************************************************************
217 * IDirectMusicAudioPathImpl implementation structure
219 struct IDirectMusicAudioPathImpl {
220 /* IUnknown fields */
221 const IUnknownVtbl *UnknownVtbl;
222 const IDirectMusicAudioPathVtbl *AudioPathVtbl;
223 const IDirectMusicObjectVtbl *ObjectVtbl;
224 const IPersistStreamVtbl *PersistStreamVtbl;
225 LONG ref;
227 /* IDirectMusicAudioPathImpl fields */
228 LPDMUS_OBJECTDESC pDesc;
230 IDirectMusicPerformance8* pPerf;
231 IDirectMusicGraph* pToolGraph;
232 IDirectSoundBuffer* pDSBuffer;
233 IDirectSoundBuffer* pPrimary;
235 BOOL fActive;
238 /*****************************************************************************
239 * IDirectMusicTool8Impl implementation structure
241 struct IDirectMusicTool8Impl {
242 /* IUnknown fields */
243 const IDirectMusicTool8Vtbl *lpVtbl;
244 LONG ref;
246 /* IDirectMusicTool8Impl fields */
249 /*****************************************************************************
250 * IDirectMusicPatternTrackImpl implementation structure
252 struct IDirectMusicPatternTrackImpl {
253 /* IUnknown fields */
254 const IDirectMusicPatternTrackVtbl *lpVtbl;
255 LONG ref;
257 /* IDirectMusicPatternTrackImpl fields */
260 /*****************************************************************************
261 * IDirectMusicLyricsTrack implementation structure
263 struct IDirectMusicLyricsTrack
265 /* IUnknown fields */
266 const IUnknownVtbl *UnknownVtbl;
267 const IDirectMusicTrack8Vtbl *TrackVtbl;
268 const IPersistStreamVtbl *PersistStreamVtbl;
269 LONG ref;
271 /* IDirectMusicLyricsTrack fields */
272 LPDMUS_OBJECTDESC pDesc;
275 /*****************************************************************************
276 * IDirectMusicMarkerTrack implementation structure
278 struct IDirectMusicMarkerTrack {
279 /* IUnknown fields */
280 const IUnknownVtbl *UnknownVtbl;
281 const IDirectMusicTrack8Vtbl *TrackVtbl;
282 const IPersistStreamVtbl *PersistStreamVtbl;
283 LONG ref;
285 /* IDirectMusicMarkerTrack fields */
286 LPDMUS_OBJECTDESC pDesc;
289 /*****************************************************************************
290 * IDirectMusicParamControlTrack implementation structure
292 struct IDirectMusicParamControlTrack {
293 /* IUnknown fields */
294 const IUnknownVtbl *UnknownVtbl;
295 const IDirectMusicTrack8Vtbl *TrackVtbl;
296 const IPersistStreamVtbl *PersistStreamVtbl;
297 LONG ref;
299 /* IDirectMusicParamControlTrack fields */
300 LPDMUS_OBJECTDESC pDesc;
303 /*****************************************************************************
304 * IDirectMusicSegTriggerTrack implementation structure
306 struct IDirectMusicSegTriggerTrack {
307 /* IUnknown fields */
308 const IUnknownVtbl *UnknownVtbl;
309 const IDirectMusicTrack8Vtbl *TrackVtbl;
310 const IPersistStreamVtbl *PersistStreamVtbl;
311 LONG ref;
313 /* IDirectMusicSegTriggerTrack fields */
314 LPDMUS_OBJECTDESC pDesc;
316 struct list Items;
319 /*****************************************************************************
320 * IDirectMusicSeqTrack implementation structure
322 struct IDirectMusicSeqTrack {
323 /* IUnknown fields */
324 const IUnknownVtbl *UnknownVtbl;
325 const IDirectMusicTrack8Vtbl *TrackVtbl;
326 const IPersistStreamVtbl *PersistStreamVtbl;
327 LONG ref;
329 /* IDirectMusicSeqTrack fields */
330 LPDMUS_OBJECTDESC pDesc;
333 /*****************************************************************************
334 * IDirectMusicSysExTrack implementation structure
336 struct IDirectMusicSysExTrack {
337 /* IUnknown fields */
338 const IUnknownVtbl *UnknownVtbl;
339 const IDirectMusicTrack8Vtbl *TrackVtbl;
340 const IPersistStreamVtbl *PersistStreamVtbl;
341 LONG ref;
343 /* IDirectMusicSysExTrack fields */
344 LPDMUS_OBJECTDESC pDesc;
347 /*****************************************************************************
348 * IDirectMusicTempoTrack implementation structure
350 struct IDirectMusicTempoTrack {
351 /* IUnknown fields */
352 const IUnknownVtbl *UnknownVtbl;
353 const IDirectMusicTrack8Vtbl *TrackVtbl;
354 const IPersistStreamVtbl *PersistStreamVtbl;
355 LONG ref;
357 /* IDirectMusicTempoTrack fields */
358 LPDMUS_OBJECTDESC pDesc;
359 BOOL enabled;
360 struct list Items;
363 /*****************************************************************************
364 * IDirectMusicTimeSigTrack implementation structure
366 struct IDirectMusicTimeSigTrack {
367 /* IUnknown fields */
368 const IUnknownVtbl *UnknownVtbl;
369 const IDirectMusicTrack8Vtbl *TrackVtbl;
370 const IPersistStreamVtbl *PersistStreamVtbl;
371 LONG ref;
373 /* IDirectMusicTimeSigTrack fields */
374 LPDMUS_OBJECTDESC pDesc;
377 /*****************************************************************************
378 * IDirectMusicWaveTrack implementation structure
380 struct IDirectMusicWaveTrack {
381 /* IUnknown fields */
382 const IUnknownVtbl *UnknownVtbl;
383 const IDirectMusicTrack8Vtbl *TrackVtbl;
384 const IPersistStreamVtbl *PersistStreamVtbl;
385 LONG ref;
387 /* IDirectMusicWaveTrack fields */
388 LPDMUS_OBJECTDESC pDesc;
391 /**********************************************************************
392 * Dll lifetime tracking declaration for dmime.dll
394 extern LONG DMIME_refCount;
395 static inline void DMIME_LockModule(void) { InterlockedIncrement( &DMIME_refCount ); }
396 static inline void DMIME_UnlockModule(void) { InterlockedDecrement( &DMIME_refCount ); }
398 /*****************************************************************************
399 * Misc.
402 #include "dmutils.h"
404 #endif /* __WINE_DMIME_PRIVATE_H */