1 /* IDirectMusicStyle Implementation
2 * IDirectMusicStyle8 Implementation
4 * Copyright (C) 2003 Rok Mandeljc
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Library General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 #include "wine/debug.h"
27 #include "dmusic_private.h"
29 WINE_DEFAULT_DEBUG_CHANNEL(dmusic
);
31 /* IDirectMusicStyle IUnknown parts follow: */
32 HRESULT WINAPI
IDirectMusicStyleImpl_QueryInterface (LPDIRECTMUSICSTYLE iface
, REFIID riid
, LPVOID
*ppobj
)
34 ICOM_THIS(IDirectMusicStyleImpl
,iface
);
36 if (IsEqualGUID(riid
, &IID_IUnknown
) || IsEqualGUID(riid
, &IID_IDirectMusicStyle
))
38 IDirectMusicStyleImpl_AddRef(iface
);
42 WARN("(%p)->(%s,%p),not found\n",This
,debugstr_guid(riid
),ppobj
);
46 ULONG WINAPI
IDirectMusicStyleImpl_AddRef (LPDIRECTMUSICSTYLE iface
)
48 ICOM_THIS(IDirectMusicStyleImpl
,iface
);
49 TRACE("(%p) : AddRef from %ld\n", This
, This
->ref
);
53 ULONG WINAPI
IDirectMusicStyleImpl_Release (LPDIRECTMUSICSTYLE iface
)
55 ICOM_THIS(IDirectMusicStyleImpl
,iface
);
56 ULONG ref
= --This
->ref
;
57 TRACE("(%p) : ReleaseRef to %ld\n", This
, This
->ref
);
60 HeapFree(GetProcessHeap(), 0, This
);
65 /* IDirectMusicStyle Interface follow: */
66 HRESULT WINAPI
IDirectMusicStyleImpl_GetBand (LPDIRECTMUSICSTYLE iface
, WCHAR
* pwszName
, IDirectMusicBand
** ppBand
)
72 HRESULT WINAPI
IDirectMusicStyleImpl_EnumBand (LPDIRECTMUSICSTYLE iface
, DWORD dwIndex
, WCHAR
* pwszName
)
78 HRESULT WINAPI
IDirectMusicStyleImpl_GetDefaultBand (LPDIRECTMUSICSTYLE iface
, IDirectMusicBand
** ppBand
)
84 HRESULT WINAPI
IDirectMusicStyleImpl_EnumMotif (LPDIRECTMUSICSTYLE iface
, DWORD dwIndex
, WCHAR
* pwszName
)
90 HRESULT WINAPI
IDirectMusicStyleImpl_GetMotif (LPDIRECTMUSICSTYLE iface
, WCHAR
* pwszName
, IDirectMusicSegment
** ppSegment
)
96 HRESULT WINAPI
IDirectMusicStyleImpl_GetDefaultChordMap (LPDIRECTMUSICSTYLE iface
, IDirectMusicChordMap
** ppChordMap
)
102 HRESULT WINAPI
IDirectMusicStyleImpl_EnumChordMap (LPDIRECTMUSICSTYLE iface
, DWORD dwIndex
, WCHAR
* pwszName
)
108 HRESULT WINAPI
IDirectMusicStyleImpl_GetChordMap (LPDIRECTMUSICSTYLE iface
, WCHAR
* pwszName
, IDirectMusicChordMap
** ppChordMap
)
114 HRESULT WINAPI
IDirectMusicStyleImpl_GetTimeSignature (LPDIRECTMUSICSTYLE iface
, DMUS_TIMESIGNATURE
* pTimeSig
)
120 HRESULT WINAPI
IDirectMusicStyleImpl_GetEmbellishmentLength (LPDIRECTMUSICSTYLE iface
, DWORD dwType
, DWORD dwLevel
, DWORD
* pdwMin
, DWORD
* pdwMax
)
126 HRESULT WINAPI
IDirectMusicStyleImpl_GetTempo (LPDIRECTMUSICSTYLE iface
, double* pTempo
)
132 ICOM_VTABLE(IDirectMusicStyle
) DirectMusicStyle_Vtbl
=
134 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
135 IDirectMusicStyleImpl_QueryInterface
,
136 IDirectMusicStyleImpl_AddRef
,
137 IDirectMusicStyleImpl_Release
,
138 IDirectMusicStyleImpl_GetBand
,
139 IDirectMusicStyleImpl_EnumBand
,
140 IDirectMusicStyleImpl_GetDefaultBand
,
141 IDirectMusicStyleImpl_EnumMotif
,
142 IDirectMusicStyleImpl_GetMotif
,
143 IDirectMusicStyleImpl_GetDefaultChordMap
,
144 IDirectMusicStyleImpl_EnumChordMap
,
145 IDirectMusicStyleImpl_GetChordMap
,
146 IDirectMusicStyleImpl_GetTimeSignature
,
147 IDirectMusicStyleImpl_GetEmbellishmentLength
,
148 IDirectMusicStyleImpl_GetTempo
152 /* IDirectMusicStyle8 IUnknown parts follow: */
153 HRESULT WINAPI
IDirectMusicStyle8Impl_QueryInterface (LPDIRECTMUSICSTYLE8 iface
, REFIID riid
, LPVOID
*ppobj
)
155 ICOM_THIS(IDirectMusicStyle8Impl
,iface
);
157 if (IsEqualGUID(riid
, &IID_IUnknown
) || IsEqualGUID(riid
, &IID_IDirectMusicStyle8
))
159 IDirectMusicStyle8Impl_AddRef(iface
);
163 WARN("(%p)->(%s,%p),not found\n",This
,debugstr_guid(riid
),ppobj
);
164 return E_NOINTERFACE
;
167 ULONG WINAPI
IDirectMusicStyle8Impl_AddRef (LPDIRECTMUSICSTYLE8 iface
)
169 ICOM_THIS(IDirectMusicStyle8Impl
,iface
);
170 TRACE("(%p) : AddRef from %ld\n", This
, This
->ref
);
171 return ++(This
->ref
);
174 ULONG WINAPI
IDirectMusicStyle8Impl_Release (LPDIRECTMUSICSTYLE8 iface
)
176 ICOM_THIS(IDirectMusicStyle8Impl
,iface
);
177 ULONG ref
= --This
->ref
;
178 TRACE("(%p) : ReleaseRef to %ld\n", This
, This
->ref
);
181 HeapFree(GetProcessHeap(), 0, This
);
186 /* IDirectMusicStyle Interface part follow: */
187 HRESULT WINAPI
IDirectMusicStyle8Impl_GetBand (LPDIRECTMUSICSTYLE8 iface
, WCHAR
* pwszName
, IDirectMusicBand
** ppBand
)
193 HRESULT WINAPI
IDirectMusicStyle8Impl_EnumBand (LPDIRECTMUSICSTYLE8 iface
, DWORD dwIndex
, WCHAR
* pwszName
)
199 HRESULT WINAPI
IDirectMusicStyle8Impl_GetDefaultBand (LPDIRECTMUSICSTYLE8 iface
, IDirectMusicBand
** ppBand
)
205 HRESULT WINAPI
IDirectMusicStyle8Impl_EnumMotif (LPDIRECTMUSICSTYLE8 iface
, DWORD dwIndex
, WCHAR
* pwszName
)
211 HRESULT WINAPI
IDirectMusicStyle8Impl_GetMotif (LPDIRECTMUSICSTYLE8 iface
, WCHAR
* pwszName
, IDirectMusicSegment
** ppSegment
)
217 HRESULT WINAPI
IDirectMusicStyle8Impl_GetDefaultChordMap (LPDIRECTMUSICSTYLE8 iface
, IDirectMusicChordMap
** ppChordMap
)
223 HRESULT WINAPI
IDirectMusicStyle8Impl_EnumChordMap (LPDIRECTMUSICSTYLE8 iface
, DWORD dwIndex
, WCHAR
* pwszName
)
229 HRESULT WINAPI
IDirectMusicStyle8Impl_GetChordMap (LPDIRECTMUSICSTYLE8 iface
, WCHAR
* pwszName
, IDirectMusicChordMap
** ppChordMap
)
235 HRESULT WINAPI
IDirectMusicStyle8Impl_GetTimeSignature (LPDIRECTMUSICSTYLE8 iface
, DMUS_TIMESIGNATURE
* pTimeSig
)
241 HRESULT WINAPI
IDirectMusicStyle8Impl_GetEmbellishmentLength (LPDIRECTMUSICSTYLE8 iface
, DWORD dwType
, DWORD dwLevel
, DWORD
* pdwMin
, DWORD
* pdwMax
)
247 HRESULT WINAPI
IDirectMusicStyle8Impl_GetTempo (LPDIRECTMUSICSTYLE8 iface
, double* pTempo
)
253 /* IDirectMusicStyle8 Interface part follow: */
254 HRESULT WINAPI
IDirectMusicStyle8ImplEnumPattern (LPDIRECTMUSICSTYLE8 iface
, DWORD dwIndex
, DWORD dwPatternType
, WCHAR
* pwszName
)
260 ICOM_VTABLE(IDirectMusicStyle8
) DirectMusicStyle8_Vtbl
=
262 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
263 IDirectMusicStyle8Impl_QueryInterface
,
264 IDirectMusicStyle8Impl_AddRef
,
265 IDirectMusicStyle8Impl_Release
,
266 IDirectMusicStyle8Impl_GetBand
,
267 IDirectMusicStyle8Impl_EnumBand
,
268 IDirectMusicStyle8Impl_GetDefaultBand
,
269 IDirectMusicStyle8Impl_EnumMotif
,
270 IDirectMusicStyle8Impl_GetMotif
,
271 IDirectMusicStyle8Impl_GetDefaultChordMap
,
272 IDirectMusicStyle8Impl_EnumChordMap
,
273 IDirectMusicStyle8Impl_GetChordMap
,
274 IDirectMusicStyle8Impl_GetTimeSignature
,
275 IDirectMusicStyle8Impl_GetEmbellishmentLength
,
276 IDirectMusicStyle8Impl_GetTempo
,
277 IDirectMusicStyle8ImplEnumPattern