Move the PROPVARIANT declaration from objidl.idl to propidl.idl.
[wine.git] / include / mlang.idl
blob90eab725cf2c4fe9c2e28fb7fe2ab3147fea0f72
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 import "unknwn.idl";
21 interface IStream;
23 /* FIXME: LANDID is defined in winnt.h and mlang.h in the platform SDK */
24 cpp_quote("#ifndef __WINE_WINNT_H")
25 typedef WORD LANGID;
26 cpp_quote("#endif")
29 object,
30 pointer_default(unique)
32 interface IMLangCodePages : IUnknown
34 HRESULT GetCharCodePages(
35 [in] WCHAR chSrc,
36 DWORD *pdwCodePages);
37 HRESULT GetStrCodePages(
38 [in, size_is(cchSrc)] const WCHAR *pszSrc,
39 [in] long cchSrc,
40 [in] DWORD dwPriorityCodePages,
41 [out] DWORD *pdwCodePages,
42 [out] long *pcchCodePages);
43 HRESULT CodePageToCodePages(
44 [in] UINT uCodePage,
45 [out] DWORD *pdwCodePages);
46 HRESULT CodePagesToCodePage(
47 [in] DWORD dwCodePages,
48 [in] UINT uDefaultCodePage,
49 [out] UINT *puCodePage);
53 object,
54 pointer_default(unique)
56 interface IMLangFontLink : IMLangCodePages
58 HRESULT GetFontCodePages(
59 [in] HDC hDC,
60 [in] HFONT hFont,
61 [out] DWORD *pdwCodePages );
63 HRESULT MapFont(
64 [in] HDC hDC,
65 [in] DWORD dwCodePages,
66 [in] HFONT hSrcFont,
67 [out] HFONT *phDestFont);
69 HRESULT ReleaseFont(
70 [in] HFONT hFont);
72 HRESULT ResetFontMapping();
76 object,
77 pointer_default(unique)
79 interface IEnumScript : IUnknown
81 const USHORT MAX_SCRIPT_NAME = 48;
82 const USHORT MAX_MIMEFACE_NAME = 32;
84 typedef BYTE SCRIPT_ID;
85 typedef __int64 SCRIPT_IDS;
87 typedef enum tagSCRIPTCONTF
89 sidDefault = 0,
90 sidMerge = sidDefault + 1,
91 sidAsciiSym = sidMerge + 1,
92 sidAsciiLatin = sidAsciiSym + 1,
93 sidLatin = sidAsciiLatin + 1,
94 sidGreek = sidLatin + 1,
95 sidCyrillic = sidGreek + 1,
96 sidArmenian = sidCyrillic + 1,
97 sidHebrew = sidArmenian + 1,
98 sidArabic = sidHebrew + 1,
99 sidDevanagari = sidArabic + 1,
100 sidBengali = sidDevanagari + 1,
101 sidGurmukhi = sidBengali + 1,
102 sidGujarati = sidGurmukhi + 1,
103 sidOriya = sidGujarati + 1,
104 sidTamil = sidOriya + 1,
105 sidTelugu = sidTamil + 1,
106 sidKannada = sidTelugu + 1,
107 sidMalayalam = sidKannada + 1,
108 sidThai = sidMalayalam + 1,
109 sidLao = sidThai + 1,
110 sidTibetan = sidLao + 1,
111 sidGeorgian = sidTibetan + 1,
112 sidHangul = sidGeorgian + 1,
113 sidKana = sidHangul + 1,
114 sidBopomofo = sidKana + 1,
115 sidHan = sidBopomofo + 1,
116 sidEthiopic = sidHan + 1,
117 sidCanSyllabic = sidEthiopic + 1,
118 sidCherokee = sidCanSyllabic + 1,
119 sidYi = sidCherokee + 1,
120 sidBraille = sidYi + 1,
121 sidRunic = sidBraille + 1,
122 sidOgham = sidRunic + 1,
123 sidSinhala = sidOgham + 1,
124 sidSyriac = sidSinhala + 1,
125 sidBurmese = sidSyriac + 1,
126 sidKhmer = sidBurmese + 1,
127 sidThaana = sidKhmer + 1,
128 sidMongolian = sidThaana + 1,
129 sidUserDefined = sidMongolian + 1,
130 sidLim = sidUserDefined + 1,
131 sidFEFirst = sidHangul,
132 sidFELast = sidHan
133 } SCRIPTCONTF;
135 typedef enum tagSCRIPTFONTCONTF
137 SCRIPTCONTF_FIXED_FONT = 0x1,
138 SCRIPTCONTF_PROPORTIONAL_FONT = 0x2,
139 SCRIPTCONTF_SCRIPT_USER = 0x10000,
140 SCRIPTCONTF_SCRIPT_HIDE = 0x20000,
141 SCRIPTCONTF_SCRIPT_SYSTEM = 0x40000
142 } SCRIPTFONTCONTF;
144 typedef struct tagSCRIPFONTINFO
146 SCRIPT_IDS scripts;
147 WCHAR wszFont[MAX_MIMEFACE_NAME];
148 } SCRIPTFONTINFO, *PSCRIPTFONTINFO;
150 typedef struct tagSCRIPTINFO {
151 SCRIPT_ID ScriptId;
152 UINT uiCodePage;
153 WCHAR wszDescription[MAX_SCRIPT_NAME];
154 WCHAR wszFixedWidthFont[MAX_MIMEFACE_NAME];
155 WCHAR wszProportionalFont[MAX_MIMEFACE_NAME];
156 } SCRIPTINFO, *PSCRIPTINFO;
158 HRESULT Clone(
159 [out] IEnumScript **ppEnum);
161 HRESULT Next(
162 [in] ULONG celt,
163 [out] PSCRIPTINFO rgelt,
164 [out] ULONG *pceltFetched);
166 HRESULT Reset();
168 HRESULT Skip(
169 [in] ULONG celt);
173 object,
174 pointer_default(unique)
176 interface IEnumCodePage : IUnknown
178 const USHORT MAX_MIMECP_NAME = 64;
179 const USHORT MAX_MIMECSET_NAME = 50;
181 typedef enum tagMIMECONTF
183 MIMECONTF_MAILNEWS = 0x00000001,
184 MIMECONTF_BROWSER = 0x00000002,
185 MIMECONTF_MINIMAL = 0x00000004,
186 MIMECONTF_IMPORT = 0x00000008,
187 MIMECONTF_SAVABLE_MAILNEWS = 0x00000100,
188 MIMECONTF_SAVABLE_BROWSER = 0x00000200,
189 MIMECONTF_EXPORT = 0x00000400,
190 MIMECONTF_PRIVCONVERTER = 0x00010000,
191 MIMECONTF_VALID = 0x00020000,
192 MIMECONTF_VALID_NLS = 0x00040000,
193 MIMECONTF_MIME_IE4 = 0x10000000,
194 MIMECONTF_MIME_LATEST = 0x20000000,
195 MIMECONTF_MIME_REGISTRY = 0x40000000
196 } MIMECONTF;
198 typedef struct tagMIMECPINFO {
199 DWORD dwFlags;
200 UINT uiCodePage;
201 UINT uiFamilyCodePage;
202 WCHAR wszDescription[MAX_MIMECP_NAME];
203 WCHAR wszWebCharset[MAX_MIMECSET_NAME];
204 WCHAR wszHeaderCharset[MAX_MIMECSET_NAME];
205 WCHAR wszBodyCharset[MAX_MIMECSET_NAME];
206 WCHAR wszFixedWidthFont[MAX_MIMEFACE_NAME];
207 WCHAR wszProportionalFont[MAX_MIMEFACE_NAME];
208 BYTE bGDICharset;
209 } MIMECPINFO, *PMIMECPINFO;
211 typedef struct tagMIMECSETINFO
213 UINT uiCodePage;
214 UINT uiInternetEncoding;
215 WCHAR wszCharset[MAX_MIMECSET_NAME];
216 } MIMECSETINFO, *PMIMECSETINFO;
218 HRESULT Clone(
219 [out] IEnumCodePage **ppEnum);
221 HRESULT Next(
222 [in] ULONG celt,
223 [out] PMIMECPINFO rgelt,
224 [out] ULONG *pceltFetched);
226 HRESULT Reset();
228 HRESULT Skip(
229 [in] ULONG celt);
233 object,
234 pointer_default(unique)
236 interface IMLangConvertCharset : IUnknown
238 HRESULT Initialize(
239 [in] UINT uiSrcCodePage,
240 [in] UINT uiDstCodePage,
241 [in] DWORD dwProperty);
243 HRESULT GetSourceCodePage(
244 [out] UINT *puiSrcCodePage);
246 HRESULT GetDestinationCodePage(
247 [out] UINT *puiDstCodePage);
249 HRESULT GetProperty(
250 [out] DWORD *pdwProperty);
252 HRESULT DoConversion(
253 [in] BYTE *pSrcStr,
254 [in,out] UINT *pcSrcSize,
255 [in] BYTE *pDstStr,
256 [in,out] UINT *pcDstSize);
258 HRESULT DoConversionToUnicode(
259 [in] CHAR *pSrcStr,
260 [in,out] UINT *pcSrcSize,
261 [in] WCHAR *pDstStr,
262 [in,out] UINT *pcDstSize);
264 HRESULT DoConversionFromUnicode(
265 [in] WCHAR *pSrcStr,
266 [in,out] UINT *pcSrcSize,
267 [in] CHAR *pDstStr,
268 [in,out] UINT *pcDstSize);
272 object,
273 pointer_default(unique)
275 interface IEnumRfc1766 : IUnknown
277 typedef struct tagRFC1766INFO
279 LCID lcid;
280 WCHAR wszRfc1766[MAX_RFC1766_NAME];
281 WCHAR wszLocaleName[MAX_LOCALE_NAME];
282 } RFC1766INFO, *PRFC1766INFO;
284 HRESULT Clone(
285 [out] IEnumRfc1766 **ppEnum);
287 HRESULT Next(
288 [in] ULONG celt,
289 [out] PRFC1766INFO rgelt,
290 [out] ULONG *pceltFetched);
292 HRESULT Reset();
294 HRESULT Skip(
295 [in] ULONG celt);
299 object,
300 pointer_default(unique)
302 interface IMultiLanguage : IUnknown
304 HRESULT GetNumberOfCodePageInfo(
305 [out] UINT *pcCodePage);
307 HRESULT GetCodePageInfo(
308 [in] UINT uiCodePage,
309 [out] PMIMECPINFO pCodePageInfo);
311 HRESULT GetFamilyCodePage(
312 [in] UINT uiCodePage,
313 [out] UINT *puiFamilyCodePage);
315 HRESULT EnumCodePages(
316 [in] DWORD grfFlags,
317 [out] IEnumCodePage **ppEnumCodePage);
319 HRESULT GetCharsetInfo(
320 [in] BSTR Charset,
321 [in] PMIMECSETINFO pCharsetInfo);
323 HRESULT IsConvertible(
324 [in] DWORD dwSrcEncoding,
325 [in] DWORD dwDstEncoding);
327 HRESULT ConvertString(
328 [in,out] DWORD *pdwMode,
329 [in] DWORD dwSrcEncoding,
330 [in] DWORD dwDstEncoding,
331 [in] BYTE *pSrcStr,
332 [in,out] UINT *pcSrcSize,
333 [in] BYTE *pDstStr,
334 [in,out] UINT *pcDstSize);
336 HRESULT ConvertStringToUnicode(
337 [in,out] DWORD *pdwMode,
338 [in] DWORD dwEncoding,
339 [in] CHAR *pSrcStr,
340 [in,out] UINT *pcSrcSize,
341 [in] WCHAR *pDstStr,
342 [in,out] UINT *pcDstSize);
344 HRESULT ConvertStringFromUnicode(
345 [in,out] DWORD *pdwMode,
346 [in] DWORD dwEncoding,
347 [in] WCHAR *pSrcStr,
348 [in,out] UINT *pcSrcSize,
349 [in] CHAR *pDstStr,
350 [in,out] UINT *pcDstSize);
352 HRESULT ConvertStringReset();
354 HRESULT GetRfc1766FromLcid(
355 [in] LCID Locale,
356 [out] BSTR *pbstrRfc1766);
358 HRESULT GetLcidFromRfc1766(
359 [out] LCID *pLocale,
360 [in] BSTR bstrRfc1766);
362 HRESULT EnumRfc1766(
363 [out] IEnumRfc1766 **ppEnumRfc1766);
365 HRESULT GetRfc1766Info(
366 [in] LCID Locale,
367 [out] PRFC1766INFO pRfc1766Info);
369 HRESULT CreateConvertCharset(
370 [in] UINT uiSrcCodePage,
371 [in] UINT uiDstCodePage,
372 [in] DWORD dwProperty,
373 [out] IMLangConvertCharset **ppMLangConvertCharset);
378 object,
379 pointer_default(unique)
381 interface IMultiLanguage2 : IUnknown
383 typedef struct tagDetectEncodingInfo
385 UINT nLangID;
386 UINT nCodePage;
387 INT nDocPercent;
388 INT nConfidence;
389 } DetectEncodingInfo, *pDetectEncodingInfo;
391 HRESULT GetNumberOfCodePageInfo(
392 [out] UINT *pcCodePage);
394 HRESULT GetCodePageInfo(
395 [in] UINT uiCodePage,
396 [in] LANGID LangId,
397 [out] PMIMECPINFO pCodePageInfo);
399 HRESULT GetFamilyCodePage(
400 [in] UINT uiCodePage,
401 [out] UINT *puiFamilyCodePage);
403 HRESULT EnumCodePages(
404 [in] DWORD grfFlags,
405 [in] LANGID LangId,
406 [out] IEnumCodePage **ppEnumCodePage);
408 HRESULT GetCharsetInfo(
409 [in] BSTR Charset,
410 [in] PMIMECSETINFO pCharsetInfo);
412 HRESULT IsConvertible(
413 [in] DWORD dwSrcEncoding,
414 [in] DWORD dwDstEncoding);
416 HRESULT ConvertString(
417 [in,out] DWORD *pdwMode,
418 [in] DWORD dwSrcEncoding,
419 [in] DWORD dwDstEncoding,
420 [in] BYTE *pSrcStr,
421 [in,out] UINT *pcSrcSize,
422 [in] BYTE *pDstStr,
423 [in,out] UINT *pcDstSize);
425 HRESULT ConvertStringToUnicode(
426 [in,out] DWORD *pdwMode,
427 [in] DWORD dwEncoding,
428 [in] CHAR *pSrcStr,
429 [in,out] UINT *pcSrcSize,
430 [in] WCHAR *pDstStr,
431 [in,out] UINT *pcDstSize);
433 HRESULT ConvertStringFromUnicode(
434 [in,out] DWORD *pdwMode,
435 [in] DWORD dwEncoding,
436 [in] WCHAR *pSrcStr,
437 [in,out] UINT *pcSrcSize,
438 [in] CHAR *pDstStr,
439 [in,out] UINT *pcDstSize);
441 HRESULT ConvertStringReset();
443 HRESULT GetRfc1766FromLcid(
444 [in] LCID Locale,
445 [out] BSTR *pbstrRfc1766);
447 HRESULT GetLcidFromRfc1766(
448 [out] LCID *pLocale,
449 [in] BSTR bstrRfc1766);
451 HRESULT EnumRfc1766(
452 [in] LANGID LangId,
453 [out] IEnumRfc1766 **ppEnumRfc1766);
455 HRESULT GetRfc1766Info(
456 [in] LCID Locale,
457 [in] LANGID LangId,
458 [out] PRFC1766INFO pRfc1766Info);
460 HRESULT CreateConvertCharset(
461 [in] UINT uiSrcCodePage,
462 [in] UINT uiDstCodePage,
463 [in] DWORD dwProperty,
464 [out] IMLangConvertCharset **ppMLangConvertCharset);
466 HRESULT ConvertStringInIStream(
467 [in,out] DWORD *pdwMode,
468 [in] DWORD dwFlag,
469 [in] WCHAR *lpFallBack,
470 [in] DWORD dwSrcEncoding,
471 [in] DWORD dwDstEncoding,
472 [in] IStream *pstmIn,
473 [in] IStream *pstmOut);
475 HRESULT ConvertStringToUnicodeEx(
476 [in,out] DWORD *pdwMode,
477 [in] DWORD dwEncoding,
478 [in] CHAR *pSrcStr,
479 [in,out] UINT *pcSrcSize,
480 [in] WCHAR *pDstStr,
481 [in,out] UINT *pcDstSize,
482 [in] DWORD dwFlag,
483 [in] WCHAR *lpFallBack);
485 HRESULT ConvertStringFromUnicodeEx(
486 [in,out] DWORD *pdwMode,
487 [in] DWORD dwEncoding,
488 [in] WCHAR *pSrcStr,
489 [in,out] UINT *pcSrcSize,
490 [in] CHAR *pDstStr,
491 [in,out] UINT *pcDstSize,
492 [in] DWORD dwFlag,
493 [in] WCHAR *lpFallBack);
495 HRESULT DetectCodepageInIStream(
496 [in] DWORD dwFlag,
497 [in] DWORD dwPrefWinCodePage,
498 [in] IStream *pstmIn,
499 [in,out] DetectEncodingInfo *lpEncoding,
500 [in,out] INT *pnScores);
502 HRESULT DetectInputCodepage(
503 [in] DWORD dwFlag,
504 [in] DWORD dwPrefWinCodePage,
505 [in] CHAR *pSrcStr,
506 [in,out] INT *pcSrcSize,
507 [in,out] DetectEncodingInfo *lpEncoding,
508 [in,out] INT *pnScores);
510 HRESULT ValidateCodePage(
511 [in] UINT uiCodePage,
512 [in] HWND hwnd);
514 HRESULT GetCodePageDescription(
515 [in] UINT uiCodePage,
516 [in] LCID lcid,
517 [in,out] LPWSTR lpWideCharStr,
518 [in] int cchWideChar);
520 HRESULT IsCodePageInstallable(
521 [in] UINT uiCodePage);
523 HRESULT SetMimeDBSource(
524 [in] MIMECONTF dwSource);
526 HRESULT GetNumberOfScripts(
527 [out] UINT *pnScripts);
529 HRESULT EnumScripts(
530 [in] DWORD dwFlags,
531 [in] LANGID LangId,
532 [out] IEnumScript **ppEnumScript);
534 HRESULT ValidateCodePageEx( /* undocumented on MSDN */
535 [in] UINT uiCodePage,
536 [in] HWND hwnd,
537 [in] DWORD dwfIODControl);
540 cpp_quote("STDAPI LcidToRfc1766A(LCID, LPSTR, INT);")
541 cpp_quote("STDAPI LcidToRfc1766W(LCID, LPWSTR, INT);")
542 cpp_quote("#define LcidToRfc1766 WINELIB_NAME_AW(LcidToRfc1766)")
544 cpp_quote("STDAPI Rfc1766ToLcidA(LCID *, LPCSTR);")
545 cpp_quote("STDAPI Rfc1766ToLcidW(LCID *, LPCWSTR);")
546 cpp_quote("#define Rfc1766ToLcid WINELIB_NAME_AW(Rfc1766ToLcid)")
548 cpp_quote("STDAPI IsConvertINetStringAvailable(DWORD, DWORD);")
549 cpp_quote("STDAPI ConvertINetString(LPDWORD, DWORD, DWORD, LPCSTR, LPINT, LPSTR, LPINT);")
550 cpp_quote("STDAPI ConvertINetMultiByteToUnicode(LPDWORD, DWORD, LPCSTR, LPINT, LPWSTR, LPINT);")
551 cpp_quote("STDAPI ConvertINetUnicodeToMultiByte(LPDWORD, DWORD, LPCWSTR, LPINT, LPSTR, LPINT);")
553 cpp_quote("DEFINE_GUID(CLSID_CMultiLanguage, 0x275c23e2, 0x3747, 0x11d0, 0x9f,0xea,0x00,0xaa,0x00,0x3f,0x86,0x46);")
554 cpp_quote("DEFINE_GUID(IID_IMLangCodePages, 0x359F3443,0xBD4A,0x11D0,0xB1,0x88,0x00,0xAA,0x00,0x38,0xC9,0x69);")
555 cpp_quote("DEFINE_GUID(IID_IMLangFontLink, 0x359F3441,0xBD4A,0x11D0,0xB1,0x88,0x00,0xAA,0x00,0x38,0xC9,0x69);")
556 cpp_quote("DEFINE_GUID(IID_IMultiLanguage2, 0xDCCFC164,0x2B38,0x11d2,0xB7,0xEC,0x00,0xC0,0x4F,0x8F,0x5D,0x9A);")
557 cpp_quote("DEFINE_GUID(IID_IMultiLanguage, 0x275c23e1,0x3747,0x11d0,0x9f,0xea,0x00,0xaa,0x00,0x3f,0x86,0x46);")
558 cpp_quote("DEFINE_GUID(IID_IEnumCodePage, 0x275c23e3,0x3747,0x11d0,0x9f,0xea,0x00,0xaa,0x00,0x3f,0x86,0x46);")
559 cpp_quote("DEFINE_GUID(IID_IEnumScript, 0xae5f1430,0x388b,0x11d2,0x83,0x80,0x00,0xc0,0x4f,0x8f,0x5d,0xa1);")