Restore default "open" functionality of ShellExecute.
[wine] / dlls / dswave / dswave_private.h
1 /* DirectMusic Wave Private Include
2  *
3  * Copyright (C) 2003-2004 Rok Mandeljc
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (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
13  * GNU Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18  */
19
20 #ifndef __WINE_DSWAVE_PRIVATE_H
21 #define __WINE_DSWAVE_PRIVATE_H
22
23 #include <stdarg.h>
24
25 #include "windef.h"
26 #include "winbase.h"
27 #include "winnt.h"
28 #include "wingdi.h"
29 #include "winuser.h"
30
31 #include "wine/debug.h"
32 #include "wine/list.h"
33 #include "wine/unicode.h"
34 #include "winreg.h"
35
36 #include "dmusici.h"
37 #include "dmusicf.h"
38 #include "dmusics.h"
39
40 /*****************************************************************************
41  * Interfaces
42  */
43 typedef struct IDirectMusicWaveImpl IDirectMusicWaveImpl;
44
45
46 /*****************************************************************************
47  * Predeclare the interface implementation structures
48  */
49 extern ICOM_VTABLE(IUnknown)               DirectMusicWave_Unknown_Vtbl;
50 extern ICOM_VTABLE(IDirectMusicObject)     DirectMusicWave_Object_Vtbl;
51 extern ICOM_VTABLE(IPersistStream)         DirectMusicWave_PersistStream_Vtbl;
52 extern ICOM_VTABLE(IDirectMusicSegment8)   DirectMusicWave_Segment_Vtbl;
53
54
55 /*****************************************************************************
56  * ClassFactory
57  */
58 extern HRESULT WINAPI DMUSIC_CreateDirectMusicWaveImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter);
59
60
61 /*****************************************************************************
62  * IDirectMusicWaveImpl implementation structure
63  */
64 struct IDirectMusicWaveImpl {
65   /* IUnknown fields */
66   ICOM_VTABLE(IUnknown) *UnknownVtbl;
67   ICOM_VTABLE(IDirectMusicSegment8) *SegmentVtbl;
68   ICOM_VTABLE(IDirectMusicObject) *ObjectVtbl;
69   ICOM_VTABLE(IPersistStream) *PersistStreamVtbl;
70   DWORD          ref;
71
72   /* IDirectMusicWaveImpl fields */
73   LPDMUS_OBJECTDESC pDesc;
74
75 };
76
77 /* IUnknown: */
78 extern HRESULT WINAPI IDirectMusicWaveImpl_IUnknown_QueryInterface (LPUNKNOWN iface, REFIID riid, LPVOID *ppobj);
79 extern ULONG WINAPI   IDirectMusicWaveImpl_IUnknown_AddRef (LPUNKNOWN iface);
80 extern ULONG WINAPI   IDirectMusicWaveImpl_IUnknown_Release (LPUNKNOWN iface);
81 /* IDirectMusicSegment(8): */
82 extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_QueryInterface (LPDIRECTMUSICSEGMENT8 iface, REFIID riid, LPVOID *ppobj);
83 extern ULONG WINAPI   IDirectMusicWaveImpl_IDirectMusicSegment8_AddRef (LPDIRECTMUSICSEGMENT8 iface);
84 extern ULONG WINAPI   IDirectMusicWaveImpl_IDirectMusicSegment8_Release (LPDIRECTMUSICSEGMENT8 iface);
85 extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_GetLength (LPDIRECTMUSICSEGMENT8 iface, MUSIC_TIME* pmtLength);
86 extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_SetLength (LPDIRECTMUSICSEGMENT8 iface, MUSIC_TIME mtLength);
87 extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_GetRepeats (LPDIRECTMUSICSEGMENT8 iface, DWORD* pdwRepeats);
88 extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_SetRepeats (LPDIRECTMUSICSEGMENT8 iface, DWORD dwRepeats);
89 extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_GetDefaultResolution (LPDIRECTMUSICSEGMENT8 iface, DWORD* pdwResolution);
90 extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_SetDefaultResolution (LPDIRECTMUSICSEGMENT8 iface, DWORD dwResolution);
91 extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_GetTrack (LPDIRECTMUSICSEGMENT8 iface, REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, IDirectMusicTrack** ppTrack);
92 extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_GetTrackGroup (LPDIRECTMUSICSEGMENT8 iface, IDirectMusicTrack* pTrack, DWORD* pdwGroupBits);
93 extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_InsertTrack (LPDIRECTMUSICSEGMENT8 iface, IDirectMusicTrack* pTrack, DWORD dwGroupBits);
94 extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_RemoveTrack (LPDIRECTMUSICSEGMENT8 iface, IDirectMusicTrack* pTrack);
95 extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_InitPlay (LPDIRECTMUSICSEGMENT8 iface, IDirectMusicSegmentState** ppSegState, IDirectMusicPerformance* pPerformance, DWORD dwFlags);
96 extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_GetGraph (LPDIRECTMUSICSEGMENT8 iface, IDirectMusicGraph** ppGraph);
97 extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_SetGraph (LPDIRECTMUSICSEGMENT8 iface, IDirectMusicGraph* pGraph);
98 extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_AddNotificationType (LPDIRECTMUSICSEGMENT8 iface, REFGUID rguidNotificationType);
99 extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_RemoveNotificationType (LPDIRECTMUSICSEGMENT8 iface, REFGUID rguidNotificationType);
100 extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_GetParam (LPDIRECTMUSICSEGMENT8 iface, REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, MUSIC_TIME* pmtNext, void* pParam);
101 extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_SetParam (LPDIRECTMUSICSEGMENT8 iface, REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, void* pParam);
102 extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_Clone (LPDIRECTMUSICSEGMENT8 iface, MUSIC_TIME mtStart, MUSIC_TIME mtEnd, IDirectMusicSegment** ppSegment);
103 extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_SetStartPoint (LPDIRECTMUSICSEGMENT8 iface, MUSIC_TIME mtStart);
104 extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_GetStartPoint (LPDIRECTMUSICSEGMENT8 iface, MUSIC_TIME* pmtStart);
105 extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_SetLoopPoints (LPDIRECTMUSICSEGMENT8 iface, MUSIC_TIME mtStart, MUSIC_TIME mtEnd);
106 extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_GetLoopPoints (LPDIRECTMUSICSEGMENT8 iface, MUSIC_TIME* pmtStart, MUSIC_TIME* pmtEnd);
107 extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_SetPChannelsUsed (LPDIRECTMUSICSEGMENT8 iface, DWORD dwNumPChannels, DWORD* paPChannels);
108 extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_SetTrackConfig (LPDIRECTMUSICSEGMENT8 iface, REFGUID rguidTrackClassID, DWORD dwGroupBits, DWORD dwIndex, DWORD dwFlagsOn, DWORD dwFlagsOff);
109 extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_GetAudioPathConfig (LPDIRECTMUSICSEGMENT8 iface, IUnknown** ppAudioPathConfig);
110 extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_Compose (LPDIRECTMUSICSEGMENT8 iface, MUSIC_TIME mtTime, IDirectMusicSegment* pFromSegment, IDirectMusicSegment* pToSegment, IDirectMusicSegment** ppComposedSegment);
111 extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_Download (LPDIRECTMUSICSEGMENT8 iface, IUnknown *pAudioPath);
112 extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicSegment8_Unload (LPDIRECTMUSICSEGMENT8 iface, IUnknown *pAudioPath);
113 /* IDirectMusicObject: */
114 extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicObject_QueryInterface (LPDIRECTMUSICOBJECT iface, REFIID riid, LPVOID *ppobj);
115 extern ULONG WINAPI   IDirectMusicWaveImpl_IDirectMusicObject_AddRef (LPDIRECTMUSICOBJECT iface);
116 extern ULONG WINAPI   IDirectMusicWaveImpl_IDirectMusicObject_Release (LPDIRECTMUSICOBJECT iface);
117 extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicObject_GetDescriptor (LPDIRECTMUSICOBJECT iface, LPDMUS_OBJECTDESC pDesc);
118 extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicObject_SetDescriptor (LPDIRECTMUSICOBJECT iface, LPDMUS_OBJECTDESC pDesc);
119 extern HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicObject_ParseDescriptor (LPDIRECTMUSICOBJECT iface, LPSTREAM pStream, LPDMUS_OBJECTDESC pDesc);
120 /* IPersistStream: */
121 extern HRESULT WINAPI IDirectMusicWaveImpl_IPersistStream_QueryInterface (LPPERSISTSTREAM iface, REFIID riid, void** ppvObject);
122 extern ULONG WINAPI   IDirectMusicWaveImpl_IPersistStream_AddRef (LPPERSISTSTREAM iface);
123 extern ULONG WINAPI   IDirectMusicWaveImpl_IPersistStream_Release (LPPERSISTSTREAM iface);
124 extern HRESULT WINAPI IDirectMusicWaveImpl_IPersistStream_GetClassID (LPPERSISTSTREAM iface, CLSID* pClassID);
125 extern HRESULT WINAPI IDirectMusicWaveImpl_IPersistStream_IsDirty (LPPERSISTSTREAM iface);
126 extern HRESULT WINAPI IDirectMusicWaveImpl_IPersistStream_Load (LPPERSISTSTREAM iface, IStream* pStm);
127 extern HRESULT WINAPI IDirectMusicWaveImpl_IPersistStream_Save (LPPERSISTSTREAM iface, IStream* pStm, BOOL fClearDirty);
128 extern HRESULT WINAPI IDirectMusicWaveImpl_IPersistStream_GetSizeMax (LPPERSISTSTREAM iface, ULARGE_INTEGER* pcbSize);
129
130
131 /*****************************************************************************
132  * Misc.
133  */
134 /* for simpler reading */
135 typedef struct _DMUS_PRIVATE_CHUNK {
136         FOURCC fccID; /* FOURCC ID of the chunk */
137         DWORD dwSize; /* size of the chunk */
138 } DMUS_PRIVATE_CHUNK, *LPDMUS_PRIVATE_CHUNK;
139
140 /* used for generic dumping (copied from ddraw) */
141 typedef struct {
142     DWORD val;
143     const char* name;
144 } flag_info;
145
146 typedef struct {
147     const GUID *guid;
148     const char* name;
149 } guid_info;
150
151 /* used for initialising structs (primarily for DMUS_OBJECTDESC) */
152 #define DM_STRUCT_INIT(x)                               \
153         do {                                                            \
154                 memset((x), 0, sizeof(*(x)));   \
155                 (x)->dwSize = sizeof(*x);               \
156         } while (0)
157
158 #define FE(x) { x, #x } 
159 #define GE(x) { &x, #x }
160
161 /* check whether the given DWORD is even (return 0) or odd (return 1) */
162 extern int even_or_odd (DWORD number);
163 /* FOURCC to string conversion for debug messages */
164 extern const char *debugstr_fourcc (DWORD fourcc);
165 /* DMUS_VERSION struct to string conversion for debug messages */
166 extern const char *debugstr_dmversion (LPDMUS_VERSION version);
167 /* returns name of given GUID */
168 extern const char *debugstr_dmguid (const GUID *id);
169 /* returns name of given error code */
170 extern const char *debugstr_dmreturn (DWORD code);
171 /* generic flags-dumping function */
172 extern const char *debugstr_flags (DWORD flags, const flag_info* names, size_t num_names);
173 extern const char *debugstr_DMUS_OBJ_FLAGS (DWORD flagmask);
174 /* dump whole DMUS_OBJECTDESC struct */
175 extern const char *debugstr_DMUS_OBJECTDESC (LPDMUS_OBJECTDESC pDesc);
176
177 #endif  /* __WINE_DSWAVE_PRIVATE_H */