ws2_32: Return the correct address family in WSAStringToAddressA.
[wine.git] / dlls / dmime / dmime_private.h
blobccda14c2508cdf6b1ba3f31f4b6bc46ba672bbb6
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 IDirectMusicSegment8Impl IDirectMusicSegment8Impl;
50 typedef struct IDirectMusicSegmentState8Impl IDirectMusicSegmentState8Impl;
51 typedef struct IDirectMusicGraphImpl IDirectMusicGraphImpl;
52 typedef struct IDirectMusicAudioPathImpl IDirectMusicAudioPathImpl;
54 typedef struct IDirectMusicLyricsTrack IDirectMusicLyricsTrack;
55 typedef struct IDirectMusicMarkerTrack IDirectMusicMarkerTrack;
56 typedef struct IDirectMusicParamControlTrack IDirectMusicParamControlTrack;
57 typedef struct IDirectMusicSegTriggerTrack IDirectMusicSegTriggerTrack;
58 typedef struct IDirectMusicSeqTrack IDirectMusicSeqTrack;
59 typedef struct IDirectMusicSysExTrack IDirectMusicSysExTrack;
60 typedef struct IDirectMusicTempoTrack IDirectMusicTempoTrack;
61 typedef struct IDirectMusicTimeSigTrack IDirectMusicTimeSigTrack;
62 typedef struct IDirectMusicWaveTrack IDirectMusicWaveTrack;
64 /*****************************************************************************
65 * ClassFactory
67 extern HRESULT WINAPI create_dmperformance(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
68 extern HRESULT WINAPI create_dmsegment(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
69 extern HRESULT WINAPI create_dmsegmentstate(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
70 extern HRESULT WINAPI create_dmgraph(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
71 extern HRESULT WINAPI create_dmaudiopath(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
73 extern HRESULT WINAPI create_dmlyricstrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
74 extern HRESULT WINAPI create_dmmarkertrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
75 extern HRESULT WINAPI create_dmparamcontroltrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
76 extern HRESULT WINAPI create_dmsegtriggertrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
77 extern HRESULT WINAPI create_dmseqtrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
78 extern HRESULT WINAPI create_dmsysextrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
79 extern HRESULT WINAPI create_dmtempotrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
80 extern HRESULT WINAPI create_dmtimesigtrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
81 extern HRESULT WINAPI create_dmwavetrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
84 /*****************************************************************************
85 * Auxiliary definitions
87 typedef struct _DMUS_PRIVATE_SEGMENT_TRACK {
88 struct list entry; /* for listing elements */
89 DWORD dwGroupBits;
90 IDirectMusicTrack* pTrack;
91 } DMUS_PRIVATE_SEGMENT_TRACK, *LPDMUS_PRIVATE_SEGMENT_TRACK;
93 typedef struct _DMUS_PRIVATE_TEMPO_ITEM {
94 struct list entry; /* for listing elements */
95 DMUS_IO_TEMPO_ITEM item;
96 } DMUS_PRIVATE_TEMPO_ITEM, *LPDMUS_PRIVATE_TEMPO_ITEM;
98 typedef struct _DMUS_PRIVATE_SEGMENT_ITEM {
99 struct list entry; /* for listing elements */
100 DMUS_IO_SEGMENT_ITEM_HEADER header;
101 IDirectMusicObject* pObject;
102 WCHAR wszName[DMUS_MAX_NAME];
103 } DMUS_PRIVATE_SEGMENT_ITEM, *LPDMUS_PRIVATE_SEGMENT_ITEM;
105 typedef struct _DMUS_PRIVATE_GRAPH_TOOL {
106 struct list entry; /* for listing elements */
107 DWORD dwIndex;
108 IDirectMusicTool* pTool;
109 } DMUS_PRIVATE_GRAPH_TOOL, *LPDMUS_PRIVATE_GRAPH_TOOL;
111 typedef struct _DMUS_PRIVATE_TEMPO_PLAY_STATE {
112 DWORD dummy;
113 } DMUS_PRIVATE_TEMPO_PLAY_STATE, *LPDMUS_PRIVATE_TEMPO_PLAY_STATE;
115 /* some sort of aux. performance channel: as far as i can understand, these are
116 used to represent a particular midi channel in particular group at particular
117 group; so all we need to do is to fill it with parent port, group and midi
118 channel ? */
119 typedef struct DMUSIC_PRIVATE_PCHANNEL_ {
120 DWORD channel; /* map to this channel... */
121 DWORD group; /* ... in this group ... */
122 IDirectMusicPort *port; /* ... at this port */
123 } DMUSIC_PRIVATE_PCHANNEL, *LPDMUSIC_PRIVATE_PCHANNEL;
125 /*****************************************************************************
126 * IDirectMusicSegment8Impl implementation structure
128 struct IDirectMusicSegment8Impl {
129 IDirectMusicSegment8 IDirectMusicSegment8_iface;
130 const IDirectMusicObjectVtbl *ObjectVtbl;
131 const IPersistStreamVtbl *PersistStreamVtbl;
132 LONG ref;
134 /* IDirectMusicSegment8Impl fields */
135 LPDMUS_OBJECTDESC pDesc;
136 DMUS_IO_SEGMENT_HEADER header;
137 IDirectMusicGraph* pGraph;
138 struct list Tracks;
141 /*****************************************************************************
142 * IDirectMusicSegmentState8Impl implementation structure
144 struct IDirectMusicSegmentState8Impl {
145 /* IUnknown fields */
146 const IDirectMusicSegmentState8Vtbl *lpVtbl;
147 LONG ref;
149 /* IDirectMusicSegmentState8Impl fields */
152 /*****************************************************************************
153 * IDirectMusicGraphImpl implementation structure
155 struct IDirectMusicGraphImpl {
156 /* IUnknown fields */
157 const IUnknownVtbl *UnknownVtbl;
158 const IDirectMusicGraphVtbl *GraphVtbl;
159 const IDirectMusicObjectVtbl *ObjectVtbl;
160 const IPersistStreamVtbl *PersistStreamVtbl;
161 LONG ref;
163 /* IDirectMusicGraphImpl fields */
164 LPDMUS_OBJECTDESC pDesc;
165 WORD num_tools;
166 struct list Tools;
169 /*****************************************************************************
170 * IDirectMusicAudioPathImpl implementation structure
172 struct IDirectMusicAudioPathImpl {
173 /* IUnknown fields */
174 const IUnknownVtbl *UnknownVtbl;
175 const IDirectMusicAudioPathVtbl *AudioPathVtbl;
176 const IDirectMusicObjectVtbl *ObjectVtbl;
177 const IPersistStreamVtbl *PersistStreamVtbl;
178 LONG ref;
180 /* IDirectMusicAudioPathImpl fields */
181 LPDMUS_OBJECTDESC pDesc;
183 IDirectMusicPerformance8* pPerf;
184 IDirectMusicGraph* pToolGraph;
185 IDirectSoundBuffer* pDSBuffer;
186 IDirectSoundBuffer* pPrimary;
188 BOOL fActive;
191 /*****************************************************************************
192 * IDirectMusicLyricsTrack implementation structure
194 struct IDirectMusicLyricsTrack
196 /* IUnknown fields */
197 const IUnknownVtbl *UnknownVtbl;
198 const IDirectMusicTrack8Vtbl *TrackVtbl;
199 const IPersistStreamVtbl *PersistStreamVtbl;
200 LONG ref;
202 /* IDirectMusicLyricsTrack fields */
203 LPDMUS_OBJECTDESC pDesc;
206 /*****************************************************************************
207 * IDirectMusicMarkerTrack implementation structure
209 struct IDirectMusicMarkerTrack {
210 /* IUnknown fields */
211 const IUnknownVtbl *UnknownVtbl;
212 const IDirectMusicTrack8Vtbl *TrackVtbl;
213 const IPersistStreamVtbl *PersistStreamVtbl;
214 LONG ref;
216 /* IDirectMusicMarkerTrack fields */
217 LPDMUS_OBJECTDESC pDesc;
220 /*****************************************************************************
221 * IDirectMusicParamControlTrack implementation structure
223 struct IDirectMusicParamControlTrack {
224 /* IUnknown fields */
225 const IUnknownVtbl *UnknownVtbl;
226 const IDirectMusicTrack8Vtbl *TrackVtbl;
227 const IPersistStreamVtbl *PersistStreamVtbl;
228 LONG ref;
230 /* IDirectMusicParamControlTrack fields */
231 LPDMUS_OBJECTDESC pDesc;
234 /*****************************************************************************
235 * IDirectMusicSegTriggerTrack implementation structure
237 struct IDirectMusicSegTriggerTrack {
238 /* IUnknown fields */
239 const IUnknownVtbl *UnknownVtbl;
240 const IDirectMusicTrack8Vtbl *TrackVtbl;
241 const IPersistStreamVtbl *PersistStreamVtbl;
242 LONG ref;
244 /* IDirectMusicSegTriggerTrack fields */
245 LPDMUS_OBJECTDESC pDesc;
247 struct list Items;
250 /*****************************************************************************
251 * IDirectMusicSeqTrack implementation structure
253 struct IDirectMusicSeqTrack {
254 /* IUnknown fields */
255 const IUnknownVtbl *UnknownVtbl;
256 const IDirectMusicTrack8Vtbl *TrackVtbl;
257 const IPersistStreamVtbl *PersistStreamVtbl;
258 LONG ref;
260 /* IDirectMusicSeqTrack fields */
261 LPDMUS_OBJECTDESC pDesc;
264 /*****************************************************************************
265 * IDirectMusicSysExTrack implementation structure
267 struct IDirectMusicSysExTrack {
268 /* IUnknown fields */
269 const IUnknownVtbl *UnknownVtbl;
270 const IDirectMusicTrack8Vtbl *TrackVtbl;
271 const IPersistStreamVtbl *PersistStreamVtbl;
272 LONG ref;
274 /* IDirectMusicSysExTrack fields */
275 LPDMUS_OBJECTDESC pDesc;
278 /*****************************************************************************
279 * IDirectMusicTempoTrack implementation structure
281 struct IDirectMusicTempoTrack {
282 /* IUnknown fields */
283 const IUnknownVtbl *UnknownVtbl;
284 const IDirectMusicTrack8Vtbl *TrackVtbl;
285 const IPersistStreamVtbl *PersistStreamVtbl;
286 LONG ref;
288 /* IDirectMusicTempoTrack fields */
289 LPDMUS_OBJECTDESC pDesc;
290 BOOL enabled;
291 struct list Items;
294 /*****************************************************************************
295 * IDirectMusicTimeSigTrack implementation structure
297 struct IDirectMusicTimeSigTrack {
298 /* IUnknown fields */
299 const IUnknownVtbl *UnknownVtbl;
300 const IDirectMusicTrack8Vtbl *TrackVtbl;
301 const IPersistStreamVtbl *PersistStreamVtbl;
302 LONG ref;
304 /* IDirectMusicTimeSigTrack fields */
305 LPDMUS_OBJECTDESC pDesc;
308 /*****************************************************************************
309 * IDirectMusicWaveTrack implementation structure
311 struct IDirectMusicWaveTrack {
312 /* IUnknown fields */
313 const IUnknownVtbl *UnknownVtbl;
314 const IDirectMusicTrack8Vtbl *TrackVtbl;
315 const IPersistStreamVtbl *PersistStreamVtbl;
316 LONG ref;
318 /* IDirectMusicWaveTrack fields */
319 LPDMUS_OBJECTDESC pDesc;
322 /**********************************************************************
323 * Dll lifetime tracking declaration for dmime.dll
325 extern LONG DMIME_refCount DECLSPEC_HIDDEN;
326 static inline void DMIME_LockModule(void) { InterlockedIncrement( &DMIME_refCount ); }
327 static inline void DMIME_UnlockModule(void) { InterlockedDecrement( &DMIME_refCount ); }
329 /*****************************************************************************
330 * Misc.
333 #include "dmutils.h"
335 #endif /* __WINE_DMIME_PRIVATE_H */