wineacm.h 5.28 KB
Newer Older
1
/* -*- tab-width: 8; c-basic-offset: 4 -*- */
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/*
 * Copyright 2000 Eric Pouech
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
17
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 19
 */

20 21 22
#ifndef __WINE_WINEACM_H
#define __WINE_WINEACM_H

23 24 25
#include <windef.h>
#include <winuser.h>

26 27 28 29
/***********************************************************************
 * Wine specific - Win32
 */
typedef struct _WINE_ACMDRIVERID *PWINE_ACMDRIVERID;
30
typedef struct _WINE_ACMDRIVER   *PWINE_ACMDRIVER;
31

32 33 34 35
#define WINE_ACMOBJ_DONTCARE	0x5EED0000
#define WINE_ACMOBJ_DRIVERID	0x5EED0001
#define WINE_ACMOBJ_DRIVER	0x5EED0002
#define WINE_ACMOBJ_STREAM	0x5EED0003
36
#define WINE_ACMOBJ_NOTIFYWND   0x5EED0004
37
#define WINE_ACMOBJ_LOCALDRIVER 0x5EED0005
38

39 40
typedef struct _WINE_ACMOBJ
{
41 42
    DWORD		dwType;
    PWINE_ACMDRIVERID	pACMDriverID;
43 44
} WINE_ACMOBJ, *PWINE_ACMOBJ;

45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
typedef struct _WINE_ACMLOCALDRIVER * PWINE_ACMLOCALDRIVER;
typedef struct _WINE_ACMLOCALDRIVERINST * PWINE_ACMLOCALDRIVERINST;
typedef struct _WINE_ACMLOCALDRIVER
{
    WINE_ACMOBJ         obj;
    HMODULE             hModule;
    DRIVERPROC          lpDrvProc;
    PWINE_ACMLOCALDRIVERINST pACMInstList;
    PWINE_ACMLOCALDRIVER pNextACMLocalDrv;
    PWINE_ACMLOCALDRIVER pPrevACMLocalDrv;
} WINE_ACMLOCALDRIVER;

typedef struct _WINE_ACMLOCALDRIVERINST
{
    PWINE_ACMLOCALDRIVER pLocalDriver;
    DWORD dwDriverID;
    BOOL bSession;
    PWINE_ACMLOCALDRIVERINST pNextACMInst;
} WINE_ACMLOCALDRIVERINST;

65 66 67 68
typedef struct _WINE_ACMDRIVER
{
    WINE_ACMOBJ		obj;
    HDRVR      		hDrvr;
69 70
    PWINE_ACMLOCALDRIVERINST pLocalDrvrInst;

71 72
    PWINE_ACMDRIVER	pNextACMDriver;
} WINE_ACMDRIVER;
73 74 75 76 77 78

typedef struct _WINE_ACMSTREAM
{
    WINE_ACMOBJ		obj;
    PWINE_ACMDRIVER	pDrv;
    ACMDRVSTREAMINSTANCE drvInst;
79
    HACMDRIVER		hAcmDriver;
80 81 82 83
} WINE_ACMSTREAM, *PWINE_ACMSTREAM;

typedef struct _WINE_ACMDRIVERID
{
84
    WINE_ACMOBJ		obj;
85 86
    LPWSTR		pszDriverAlias;
    LPWSTR              pszFileName;
87
    PWINE_ACMLOCALDRIVER pLocalDriver;          /* NULL if global */
88
    PWINE_ACMDRIVER     pACMDriverList;
89
    PWINE_ACMDRIVERID   pNextACMDriverID;
90
    PWINE_ACMDRIVERID	pPrevACMDriverID;
91 92 93 94 95 96 97 98
    /* information about the driver itself, either gotten from registry or driver itself */
    DWORD		cFilterTags;
    DWORD		cFormatTags;
    DWORD		fdwSupport;
    struct {
	DWORD			dwFormatTag;
	DWORD			cbwfx;
    }* 			aFormatTag;
99 100
} WINE_ACMDRIVERID;

101 102 103 104 105 106 107 108 109 110 111
typedef struct _WINE_ACMNOTIFYWND * PWINE_ACMNOTIFYWND;
typedef struct _WINE_ACMNOTIFYWND
{
    WINE_ACMOBJ		obj;
    HWND                hNotifyWnd;          /* Window to notify on ACM events: driver add, driver removal, priority change */
    DWORD               dwNotifyMsg;         /* Notification message to send to window */
    DWORD		fdwSupport;
    PWINE_ACMNOTIFYWND  pNextACMNotifyWnd;
    PWINE_ACMNOTIFYWND  pPrevACMNotifyWnd;
} WINE_ACMNOTIFYWND;

112 113 114
/* From internal.c */
extern HANDLE MSACM_hHeap;
extern PWINE_ACMDRIVERID MSACM_pFirstACMDriverID;
115
extern PWINE_ACMDRIVERID MSACM_RegisterDriver(LPCWSTR pszDriverAlias, LPCWSTR pszFileName,
116
					      PWINE_ACMLOCALDRIVER pLocalDriver);
117 118 119 120 121
extern void MSACM_RegisterAllDrivers(void);
extern PWINE_ACMDRIVERID MSACM_UnregisterDriver(PWINE_ACMDRIVERID p);
extern void MSACM_UnregisterAllDrivers(void);
extern PWINE_ACMDRIVERID MSACM_GetDriverID(HACMDRIVERID hDriverID);
extern PWINE_ACMDRIVER MSACM_GetDriver(HACMDRIVER hDriver);
122
extern PWINE_ACMNOTIFYWND MSACM_GetNotifyWnd(HACMDRIVERID hDriver);
123 124 125
extern PWINE_ACMOBJ MSACM_GetObj(HACMOBJ hObj, DWORD type);

extern MMRESULT MSACM_Message(HACMDRIVER, UINT, LPARAM, LPARAM);
126
extern BOOL MSACM_FindFormatTagInCache(const WINE_ACMDRIVERID*, DWORD, LPDWORD);
127

128 129 130 131 132
extern void MSACM_RePositionDriver(PWINE_ACMDRIVERID, DWORD);
extern void MSACM_WriteCurrentPriorities(void);
extern void MSACM_BroadcastNotification(void);
extern void MSACM_DisableNotifications(void);
extern void MSACM_EnableNotifications(void);
133
extern PWINE_ACMNOTIFYWND MSACM_RegisterNotificationWindow(HWND hNotifyWnd, DWORD dwNotifyMsg);
134
extern PWINE_ACMNOTIFYWND MSACM_UnRegisterNotificationWindow(const WINE_ACMNOTIFYWND*);
135

136 137
extern PWINE_ACMDRIVERID MSACM_RegisterDriverFromRegistry(LPCWSTR pszRegEntry);

138 139 140 141 142 143
extern PWINE_ACMLOCALDRIVER MSACM_RegisterLocalDriver(HMODULE hModule, DRIVERPROC lpDriverProc);
extern PWINE_ACMLOCALDRIVERINST MSACM_OpenLocalDriver(PWINE_ACMLOCALDRIVER, LPARAM);
extern LRESULT MSACM_CloseLocalDriver(PWINE_ACMLOCALDRIVERINST);
/*
extern PWINE_ACMLOCALDRIVER MSACM_GetLocalDriver(HACMDRIVER hDriver);
*/
144 145 146
/* From msacm32.c */
extern HINSTANCE MSACM_hInstance32;

147
/* From pcmcnvtr.c */
148
LRESULT CALLBACK	PCM_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg,
149 150
				       LPARAM dwParam1, LPARAM dwParam2);

151
/* Dialog box templates */
Eric Pouech's avatar
Eric Pouech committed
152
#include "msacmdlg.h"
153 154

#endif /* __WINE_WINEACM_H */