winex11.drv: Don't call glXSwapBuffers if the context or the drawable are invalid.
[wine.git] / dlls / dmstyle / dmstyle_private.h
blobcfbe7b540fb765e8ed5f4ace1b518c8df3250b05
1 /* DirectMusicStyle 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_DMSTYLE_PRIVATE_H
21 #define __WINE_DMSTYLE_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 IDirectMusicStyle8Impl IDirectMusicStyle8Impl;
50 typedef struct IDirectMusicAuditionTrack IDirectMusicAuditionTrack;
51 typedef struct IDirectMusicChordTrack IDirectMusicChordTrack;
52 typedef struct IDirectMusicCommandTrack IDirectMusicCommandTrack;
53 typedef struct IDirectMusicMelodyFormulationTrack IDirectMusicMelodyFormulationTrack;
54 typedef struct IDirectMusicMotifTrack IDirectMusicMotifTrack;
55 typedef struct IDirectMusicMuteTrack IDirectMusicMuteTrack;
56 typedef struct IDirectMusicStyleTrack IDirectMusicStyleTrack;
58 /*****************************************************************************
59 * ClassFactory
61 extern HRESULT WINAPI DMUSIC_CreateDirectMusicStyleImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
63 /*****************************************************************************
64 * Auxiliary definitions
66 typedef struct _DMUS_PRIVATE_STYLE_BAND {
67 struct list entry; /* for listing elements */
68 IDirectMusicBand* pBand;
69 } DMUS_PRIVATE_STYLE_BAND, *LPDMUS_PRIVATE_STYLE_BAND;
71 typedef struct _DMUS_PRIVATE_STYLE_PARTREF_ITEM {
72 struct list entry; /* for listing elements */
73 DMUS_OBJECTDESC desc;
74 DMUS_IO_PARTREF part_ref;
75 } DMUS_PRIVATE_STYLE_PARTREF_ITEM, *LPDMUS_PRIVATE_STYLE_PARTREF_ITEM;
77 typedef struct _DMUS_PRIVATE_STYLE_MOTIF {
78 struct list entry; /* for listing elements */
79 DWORD dwRhythm;
80 DMUS_IO_PATTERN pattern;
81 DMUS_OBJECTDESC desc;
82 /** optional for motifs */
83 DMUS_IO_MOTIFSETTINGS settings;
84 IDirectMusicBand* pBand;
86 struct list Items;
87 } DMUS_PRIVATE_STYLE_MOTIF, *LPDMUS_PRIVATE_STYLE_MOTIF;
89 typedef struct _DMUS_PRIVATE_STYLE_ITEM {
90 struct list entry; /* for listing elements */
91 DWORD dwTimeStamp;
92 IDirectMusicStyle8* pObject;
93 } DMUS_PRIVATE_STYLE_ITEM, *LPDMUS_PRIVATE_STYLE_ITEM;
95 extern HRESULT WINAPI DMUSIC_CreateDirectMusicAuditionTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
96 extern HRESULT WINAPI DMUSIC_CreateDirectMusicChordTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
97 extern HRESULT WINAPI DMUSIC_CreateDirectMusicCommandTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
98 extern HRESULT WINAPI DMUSIC_CreateDirectMusicMelodyFormulationTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
99 extern HRESULT WINAPI DMUSIC_CreateDirectMusicMotifTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
100 extern HRESULT WINAPI DMUSIC_CreateDirectMusicMuteTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
101 extern HRESULT WINAPI DMUSIC_CreateDirectMusicStyleTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
103 /*****************************************************************************
104 * IDirectMusicStyle8Impl implementation structure
106 struct IDirectMusicStyle8Impl {
107 /* IUnknown fields */
108 const IUnknownVtbl *UnknownVtbl;
109 const IDirectMusicStyle8Vtbl *StyleVtbl;
110 const IDirectMusicObjectVtbl *ObjectVtbl;
111 const IPersistStreamVtbl *PersistStreamVtbl;
112 LONG ref;
114 /* IDirectMusicStyle8Impl fields */
115 LPDMUS_OBJECTDESC pDesc;
116 DMUS_IO_STYLE style;
118 /* data */
119 struct list Motifs;
120 struct list Bands;
123 /*****************************************************************************
124 * IDirectMusicAuditionTrack implementation structure
126 struct IDirectMusicAuditionTrack {
127 /* IUnknown fields */
128 const IUnknownVtbl *UnknownVtbl;
129 const IDirectMusicTrack8Vtbl *TrackVtbl;
130 const IPersistStreamVtbl *PersistStreamVtbl;
131 LONG ref;
133 /* IDirectMusicAuditionTrack fields */
134 LPDMUS_OBJECTDESC pDesc;
137 /*****************************************************************************
138 * IDirectMusicChordTrack implementation structure
140 struct IDirectMusicChordTrack {
141 /* IUnknown fields */
142 const IUnknownVtbl *UnknownVtbl;
143 const IDirectMusicTrack8Vtbl *TrackVtbl;
144 const IPersistStreamVtbl *PersistStreamVtbl;
145 LONG ref;
147 /* IDirectMusicChordTrack fields */
148 LPDMUS_OBJECTDESC pDesc;
149 DWORD dwScale;
152 typedef struct _DMUS_PRIVATE_COMMAND {
153 struct list entry; /* for listing elements */
154 DMUS_IO_COMMAND pCommand;
155 IDirectMusicCollection* ppReferenceCollection;
156 } DMUS_PRIVATE_COMMAND, *LPDMUS_PRIVATE_COMMAND;
158 /*****************************************************************************
159 * IDirectMusicCommandTrack implementation structure
161 struct IDirectMusicCommandTrack {
162 /* IUnknown fields */
163 const IUnknownVtbl *UnknownVtbl;
164 const IDirectMusicTrack8Vtbl *TrackVtbl;
165 const IPersistStreamVtbl *PersistStreamVtbl;
166 LONG ref;
168 /* IDirectMusicCommandTrack fields */
169 LPDMUS_OBJECTDESC pDesc;
170 /* track data */
171 struct list Commands;
174 /*****************************************************************************
175 * IDirectMusicMelodyFormulationTrack implementation structure
177 struct IDirectMusicMelodyFormulationTrack {
178 /* IUnknown fields */
179 const IUnknownVtbl *UnknownVtbl;
180 const IDirectMusicTrack8Vtbl *TrackVtbl;
181 const IPersistStreamVtbl *PersistStreamVtbl;
182 LONG ref;
184 /* IDirectMusicMelodyFormulationTrack fields */
185 LPDMUS_OBJECTDESC pDesc;
188 /* IUnknown: */
189 extern HRESULT WINAPI IDirectMusicMelodyFormulationTrack_IUnknown_QueryInterface (LPUNKNOWN iface, REFIID riid, LPVOID *ppobj);
190 extern ULONG WINAPI IDirectMusicMelodyFormulationTrack_IUnknown_AddRef (LPUNKNOWN iface);
191 /* IDirectMusicTrack(8): */
192 extern ULONG WINAPI IDirectMusicMelodyFormulationTrack_IDirectMusicTrack_AddRef (LPDIRECTMUSICTRACK8 iface);
193 /* IPersistStream: */
194 extern ULONG WINAPI IDirectMusicMelodyFormulationTrack_IPersistStream_AddRef (LPPERSISTSTREAM iface);
196 /*****************************************************************************
197 * IDirectMusicMotifTrack implementation structure
199 struct IDirectMusicMotifTrack {
200 /* IUnknown fields */
201 const IUnknownVtbl *UnknownVtbl;
202 const IDirectMusicTrack8Vtbl *TrackVtbl;
203 const IPersistStreamVtbl *PersistStreamVtbl;
204 LONG ref;
206 /* IDirectMusicMotifTrack fields */
207 LPDMUS_OBJECTDESC pDesc;
210 /*****************************************************************************
211 * IDirectMusicMuteTrack implementation structure
213 struct IDirectMusicMuteTrack {
214 /* IUnknown fields */
215 const IUnknownVtbl *UnknownVtbl;
216 const IDirectMusicTrack8Vtbl *TrackVtbl;
217 const IPersistStreamVtbl *PersistStreamVtbl;
218 LONG ref;
220 /* IDirectMusicMuteTrack fields */
221 LPDMUS_OBJECTDESC pDesc;
224 /*****************************************************************************
225 * IDirectMusicStyleTrack implementation structure
227 struct IDirectMusicStyleTrack {
228 /* IUnknown fields */
229 const IUnknownVtbl *UnknownVtbl;
230 const IDirectMusicTrack8Vtbl *TrackVtbl;
231 const IPersistStreamVtbl *PersistStreamVtbl;
232 LONG ref;
234 /* IDirectMusicStyleTrack fields */
235 LPDMUS_OBJECTDESC pDesc;
237 struct list Items;
240 /**********************************************************************
241 * Dll lifetime tracking declaration for dmstyle.dll
243 extern LONG DMSTYLE_refCount;
244 static inline void DMSTYLE_LockModule(void) { InterlockedIncrement( &DMSTYLE_refCount ); }
245 static inline void DMSTYLE_UnlockModule(void) { InterlockedDecrement( &DMSTYLE_refCount ); }
247 /*****************************************************************************
248 * Misc.
250 #include "dmutils.h"
252 #endif /* __WINE_DMSTYLE_PRIVATE_H */