forked from Mirrors/wine-wine
dmloader: Move struct definitions to the files they are used in.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org> Signed-off-by: Alexandre Julliard <julliard@winehq.org>oldstable
parent
8b98126666
commit
a8900c9bbb
|
@ -28,6 +28,21 @@ WINE_DECLARE_DEBUG_CHANNEL(dmdump);
|
|||
#define DMUS_MAX_NAME_SIZE DMUS_MAX_NAME*sizeof(WCHAR)
|
||||
#define DMUS_MAX_FILENAME_SIZE DMUS_MAX_FILENAME*sizeof(WCHAR)
|
||||
|
||||
typedef struct riff_chunk {
|
||||
FOURCC fccID;
|
||||
DWORD dwSize;
|
||||
} WINE_CHUNK;
|
||||
|
||||
/* contained object entry */
|
||||
typedef struct container_entry {
|
||||
struct list entry;
|
||||
DMUS_OBJECTDESC Desc;
|
||||
BOOL bIsRIFF;
|
||||
DWORD dwFlags; /* DMUS_CONTAINED_OBJF_KEEP: keep object in loader's cache, even when container is released */
|
||||
WCHAR *wszAlias;
|
||||
IDirectMusicObject *pObject; /* needed when releasing from loader's cache on container release */
|
||||
} WINE_CONTAINER_ENTRY, *LPWINE_CONTAINER_ENTRY;
|
||||
|
||||
/*****************************************************************************
|
||||
* IDirectMusicContainerImpl implementation
|
||||
*/
|
||||
|
|
|
@ -56,8 +56,6 @@ static inline void unlock_module(void) { InterlockedDecrement( &module_ref ); }
|
|||
typedef struct IDirectMusicLoaderCF IDirectMusicLoaderCF;
|
||||
typedef struct IDirectMusicContainerCF IDirectMusicContainerCF;
|
||||
|
||||
typedef struct IDirectMusicLoaderImpl IDirectMusicLoaderImpl;
|
||||
|
||||
typedef struct IDirectMusicLoaderFileStream IDirectMusicLoaderFileStream;
|
||||
typedef struct IDirectMusicLoaderResourceStream IDirectMusicLoaderResourceStream;
|
||||
typedef struct IDirectMusicLoaderGenericStream IDirectMusicLoaderGenericStream;
|
||||
|
@ -71,14 +69,6 @@ extern HRESULT WINAPI DMUSIC_CreateDirectMusicLoaderFileStream (LPVOID *ppobj) D
|
|||
extern HRESULT WINAPI DMUSIC_CreateDirectMusicLoaderResourceStream (LPVOID *ppobj) DECLSPEC_HIDDEN;
|
||||
extern HRESULT WINAPI DMUSIC_CreateDirectMusicLoaderGenericStream (LPVOID *ppobj) DECLSPEC_HIDDEN;
|
||||
|
||||
/* cache/alias entry */
|
||||
typedef struct _WINE_LOADER_ENTRY {
|
||||
struct list entry; /* for listing elements */
|
||||
DMUS_OBJECTDESC Desc;
|
||||
LPDIRECTMUSICOBJECT pObject; /* pointer to object */
|
||||
BOOL bInvalidDefaultDLS; /* my workaround for enabling caching of "faulty" default dls collection */
|
||||
} WINE_LOADER_ENTRY, *LPWINE_LOADER_ENTRY;
|
||||
|
||||
/* cache options, search paths for specific types of objects */
|
||||
typedef struct _WINE_LOADER_OPTION {
|
||||
struct list entry; /* for listing elements */
|
||||
|
@ -86,29 +76,6 @@ typedef struct _WINE_LOADER_OPTION {
|
|||
WCHAR wszSearchPath[MAX_PATH]; /* look for objects of certain type in here */
|
||||
} WINE_LOADER_OPTION, *LPWINE_LOADER_OPTION;
|
||||
|
||||
/*****************************************************************************
|
||||
* IDirectMusicLoaderImpl implementation structure
|
||||
*/
|
||||
struct IDirectMusicLoaderImpl {
|
||||
IDirectMusicLoader8 IDirectMusicLoader8_iface;
|
||||
LONG ref;
|
||||
unsigned int cache_class;
|
||||
/* simple cache (linked list) */
|
||||
struct list *pObjects;
|
||||
/* settings for certain object classes */
|
||||
struct list *pClassSettings;
|
||||
};
|
||||
|
||||
/* contained object entry */
|
||||
typedef struct _WINE_CONTAINER_ENTRY {
|
||||
struct list entry; /* for listing elements */
|
||||
DMUS_OBJECTDESC Desc;
|
||||
BOOL bIsRIFF;
|
||||
DWORD dwFlags; /* DMUS_CONTAINED_OBJF_KEEP: keep object in loader's cache, even when container is released */
|
||||
WCHAR* wszAlias;
|
||||
LPDIRECTMUSICOBJECT pObject; /* needed when releasing from loader's cache on container release */
|
||||
} WINE_CONTAINER_ENTRY, *LPWINE_CONTAINER_ENTRY;
|
||||
|
||||
/*****************************************************************************
|
||||
* IDirectMusicLoaderFileStream implementation structure
|
||||
*/
|
||||
|
@ -167,15 +134,6 @@ struct IDirectMusicLoaderGenericStream {
|
|||
/* Custom: */
|
||||
extern HRESULT WINAPI IDirectMusicLoaderGenericStream_Attach (LPSTREAM iface, LPSTREAM pStream, LPDIRECTMUSICLOADER8 pLoader) DECLSPEC_HIDDEN;
|
||||
|
||||
/*****************************************************************************
|
||||
* Misc.
|
||||
*/
|
||||
/* for simpler reading */
|
||||
typedef struct _WINE_CHUNK {
|
||||
FOURCC fccID; /* FOURCC ID of the chunk */
|
||||
DWORD dwSize; /* size of the chunk */
|
||||
} WINE_CHUNK, *LPWINE_CHUNK;
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
#endif /* __WINE_DMLOADER_PRIVATE_H */
|
||||
|
|
|
@ -37,6 +37,25 @@ static const GUID *classes[] = {
|
|||
&CLSID_DirectSoundWave
|
||||
};
|
||||
|
||||
/* cache/alias entry */
|
||||
typedef struct cache_entry {
|
||||
struct list entry;
|
||||
DMUS_OBJECTDESC Desc;
|
||||
IDirectMusicObject *pObject;
|
||||
BOOL bInvalidDefaultDLS; /* workaround for enabling caching of "faulty" default dls collection */
|
||||
} WINE_LOADER_ENTRY, *LPWINE_LOADER_ENTRY;
|
||||
|
||||
typedef struct IDirectMusicLoaderImpl {
|
||||
IDirectMusicLoader8 IDirectMusicLoader8_iface;
|
||||
LONG ref;
|
||||
unsigned int cache_class;
|
||||
/* simple cache */
|
||||
struct list *pObjects;
|
||||
/* settings for certain object classes */
|
||||
struct list *pClassSettings;
|
||||
} IDirectMusicLoaderImpl;
|
||||
|
||||
|
||||
static inline IDirectMusicLoaderImpl* impl_from_IDirectMusicLoader8(IDirectMusicLoader8 *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, IDirectMusicLoaderImpl, IDirectMusicLoader8_iface);
|
||||
|
|
Loading…
Reference in New Issue