gdiplus: Implement GdipSetLineSigmaBlend.
[wine/multimedia.git] / dlls / dmime / dmime_private.h
blob308c2c8f46bce89a70d56f5e7457582c73eb82c7
1 /* DirectMusicInteractiveEngine Private Include
3 * Copyright (C) 2003-2004 Rok Mandeljc
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (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 GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, 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"
44 #include "dmusicc.h"
46 /*****************************************************************************
47 * Interfaces
49 typedef struct IDirectMusicPerformance8Impl IDirectMusicPerformance8Impl;
50 typedef struct IDirectMusicSegment8Impl IDirectMusicSegment8Impl;
51 typedef struct IDirectMusicSegmentState8Impl IDirectMusicSegmentState8Impl;
52 typedef struct IDirectMusicGraphImpl IDirectMusicGraphImpl;
53 typedef struct IDirectMusicAudioPathImpl IDirectMusicAudioPathImpl;
54 typedef struct IDirectMusicTool8Impl IDirectMusicTool8Impl;
55 typedef struct IDirectMusicPatternTrackImpl IDirectMusicPatternTrackImpl;
57 typedef struct IDirectMusicLyricsTrack IDirectMusicLyricsTrack;
58 typedef struct IDirectMusicMarkerTrack IDirectMusicMarkerTrack;
59 typedef struct IDirectMusicParamControlTrack IDirectMusicParamControlTrack;
60 typedef struct IDirectMusicSegTriggerTrack IDirectMusicSegTriggerTrack;
61 typedef struct IDirectMusicSeqTrack IDirectMusicSeqTrack;
62 typedef struct IDirectMusicSysExTrack IDirectMusicSysExTrack;
63 typedef struct IDirectMusicTempoTrack IDirectMusicTempoTrack;
64 typedef struct IDirectMusicTimeSigTrack IDirectMusicTimeSigTrack;
65 typedef struct IDirectMusicWaveTrack IDirectMusicWaveTrack;
67 /*****************************************************************************
68 * ClassFactory
70 extern HRESULT WINAPI DMUSIC_CreateDirectMusicPerformanceImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter);
71 extern HRESULT WINAPI DMUSIC_CreateDirectMusicSegmentImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter);
72 extern HRESULT WINAPI DMUSIC_CreateDirectMusicSegmentStateImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter);
73 extern HRESULT WINAPI DMUSIC_CreateDirectMusicGraphImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter);
74 extern HRESULT WINAPI DMUSIC_CreateDirectMusicAudioPathImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter);
75 extern HRESULT WINAPI DMUSIC_CreateDirectMusicToolImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter);
76 extern HRESULT WINAPI DMUSIC_CreateDirectMusicPatternTrackImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter);
78 extern HRESULT WINAPI DMUSIC_CreateDirectMusicLyricsTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
79 extern HRESULT WINAPI DMUSIC_CreateDirectMusicMarkerTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
80 extern HRESULT WINAPI DMUSIC_CreateDirectMusicParamControlTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
81 extern HRESULT WINAPI DMUSIC_CreateDirectMusicSegTriggerTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
82 extern HRESULT WINAPI DMUSIC_CreateDirectMusicSeqTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
83 extern HRESULT WINAPI DMUSIC_CreateDirectMusicSysExTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
84 extern HRESULT WINAPI DMUSIC_CreateDirectMusicTempoTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
85 extern HRESULT WINAPI DMUSIC_CreateDirectMusicTimeSigTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
86 extern HRESULT WINAPI DMUSIC_CreateDirectMusicWaveTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
89 /*****************************************************************************
90 * Auxiliary definitions
92 typedef struct _DMUS_PRIVATE_SEGMENT_TRACK {
93 struct list entry; /* for listing elements */
94 DWORD dwGroupBits;
95 IDirectMusicTrack* pTrack;
96 } DMUS_PRIVATE_SEGMENT_TRACK, *LPDMUS_PRIVATE_SEGMENT_TRACK;
98 typedef struct _DMUS_PRIVATE_TEMPO_ITEM {
99 struct list entry; /* for listing elements */
100 DMUS_IO_TEMPO_ITEM item;
101 } DMUS_PRIVATE_TEMPO_ITEM, *LPDMUS_PRIVATE_TEMPO_ITEM;
103 typedef struct _DMUS_PRIVATE_SEGMENT_ITEM {
104 struct list entry; /* for listing elements */
105 DMUS_IO_SEGMENT_ITEM_HEADER header;
106 IDirectMusicObject* pObject;
107 WCHAR wszName[DMUS_MAX_NAME];
108 } DMUS_PRIVATE_SEGMENT_ITEM, *LPDMUS_PRIVATE_SEGMENT_ITEM;
110 typedef struct _DMUS_PRIVATE_GRAPH_TOOL {
111 struct list entry; /* for listing elements */
112 DWORD dwIndex;
113 IDirectMusicTool* pTool;
114 } DMUS_PRIVATE_GRAPH_TOOL, *LPDMUS_PRIVATE_GRAPH_TOOL;
116 typedef struct _DMUS_PRIVATE_TEMPO_PLAY_STATE {
117 DWORD dummy;
118 } DMUS_PRIVATE_TEMPO_PLAY_STATE, *LPDMUS_PRIVATE_TEMPO_PLAY_STATE;
120 /* some sort of aux. performance channel: as far as i can understand, these are
121 used to represent a particular midi channel in particular group at particular
122 group; so all we need to do is to fill it with parent port, group and midi
123 channel ? */
124 typedef struct DMUSIC_PRIVATE_PCHANNEL_ {
125 DWORD channel; /* map to this channel... */
126 DWORD group; /* ... in this group ... */
127 IDirectMusicPort *port; /* ... at this port */
128 } DMUSIC_PRIVATE_PCHANNEL, *LPDMUSIC_PRIVATE_PCHANNEL;
130 /*****************************************************************************
131 * IDirectMusicPerformance8Impl implementation structure
133 struct IDirectMusicPerformance8Impl {
134 /* IUnknown fields */
135 const IDirectMusicPerformance8Vtbl *lpVtbl;
136 LONG ref;
138 /* IDirectMusicPerformanceImpl fields */
139 IDirectMusic8* pDirectMusic;
140 IDirectSound* pDirectSound;
141 IDirectMusicGraph* pToolGraph;
142 DMUS_AUDIOPARAMS pParams;
144 /* global parameters */
145 BOOL fAutoDownload;
146 char cMasterGrooveLevel;
147 float fMasterTempo;
148 long lMasterVolume;
150 /* performance channels */
151 DMUSIC_PRIVATE_PCHANNEL PChannel[32];
153 /* IDirectMusicPerformance8Impl fields */
154 IDirectMusicAudioPath* pDefaultPath;
155 HANDLE hNotification;
156 REFERENCE_TIME rtMinimum;
158 REFERENCE_TIME rtLatencyTime;
159 DWORD dwBumperLength;
160 DWORD dwPrepareTime;
161 /** Message Processing */
162 HANDLE procThread;
163 DWORD procThreadId;
164 REFERENCE_TIME procThreadStartTime;
165 BOOL procThreadTicStarted;
166 CRITICAL_SECTION safe;
167 struct DMUS_PMSGItem* head;
168 struct DMUS_PMSGItem* imm_head;
171 /*****************************************************************************
172 * IDirectMusicSegment8Impl implementation structure
174 struct IDirectMusicSegment8Impl {
175 /* IUnknown fields */
176 const IUnknownVtbl *UnknownVtbl;
177 const IDirectMusicSegment8Vtbl *SegmentVtbl;
178 const IDirectMusicObjectVtbl *ObjectVtbl;
179 const IPersistStreamVtbl *PersistStreamVtbl;
180 LONG ref;
182 /* IDirectMusicSegment8Impl fields */
183 LPDMUS_OBJECTDESC pDesc;
184 DMUS_IO_SEGMENT_HEADER header;
185 IDirectMusicGraph* pGraph;
186 struct list Tracks;
189 /*****************************************************************************
190 * IDirectMusicSegmentState8Impl implementation structure
192 struct IDirectMusicSegmentState8Impl {
193 /* IUnknown fields */
194 const IDirectMusicSegmentState8Vtbl *lpVtbl;
195 LONG ref;
197 /* IDirectMusicSegmentState8Impl fields */
200 /*****************************************************************************
201 * IDirectMusicGraphImpl implementation structure
203 struct IDirectMusicGraphImpl {
204 /* IUnknown fields */
205 const IUnknownVtbl *UnknownVtbl;
206 const IDirectMusicGraphVtbl *GraphVtbl;
207 const IDirectMusicObjectVtbl *ObjectVtbl;
208 const IPersistStreamVtbl *PersistStreamVtbl;
209 LONG ref;
211 /* IDirectMusicGraphImpl fields */
212 LPDMUS_OBJECTDESC pDesc;
213 WORD num_tools;
214 struct list Tools;
217 /*****************************************************************************
218 * IDirectMusicAudioPathImpl implementation structure
220 struct IDirectMusicAudioPathImpl {
221 /* IUnknown fields */
222 const IUnknownVtbl *UnknownVtbl;
223 const IDirectMusicAudioPathVtbl *AudioPathVtbl;
224 const IDirectMusicObjectVtbl *ObjectVtbl;
225 const IPersistStreamVtbl *PersistStreamVtbl;
226 LONG ref;
228 /* IDirectMusicAudioPathImpl fields */
229 LPDMUS_OBJECTDESC pDesc;
231 IDirectMusicPerformance8* pPerf;
232 IDirectMusicGraph* pToolGraph;
233 IDirectSoundBuffer* pDSBuffer;
234 IDirectSoundBuffer* pPrimary;
236 BOOL fActive;
239 /*****************************************************************************
240 * IDirectMusicTool8Impl implementation structure
242 struct IDirectMusicTool8Impl {
243 /* IUnknown fields */
244 const IDirectMusicTool8Vtbl *lpVtbl;
245 LONG ref;
247 /* IDirectMusicTool8Impl fields */
250 /*****************************************************************************
251 * IDirectMusicPatternTrackImpl implementation structure
253 struct IDirectMusicPatternTrackImpl {
254 /* IUnknown fields */
255 const IDirectMusicPatternTrackVtbl *lpVtbl;
256 LONG ref;
258 /* IDirectMusicPatternTrackImpl fields */
261 /*****************************************************************************
262 * IDirectMusicLyricsTrack implementation structure
264 struct IDirectMusicLyricsTrack
266 /* IUnknown fields */
267 const IUnknownVtbl *UnknownVtbl;
268 const IDirectMusicTrack8Vtbl *TrackVtbl;
269 const IPersistStreamVtbl *PersistStreamVtbl;
270 LONG ref;
272 /* IDirectMusicLyricsTrack fields */
273 LPDMUS_OBJECTDESC pDesc;
276 /*****************************************************************************
277 * IDirectMusicMarkerTrack implementation structure
279 struct IDirectMusicMarkerTrack {
280 /* IUnknown fields */
281 const IUnknownVtbl *UnknownVtbl;
282 const IDirectMusicTrack8Vtbl *TrackVtbl;
283 const IPersistStreamVtbl *PersistStreamVtbl;
284 LONG ref;
286 /* IDirectMusicMarkerTrack fields */
287 LPDMUS_OBJECTDESC pDesc;
290 /*****************************************************************************
291 * IDirectMusicParamControlTrack implementation structure
293 struct IDirectMusicParamControlTrack {
294 /* IUnknown fields */
295 const IUnknownVtbl *UnknownVtbl;
296 const IDirectMusicTrack8Vtbl *TrackVtbl;
297 const IPersistStreamVtbl *PersistStreamVtbl;
298 LONG ref;
300 /* IDirectMusicParamControlTrack fields */
301 LPDMUS_OBJECTDESC pDesc;
304 /*****************************************************************************
305 * IDirectMusicSegTriggerTrack implementation structure
307 struct IDirectMusicSegTriggerTrack {
308 /* IUnknown fields */
309 const IUnknownVtbl *UnknownVtbl;
310 const IDirectMusicTrack8Vtbl *TrackVtbl;
311 const IPersistStreamVtbl *PersistStreamVtbl;
312 LONG ref;
314 /* IDirectMusicSegTriggerTrack fields */
315 LPDMUS_OBJECTDESC pDesc;
317 struct list Items;
320 /*****************************************************************************
321 * IDirectMusicSeqTrack implementation structure
323 struct IDirectMusicSeqTrack {
324 /* IUnknown fields */
325 const IUnknownVtbl *UnknownVtbl;
326 const IDirectMusicTrack8Vtbl *TrackVtbl;
327 const IPersistStreamVtbl *PersistStreamVtbl;
328 LONG ref;
330 /* IDirectMusicSeqTrack fields */
331 LPDMUS_OBJECTDESC pDesc;
334 /*****************************************************************************
335 * IDirectMusicSysExTrack implementation structure
337 struct IDirectMusicSysExTrack {
338 /* IUnknown fields */
339 const IUnknownVtbl *UnknownVtbl;
340 const IDirectMusicTrack8Vtbl *TrackVtbl;
341 const IPersistStreamVtbl *PersistStreamVtbl;
342 LONG ref;
344 /* IDirectMusicSysExTrack fields */
345 LPDMUS_OBJECTDESC pDesc;
348 /*****************************************************************************
349 * IDirectMusicTempoTrack implementation structure
351 struct IDirectMusicTempoTrack {
352 /* IUnknown fields */
353 const IUnknownVtbl *UnknownVtbl;
354 const IDirectMusicTrack8Vtbl *TrackVtbl;
355 const IPersistStreamVtbl *PersistStreamVtbl;
356 LONG ref;
358 /* IDirectMusicTempoTrack fields */
359 LPDMUS_OBJECTDESC pDesc;
360 BOOL enabled;
361 struct list Items;
364 /*****************************************************************************
365 * IDirectMusicTimeSigTrack implementation structure
367 struct IDirectMusicTimeSigTrack {
368 /* IUnknown fields */
369 const IUnknownVtbl *UnknownVtbl;
370 const IDirectMusicTrack8Vtbl *TrackVtbl;
371 const IPersistStreamVtbl *PersistStreamVtbl;
372 LONG ref;
374 /* IDirectMusicTimeSigTrack fields */
375 LPDMUS_OBJECTDESC pDesc;
378 /*****************************************************************************
379 * IDirectMusicWaveTrack implementation structure
381 struct IDirectMusicWaveTrack {
382 /* IUnknown fields */
383 const IUnknownVtbl *UnknownVtbl;
384 const IDirectMusicTrack8Vtbl *TrackVtbl;
385 const IPersistStreamVtbl *PersistStreamVtbl;
386 LONG ref;
388 /* IDirectMusicWaveTrack fields */
389 LPDMUS_OBJECTDESC pDesc;
392 /**********************************************************************
393 * Dll lifetime tracking declaration for dmime.dll
395 extern LONG DMIME_refCount;
396 static inline void DMIME_LockModule(void) { InterlockedIncrement( &DMIME_refCount ); }
397 static inline void DMIME_UnlockModule(void) { InterlockedDecrement( &DMIME_refCount ); }
399 /*****************************************************************************
400 * Misc.
403 #include "dmutils.h"
405 #endif /* __WINE_DMIME_PRIVATE_H */