includes: Fix alignment for 64-bits
[wine/wine64.git] / dlls / dmcompos / dmcompos_private.h
blob5048b33915510a1e54e65ed685a4e00ea1f372e4
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
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 IDirectMusicChordMapImpl IDirectMusicChordMapImpl;
49 typedef struct IDirectMusicComposerImpl IDirectMusicComposerImpl;
50 typedef struct IDirectMusicChordMapTrack IDirectMusicChordMapTrack;
51 typedef struct IDirectMusicSignPostTrack IDirectMusicSignPostTrack;
53 /*****************************************************************************
54 * ClassFactory
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 {
65 /* IUnknown fields */
66 const IUnknownVtbl *UnknownVtbl;
67 const IDirectMusicChordMapVtbl *ChordMapVtbl;
68 const IDirectMusicObjectVtbl *ObjectVtbl;
69 const IPersistStreamVtbl *PersistStreamVtbl;
70 LONG ref;
72 /* IDirectMusicChordMapImpl fields */
73 LPDMUS_OBJECTDESC pDesc;
77 /*****************************************************************************
78 * IDirectMusicComposerImpl implementation structure
80 struct IDirectMusicComposerImpl {
81 /* IUnknown fields */
82 const IDirectMusicComposerVtbl *lpVtbl;
83 LONG ref;
85 /* IDirectMusicComposerImpl fields */
88 /*****************************************************************************
89 * IDirectMusicChordMapTrack implementation structure
91 struct IDirectMusicChordMapTrack {
92 /* IUnknown fields */
93 const IUnknownVtbl *UnknownVtbl;
94 const IDirectMusicTrack8Vtbl *TrackVtbl;
95 const IPersistStreamVtbl *PersistStreamVtbl;
96 LONG ref;
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;
110 LONG ref;
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 /*****************************************************************************
124 * Misc.
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) */
133 typedef struct {
134 DWORD val;
135 const char* name;
136 } flag_info;
138 typedef struct {
139 const GUID *guid;
140 const char* name;
141 } guid_info;
143 /* used for initialising structs (primarily for DMUS_OBJECTDESC) */
144 #define DM_STRUCT_INIT(x) \
145 do { \
146 memset((x), 0, sizeof(*(x))); \
147 (x)->dwSize = sizeof(*x); \
148 } while (0)
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 /* FOURCC to string conversion for debug messages */
156 extern const char *debugstr_fourcc (DWORD fourcc);
157 /* returns name of given GUID */
158 extern const char *debugstr_dmguid (const GUID *id);
159 /* dump whole DMUS_OBJECTDESC struct */
160 extern const char *debugstr_DMUS_OBJECTDESC (LPDMUS_OBJECTDESC pDesc);
162 #endif /* __WINE_DMCOMPOS_PRIVATE_H */