1 /**
2  * Windows API header module
3  *
4  * Translated from MinGW Windows headers
5  *
6  * Authors: Stewart Gordon
7  * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
8  * Source: $(DRUNTIMESRC core/sys/windows/_msacm.d)
9  */
10 module core.sys.windows.msacm;
11 version (Windows):
12 
13 version (ANSI) {} else version = Unicode;
14 
15 import core.sys.windows.basetsd, core.sys.windows.mmsystem, core.sys.windows.windef;
16 
17 mixin DECLARE_HANDLE!("HACMDRIVERID");
18 mixin DECLARE_HANDLE!("HACMDRIVER");
19 alias HACMDRIVER* LPHACMDRIVER;
20 
21 enum size_t
22     ACMDRIVERDETAILS_SHORTNAME_CHARS =  32,
23     ACMDRIVERDETAILS_LONGNAME_CHARS  = 128,
24     ACMDRIVERDETAILS_COPYRIGHT_CHARS =  80,
25     ACMDRIVERDETAILS_LICENSING_CHARS = 128,
26     ACMDRIVERDETAILS_FEATURES_CHARS  = 512;
27 
28 enum size_t
29     ACMFORMATDETAILS_FORMAT_CHARS       = 128,
30     ACMFORMATTAGDETAILS_FORMATTAG_CHARS = 48;
31 
32 align(1):
33 
34 struct ACMFORMATDETAILSA {
35     DWORD          cbStruct = ACMFORMATDETAILSA.sizeof;
36     DWORD          dwFormatIndex;
37     DWORD          dwFormatTag;
38     DWORD          fdwSupport;
39     LPWAVEFORMATEX pwfx;
40     DWORD          cbwfx;
41     char[ACMFORMATDETAILS_FORMAT_CHARS] szFormat = 0;
42 }
43 alias ACMFORMATDETAILSA* LPACMFORMATDETAILSA;
44 
45 struct ACMFORMATDETAILSW {
46     DWORD          cbStruct = ACMFORMATDETAILSW.sizeof;
47     DWORD          dwFormatIndex;
48     DWORD          dwFormatTag;
49     DWORD          fdwSupport;
50     LPWAVEFORMATEX pwfx;
51     DWORD          cbwfx;
52     WCHAR[ACMFORMATDETAILS_FORMAT_CHARS] szFormat = 0;
53 }
54 alias ACMFORMATDETAILSW* LPACMFORMATDETAILSW;
55 
56 struct ACMFORMATTAGDETAILSA {
57     DWORD cbStruct = ACMFORMATTAGDETAILSA.sizeof;
58     DWORD dwFormatTagIndex;
59     DWORD dwFormatTag;
60     DWORD cbFormatSize;
61     DWORD fdwSupport;
62     DWORD cStandardFormats;
63     char[ACMFORMATTAGDETAILS_FORMATTAG_CHARS] szFormatTag = 0;
64 }
65 alias ACMFORMATTAGDETAILSA* LPACMFORMATTAGDETAILSA;
66 
67 struct ACMFORMATTAGDETAILSW {
68     DWORD cbStruct = ACMFORMATTAGDETAILSW.sizeof;
69     DWORD dwFormatTagIndex;
70     DWORD dwFormatTag;
71     DWORD cbFormatSize;
72     DWORD fdwSupport;
73     DWORD cStandardFormats;
74     WCHAR[ACMFORMATTAGDETAILS_FORMATTAG_CHARS] szFormatTag = 0;
75 }
76 alias ACMFORMATTAGDETAILSW* LPACMFORMATTAGDETAILSW;
77 
78 struct ACMDRIVERDETAILSA {
79 align(1):
80     DWORD  cbStruct = ACMDRIVERDETAILSA.sizeof;
81     FOURCC fccType;
82     FOURCC fccComp;
83     WORD   wMid;
84     WORD   wPid;
85     DWORD  vdwACM;
86     DWORD  vdwDriver;
87     DWORD  fdwSupport;
88     DWORD  cFormatTags;
89     DWORD  cFilterTags;
90     HICON  hicon;
91     char[ACMDRIVERDETAILS_SHORTNAME_CHARS] szShortName = 0;
92     char[ACMDRIVERDETAILS_LONGNAME_CHARS]  szLongName = 0;
93     char[ACMDRIVERDETAILS_COPYRIGHT_CHARS] szCopyright = 0;
94     char[ACMDRIVERDETAILS_LICENSING_CHARS] szLicensing = 0;
95     char[ACMDRIVERDETAILS_FEATURES_CHARS]  szFeatures = 0;
96 }
97 alias ACMDRIVERDETAILSA* LPACMDRIVERDETAILSA;
98 
99 struct ACMDRIVERDETAILSW {
100 align(1):
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 = 0;
113     WCHAR[ACMDRIVERDETAILS_LONGNAME_CHARS]  szLongName = 0;
114     WCHAR[ACMDRIVERDETAILS_COPYRIGHT_CHARS] szCopyright = 0;
115     WCHAR[ACMDRIVERDETAILS_LICENSING_CHARS] szLicensing = 0;
116     WCHAR[ACMDRIVERDETAILS_FEATURES_CHARS]  szFeatures = 0;
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;