msvcp60: Fixed basic_istream::ipfx implementation.
[wine] / dlls / dmsynth / dmsynth_private.h
1 /* DirectMusicSynthesizer 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_DMSYNTH_PRIVATE_H
21 #define __WINE_DMSYNTH_PRIVATE_H
22
23 #include <stdarg.h>
24
25 #define COBJMACROS
26
27 #include "windef.h"
28 #include "winbase.h"
29 #include "winnt.h"
30 #include "wingdi.h"
31 #include "winuser.h"
32
33 #include "wine/debug.h"
34 #include "wine/list.h"
35 #include "wine/unicode.h"
36 #include "winreg.h"
37 #include "objbase.h"
38
39 #include "dmusici.h"
40 #include "dmusicf.h"
41 #include "dmusics.h"
42 #include "dmksctrl.h"
43
44 /*****************************************************************************
45  * Interfaces
46  */
47 typedef struct IDirectMusicSynth8Impl IDirectMusicSynth8Impl;
48 typedef struct IDirectMusicSynthSinkImpl IDirectMusicSynthSinkImpl;
49
50 /*****************************************************************************
51  * ClassFactory
52  */
53 extern HRESULT WINAPI DMUSIC_CreateDirectMusicSynthImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN;
54 extern HRESULT WINAPI DMUSIC_CreateDirectMusicSynthSinkImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN;
55
56 /*****************************************************************************
57  * IDirectMusicSynth8Impl implementation structure
58  */
59 struct IDirectMusicSynth8Impl {
60     /* IUnknown fields */
61     IDirectMusicSynth8 IDirectMusicSynth8_iface;
62     IKsControl IKsControl_iface;
63     LONG ref;
64
65     /* IDirectMusicSynth8 fields */
66     DMUS_PORTCAPS pCaps;
67     BOOL fActive;
68     IReferenceClock* pLatencyClock;
69     IDirectMusicSynthSinkImpl* pSynthSink;
70 };
71
72 /*****************************************************************************
73  * IDirectMusicSynthSinkImpl implementation structure
74  */
75 struct IDirectMusicSynthSinkImpl {
76     /* IUnknown fields */
77     IDirectMusicSynthSink IDirectMusicSynthSink_iface;
78     IKsControl IKsControl_iface;
79     LONG ref;
80
81     /* IDirectMusicSynthSinkImpl fields */
82     IReferenceClock* latency_clock;
83 };
84
85 /**********************************************************************
86  * Dll lifetime tracking declaration for dmsynth.dll
87  */
88 extern LONG DMSYNTH_refCount DECLSPEC_HIDDEN;
89 static inline void DMSYNTH_LockModule(void) { InterlockedIncrement( &DMSYNTH_refCount ); }
90 static inline void DMSYNTH_UnlockModule(void) { InterlockedDecrement( &DMSYNTH_refCount ); }
91
92 /*****************************************************************************
93  * Misc.
94  */
95 /* used for generic dumping (copied from ddraw) */
96 typedef struct {
97     DWORD val;
98     const char* name;
99 } flag_info;
100
101 typedef struct {
102     const GUID *guid;
103     const char* name;
104 } guid_info;
105
106 /* used for initialising structs (primarily for DMUS_OBJECTDESC) */
107 #define DM_STRUCT_INIT(x)                               \
108         do {                                                            \
109                 memset((x), 0, sizeof(*(x)));   \
110                 (x)->dwSize = sizeof(*x);               \
111         } while (0)
112
113 #define FE(x) { x, #x } 
114 #define GE(x) { &x, #x }
115
116 /* returns name of given GUID */
117 extern const char *debugstr_dmguid (const GUID *id) DECLSPEC_HIDDEN;
118
119 #endif  /* __WINE_DMSYNTH_PRIVATE_H */