1 /* DirectMusicStyle Private Include
2 *
3 * Copyright (C) 2003-2004 Rok Mandeljc
4 *
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.
9 *
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.
14 *
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
18 */
19
20 #ifndef __WINE_DMSTYLE_PRIVATE_H
21 #define __WINE_DMSTYLE_PRIVATE_H
22
23 #include <stdio.h>
24 #include <stdarg.h>
25 #include <string.h>
26
27 #define COBJMACROS
28
29 #include "windef.h"
30 #include "winbase.h"
31 #include "winnt.h"
32 #include "wingdi.h"
33 #include "winuser.h"
34
35 #include "wine/debug.h"
36 #include "wine/list.h"
37 #include "wine/unicode.h"
38 #include "winreg.h"
39 #include "objbase.h"
40
41 #include "dmusici.h"
42 #include "dmusicf.h"
43 #include "dmusics.h"
44
45 /*****************************************************************************
46 * Interfaces
47 */
48 typedef struct IDirectMusicStyle8Impl IDirectMusicStyle8Impl;
49
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;
57
58 /*****************************************************************************
59 * ClassFactory
60 */
61 extern HRESULT WINAPI DMUSIC_CreateDirectMusicStyleImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
62
63 /*****************************************************************************
64 * Auxiliary definitions
65 */
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;
70
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;
76
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;
85
86 struct list Items;
87 } DMUS_PRIVATE_STYLE_MOTIF, *LPDMUS_PRIVATE_STYLE_MOTIF;
88
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;
94
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);
102
103 /*****************************************************************************
104 * IDirectMusicStyle8Impl implementation structure
105 */
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;
113
114 /* IDirectMusicStyle8Impl fields */
115 LPDMUS_OBJECTDESC pDesc;
116 DMUS_IO_STYLE style;
117
118 /* data */
119 struct list Motifs;
120 struct list Bands;
121 };
122
123 /*****************************************************************************
124 * IDirectMusicAuditionTrack implementation structure
125 */
126 struct IDirectMusicAuditionTrack {
127 /* IUnknown fields */
128 const IUnknownVtbl *UnknownVtbl;
129 const IDirectMusicTrack8Vtbl *TrackVtbl;
130 const IPersistStreamVtbl *PersistStreamVtbl;
131 LONG ref;
132
133 /* IDirectMusicAuditionTrack fields */
134 LPDMUS_OBJECTDESC pDesc;
135 };
136
137 /*****************************************************************************
138 * IDirectMusicChordTrack implementation structure
139 */
140 struct IDirectMusicChordTrack {
141 /* IUnknown fields */
142 const IUnknownVtbl *UnknownVtbl;
143 const IDirectMusicTrack8Vtbl *TrackVtbl;
144 const IPersistStreamVtbl *PersistStreamVtbl;
145 LONG ref;
146
147 /* IDirectMusicChordTrack fields */
148 LPDMUS_OBJECTDESC pDesc;
149 DWORD dwScale;
150 };
151
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;
157
158 /*****************************************************************************
159 * IDirectMusicCommandTrack implementation structure
160 */
161 struct IDirectMusicCommandTrack {
162 /* IUnknown fields */
163 const IUnknownVtbl *UnknownVtbl;
164 const IDirectMusicTrack8Vtbl *TrackVtbl;
165 const IPersistStreamVtbl *PersistStreamVtbl;
166 LONG ref;
167
168 /* IDirectMusicCommandTrack fields */
169 LPDMUS_OBJECTDESC pDesc;
170 /* track data */
171 struct list Commands;
172 };
173
174 /*****************************************************************************
175 * IDirectMusicMelodyFormulationTrack implementation structure
176 */
177 struct IDirectMusicMelodyFormulationTrack {
178 /* IUnknown fields */
179 const IUnknownVtbl *UnknownVtbl;
180 const IDirectMusicTrack8Vtbl *TrackVtbl;
181 const IPersistStreamVtbl *PersistStreamVtbl;
182 LONG ref;
183
184 /* IDirectMusicMelodyFormulationTrack fields */
185 LPDMUS_OBJECTDESC pDesc;
186 };
187
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);
195
196 /*****************************************************************************
197 * IDirectMusicMotifTrack implementation structure
198 */
199 struct IDirectMusicMotifTrack {
200 /* IUnknown fields */
201 const IUnknownVtbl *UnknownVtbl;
202 const IDirectMusicTrack8Vtbl *TrackVtbl;
203 const IPersistStreamVtbl *PersistStreamVtbl;
204 LONG ref;
205
206 /* IDirectMusicMotifTrack fields */
207 LPDMUS_OBJECTDESC pDesc;
208 };
209
210 /*****************************************************************************
211 * IDirectMusicMuteTrack implementation structure
212 */
213 struct IDirectMusicMuteTrack {
214 /* IUnknown fields */
215 const IUnknownVtbl *UnknownVtbl;
216 const IDirectMusicTrack8Vtbl *TrackVtbl;
217 const IPersistStreamVtbl *PersistStreamVtbl;
218 LONG ref;
219
220 /* IDirectMusicMuteTrack fields */
221 LPDMUS_OBJECTDESC pDesc;
222 };
223
224 /*****************************************************************************
225 * IDirectMusicStyleTrack implementation structure
226 */
227 struct IDirectMusicStyleTrack {
228 /* IUnknown fields */
229 const IUnknownVtbl *UnknownVtbl;
230 const IDirectMusicTrack8Vtbl *TrackVtbl;
231 const IPersistStreamVtbl *PersistStreamVtbl;
232 LONG ref;
233
234 /* IDirectMusicStyleTrack fields */
235 LPDMUS_OBJECTDESC pDesc;
236
237 struct list Items;
238 };
239
240 /**********************************************************************
241 * Dll lifetime tracking declaration for dmstyle.dll
242 */
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 ); }
246
247 /*****************************************************************************
248 * Misc.
249 */
250 #include "dmutils.h"
251
252 #endif /* __WINE_DMSTYLE_PRIVATE_H */
253
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.