lz32/tests: More checks for various LZOpenFile[AW] operations on existing files.
[wine.git] / include / mlang.idl
blob96e96facef3dcd8d0678160fb6f0fb746b4ae7ad
1 /*
2 * Copyright (C) 2004 Mike McCormack
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 import "unknwn.idl";
21 interface IStream;
23 /* FIXME: LANGID is defined in winnt.h and mlang.h in the platform SDK */
24 cpp_quote("#ifndef _WINNT_")
25 typedef WORD LANGID;
26 cpp_quote("#endif")
29 object,
30 uuid(359f3443-bd4a-11d0-b188-00aa0038c969),
31 pointer_default(unique)
33 interface IMLangCodePages : IUnknown
35 HRESULT GetCharCodePages(
36 [in] WCHAR chSrc,
37 DWORD *pdwCodePages);
38 HRESULT GetStrCodePages(
39 [in, size_is(cchSrc)] const WCHAR *pszSrc,
40 [in] long cchSrc,
41 [in] DWORD dwPriorityCodePages,
42 [out] DWORD *pdwCodePages,
43 [out] long *pcchCodePages);
44 HRESULT CodePageToCodePages(
45 [in] UINT uCodePage,
46 [out] DWORD *pdwCodePages);
47 HRESULT CodePagesToCodePage(
48 [in] DWORD dwCodePages,
49 [in] UINT uDefaultCodePage,
50 [out] UINT *puCodePage);
54 object,
55 uuid(359f3441-bd4a-11d0-b188-00aa0038c969),
56 pointer_default(unique)
58 interface IMLangFontLink : IMLangCodePages
60 HRESULT GetFontCodePages(
61 [in] HDC hDC,
62 [in] HFONT hFont,
63 [out] DWORD *pdwCodePages );
65 HRESULT MapFont(
66 [in] HDC hDC,
67 [in] DWORD dwCodePages,
68 [in] HFONT hSrcFont,
69 [out] HFONT *phDestFont);
71 HRESULT ReleaseFont(
72 [in] HFONT hFont);
74 HRESULT ResetFontMapping();
78 object,
79 uuid(ae5f1430-388b-11d2-8380-00c04f8f5da1),
80 pointer_default(unique)
82 interface IEnumScript : IUnknown
84 const USHORT MAX_SCRIPT_NAME = 48;
85 const USHORT MAX_MIMEFACE_NAME = 32;
87 typedef BYTE SCRIPT_ID;
88 typedef __int64 SCRIPT_IDS;
90 typedef enum tagSCRIPTCONTF
92 sidDefault = 0,
93 sidMerge = sidDefault + 1,
94 sidAsciiSym = sidMerge + 1,
95 sidAsciiLatin = sidAsciiSym + 1,
96 sidLatin = sidAsciiLatin + 1,
97 sidGreek = sidLatin + 1,
98 sidCyrillic = sidGreek + 1,
99 sidArmenian = sidCyrillic + 1,
100 sidHebrew = sidArmenian + 1,
101 sidArabic = sidHebrew + 1,
102 sidDevanagari = sidArabic + 1,
103 sidBengali = sidDevanagari + 1,
104 sidGurmukhi = sidBengali + 1,
105 sidGujarati = sidGurmukhi + 1,
106 sidOriya = sidGujarati + 1,
107 sidTamil = sidOriya + 1,
108 sidTelugu = sidTamil + 1,
109 sidKannada = sidTelugu + 1,
110 sidMalayalam = sidKannada + 1,
111 sidThai = sidMalayalam + 1,
112 sidLao = sidThai + 1,
113 sidTibetan = sidLao + 1,
114 sidGeorgian = sidTibetan + 1,
115 sidHangul = sidGeorgian + 1,
116 sidKana = sidHangul + 1,
117 sidBopomofo = sidKana + 1,
118 sidHan = sidBopomofo + 1,
119 sidEthiopic = sidHan + 1,
120 sidCanSyllabic = sidEthiopic + 1,
121 sidCherokee = sidCanSyllabic + 1,
122 sidYi = sidCherokee + 1,
123 sidBraille = sidYi + 1,
124 sidRunic = sidBraille + 1,
125 sidOgham = sidRunic + 1,
126 sidSinhala = sidOgham + 1,
127 sidSyriac = sidSinhala + 1,
128 sidBurmese = sidSyriac + 1,
129 sidKhmer = sidBurmese + 1,
130 sidThaana = sidKhmer + 1,
131 sidMongolian = sidThaana + 1,
132 sidUserDefined = sidMongolian + 1,
133 sidLim = sidUserDefined + 1,
134 sidFEFirst = sidHangul,
135 sidFELast = sidHan
136 } SCRIPTCONTF;
138 typedef enum tagSCRIPTFONTCONTF
140 SCRIPTCONTF_FIXED_FONT = 0x1,
141 SCRIPTCONTF_PROPORTIONAL_FONT = 0x2,
142 SCRIPTCONTF_SCRIPT_USER = 0x10000,
143 SCRIPTCONTF_SCRIPT_HIDE = 0x20000,
144 SCRIPTCONTF_SCRIPT_SYSTEM = 0x40000
145 } SCRIPTFONTCONTF;
147 typedef struct tagSCRIPFONTINFO
149 SCRIPT_IDS scripts;
150 WCHAR wszFont[MAX_MIMEFACE_NAME];
151 } SCRIPTFONTINFO, *PSCRIPTFONTINFO;
153 typedef struct tagSCRIPTINFO {
154 SCRIPT_ID ScriptId;
155 UINT uiCodePage;
156 WCHAR wszDescription[MAX_SCRIPT_NAME];
157 WCHAR wszFixedWidthFont[MAX_MIMEFACE_NAME];
158 WCHAR wszProportionalFont[MAX_MIMEFACE_NAME];
159 } SCRIPTINFO, *PSCRIPTINFO;
161 HRESULT Clone(
162 [out] IEnumScript **ppEnum);
164 HRESULT Next(
165 [in] ULONG celt,
166 [out] PSCRIPTINFO rgelt,
167 [out] ULONG *pceltFetched);
169 HRESULT Reset();
171 HRESULT Skip(
172 [in] ULONG celt);
176 object,
177 uuid(275c23e3-3747-11d0-9fea-00aa003f8646),
178 pointer_default(unique)
180 interface IEnumCodePage : IUnknown
182 const USHORT MAX_MIMECP_NAME = 64;
183 const USHORT MAX_MIMECSET_NAME = 50;
185 typedef enum tagMIMECONTF
187 MIMECONTF_MAILNEWS = 0x00000001,
188 MIMECONTF_BROWSER = 0x00000002,
189 MIMECONTF_MINIMAL = 0x00000004,
190 MIMECONTF_IMPORT = 0x00000008,
191 MIMECONTF_SAVABLE_MAILNEWS = 0x00000100,
192 MIMECONTF_SAVABLE_BROWSER = 0x00000200,
193 MIMECONTF_EXPORT = 0x00000400,
194 MIMECONTF_PRIVCONVERTER = 0x00010000,
195 MIMECONTF_VALID = 0x00020000,
196 MIMECONTF_VALID_NLS = 0x00040000,
197 MIMECONTF_MIME_IE4 = 0x10000000,
198 MIMECONTF_MIME_LATEST = 0x20000000,
199 MIMECONTF_MIME_REGISTRY = 0x40000000
200 } MIMECONTF;
202 typedef struct tagMIMECPINFO {
203 DWORD dwFlags;
204 UINT uiCodePage;
205 UINT uiFamilyCodePage;
206 WCHAR wszDescription[MAX_MIMECP_NAME];
207 WCHAR wszWebCharset[MAX_MIMECSET_NAME];
208 WCHAR wszHeaderCharset[MAX_MIMECSET_NAME];
209 WCHAR wszBodyCharset[MAX_MIMECSET_NAME];
210 WCHAR wszFixedWidthFont[MAX_MIMEFACE_NAME];
211 WCHAR wszProportionalFont[MAX_MIMEFACE_NAME];
212 BYTE bGDICharset;
213 } MIMECPINFO, *PMIMECPINFO;
215 typedef struct tagMIMECSETINFO
217 UINT uiCodePage;
218 UINT uiInternetEncoding;
219 WCHAR wszCharset[MAX_MIMECSET_NAME];
220 } MIMECSETINFO, *PMIMECSETINFO;
222 HRESULT Clone(
223 [out] IEnumCodePage **ppEnum);
225 HRESULT Next(
226 [in] ULONG celt,
227 [out] PMIMECPINFO rgelt,
228 [out] ULONG *pceltFetched);
230 HRESULT Reset();
232 HRESULT Skip(
233 [in] ULONG celt);
237 object,
238 uuid(d66d6f98-cdaa-11d0-b822-00c04fc9b31f),
239 pointer_default(unique)
241 interface IMLangConvertCharset : IUnknown
243 HRESULT Initialize(
244 [in] UINT uiSrcCodePage,
245 [in] UINT uiDstCodePage,
246 [in] DWORD dwProperty);
248 HRESULT GetSourceCodePage(
249 [out] UINT *puiSrcCodePage);
251 HRESULT GetDestinationCodePage(
252 [out] UINT *puiDstCodePage);
254 HRESULT GetProperty(
255 [out] DWORD *pdwProperty);
257 HRESULT DoConversion(
258 [in] BYTE *pSrcStr,
259 [in,out] UINT *pcSrcSize,
260 [in] BYTE *pDstStr,
261 [in,out] UINT *pcDstSize);
263 HRESULT DoConversionToUnicode(
264 [in] CHAR *pSrcStr,
265 [in,out] UINT *pcSrcSize,
266 [in] WCHAR *pDstStr,
267 [in,out] UINT *pcDstSize);
269 HRESULT DoConversionFromUnicode(
270 [in] WCHAR *pSrcStr,
271 [in,out] UINT *pcSrcSize,
272 [in] CHAR *pDstStr,
273 [in,out] UINT *pcDstSize);
277 uuid(d66d6f99-cdaa-11d0-b822-00c04fc9b31f)
279 coclass CMLangConvertCharset
281 [default] interface IMLangConvertCharset;
285 object,
286 uuid(3dc39d1d-c030-11d0-b81b-00c04fc9b31f),
287 pointer_default(unique)
289 interface IEnumRfc1766 : IUnknown
291 const USHORT MAX_RFC1766_NAME = 6;
292 const USHORT MAX_LOCALE_NAME = 32;
294 typedef struct tagRFC1766INFO
296 LCID lcid;
297 WCHAR wszRfc1766[MAX_RFC1766_NAME];
298 WCHAR wszLocaleName[MAX_LOCALE_NAME];
299 } RFC1766INFO, *PRFC1766INFO;
301 HRESULT Clone(
302 [out] IEnumRfc1766 **ppEnum);
304 HRESULT Next(
305 [in] ULONG celt,
306 [out] PRFC1766INFO rgelt,
307 [out] ULONG *pceltFetched);
309 HRESULT Reset();
311 HRESULT Skip(
312 [in] ULONG celt);
316 object,
317 uuid(275c23e1-3747-11d0-9fea-00aa003f8646),
318 pointer_default(unique)
320 interface IMultiLanguage : IUnknown
322 HRESULT GetNumberOfCodePageInfo(
323 [out] UINT *pcCodePage);
325 HRESULT GetCodePageInfo(
326 [in] UINT uiCodePage,
327 [out] PMIMECPINFO pCodePageInfo);
329 HRESULT GetFamilyCodePage(
330 [in] UINT uiCodePage,
331 [out] UINT *puiFamilyCodePage);
333 HRESULT EnumCodePages(
334 [in] DWORD grfFlags,
335 [out] IEnumCodePage **ppEnumCodePage);
337 HRESULT GetCharsetInfo(
338 [in] BSTR Charset,
339 [in] PMIMECSETINFO pCharsetInfo);
341 HRESULT IsConvertible(
342 [in] DWORD dwSrcEncoding,
343 [in] DWORD dwDstEncoding);
345 HRESULT ConvertString(
346 [in,out] DWORD *pdwMode,
347 [in] DWORD dwSrcEncoding,
348 [in] DWORD dwDstEncoding,
349 [in] BYTE *pSrcStr,
350 [in,out] UINT *pcSrcSize,
351 [in] BYTE *pDstStr,
352 [in,out] UINT *pcDstSize);
354 HRESULT ConvertStringToUnicode(
355 [in,out] DWORD *pdwMode,
356 [in] DWORD dwEncoding,
357 [in] CHAR *pSrcStr,
358 [in,out] UINT *pcSrcSize,
359 [in] WCHAR *pDstStr,
360 [in,out] UINT *pcDstSize);
362 HRESULT ConvertStringFromUnicode(
363 [in,out] DWORD *pdwMode,
364 [in] DWORD dwEncoding,
365 [in] WCHAR *pSrcStr,
366 [in,out] UINT *pcSrcSize,
367 [in] CHAR *pDstStr,
368 [in,out] UINT *pcDstSize);
370 HRESULT ConvertStringReset();
372 HRESULT GetRfc1766FromLcid(
373 [in] LCID Locale,
374 [out] BSTR *pbstrRfc1766);
376 HRESULT GetLcidFromRfc1766(
377 [out] LCID *pLocale,
378 [in] BSTR bstrRfc1766);
380 HRESULT EnumRfc1766(
381 [out] IEnumRfc1766 **ppEnumRfc1766);
383 HRESULT GetRfc1766Info(
384 [in] LCID Locale,
385 [out] PRFC1766INFO pRfc1766Info);
387 HRESULT CreateConvertCharset(
388 [in] UINT uiSrcCodePage,
389 [in] UINT uiDstCodePage,
390 [in] DWORD dwProperty,
391 [out] IMLangConvertCharset **ppMLangConvertCharset);
396 object,
397 uuid(dccfc164-2b38-11d2-b7ec-00c04f8f5d9a),
398 pointer_default(unique)
400 interface IMultiLanguage2 : IUnknown
402 typedef struct tagDetectEncodingInfo
404 UINT nLangID;
405 UINT nCodePage;
406 INT nDocPercent;
407 INT nConfidence;
408 } DetectEncodingInfo, *pDetectEncodingInfo;
410 HRESULT GetNumberOfCodePageInfo(
411 [out] UINT *pcCodePage);
413 HRESULT GetCodePageInfo(
414 [in] UINT uiCodePage,
415 [in] LANGID LangId,
416 [out] PMIMECPINFO pCodePageInfo);
418 HRESULT GetFamilyCodePage(
419 [in] UINT uiCodePage,
420 [out] UINT *puiFamilyCodePage);
422 HRESULT EnumCodePages(
423 [in] DWORD grfFlags,
424 [in] LANGID LangId,
425 [out] IEnumCodePage **ppEnumCodePage);
427 HRESULT GetCharsetInfo(
428 [in] BSTR Charset,
429 [in] PMIMECSETINFO pCharsetInfo);
431 HRESULT IsConvertible(
432 [in] DWORD dwSrcEncoding,
433 [in] DWORD dwDstEncoding);
435 HRESULT ConvertString(
436 [in,out] DWORD *pdwMode,
437 [in] DWORD dwSrcEncoding,
438 [in] DWORD dwDstEncoding,
439 [in] BYTE *pSrcStr,
440 [in,out] UINT *pcSrcSize,
441 [in] BYTE *pDstStr,
442 [in,out] UINT *pcDstSize);
444 HRESULT ConvertStringToUnicode(
445 [in,out] DWORD *pdwMode,
446 [in] DWORD dwEncoding,
447 [in] CHAR *pSrcStr,
448 [in,out] UINT *pcSrcSize,
449 [in] WCHAR *pDstStr,
450 [in,out] UINT *pcDstSize);
452 HRESULT ConvertStringFromUnicode(
453 [in,out] DWORD *pdwMode,
454 [in] DWORD dwEncoding,
455 [in] WCHAR *pSrcStr,
456 [in,out] UINT *pcSrcSize,
457 [in] CHAR *pDstStr,
458 [in,out] UINT *pcDstSize);
460 HRESULT ConvertStringReset();
462 HRESULT GetRfc1766FromLcid(
463 [in] LCID Locale,
464 [out] BSTR *pbstrRfc1766);
466 HRESULT GetLcidFromRfc1766(
467 [out] LCID *pLocale,
468 [in] BSTR bstrRfc1766);
470 HRESULT EnumRfc1766(
471 [in] LANGID LangId,
472 [out] IEnumRfc1766 **ppEnumRfc1766);
474 HRESULT GetRfc1766Info(
475 [in] LCID Locale,
476 [in] LANGID LangId,
477 [out] PRFC1766INFO pRfc1766Info);
479 HRESULT CreateConvertCharset(
480 [in] UINT uiSrcCodePage,
481 [in] UINT uiDstCodePage,
482 [in] DWORD dwProperty,
483 [out] IMLangConvertCharset **ppMLangConvertCharset);
485 HRESULT ConvertStringInIStream(
486 [in,out] DWORD *pdwMode,
487 [in] DWORD dwFlag,
488 [in] WCHAR *lpFallBack,
489 [in] DWORD dwSrcEncoding,
490 [in] DWORD dwDstEncoding,
491 [in] IStream *pstmIn,
492 [in] IStream *pstmOut);
494 HRESULT ConvertStringToUnicodeEx(
495 [in,out] DWORD *pdwMode,
496 [in] DWORD dwEncoding,
497 [in] CHAR *pSrcStr,
498 [in,out] UINT *pcSrcSize,
499 [in] WCHAR *pDstStr,
500 [in,out] UINT *pcDstSize,
501 [in] DWORD dwFlag,
502 [in] WCHAR *lpFallBack);
504 HRESULT ConvertStringFromUnicodeEx(
505 [in,out] DWORD *pdwMode,
506 [in] DWORD dwEncoding,
507 [in] WCHAR *pSrcStr,
508 [in,out] UINT *pcSrcSize,
509 [in] CHAR *pDstStr,
510 [in,out] UINT *pcDstSize,
511 [in] DWORD dwFlag,
512 [in] WCHAR *lpFallBack);
514 HRESULT DetectCodepageInIStream(
515 [in] DWORD dwFlag,
516 [in] DWORD dwPrefWinCodePage,
517 [in] IStream *pstmIn,
518 [in,out] DetectEncodingInfo *lpEncoding,
519 [in,out] INT *pnScores);
521 HRESULT DetectInputCodepage(
522 [in] DWORD dwFlag,
523 [in] DWORD dwPrefWinCodePage,
524 [in] CHAR *pSrcStr,
525 [in,out] INT *pcSrcSize,
526 [in,out] DetectEncodingInfo *lpEncoding,
527 [in,out] INT *pnScores);
529 HRESULT ValidateCodePage(
530 [in] UINT uiCodePage,
531 [in] HWND hwnd);
533 HRESULT GetCodePageDescription(
534 [in] UINT uiCodePage,
535 [in] LCID lcid,
536 [in,out] LPWSTR lpWideCharStr,
537 [in] int cchWideChar);
539 HRESULT IsCodePageInstallable(
540 [in] UINT uiCodePage);
542 HRESULT SetMimeDBSource(
543 [in] MIMECONTF dwSource);
545 HRESULT GetNumberOfScripts(
546 [out] UINT *pnScripts);
548 HRESULT EnumScripts(
549 [in] DWORD dwFlags,
550 [in] LANGID LangId,
551 [out] IEnumScript **ppEnumScript);
553 HRESULT ValidateCodePageEx( /* undocumented on MSDN */
554 [in] UINT uiCodePage,
555 [in] HWND hwnd,
556 [in] DWORD dwfIODControl);
560 object,
561 uuid(4e5868ab-b157-4623-9acc-6a1d9caebe04),
562 pointer_default(unique)
564 interface IMultiLanguage3 : IMultiLanguage2
566 typedef [unique] IMultiLanguage3 *LPMULTILANGUAGE3;
567 HRESULT DetectOutboundCodePage(
568 [in] DWORD dwFlags,
569 [in] LPCWSTR lpWideCharStr,
570 [in] UINT cchWideChar,
571 [in] UINT *puiPreferredCodePages,
572 [in] UINT nPreferredCodePages,
573 [in] UINT *puiDetectedCodePages,
574 [in, out] UINT *pnDetectedCodePages,
575 [in] WCHAR *lpSpecialChar);
577 HRESULT DetectOutboundCodePageInIStream(
578 [in] DWORD dwFlags,
579 [in] IStream *pStrIn,
580 [in] UINT *puiPreferredCodePages,
581 [in] UINT nPreferredCodePages,
582 [in] UINT *puiDetectedCodePages,
583 [in, out] UINT *pnDetectedCodePages,
584 [in] WCHAR *lpSpecialChar);
588 uuid(275C23E2-3747-11d0-9FEA-00AA003f8646)
590 coclass CMultiLanguage
592 [default] interface IMultiLanguage;
593 interface IMLangCodePages;
594 interface IMLangFontLink;
595 /* interface IMLangLineBreakConsole; */
598 cpp_quote("STDAPI LcidToRfc1766A(LCID, LPSTR, INT);")
599 cpp_quote("STDAPI LcidToRfc1766W(LCID, LPWSTR, INT);")
600 cpp_quote("#define LcidToRfc1766 WINELIB_NAME_AW(LcidToRfc1766)")
602 cpp_quote("STDAPI Rfc1766ToLcidA(LCID *, LPCSTR);")
603 cpp_quote("STDAPI Rfc1766ToLcidW(LCID *, LPCWSTR);")
604 cpp_quote("#define Rfc1766ToLcid WINELIB_NAME_AW(Rfc1766ToLcid)")
606 cpp_quote("STDAPI GetGlobalFontLinkObject(void);")
607 cpp_quote("STDAPI IsConvertINetStringAvailable(DWORD, DWORD);")
608 cpp_quote("STDAPI ConvertINetString(LPDWORD, DWORD, DWORD, LPCSTR, LPINT, LPSTR, LPINT);")
609 cpp_quote("STDAPI ConvertINetMultiByteToUnicode(LPDWORD, DWORD, LPCSTR, LPINT, LPWSTR, LPINT);")
610 cpp_quote("STDAPI ConvertINetUnicodeToMultiByte(LPDWORD, DWORD, LPCWSTR, LPINT, LPSTR, LPINT);")