source: Daodan/MinGW/include/mlang.h@ 1163

Last change on this file since 1163 was 1046, checked in by alloc, 8 years ago

Daodan: Added Windows MinGW and build batch file

File size: 12.4 KB
Line 
1#ifndef _MLANG_H
2#define _MLANG_H
3#if __GNUC__ >= 3
4#pragma GCC system_header
5#endif
6
7#include <windows.h>
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12#pragma pack(push,1)
13
14#define MAX_MIMECP_NAME 64
15#define MAX_MIMECSET_NAME 50
16#define MAX_SCRIPT_NAME 48
17#define MAX_MIMEFACE_NAME 32
18#define MAX_RFC1766_NAME 6
19#define MAX_LOCALE_NAME 32
20
21typedef enum tagMIMECONTF {
22 MIMECONTF_MAILNEWS = 0x00000001,
23 MIMECONTF_BROWSER = 0x00000002,
24 MIMECONTF_MINIMAL = 0x00000004,
25 MIMECONTF_IMPORT = 0x00000008,
26 MIMECONTF_SAVABLE_MAILNEWS = 0x00000100,
27 MIMECONTF_SAVABLE_BROWSER = 0x00000200,
28 MIMECONTF_EXPORT = 0x00000400,
29 MIMECONTF_PRIVCONVERTER = 0x00010000,
30 MIMECONTF_VALID = 0x00020000,
31 MIMECONTF_VALID_NLS = 0x00040000,
32 MIMECONTF_MIME_IE4 = 0x10000000,
33 MIMECONTF_MIME_LATEST = 0x20000000,
34 MIMECONTF_MIME_REGISTRY = 0x40000000
35} MIMECONTF;
36typedef enum tagMLCONVCHARF {
37 MLCONVCHARF_NONE = 0,
38 MLCONVCHARF_AUTODETECT = 1,
39 MLCONVCHARF_NCR_ENTITIZE = 2,
40 MLCONVCHARF_NAME_ENTITIZE = 4,
41 MLCONVCHARF_USEDEFCHAR = 8,
42 MLCONVCHARF_NOBESTFITCHARS = 16
43} MLCONVCHAR;
44typedef enum tagMLCPF {
45 MLDETECTF_MAILNEWS = 0x0001,
46 MLDETECTF_BROWSER = 0x0002,
47 MLDETECTF_VALID = 0x0004,
48 MLDETECTF_VALID_NLS = 0x0008,
49 MLDETECTF_PRESERVE_ORDER = 0x0010,
50 MLDETECTF_PREFERRED_ONLY = 0x0020,
51 MLDETECTF_FILTER_SPECIALCHAR = 0x0040
52} MLCP;
53typedef enum tagMLDETECTCP {
54 MLDETECTCP_NONE = 0,
55 MLDETECTCP_7BIT = 1,
56 MLDETECTCP_8BIT = 2,
57 MLDETECTCP_DBCS = 4,
58 MLDETECTCP_HTML = 8
59} MLDETECTCP;
60typedef enum tagSCRIPTFONTCONTF {
61 SCRIPTCONTF_FIXED_FONT = 0x00000001,
62 SCRIPTCONTF_PROPORTIONAL_FONT = 0x00000002,
63 SCRIPTCONTF_SCRIPT_USER = 0x00010000,
64 SCRIPTCONTF_SCRIPT_HIDE = 0x00020000,
65 SCRIPTCONTF_SCRIPT_SYSTEM = 0x00040000
66} SCRIPTFONTCONTF;
67typedef enum tagSCRIPTCONTF {
68 sidDefault,
69 sidMerge,
70 sidAsciiSym,
71 sidAsciiLatin,
72 sidLatin,
73 sidGreek,
74 sidCyrillic,
75 sidArmenian,
76 sidHebrew,
77 sidArabic,
78 sidDevanagari,
79 sidBengali,
80 sidGurmukhi,
81 sidGujarati,
82 sidOriya,
83 sidTamil,
84 sidTelugu,
85 sidKannada,
86 sidMalayalam,
87 sidThai,
88 sidLao,
89 sidTibetan,
90 sidGeorgian,
91 sidHangul,
92 sidKana,
93 sidBopomofo,
94 sidHan,
95 sidEthiopic,
96 sidCanSyllabic,
97 sidCherokee,
98 sidYi,
99 sidBraille,
100 sidRunic,
101 sidOgham,
102 sidSinhala,
103 sidSyriac,
104 sidBurmese,
105 sidKhmer,
106 sidThaana,
107 sidMongolian,
108 sidLim,
109 sidFEFirst = sidHangul,
110 sidFELast = sidHan
111} SCRIPTCONTF;
112
113typedef struct tagDetectEncodingInfo {
114 UINT nLangID;
115 UINT nCodePage;
116 INT nDocPercent;
117 INT nConfidence;
118} DetectEncodingInfo, *pDetectEncodingInfo;
119typedef struct tagMIMECPINFO {
120 DWORD dwFlags;
121 UINT uiCodePage;
122 UINT uiFamilyCodePage;
123 WCHAR wszDescription[MAX_MIMECP_NAME];
124 WCHAR wszWebCharset[MAX_MIMECSET_NAME];
125 WCHAR wszHeaderCharset[MAX_MIMECSET_NAME];
126 WCHAR wszBodyCharset[MAX_MIMECSET_NAME];
127 WCHAR wszFixedWidthFont[MAX_MIMEFACE_NAME];
128 WCHAR wszProportionalFont[MAX_MIMEFACE_NAME];
129 BYTE bGDICharset;
130} MIMECPINFO, *PMIMECPINFO;
131typedef struct tagMIMECSETINFO {
132 UINT uiCodePage;
133 UINT uiInternetEncoding;
134 WCHAR wszCharset[MAX_MIMECSET_NAME];
135} MIMECSETINFO, *PMIMECSETINFO;
136typedef struct tagRFC1766INFO {
137 LCID lcid;
138 WCHAR wszRfc1766[MAX_RFC1766_NAME];
139 WCHAR wszLocaleName[MAX_LOCALE_NAME];
140} RFC1766INFO, *PRFC1766INFO;
141typedef BYTE SCRIPT_ID;
142typedef struct tagSCRIPTINFO {
143 SCRIPT_ID ScriptId;
144 UINT uiCodePage;
145 WCHAR wszDescription[MAX_SCRIPT_NAME];
146 WCHAR wszFixedWidthFont[MAX_MIMEFACE_NAME];
147 WCHAR wszProportionalFont[MAX_MIMEFACE_NAME];
148} SCRIPTINFO, *PSCRIPTINFO;
149typedef struct tagUNICODERANGE {
150 WCHAR wcFrom;
151 WCHAR wcTo;
152} UNICODERANGE;
153
154typedef struct tagSCRIPTFONTINFO SCRIPTFONTINFO;
155
156EXTERN_C const IID IID_IEnumCodePage;
157#define INTERFACE IEnumCodePage
158DECLARE_INTERFACE_(IEnumCodePage,IUnknown)
159{
160 STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
161 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
162 STDMETHOD_(ULONG,Release)(THIS) PURE;
163 STDMETHOD(Clone)(THIS_ IEnumCodePage**) PURE;
164 STDMETHOD(Next)(THIS_ ULONG,PMIMECPINFO,ULONG*) PURE;
165 STDMETHOD(Reset)(THIS) PURE;
166 STDMETHOD(Skip)(THIS_ ULONG) PURE;
167};
168#undef INTERFACE
169
170EXTERN_C const IID IID_IEnumRfc1766;
171#define INTERFACE IEnumRfc1766
172DECLARE_INTERFACE_(IEnumRfc1766,IUnknown)
173{
174 STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
175 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
176 STDMETHOD_(ULONG,Release)(THIS) PURE;
177 STDMETHOD(Clone)(THIS_ IEnumRfc1766**) PURE;
178 STDMETHOD(Next)(THIS_ ULONG,PRFC1766INFO,ULONG*) PURE;
179 STDMETHOD(Reset)(THIS) PURE;
180 STDMETHOD(Skip)(THIS_ ULONG) PURE;
181};
182#undef INTERFACE
183
184EXTERN_C const IID IID_IEnumScript;
185#define INTERFACE IEnumScript
186DECLARE_INTERFACE_(IEnumScript,IUnknown)
187{
188 STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
189 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
190 STDMETHOD_(ULONG,Release)(THIS) PURE;
191 STDMETHOD(Clone)(THIS_ IEnumScript**) PURE;
192 STDMETHOD(Next)(THIS_ ULONG,PSCRIPTINFO,ULONG*) PURE;
193 STDMETHOD(Reset)(THIS) PURE;
194 STDMETHOD(Skip)(THIS_ ULONG) PURE;
195};
196#undef INTERFACE
197
198EXTERN_C const IID IID_IMLangCodePages;
199#define INTERFACE IMLangCodePages
200DECLARE_INTERFACE_(IMLangCodePages,IUnknown)
201{
202 STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
203 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
204 STDMETHOD_(ULONG,Release)(THIS) PURE;
205 STDMETHOD(GetCharCodePages)(THIS_ WCHAR,DWORD*) PURE;
206 STDMETHOD(GetStrCodePages)(THIS_ const WCHAR *,long,DWORD,DWORD*,long*) PURE;
207 STDMETHOD(CodePageToCodePages)(THIS_ UINT,DWORD*) PURE;
208 STDMETHOD(CodePagesToCodePage)(THIS_ DWORD,UINT,UINT*) PURE;
209};
210#undef INTERFACE
211
212EXTERN_C const IID IID_IMLangConvertCharset;
213#define INTERFACE IMLangConvertCharset
214DECLARE_INTERFACE_(IMLangConvertCharset,IUnknown)
215{
216 STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
217 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
218 STDMETHOD_(ULONG,Release)(THIS) PURE;
219 STDMETHOD(Initialize)(THIS_ UINT,UINT,DWORD) PURE;
220 STDMETHOD(GetSourceCodePage)(THIS_ UINT*) PURE;
221 STDMETHOD(GetDestinationCodePage)(THIS_ UINT*) PURE;
222 STDMETHOD(GetProperty)(THIS_ DWORD*) PURE;
223 STDMETHOD(DoConversion)(THIS_ BYTE*,UINT*,BYTE*,UINT*) PURE;
224 STDMETHOD(DoConversionToUnicode)(THIS_ CHAR*,UINT*,WCHAR*,UINT*) PURE;
225 STDMETHOD(DoConversionFromUnicode)(THIS_ WCHAR*,UINT*,CHAR*,UINT*) PURE;
226};
227#undef INTERFACE
228EXTERN_C const CLSID CLSID_CMLangConvertCharset;
229
230EXTERN_C const IID IID_IMLangFontLink;
231#define INTERFACE IMLangFontLink
232DECLARE_INTERFACE_(IMLangFontLink,IMLangCodePages)
233{
234 STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
235 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
236 STDMETHOD_(ULONG,Release)(THIS) PURE;
237 STDMETHOD(GetCharCodePages)(THIS_ WCHAR,DWORD*) PURE;
238 STDMETHOD(GetStrCodePages)(THIS_ const WCHAR *,long,DWORD,DWORD*,long*) PURE;
239 STDMETHOD(CodePageToCodePages)(THIS_ UINT,DWORD*) PURE;
240 STDMETHOD(CodePagesToCodePage)(THIS_ DWORD,UINT,UINT*) PURE;
241 STDMETHOD(GetFontCodePages)(THIS_ HDC,HFONT,DWORD*) PURE;
242 STDMETHOD(MapFont)(THIS_ HDC,DWORD,HFONT,HFONT*) PURE;
243 STDMETHOD(ReleaseFont)(THIS_ HFONT) PURE;
244 STDMETHOD(ResetFontMapping)(THIS) PURE;
245};
246#undef INTERFACE
247
248EXTERN_C const IID IID_IMLangFontLink2;
249#define INTERFACE IMLangFontLink2
250DECLARE_INTERFACE_(IMLangFontLink2,IMLangCodePages)
251{
252 STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
253 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
254 STDMETHOD_(ULONG,Release)(THIS) PURE;
255 STDMETHOD(GetCharCodePages)(THIS_ WCHAR,DWORD*) PURE;
256 STDMETHOD(GetStrCodePages)(THIS_ const WCHAR *,long,DWORD,DWORD*,long*) PURE;
257 STDMETHOD(CodePageToCodePages)(THIS_ UINT,DWORD*) PURE;
258 STDMETHOD(CodePagesToCodePage)(THIS_ DWORD,UINT,UINT*) PURE;
259 STDMETHOD(GetFontCodePages)(THIS_ HDC,HFONT,DWORD*) PURE;
260 STDMETHOD(ReleaseFont)(THIS_ HFONT) PURE;
261 STDMETHOD(ResetFontMapping)(THIS) PURE;
262 STDMETHOD(MapFont)(THIS_ HDC,DWORD,WCHAR,HFONT*) PURE;
263 STDMETHOD(GetFontUnicodeRange)(THIS_ HDC,UINT*,UNICODERANGE*) PURE;
264 STDMETHOD(GetScriptFontInfo)(THIS_ SCRIPT_ID,DWORD,UINT*,SCRIPTFONTINFO*) PURE;
265 STDMETHOD(CodePageToScriptID)(THIS) PURE;
266};
267#undef INTERFACE
268
269EXTERN_C const IID IID_IMLangLineBreakConsole;
270#define INTERFACE IMLangLineBreakConsole
271DECLARE_INTERFACE_(IMLangLineBreakConsole,IMLangCodePages)
272{
273 STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
274 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
275 STDMETHOD_(ULONG,Release)(THIS) PURE;
276 STDMETHOD(BreakLineML)(THIS) PURE;
277 STDMETHOD(BreakLineW)(THIS_ LCID,const WCHAR*,long,long,long*,long*) PURE;
278 STDMETHOD(BreakLineA)(THIS_ LCID,UINT,const CHAR*,long,long,long*,long*) PURE;
279};
280#undef INTERFACE
281
282EXTERN_C const IID IID_IMultiLanguage;
283#define INTERFACE IMultiLanguage
284DECLARE_INTERFACE_(IMultiLanguage,IUnknown)
285{
286 STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
287 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
288 STDMETHOD_(ULONG,Release)(THIS) PURE;
289 STDMETHOD(GetNumberOfCodePageInfo)(THIS_ UINT*) PURE;
290 STDMETHOD(GetCodePageInfo)(THIS_ UINT,PMIMECPINFO) PURE;
291 STDMETHOD(GetFamilyCodePage)(THIS_ UINT,UINT*) PURE;
292 STDMETHOD(EnumCodePages)(THIS_ DWORD,IEnumCodePage**) PURE;
293 STDMETHOD(GetCharsetInfo)(THIS_ BSTR,PMIMECSETINFO) PURE;
294 STDMETHOD(IsConvertible)(THIS_ DWORD,DWORD) PURE;
295 STDMETHOD(ConvertString)(THIS_ DWORD*,DWORD,DWORD,BYTE*,UINT*,BYTE*,UINT*) PURE;
296 STDMETHOD(ConvertStringToUnicode)(THIS_ DWORD*,DWORD,CHAR*,UINT*,WCHAR*,UINT*) PURE;
297 STDMETHOD(ConvertStringFromUnicode)(THIS_ DWORD*,DWORD,WCHAR*,UINT*,CHAR*,UINT*) PURE;
298 STDMETHOD(ConvertStringReset)(THIS) PURE;
299 STDMETHOD(GetRfc1766FromLcid)(THIS_ LCID,BSTR*) PURE;
300 STDMETHOD(GetLcidFromRfc1766)(THIS_ LCID*,BSTR) PURE;
301 STDMETHOD(EnumRfc1766)(THIS_ IEnumRfc1766**) PURE;
302 STDMETHOD(GetRfc1766Info)(THIS_ LCID,PRFC1766INFO) PURE;
303 STDMETHOD(CreateConvertCharset)(THIS_ UINT,UINT,DWORD,IMLangConvertCharset**) PURE;
304};
305#undef INTERFACE
306EXTERN_C const CLSID CLSID_CMultiLanguage;
307
308EXTERN_C const IID IID_IMultiLanguage2;
309#define INTERFACE IMultiLanguage2
310DECLARE_INTERFACE_(IMultiLanguage2,IUnknown)
311{
312 STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
313 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
314 STDMETHOD_(ULONG,Release)(THIS) PURE;
315 STDMETHOD(GetNumberOfCodePageInfo)(THIS_ UINT*) PURE;
316 STDMETHOD(GetCodePageInfo)(THIS_ UINT,PMIMECPINFO) PURE;
317 STDMETHOD(GetFamilyCodePage)(THIS_ UINT,UINT*) PURE;
318 STDMETHOD(EnumCodePages)(THIS_ DWORD,IEnumCodePage**) PURE;
319 STDMETHOD(GetCharsetInfo)(THIS_ BSTR,PMIMECSETINFO) PURE;
320 STDMETHOD(IsConvertible)(THIS_ DWORD,DWORD) PURE;
321 STDMETHOD(ConvertString)(THIS_ DWORD*,DWORD,DWORD,BYTE*,UINT*,BYTE*,UINT*) PURE;
322 STDMETHOD(ConvertStringToUnicode)(THIS_ DWORD*,DWORD,CHAR*,UINT*,WCHAR*,UINT*) PURE;
323 STDMETHOD(ConvertStringFromUnicode)(THIS_ DWORD*,DWORD,WCHAR*,UINT*,CHAR*,UINT*) PURE;
324 STDMETHOD(ConvertStringReset)(THIS) PURE;
325 STDMETHOD(GetRfc1766FromLcid)(THIS_ LCID,BSTR*) PURE;
326 STDMETHOD(GetLcidFromRfc1766)(THIS_ LCID*,BSTR) PURE;
327 STDMETHOD(EnumRfc1766)(THIS_ IEnumRfc1766**) PURE;
328 STDMETHOD(GetRfc1766Info)(THIS_ LCID,PRFC1766INFO) PURE;
329 STDMETHOD(CreateConvertCharset)(THIS_ UINT,UINT,DWORD,IMLangConvertCharset**) PURE;
330 STDMETHOD(ConvertStringInIStream)(THIS_ DWORD*,DWORD,WCHAR*,DWORD,DWORD,IStream*,IStream*) PURE;
331 STDMETHOD(ConvertStringToUnicodeEx)(THIS_ DWORD*,DWORD,CHAR*,UINT*,WCHAR*,UINT*,DWORD,WCHAR*) PURE;
332 STDMETHOD(ConvertStringFromUnicodeEx)(THIS_ DWORD*,DWORD,WCHAR*,UINT*,CHAR*,UINT*,DWORD,WCHAR*) PURE;
333 STDMETHOD(DetectCodepageInIStream)(THIS_ DWORD,DWORD,IStream*,DetectEncodingInfo*,INT*) PURE;
334 STDMETHOD(DetectInputCodepage)(THIS_ DWORD,DWORD,CHAR*,INT*,DetectEncodingInfo*,INT*) PURE;
335 STDMETHOD(ValidateCodePage)(THIS) PURE;
336 STDMETHOD(GetCodePageDescription)(THIS_ UINT,LCID,LPWSTR,int) PURE;
337 STDMETHOD(IsCodePageInstallable)(THIS) PURE;
338 STDMETHOD(SetMimeDBSource)(THIS_ MIMECONTF) PURE;
339 STDMETHOD(GetNumberOfScripts)(THIS_ UINT*) PURE;
340 STDMETHOD(EnumScripts)(THIS_ DWORD,LANGID,IEnumScript**) PURE;
341};
342#undef INTERFACE
343
344
345#pragma pack(pop)
346#ifdef __cplusplus
347}
348#endif
349#endif
Note: See TracBrowser for help on using the repository browser.