Updated Norwegian Bokmål Readme file.
[wine/hacks.git] / include / mlang.idl
blobfabcc59fb431903d785ff4b496d4a99ea5c3c5f9
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 #ifndef DO_NO_IMPORTS
20 import "unknwn.idl";
21 #endif
23 interface IStream;
25 /* FIXME: LANGID is defined in winnt.h and mlang.h in the platform SDK */
26 cpp_quote("#ifndef _WINNT_")
27 typedef WORD LANGID;
28 cpp_quote("#endif")
31 object,
32 uuid(359f3443-bd4a-11d0-b188-00aa0038c969),
33 pointer_default(unique)
35 interface IMLangCodePages : IUnknown
37 HRESULT GetCharCodePages(
38 [in] WCHAR chSrc,
39 DWORD *pdwCodePages);
40 HRESULT GetStrCodePages(
41 [in, size_is(cchSrc)] const WCHAR *pszSrc,
42 [in] long cchSrc,
43 [in] DWORD dwPriorityCodePages,
44 [out] DWORD *pdwCodePages,
45 [out] long *pcchCodePages);
46 HRESULT CodePageToCodePages(
47 [in] UINT uCodePage,
48 [out] DWORD *pdwCodePages);
49 HRESULT CodePagesToCodePage(
50 [in] DWORD dwCodePages,
51 [in] UINT uDefaultCodePage,
52 [out] UINT *puCodePage);
56 object,
57 uuid(359f3441-bd4a-11d0-b188-00aa0038c969),
58 pointer_default(unique)
60 interface IMLangFontLink : IMLangCodePages
62 HRESULT GetFontCodePages(
63 [in] HDC hDC,
64 [in] HFONT hFont,
65 [out] DWORD *pdwCodePages );
67 HRESULT MapFont(
68 [in] HDC hDC,
69 [in] DWORD dwCodePages,
70 [in] HFONT hSrcFont,
71 [out] HFONT *phDestFont);
73 HRESULT ReleaseFont(
74 [in] HFONT hFont);
76 HRESULT ResetFontMapping();
80 object,
81 uuid(ae5f1430-388b-11d2-8380-00c04f8f5da1),
82 pointer_default(unique)
84 interface IEnumScript : IUnknown
86 const USHORT MAX_SCRIPT_NAME = 48;
87 const USHORT MAX_MIMEFACE_NAME = 32;
89 typedef BYTE SCRIPT_ID;
90 typedef __int64 SCRIPT_IDS;
92 typedef enum tagSCRIPTCONTF
94 sidDefault = 0,
95 sidMerge = sidDefault + 1,
96 sidAsciiSym = sidMerge + 1,
97 sidAsciiLatin = sidAsciiSym + 1,
98 sidLatin = sidAsciiLatin + 1,
99 sidGreek = sidLatin + 1,
100 sidCyrillic = sidGreek + 1,
101 sidArmenian = sidCyrillic + 1,
102 sidHebrew = sidArmenian + 1,
103 sidArabic = sidHebrew + 1,
104 sidDevanagari = sidArabic + 1,
105 sidBengali = sidDevanagari + 1,
106 sidGurmukhi = sidBengali + 1,
107 sidGujarati = sidGurmukhi + 1,
108 sidOriya = sidGujarati + 1,
109 sidTamil = sidOriya + 1,
110 sidTelugu = sidTamil + 1,
111 sidKannada = sidTelugu + 1,
112 sidMalayalam = sidKannada + 1,
113 sidThai = sidMalayalam + 1,
114 sidLao = sidThai + 1,
115 sidTibetan = sidLao + 1,
116 sidGeorgian = sidTibetan + 1,
117 sidHangul = sidGeorgian + 1,
118 sidKana = sidHangul + 1,
119 sidBopomofo = sidKana + 1,
120 sidHan = sidBopomofo + 1,
121 sidEthiopic = sidHan + 1,
122 sidCanSyllabic = sidEthiopic + 1,
123 sidCherokee = sidCanSyllabic + 1,
124 sidYi = sidCherokee + 1,
125 sidBraille = sidYi + 1,
126 sidRunic = sidBraille + 1,
127 sidOgham = sidRunic + 1,
128 sidSinhala = sidOgham + 1,
129 sidSyriac = sidSinhala + 1,
130 sidBurmese = sidSyriac + 1,
131 sidKhmer = sidBurmese + 1,
132 sidThaana = sidKhmer + 1,
133 sidMongolian = sidThaana + 1,
134 sidUserDefined = sidMongolian + 1,
135 sidLim = sidUserDefined + 1,
136 sidFEFirst = sidHangul,
137 sidFELast = sidHan
138 } SCRIPTCONTF;
140 typedef enum tagSCRIPTFONTCONTF
142 SCRIPTCONTF_FIXED_FONT = 0x1,
143 SCRIPTCONTF_PROPORTIONAL_FONT = 0x2,
144 SCRIPTCONTF_SCRIPT_USER = 0x10000,
145 SCRIPTCONTF_SCRIPT_HIDE = 0x20000,
146 SCRIPTCONTF_SCRIPT_SYSTEM = 0x40000
147 } SCRIPTFONTCONTF;
149 typedef struct tagSCRIPFONTINFO
151 SCRIPT_IDS scripts;
152 WCHAR wszFont[MAX_MIMEFACE_NAME];
153 } SCRIPTFONTINFO, *PSCRIPTFONTINFO;
155 typedef struct tagSCRIPTINFO {
156 SCRIPT_ID ScriptId;
157 UINT uiCodePage;
158 WCHAR wszDescription[MAX_SCRIPT_NAME];
159 WCHAR wszFixedWidthFont[MAX_MIMEFACE_NAME];
160 WCHAR wszProportionalFont[MAX_MIMEFACE_NAME];
161 } SCRIPTINFO, *PSCRIPTINFO;
163 HRESULT Clone(
164 [out] IEnumScript **ppEnum);
166 HRESULT Next(
167 [in] ULONG celt,
168 [out] PSCRIPTINFO rgelt,
169 [out] ULONG *pceltFetched);
171 HRESULT Reset();
173 HRESULT Skip(
174 [in] ULONG celt);
178 object,
179 uuid(dccfc162-2b38-11d2-b7ec-00c04f8f5d9a),
180 pointer_default(unique)
182 interface IMLangFontLink2 : IMLangCodePages
184 typedef struct tagUNICODERANGE
186 WCHAR wcFrom;
187 WCHAR wcTo;
188 } UNICODERANGE;
190 typedef [unique] IMLangFontLink2 *PMLANGFONTLINK2;
192 HRESULT GetFontCodePages(
193 [in] HDC hDC,
194 [in] HFONT hFont,
195 [out] DWORD *pdwCodePages );
197 HRESULT ReleaseFont(
198 [in] HFONT hFont);
200 HRESULT ResetFontMapping();
202 HRESULT MapFont(
203 [in] HDC hDC,
204 [in] DWORD dwCodePages,
205 [in] WCHAR chSrc,
206 [out] HFONT *pFont);
208 HRESULT GetFontUnicodeRanges(
209 [in] HDC hDC,
210 [in,out] UINT *puiRanges,
211 [out] UNICODERANGE* pUranges);
213 HRESULT GetScriptFontInfo(
214 [in] SCRIPT_ID sid,
215 [in] DWORD dwFlags,
216 [in,out] UINT *puiFonts,
217 [out] SCRIPTFONTINFO* pScriptFont);
219 HRESULT CodePageToScriptID(
220 [in] UINT uiCodePage,
221 [out] SCRIPT_ID *pSid);
225 object,
226 uuid(275c23e3-3747-11d0-9fea-00aa003f8646),
227 pointer_default(unique)
229 interface IEnumCodePage : IUnknown
231 const USHORT MAX_MIMECP_NAME = 64;
232 const USHORT MAX_MIMECSET_NAME = 50;
234 typedef enum tagMIMECONTF
236 MIMECONTF_MAILNEWS = 0x00000001,
237 MIMECONTF_BROWSER = 0x00000002,
238 MIMECONTF_MINIMAL = 0x00000004,
239 MIMECONTF_IMPORT = 0x00000008,
240 MIMECONTF_SAVABLE_MAILNEWS = 0x00000100,
241 MIMECONTF_SAVABLE_BROWSER = 0x00000200,
242 MIMECONTF_EXPORT = 0x00000400,
243 MIMECONTF_PRIVCONVERTER = 0x00010000,
244 MIMECONTF_VALID = 0x00020000,
245 MIMECONTF_VALID_NLS = 0x00040000,
246 MIMECONTF_MIME_IE4 = 0x10000000,
247 MIMECONTF_MIME_LATEST = 0x20000000,
248 MIMECONTF_MIME_REGISTRY = 0x40000000
249 } MIMECONTF;
251 typedef struct tagMIMECPINFO {
252 DWORD dwFlags;
253 UINT uiCodePage;
254 UINT uiFamilyCodePage;
255 WCHAR wszDescription[MAX_MIMECP_NAME];
256 WCHAR wszWebCharset[MAX_MIMECSET_NAME];
257 WCHAR wszHeaderCharset[MAX_MIMECSET_NAME];
258 WCHAR wszBodyCharset[MAX_MIMECSET_NAME];
259 WCHAR wszFixedWidthFont[MAX_MIMEFACE_NAME];
260 WCHAR wszProportionalFont[MAX_MIMEFACE_NAME];
261 BYTE bGDICharset;
262 } MIMECPINFO, *PMIMECPINFO;
264 typedef struct tagMIMECSETINFO
266 UINT uiCodePage;
267 UINT uiInternetEncoding;
268 WCHAR wszCharset[MAX_MIMECSET_NAME];
269 } MIMECSETINFO, *PMIMECSETINFO;
271 HRESULT Clone(
272 [out] IEnumCodePage **ppEnum);
274 HRESULT Next(
275 [in] ULONG celt,
276 [out] PMIMECPINFO rgelt,
277 [out] ULONG *pceltFetched);
279 HRESULT Reset();
281 HRESULT Skip(
282 [in] ULONG celt);
286 object,
287 uuid(d66d6f98-cdaa-11d0-b822-00c04fc9b31f),
288 pointer_default(unique)
290 interface IMLangConvertCharset : IUnknown
292 HRESULT Initialize(
293 [in] UINT uiSrcCodePage,
294 [in] UINT uiDstCodePage,
295 [in] DWORD dwProperty);
297 HRESULT GetSourceCodePage(
298 [out] UINT *puiSrcCodePage);
300 HRESULT GetDestinationCodePage(
301 [out] UINT *puiDstCodePage);
303 HRESULT GetProperty(
304 [out] DWORD *pdwProperty);
306 HRESULT DoConversion(
307 [in] BYTE *pSrcStr,
308 [in,out] UINT *pcSrcSize,
309 [in] BYTE *pDstStr,
310 [in,out] UINT *pcDstSize);
312 HRESULT DoConversionToUnicode(
313 [in] CHAR *pSrcStr,
314 [in,out] UINT *pcSrcSize,
315 [in] WCHAR *pDstStr,
316 [in,out] UINT *pcDstSize);
318 HRESULT DoConversionFromUnicode(
319 [in] WCHAR *pSrcStr,
320 [in,out] UINT *pcSrcSize,
321 [in] CHAR *pDstStr,
322 [in,out] UINT *pcDstSize);
326 uuid(d66d6f99-cdaa-11d0-b822-00c04fc9b31f)
328 coclass CMLangConvertCharset
330 [default] interface IMLangConvertCharset;
334 object,
335 uuid(3dc39d1d-c030-11d0-b81b-00c04fc9b31f),
336 pointer_default(unique)
338 interface IEnumRfc1766 : IUnknown
340 const USHORT MAX_RFC1766_NAME = 6;
341 const USHORT MAX_LOCALE_NAME = 32;
343 typedef struct tagRFC1766INFO
345 LCID lcid;
346 WCHAR wszRfc1766[MAX_RFC1766_NAME];
347 WCHAR wszLocaleName[MAX_LOCALE_NAME];
348 } RFC1766INFO, *PRFC1766INFO;
350 HRESULT Clone(
351 [out] IEnumRfc1766 **ppEnum);
353 HRESULT Next(
354 [in] ULONG celt,
355 [out] PRFC1766INFO rgelt,
356 [out] ULONG *pceltFetched);
358 HRESULT Reset();
360 HRESULT Skip(
361 [in] ULONG celt);
365 object,
366 uuid(275c23e1-3747-11d0-9fea-00aa003f8646),
367 pointer_default(unique)
369 interface IMultiLanguage : IUnknown
371 HRESULT GetNumberOfCodePageInfo(
372 [out] UINT *pcCodePage);
374 HRESULT GetCodePageInfo(
375 [in] UINT uiCodePage,
376 [out] PMIMECPINFO pCodePageInfo);
378 HRESULT GetFamilyCodePage(
379 [in] UINT uiCodePage,
380 [out] UINT *puiFamilyCodePage);
382 HRESULT EnumCodePages(
383 [in] DWORD grfFlags,
384 [out] IEnumCodePage **ppEnumCodePage);
386 HRESULT GetCharsetInfo(
387 [in] BSTR Charset,
388 [in] PMIMECSETINFO pCharsetInfo);
390 HRESULT IsConvertible(
391 [in] DWORD dwSrcEncoding,
392 [in] DWORD dwDstEncoding);
394 HRESULT ConvertString(
395 [in,out] DWORD *pdwMode,
396 [in] DWORD dwSrcEncoding,
397 [in] DWORD dwDstEncoding,
398 [in] BYTE *pSrcStr,
399 [in,out] UINT *pcSrcSize,
400 [in] BYTE *pDstStr,
401 [in,out] UINT *pcDstSize);
403 HRESULT ConvertStringToUnicode(
404 [in,out] DWORD *pdwMode,
405 [in] DWORD dwEncoding,
406 [in] CHAR *pSrcStr,
407 [in,out] UINT *pcSrcSize,
408 [in] WCHAR *pDstStr,
409 [in,out] UINT *pcDstSize);
411 HRESULT ConvertStringFromUnicode(
412 [in,out] DWORD *pdwMode,
413 [in] DWORD dwEncoding,
414 [in] WCHAR *pSrcStr,
415 [in,out] UINT *pcSrcSize,
416 [in] CHAR *pDstStr,
417 [in,out] UINT *pcDstSize);
419 HRESULT ConvertStringReset();
421 HRESULT GetRfc1766FromLcid(
422 [in] LCID Locale,
423 [out] BSTR *pbstrRfc1766);
425 HRESULT GetLcidFromRfc1766(
426 [out] LCID *pLocale,
427 [in] BSTR bstrRfc1766);
429 HRESULT EnumRfc1766(
430 [out] IEnumRfc1766 **ppEnumRfc1766);
432 HRESULT GetRfc1766Info(
433 [in] LCID Locale,
434 [out] PRFC1766INFO pRfc1766Info);
436 HRESULT CreateConvertCharset(
437 [in] UINT uiSrcCodePage,
438 [in] UINT uiDstCodePage,
439 [in] DWORD dwProperty,
440 [out] IMLangConvertCharset **ppMLangConvertCharset);
445 object,
446 uuid(dccfc164-2b38-11d2-b7ec-00c04f8f5d9a),
447 pointer_default(unique)
449 interface IMultiLanguage2 : IUnknown
451 typedef struct tagDetectEncodingInfo
453 UINT nLangID;
454 UINT nCodePage;
455 INT nDocPercent;
456 INT nConfidence;
457 } DetectEncodingInfo, *pDetectEncodingInfo;
459 HRESULT GetNumberOfCodePageInfo(
460 [out] UINT *pcCodePage);
462 HRESULT GetCodePageInfo(
463 [in] UINT uiCodePage,
464 [in] LANGID LangId,
465 [out] PMIMECPINFO pCodePageInfo);
467 HRESULT GetFamilyCodePage(
468 [in] UINT uiCodePage,
469 [out] UINT *puiFamilyCodePage);
471 HRESULT EnumCodePages(
472 [in] DWORD grfFlags,
473 [in] LANGID LangId,
474 [out] IEnumCodePage **ppEnumCodePage);
476 HRESULT GetCharsetInfo(
477 [in] BSTR Charset,
478 [in] PMIMECSETINFO pCharsetInfo);
480 HRESULT IsConvertible(
481 [in] DWORD dwSrcEncoding,
482 [in] DWORD dwDstEncoding);
484 HRESULT ConvertString(
485 [in,out] DWORD *pdwMode,
486 [in] DWORD dwSrcEncoding,
487 [in] DWORD dwDstEncoding,
488 [in] BYTE *pSrcStr,
489 [in,out] UINT *pcSrcSize,
490 [in] BYTE *pDstStr,
491 [in,out] UINT *pcDstSize);
493 HRESULT ConvertStringToUnicode(
494 [in,out] DWORD *pdwMode,
495 [in] DWORD dwEncoding,
496 [in] CHAR *pSrcStr,
497 [in,out] UINT *pcSrcSize,
498 [in] WCHAR *pDstStr,
499 [in,out] UINT *pcDstSize);
501 HRESULT ConvertStringFromUnicode(
502 [in,out] DWORD *pdwMode,
503 [in] DWORD dwEncoding,
504 [in] WCHAR *pSrcStr,
505 [in,out] UINT *pcSrcSize,
506 [in] CHAR *pDstStr,
507 [in,out] UINT *pcDstSize);
509 HRESULT ConvertStringReset();
511 HRESULT GetRfc1766FromLcid(
512 [in] LCID Locale,
513 [out] BSTR *pbstrRfc1766);
515 HRESULT GetLcidFromRfc1766(
516 [out] LCID *pLocale,
517 [in] BSTR bstrRfc1766);
519 HRESULT EnumRfc1766(
520 [in] LANGID LangId,
521 [out] IEnumRfc1766 **ppEnumRfc1766);
523 HRESULT GetRfc1766Info(
524 [in] LCID Locale,
525 [in] LANGID LangId,
526 [out] PRFC1766INFO pRfc1766Info);
528 HRESULT CreateConvertCharset(
529 [in] UINT uiSrcCodePage,
530 [in] UINT uiDstCodePage,
531 [in] DWORD dwProperty,
532 [out] IMLangConvertCharset **ppMLangConvertCharset);
534 HRESULT ConvertStringInIStream(
535 [in,out] DWORD *pdwMode,
536 [in] DWORD dwFlag,
537 [in] WCHAR *lpFallBack,
538 [in] DWORD dwSrcEncoding,
539 [in] DWORD dwDstEncoding,
540 [in] IStream *pstmIn,
541 [in] IStream *pstmOut);
543 HRESULT ConvertStringToUnicodeEx(
544 [in,out] DWORD *pdwMode,
545 [in] DWORD dwEncoding,
546 [in] CHAR *pSrcStr,
547 [in,out] UINT *pcSrcSize,
548 [in] WCHAR *pDstStr,
549 [in,out] UINT *pcDstSize,
550 [in] DWORD dwFlag,
551 [in] WCHAR *lpFallBack);
553 HRESULT ConvertStringFromUnicodeEx(
554 [in,out] DWORD *pdwMode,
555 [in] DWORD dwEncoding,
556 [in] WCHAR *pSrcStr,
557 [in,out] UINT *pcSrcSize,
558 [in] CHAR *pDstStr,
559 [in,out] UINT *pcDstSize,
560 [in] DWORD dwFlag,
561 [in] WCHAR *lpFallBack);
563 HRESULT DetectCodepageInIStream(
564 [in] DWORD dwFlag,
565 [in] DWORD dwPrefWinCodePage,
566 [in] IStream *pstmIn,
567 [in,out] DetectEncodingInfo *lpEncoding,
568 [in,out] INT *pnScores);
570 HRESULT DetectInputCodepage(
571 [in] DWORD dwFlag,
572 [in] DWORD dwPrefWinCodePage,
573 [in] CHAR *pSrcStr,
574 [in,out] INT *pcSrcSize,
575 [in,out] DetectEncodingInfo *lpEncoding,
576 [in,out] INT *pnScores);
578 HRESULT ValidateCodePage(
579 [in] UINT uiCodePage,
580 [in] HWND hwnd);
582 HRESULT GetCodePageDescription(
583 [in] UINT uiCodePage,
584 [in] LCID lcid,
585 [in,out] LPWSTR lpWideCharStr,
586 [in] int cchWideChar);
588 HRESULT IsCodePageInstallable(
589 [in] UINT uiCodePage);
591 HRESULT SetMimeDBSource(
592 [in] MIMECONTF dwSource);
594 HRESULT GetNumberOfScripts(
595 [out] UINT *pnScripts);
597 HRESULT EnumScripts(
598 [in] DWORD dwFlags,
599 [in] LANGID LangId,
600 [out] IEnumScript **ppEnumScript);
602 HRESULT ValidateCodePageEx( /* undocumented on MSDN */
603 [in] UINT uiCodePage,
604 [in] HWND hwnd,
605 [in] DWORD dwfIODControl);
609 object,
610 uuid(4e5868ab-b157-4623-9acc-6a1d9caebe04),
611 pointer_default(unique)
613 interface IMultiLanguage3 : IMultiLanguage2
615 typedef [unique] IMultiLanguage3 *LPMULTILANGUAGE3;
616 HRESULT DetectOutboundCodePage(
617 [in] DWORD dwFlags,
618 [in] LPCWSTR lpWideCharStr,
619 [in] UINT cchWideChar,
620 [in] UINT *puiPreferredCodePages,
621 [in] UINT nPreferredCodePages,
622 [in] UINT *puiDetectedCodePages,
623 [in, out] UINT *pnDetectedCodePages,
624 [in] WCHAR *lpSpecialChar);
626 HRESULT DetectOutboundCodePageInIStream(
627 [in] DWORD dwFlags,
628 [in] IStream *pStrIn,
629 [in] UINT *puiPreferredCodePages,
630 [in] UINT nPreferredCodePages,
631 [in] UINT *puiDetectedCodePages,
632 [in, out] UINT *pnDetectedCodePages,
633 [in] WCHAR *lpSpecialChar);
637 uuid(275C23E2-3747-11d0-9FEA-00AA003f8646)
639 coclass CMultiLanguage
641 [default] interface IMultiLanguage;
642 interface IMLangCodePages;
643 interface IMLangFontLink;
644 /* interface IMLangLineBreakConsole; */
645 interface IMLangFontLink2;
648 cpp_quote("STDAPI LcidToRfc1766A(LCID, LPSTR, INT);")
649 cpp_quote("STDAPI LcidToRfc1766W(LCID, LPWSTR, INT);")
650 cpp_quote("#define LcidToRfc1766 WINELIB_NAME_AW(LcidToRfc1766)")
652 cpp_quote("STDAPI Rfc1766ToLcidA(LCID *, LPCSTR);")
653 cpp_quote("STDAPI Rfc1766ToLcidW(LCID *, LPCWSTR);")
654 cpp_quote("#define Rfc1766ToLcid WINELIB_NAME_AW(Rfc1766ToLcid)")
656 cpp_quote("STDAPI GetGlobalFontLinkObject(void);")
657 cpp_quote("STDAPI IsConvertINetStringAvailable(DWORD, DWORD);")
658 cpp_quote("STDAPI ConvertINetString(LPDWORD, DWORD, DWORD, LPCSTR, LPINT, LPSTR, LPINT);")
659 cpp_quote("STDAPI ConvertINetMultiByteToUnicode(LPDWORD, DWORD, LPCSTR, LPINT, LPWSTR, LPINT);")
660 cpp_quote("STDAPI ConvertINetUnicodeToMultiByte(LPDWORD, DWORD, LPCWSTR, LPINT, LPSTR, LPINT);")