[MSACM32]
[reactos.git] / reactos / dll / win32 / msacm32 / wineacm.h
1 /* -*- tab-width: 8; c-basic-offset: 4 -*- */
2 /*
3 * Copyright 2000 Eric Pouech
4 *
5 * This library 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 library 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 library; 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_WINEACM_H
21 #define __WINE_WINEACM_H
22
23 #include <config.h>
24
25 #include <stdarg.h>
26
27 #define WIN32_NO_STATUS
28 #define NOBITMAP
29
30 #include <wine/msacmdrv.h>
31 #include <wine/unicode.h>
32
33 #include <winuser.h>
34
35 #include <wine/debug.h>
36 WINE_DEFAULT_DEBUG_CHANNEL(msacm);
37
38 /***********************************************************************
39 * Wine specific - Win32
40 */
41 typedef struct _WINE_ACMDRIVERID *PWINE_ACMDRIVERID;
42 typedef struct _WINE_ACMDRIVER *PWINE_ACMDRIVER;
43
44 #define WINE_ACMOBJ_DONTCARE 0x5EED0000
45 #define WINE_ACMOBJ_DRIVERID 0x5EED0001
46 #define WINE_ACMOBJ_DRIVER 0x5EED0002
47 #define WINE_ACMOBJ_STREAM 0x5EED0003
48 #define WINE_ACMOBJ_NOTIFYWND 0x5EED0004
49 #define WINE_ACMOBJ_LOCALDRIVER 0x5EED0005
50
51 typedef struct _WINE_ACMOBJ
52 {
53 DWORD dwType;
54 PWINE_ACMDRIVERID pACMDriverID;
55 } WINE_ACMOBJ, *PWINE_ACMOBJ;
56
57 typedef struct _WINE_ACMLOCALDRIVER * PWINE_ACMLOCALDRIVER;
58 typedef struct _WINE_ACMLOCALDRIVERINST * PWINE_ACMLOCALDRIVERINST;
59 typedef struct _WINE_ACMLOCALDRIVER
60 {
61 WINE_ACMOBJ obj;
62 HMODULE hModule;
63 DRIVERPROC lpDrvProc;
64 PWINE_ACMLOCALDRIVERINST pACMInstList;
65 PWINE_ACMLOCALDRIVER pNextACMLocalDrv;
66 PWINE_ACMLOCALDRIVER pPrevACMLocalDrv;
67 } WINE_ACMLOCALDRIVER;
68
69 typedef struct _WINE_ACMLOCALDRIVERINST
70 {
71 PWINE_ACMLOCALDRIVER pLocalDriver;
72 DWORD dwDriverID;
73 BOOL bSession;
74 PWINE_ACMLOCALDRIVERINST pNextACMInst;
75 } WINE_ACMLOCALDRIVERINST;
76
77 typedef struct _WINE_ACMDRIVER
78 {
79 WINE_ACMOBJ obj;
80 HDRVR hDrvr;
81 PWINE_ACMLOCALDRIVERINST pLocalDrvrInst;
82
83 PWINE_ACMDRIVER pNextACMDriver;
84 } WINE_ACMDRIVER;
85
86 typedef struct _WINE_ACMSTREAM
87 {
88 WINE_ACMOBJ obj;
89 PWINE_ACMDRIVER pDrv;
90 ACMDRVSTREAMINSTANCE drvInst;
91 HACMDRIVER hAcmDriver;
92 } WINE_ACMSTREAM, *PWINE_ACMSTREAM;
93
94 typedef struct _WINE_ACMDRIVERID
95 {
96 WINE_ACMOBJ obj;
97 LPWSTR pszDriverAlias;
98 LPWSTR pszFileName;
99 PWINE_ACMLOCALDRIVER pLocalDriver; /* NULL if global */
100 PWINE_ACMDRIVER pACMDriverList;
101 PWINE_ACMDRIVERID pNextACMDriverID;
102 PWINE_ACMDRIVERID pPrevACMDriverID;
103 /* information about the driver itself, either gotten from registry or driver itself */
104 DWORD cFilterTags;
105 DWORD cFormatTags;
106 DWORD fdwSupport;
107 struct {
108 DWORD dwFormatTag;
109 DWORD cbwfx;
110 }* aFormatTag;
111 } WINE_ACMDRIVERID;
112
113 typedef struct _WINE_ACMNOTIFYWND * PWINE_ACMNOTIFYWND;
114 typedef struct _WINE_ACMNOTIFYWND
115 {
116 WINE_ACMOBJ obj;
117 HWND hNotifyWnd; /* Window to notify on ACM events: driver add, driver removal, priority change */
118 DWORD dwNotifyMsg; /* Notification message to send to window */
119 DWORD fdwSupport;
120 PWINE_ACMNOTIFYWND pNextACMNotifyWnd;
121 PWINE_ACMNOTIFYWND pPrevACMNotifyWnd;
122 } WINE_ACMNOTIFYWND;
123
124 /* From internal.c */
125 extern HANDLE MSACM_hHeap DECLSPEC_HIDDEN;
126 extern PWINE_ACMDRIVERID MSACM_pFirstACMDriverID DECLSPEC_HIDDEN;
127 extern PWINE_ACMDRIVERID MSACM_RegisterDriver(LPCWSTR pszDriverAlias, LPCWSTR pszFileName,
128 PWINE_ACMLOCALDRIVER pLocalDriver) DECLSPEC_HIDDEN;
129 extern void MSACM_RegisterAllDrivers(void) DECLSPEC_HIDDEN;
130 extern PWINE_ACMDRIVERID MSACM_UnregisterDriver(PWINE_ACMDRIVERID p) DECLSPEC_HIDDEN;
131 extern void MSACM_UnregisterAllDrivers(void) DECLSPEC_HIDDEN;
132 extern PWINE_ACMDRIVERID MSACM_GetDriverID(HACMDRIVERID hDriverID) DECLSPEC_HIDDEN;
133 extern PWINE_ACMDRIVER MSACM_GetDriver(HACMDRIVER hDriver) DECLSPEC_HIDDEN;
134 extern PWINE_ACMNOTIFYWND MSACM_GetNotifyWnd(HACMDRIVERID hDriver) DECLSPEC_HIDDEN;
135 extern PWINE_ACMOBJ MSACM_GetObj(HACMOBJ hObj, DWORD type) DECLSPEC_HIDDEN;
136
137 extern MMRESULT MSACM_Message(HACMDRIVER, UINT, LPARAM, LPARAM) DECLSPEC_HIDDEN;
138 extern BOOL MSACM_FindFormatTagInCache(const WINE_ACMDRIVERID*, DWORD, LPDWORD) DECLSPEC_HIDDEN;
139
140 extern void MSACM_RePositionDriver(PWINE_ACMDRIVERID, DWORD) DECLSPEC_HIDDEN;
141 extern void MSACM_WriteCurrentPriorities(void) DECLSPEC_HIDDEN;
142 extern void MSACM_BroadcastNotification(void) DECLSPEC_HIDDEN;
143 extern void MSACM_DisableNotifications(void) DECLSPEC_HIDDEN;
144 extern void MSACM_EnableNotifications(void) DECLSPEC_HIDDEN;
145 extern PWINE_ACMNOTIFYWND MSACM_RegisterNotificationWindow(HWND hNotifyWnd, DWORD dwNotifyMsg) DECLSPEC_HIDDEN;
146 extern PWINE_ACMNOTIFYWND MSACM_UnRegisterNotificationWindow(const WINE_ACMNOTIFYWND*) DECLSPEC_HIDDEN;
147
148 extern PWINE_ACMDRIVERID MSACM_RegisterDriverFromRegistry(LPCWSTR pszRegEntry) DECLSPEC_HIDDEN;
149
150 extern PWINE_ACMLOCALDRIVER MSACM_RegisterLocalDriver(HMODULE hModule, DRIVERPROC lpDriverProc) DECLSPEC_HIDDEN;
151 extern PWINE_ACMLOCALDRIVERINST MSACM_OpenLocalDriver(PWINE_ACMLOCALDRIVER, LPARAM) DECLSPEC_HIDDEN;
152 extern LRESULT MSACM_CloseLocalDriver(PWINE_ACMLOCALDRIVERINST) DECLSPEC_HIDDEN;
153 /*
154 extern PWINE_ACMLOCALDRIVER MSACM_GetLocalDriver(HACMDRIVER hDriver);
155 */
156 /* From msacm32.c */
157 extern HINSTANCE MSACM_hInstance32 DECLSPEC_HIDDEN;
158
159 /* From pcmcnvtr.c */
160 LRESULT CALLBACK PCM_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg,
161 LPARAM dwParam1, LPARAM dwParam2) DECLSPEC_HIDDEN;
162
163 /* Dialog box templates */
164 #include <msacmdlg.h>
165
166 #endif /* __WINE_WINEACM_H */