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