1 /* DirectMusicComposer 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_DMCOMPOS_PRIVATE_H
21 #define __WINE_DMCOMPOS_PRIVATE_H
35 #include "wine/debug.h"
36 #include "wine/list.h"
37 #include "wine/unicode.h"
45 /*****************************************************************************
48 typedef struct IDirectMusicChordMapImpl IDirectMusicChordMapImpl
;
49 typedef struct IDirectMusicComposerImpl IDirectMusicComposerImpl
;
50 typedef struct IDirectMusicChordMapTrack IDirectMusicChordMapTrack
;
51 typedef struct IDirectMusicSignPostTrack IDirectMusicSignPostTrack
;
53 /*****************************************************************************
56 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicChordMapImpl (LPCGUID lpcGUID
, LPVOID
* ppobj
, LPUNKNOWN pUnkOuter
);
57 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicComposerImpl (LPCGUID lpcGUID
, LPVOID
* ppobj
, LPUNKNOWN pUnkOuter
);
58 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicChordMapTrack (LPCGUID lpcGUID
, LPVOID
* ppobj
, LPUNKNOWN pUnkOuter
);
59 extern HRESULT WINAPI
DMUSIC_CreateDirectMusicSignPostTrack (LPCGUID lpcGUID
, LPVOID
* ppobj
, LPUNKNOWN pUnkOuter
);
61 /*****************************************************************************
62 * IDirectMusicChordMapImpl implementation structure
64 struct IDirectMusicChordMapImpl
{
66 const IUnknownVtbl
*UnknownVtbl
;
67 const IDirectMusicChordMapVtbl
*ChordMapVtbl
;
68 const IDirectMusicObjectVtbl
*ObjectVtbl
;
69 const IPersistStreamVtbl
*PersistStreamVtbl
;
72 /* IDirectMusicChordMapImpl fields */
73 LPDMUS_OBJECTDESC pDesc
;
77 /*****************************************************************************
78 * IDirectMusicComposerImpl implementation structure
80 struct IDirectMusicComposerImpl
{
82 const IDirectMusicComposerVtbl
*lpVtbl
;
85 /* IDirectMusicComposerImpl fields */
88 /*****************************************************************************
89 * IDirectMusicChordMapTrack implementation structure
91 struct IDirectMusicChordMapTrack
{
93 const IUnknownVtbl
*UnknownVtbl
;
94 const IDirectMusicTrack8Vtbl
*TrackVtbl
;
95 const IPersistStreamVtbl
*PersistStreamVtbl
;
98 /* IDirectMusicChordMapTrack fields */
99 LPDMUS_OBJECTDESC pDesc
;
102 /*****************************************************************************
103 * IDirectMusicSignPostTrack implementation structure
105 struct IDirectMusicSignPostTrack
{
106 /* IUnknown fields */
107 const IUnknownVtbl
*UnknownVtbl
;
108 const IDirectMusicTrack8Vtbl
*TrackVtbl
;
109 const IPersistStreamVtbl
*PersistStreamVtbl
;
112 /* IDirectMusicSignPostTrack fields */
113 LPDMUS_OBJECTDESC pDesc
;
116 /**********************************************************************
117 * Dll lifetime tracking declaration for dmcompos.dll
119 extern LONG DMCOMPOS_refCount
;
120 static inline void DMCOMPOS_LockModule(void) { InterlockedIncrement( &DMCOMPOS_refCount
); }
121 static inline void DMCOMPOS_UnlockModule(void) { InterlockedDecrement( &DMCOMPOS_refCount
); }
123 /*****************************************************************************
126 /* for simpler reading */
127 typedef struct _DMUS_PRIVATE_CHUNK
{
128 FOURCC fccID
; /* FOURCC ID of the chunk */
129 DWORD dwSize
; /* size of the chunk */
130 } DMUS_PRIVATE_CHUNK
, *LPDMUS_PRIVATE_CHUNK
;
132 /* used for generic dumping (copied from ddraw) */
143 /* used for initialising structs (primarily for DMUS_OBJECTDESC) */
144 #define DM_STRUCT_INIT(x) \
146 memset((x), 0, sizeof(*(x))); \
147 (x)->dwSize = sizeof(*x); \
150 #define FE(x) { x, #x }
151 #define GE(x) { &x, #x }
153 #define ICOM_THIS_MULTI(impl,field,iface) impl* const This=(impl*)((char*)(iface) - offsetof(impl,field))
155 /* check whether the given DWORD is even (return 0) or odd (return 1) */
156 extern int even_or_odd (DWORD number
);
157 /* FOURCC to string conversion for debug messages */
158 extern const char *debugstr_fourcc (DWORD fourcc
);
159 /* DMUS_VERSION struct to string conversion for debug messages */
160 extern const char *debugstr_dmversion (const DMUS_VERSION
*version
);
161 /* returns name of given GUID */
162 extern const char *debugstr_dmguid (const GUID
*id
);
163 /* returns name of given error code */
164 extern const char *debugstr_dmreturn (DWORD code
);
165 /* generic flags-dumping function */
166 extern const char *debugstr_flags (DWORD flags
, const flag_info
* names
, size_t num_names
);
167 extern const char *debugstr_DMUS_OBJ_FLAGS (DWORD flagmask
);
168 /* dump whole DMUS_OBJECTDESC struct */
169 extern const char *debugstr_DMUS_OBJECTDESC (LPDMUS_OBJECTDESC pDesc
);
171 #endif /* __WINE_DMCOMPOS_PRIVATE_H */