1 /***********************************************************************\
2 *                                msacm.d                                *
3 *                                                                       *
4 *                       Windows API header module                       *
5 *                                                                       *
6 *                 Translated from MinGW Windows headers                 *
7 *                           by Stewart Gordon                           *
8 *                                                                       *
9 *                       Placed into public domain                       *
10 \***********************************************************************/
11 module windows.msacm;
12 
13 private import windows.basetsd, windows.mmsystem, windows.windef;
14 nothrow:
15 mixin DECLARE_HANDLE!("HACMDRIVERID");
16 mixin DECLARE_HANDLE!("HACMDRIVER");
17 alias HACMDRIVER* LPHACMDRIVER;
18 
19 /* Comment from MinGW
20 	found through experimentation
21  */
22 const size_t
23 	ACMDRIVERDETAILS_SHORTNAME_CHARS =  32,
24 	ACMDRIVERDETAILS_LONGNAME_CHARS  = 128,
25 	ACMDRIVERDETAILS_COPYRIGHT_CHARS =  80,
26 	ACMDRIVERDETAILS_LICENSING_CHARS = 128;
27 
28 /* Comment from MinGW
29 	I don't know the right values for these macros
30  */
31 const size_t
32 	ACMFORMATDETAILS_FORMAT_CHARS       = 256,
33 	ACMFORMATTAGDETAILS_FORMATTAG_CHARS = 256,
34 	ACMDRIVERDETAILS_FEATURES_CHARS     = 256;
35 
36 struct ACMFORMATDETAILSA {
37 	DWORD          cbStruct = ACMFORMATDETAILSA.sizeof;  // are they?
38 	DWORD          dwFormatIndex;
39 	DWORD          dwFormatTag;
40 	DWORD          fdwSupport;
41 	LPWAVEFORMATEX pwfx;
42 	DWORD          cbwfx;
43 	char[ACMFORMATDETAILS_FORMAT_CHARS] szFormat;
44 }
45 alias ACMFORMATDETAILSA* LPACMFORMATDETAILSA;
46 
47 struct ACMFORMATDETAILSW {
48 	DWORD          cbStruct = ACMFORMATDETAILSW.sizeof;
49 	DWORD          dwFormatIndex;
50 	DWORD          dwFormatTag;
51 	DWORD          fdwSupport;
52 	LPWAVEFORMATEX pwfx;
53 	DWORD          cbwfx;
54 	WCHAR[ACMFORMATDETAILS_FORMAT_CHARS] szFormat;
55 }
56 alias ACMFORMATDETAILSW* LPACMFORMATDETAILSW;
57 
58 struct ACMFORMATTAGDETAILSA {
59 	DWORD cbStruct = ACMFORMATTAGDETAILSA.sizeof;
60 	DWORD dwFormatTagIndex;
61 	DWORD dwFormatTag;
62 	DWORD cbFormatSize;
63 	DWORD fdwSupport;
64 	DWORD cStandardFormats;
65 	char[ACMFORMATTAGDETAILS_FORMATTAG_CHARS] szFormatTag;
66 }
67 alias ACMFORMATTAGDETAILSA* LPACMFORMATTAGDETAILSA;
68 
69 struct ACMFORMATTAGDETAILSW {
70 	DWORD cbStruct = ACMFORMATTAGDETAILSW.sizeof;
71 	DWORD dwFormatTagIndex;
72 	DWORD dwFormatTag;
73 	DWORD cbFormatSize;
74 	DWORD fdwSupport;
75 	DWORD cStandardFormats;
76 	WCHAR[ACMFORMATTAGDETAILS_FORMATTAG_CHARS] szFormatTag;
77 }
78 alias ACMFORMATTAGDETAILSW* LPACMFORMATTAGDETAILSW;
79 
80 struct ACMDRIVERDETAILSA {
81 	DWORD  cbStruct = ACMDRIVERDETAILSA.sizeof;
82 	FOURCC fccType;
83 	FOURCC fccComp;
84 	WORD   wMid;
85 	WORD   wPid;
86 	DWORD  vdwACM;
87 	DWORD  vdwDriver;
88 	DWORD  fdwSupport;
89 	DWORD  cFormatTags;
90 	DWORD  cFilterTags;
91 	HICON  hicon;
92 	char[ACMDRIVERDETAILS_SHORTNAME_CHARS] szShortName;
93 	char[ACMDRIVERDETAILS_LONGNAME_CHARS]  szLongName;
94 	char[ACMDRIVERDETAILS_COPYRIGHT_CHARS] szCopyright;
95 	char[ACMDRIVERDETAILS_LICENSING_CHARS] szLicensing;
96 	char[ACMDRIVERDETAILS_FEATURES_CHARS]  szFeatures;
97 }
98 alias ACMDRIVERDETAILSA* LPACMDRIVERDETAILSA;
99 
100 struct ACMDRIVERDETAILSW {
101 	DWORD  cbStruct = ACMDRIVERDETAILSW.sizeof;
102 	FOURCC fccType;
103 	FOURCC fccComp;
104 	WORD   wMid;
105 	WORD   wPid;
106 	DWORD  vdwACM;
107 	DWORD  vdwDriver;
108 	DWORD  fdwSupport;
109 	DWORD  cFormatTags;
110 	DWORD  cFilterTags;
111 	HICON  hicon;
112 	WCHAR[ACMDRIVERDETAILS_SHORTNAME_CHARS] szShortName;
113 	WCHAR[ACMDRIVERDETAILS_LONGNAME_CHARS]  szLongName;
114 	WCHAR[ACMDRIVERDETAILS_COPYRIGHT_CHARS] szCopyright;
115 	WCHAR[ACMDRIVERDETAILS_LICENSING_CHARS] szLicensing;
116 	WCHAR[ACMDRIVERDETAILS_FEATURES_CHARS]  szFeatures;
117 }
118 alias ACMDRIVERDETAILSW* LPACMDRIVERDETAILSW;
119 
120 extern (Windows) {
121 	alias BOOL function(HACMDRIVERID hadid, LPACMFORMATDETAILSA pafd,
122 	  DWORD_PTR dwInstance, DWORD fdwSupport) ACMFORMATENUMCBA;
123 	alias BOOL function(HACMDRIVERID hadid, LPACMFORMATDETAILSW pafd,
124 	  DWORD_PTR dwInstance, DWORD fdwSupport) ACMFORMATENUMCBW;
125 	alias BOOL function(HACMDRIVERID hadid, LPACMFORMATTAGDETAILSA paftd,
126 	  DWORD_PTR dwInstance, DWORD fdwSupport) ACMFORMATTAGENUMCBA;
127 	alias BOOL function(HACMDRIVERID hadid, LPACMFORMATTAGDETAILSW paftd,
128 	  DWORD_PTR dwInstance, DWORD fdwSupport) ACMFORMATTAGENUMCBW;
129 	alias BOOL function(HACMDRIVERID hadid, DWORD_PTR dwInstance,
130 	  DWORD fdwSupport) ACMDRIVERENUMCB;
131 
132 	MMRESULT acmDriverOpen(LPHACMDRIVER phad, HACMDRIVERID hadid,
133 	  DWORD fdwOpen);
134 	MMRESULT acmDriverEnum(ACMDRIVERENUMCB fnCallback, DWORD_PTR dwInstance,
135 	  DWORD fdwEnum);
136 	MMRESULT acmFormatEnumA(HACMDRIVER had, LPACMFORMATDETAILSA pafd,
137 	  ACMFORMATENUMCBA fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum);
138 	MMRESULT acmFormatEnumW(HACMDRIVER had, LPACMFORMATDETAILSW pafd,
139 	  ACMFORMATENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum);
140 	MMRESULT acmDriverClose(HACMDRIVER had, DWORD fdwClose);
141 	MMRESULT acmDriverDetailsA(HACMDRIVERID hadid, LPACMDRIVERDETAILSA padd,
142 	  DWORD fdwDetails);
143 	MMRESULT acmDriverDetailsW(HACMDRIVERID hadid, LPACMDRIVERDETAILSW padd,
144 	  DWORD fdwDetails);
145 	MMRESULT acmFormatTagEnumA(HACMDRIVER had, LPACMFORMATTAGDETAILSA paftd,
146 	  ACMFORMATTAGENUMCBA fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum);
147 	MMRESULT acmFormatTagEnumW(HACMDRIVER had, LPACMFORMATTAGDETAILSW paftd,
148 	  ACMFORMATTAGENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum);
149 }
150 
151 version (Unicode) {
152 	alias ACMFORMATDETAILSW ACMFORMATDETAILS;
153 	alias ACMFORMATTAGDETAILSW ACMFORMATTAGDETAILS;
154 	alias ACMDRIVERDETAILSW ACMDRIVERDETAILS;
155 	alias ACMFORMATENUMCBW ACMFORMATENUMCB;
156 	alias ACMFORMATTAGENUMCBW ACMFORMATTAGENUMCB;
157 	alias acmFormatEnumW acmFormatEnum;
158 	alias acmDriverDetailsW acmDriverDetails;
159 	alias acmFormatTagEnumW acmFormatTagEnum;
160 } else {
161 	alias ACMFORMATDETAILSA ACMFORMATDETAILS;
162 	alias ACMFORMATTAGDETAILSA ACMFORMATTAGDETAILS;
163 	alias ACMDRIVERDETAILSA ACMDRIVERDETAILS;
164 	alias ACMFORMATENUMCBA ACMFORMATENUMCB;
165 	alias ACMFORMATTAGENUMCBA ACMFORMATTAGENUMCB;
166 	alias acmFormatEnumA acmFormatEnum;
167 	alias acmDriverDetailsA acmDriverDetails;
168 	alias acmFormatTagEnumA acmFormatTagEnum;
169 }
170 
171 alias ACMFORMATDETAILS* LPACMFORMATDETAILS;
172 alias ACMFORMATTAGDETAILS* LPACMFORMATTAGDETAILS;
173 alias ACMDRIVERDETAILS* LPACMDRIVERDETAILS;