wined3d: Put vertex texture capability checking in its own function.
[wine/multimedia.git] / include / mlang.idl
blobc76826ae7cba91fbe88816334141fb48a1ba4216
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(275c23e3-3747-11d0-9fea-00aa003f8646),
180 pointer_default(unique)
182 interface IEnumCodePage : IUnknown
184 const USHORT MAX_MIMECP_NAME = 64;
185 const USHORT MAX_MIMECSET_NAME = 50;
187 typedef enum tagMIMECONTF
189 MIMECONTF_MAILNEWS = 0x00000001,
190 MIMECONTF_BROWSER = 0x00000002,
191 MIMECONTF_MINIMAL = 0x00000004,
192 MIMECONTF_IMPORT = 0x00000008,
193 MIMECONTF_SAVABLE_MAILNEWS = 0x00000100,
194 MIMECONTF_SAVABLE_BROWSER = 0x00000200,
195 MIMECONTF_EXPORT = 0x00000400,
196 MIMECONTF_PRIVCONVERTER = 0x00010000,
197 MIMECONTF_VALID = 0x00020000,
198 MIMECONTF_VALID_NLS = 0x00040000,
199 MIMECONTF_MIME_IE4 = 0x10000000,
200 MIMECONTF_MIME_LATEST = 0x20000000,
201 MIMECONTF_MIME_REGISTRY = 0x40000000
202 } MIMECONTF;
204 typedef struct tagMIMECPINFO {
205 DWORD dwFlags;
206 UINT uiCodePage;
207 UINT uiFamilyCodePage;
208 WCHAR wszDescription[MAX_MIMECP_NAME];
209 WCHAR wszWebCharset[MAX_MIMECSET_NAME];
210 WCHAR wszHeaderCharset[MAX_MIMECSET_NAME];
211 WCHAR wszBodyCharset[MAX_MIMECSET_NAME];
212 WCHAR wszFixedWidthFont[MAX_MIMEFACE_NAME];
213 WCHAR wszProportionalFont[MAX_MIMEFACE_NAME];
214 BYTE bGDICharset;
215 } MIMECPINFO, *PMIMECPINFO;
217 typedef struct tagMIMECSETINFO
219 UINT uiCodePage;
220 UINT uiInternetEncoding;
221 WCHAR wszCharset[MAX_MIMECSET_NAME];
222 } MIMECSETINFO, *PMIMECSETINFO;
224 HRESULT Clone(
225 [out] IEnumCodePage **ppEnum);
227 HRESULT Next(
228 [in] ULONG celt,
229 [out] PMIMECPINFO rgelt,
230 [out] ULONG *pceltFetched);
232 HRESULT Reset();
234 HRESULT Skip(
235 [in] ULONG celt);
239 object,
240 uuid(d66d6f98-cdaa-11d0-b822-00c04fc9b31f),
241 pointer_default(unique)
243 interface IMLangConvertCharset : IUnknown
245 HRESULT Initialize(
246 [in] UINT uiSrcCodePage,
247 [in] UINT uiDstCodePage,
248 [in] DWORD dwProperty);
250 HRESULT GetSourceCodePage(
251 [out] UINT *puiSrcCodePage);
253 HRESULT GetDestinationCodePage(
254 [out] UINT *puiDstCodePage);
256 HRESULT GetProperty(
257 [out] DWORD *pdwProperty);
259 HRESULT DoConversion(
260 [in] BYTE *pSrcStr,
261 [in,out] UINT *pcSrcSize,
262 [in] BYTE *pDstStr,
263 [in,out] UINT *pcDstSize);
265 HRESULT DoConversionToUnicode(
266 [in] CHAR *pSrcStr,
267 [in,out] UINT *pcSrcSize,
268 [in] WCHAR *pDstStr,
269 [in,out] UINT *pcDstSize);
271 HRESULT DoConversionFromUnicode(
272 [in] WCHAR *pSrcStr,
273 [in,out] UINT *pcSrcSize,
274 [in] CHAR *pDstStr,
275 [in,out] UINT *pcDstSize);
279 uuid(d66d6f99-cdaa-11d0-b822-00c04fc9b31f)
281 coclass CMLangConvertCharset
283 [default] interface IMLangConvertCharset;
287 object,
288 uuid(3dc39d1d-c030-11d0-b81b-00c04fc9b31f),
289 pointer_default(unique)
291 interface IEnumRfc1766 : IUnknown
293 const USHORT MAX_RFC1766_NAME = 6;
294 const USHORT MAX_LOCALE_NAME = 32;
296 typedef struct tagRFC1766INFO
298 LCID lcid;
299 WCHAR wszRfc1766[MAX_RFC1766_NAME];
300 WCHAR wszLocaleName[MAX_LOCALE_NAME];
301 } RFC1766INFO, *PRFC1766INFO;
303 HRESULT Clone(
304 [out] IEnumRfc1766 **ppEnum);
306 HRESULT Next(
307 [in] ULONG celt,
308 [out] PRFC1766INFO rgelt,
309 [out] ULONG *pceltFetched);
311 HRESULT Reset();
313 HRESULT Skip(
314 [in] ULONG celt);
318 object,
319 uuid(275c23e1-3747-11d0-9fea-00aa003f8646),
320 pointer_default(unique)
322 interface IMultiLanguage : IUnknown
324 HRESULT GetNumberOfCodePageInfo(
325 [out] UINT *pcCodePage);
327 HRESULT GetCodePageInfo(
328 [in] UINT uiCodePage,
329 [out] PMIMECPINFO pCodePageInfo);
331 HRESULT GetFamilyCodePage(
332 [in] UINT uiCodePage,
333 [out] UINT *puiFamilyCodePage);
335 HRESULT EnumCodePages(
336 [in] DWORD grfFlags,
337 [out] IEnumCodePage **ppEnumCodePage);
339 HRESULT GetCharsetInfo(
340 [in] BSTR Charset,
341 [in] PMIMECSETINFO pCharsetInfo);
343 HRESULT IsConvertible(
344 [in] DWORD dwSrcEncoding,
345 [in] DWORD dwDstEncoding);
347 HRESULT ConvertString(
348 [in,out] DWORD *pdwMode,
349 [in] DWORD dwSrcEncoding,
350 [in] DWORD dwDstEncoding,
351 [in] BYTE *pSrcStr,
352 [in,out] UINT *pcSrcSize,
353 [in] BYTE *pDstStr,
354 [in,out] UINT *pcDstSize);
356 HRESULT ConvertStringToUnicode(
357 [in,out] DWORD *pdwMode,
358 [in] DWORD dwEncoding,
359 [in] CHAR *pSrcStr,
360 [in,out] UINT *pcSrcSize,
361 [in] WCHAR *pDstStr,
362 [in,out] UINT *pcDstSize);
364 HRESULT ConvertStringFromUnicode(
365 [in,out] DWORD *pdwMode,
366 [in] DWORD dwEncoding,
367 [in] WCHAR *pSrcStr,
368 [in,out] UINT *pcSrcSize,
369 [in] CHAR *pDstStr,
370 [in,out] UINT *pcDstSize);
372 HRESULT ConvertStringReset();
374 HRESULT GetRfc1766FromLcid(
375 [in] LCID Locale,
376 [out] BSTR *pbstrRfc1766);
378 HRESULT GetLcidFromRfc1766(
379 [out] LCID *pLocale,
380 [in] BSTR bstrRfc1766);
382 HRESULT EnumRfc1766(
383 [out] IEnumRfc1766 **ppEnumRfc1766);
385 HRESULT GetRfc1766Info(
386 [in] LCID Locale,
387 [out] PRFC1766INFO pRfc1766Info);
389 HRESULT CreateConvertCharset(
390 [in] UINT uiSrcCodePage,
391 [in] UINT uiDstCodePage,
392 [in] DWORD dwProperty,
393 [out] IMLangConvertCharset **ppMLangConvertCharset);
398 object,
399 uuid(dccfc164-2b38-11d2-b7ec-00c04f8f5d9a),
400 pointer_default(unique)
402 interface IMultiLanguage2 : IUnknown
404 typedef struct tagDetectEncodingInfo
406 UINT nLangID;
407 UINT nCodePage;
408 INT nDocPercent;
409 INT nConfidence;
410 } DetectEncodingInfo, *pDetectEncodingInfo;
412 HRESULT GetNumberOfCodePageInfo(
413 [out] UINT *pcCodePage);
415 HRESULT GetCodePageInfo(
416 [in] UINT uiCodePage,
417 [in] LANGID LangId,
418 [out] PMIMECPINFO pCodePageInfo);
420 HRESULT GetFamilyCodePage(
421 [in] UINT uiCodePage,
422 [out] UINT *puiFamilyCodePage);
424 HRESULT EnumCodePages(
425 [in] DWORD grfFlags,
426 [in] LANGID LangId,
427 [out] IEnumCodePage **ppEnumCodePage);
429 HRESULT GetCharsetInfo(
430 [in] BSTR Charset,
431 [in] PMIMECSETINFO pCharsetInfo);
433 HRESULT IsConvertible(
434 [in] DWORD dwSrcEncoding,
435 [in] DWORD dwDstEncoding);
437 HRESULT ConvertString(
438 [in,out] DWORD *pdwMode,
439 [in] DWORD dwSrcEncoding,
440 [in] DWORD dwDstEncoding,
441 [in] BYTE *pSrcStr,
442 [in,out] UINT *pcSrcSize,
443 [in] BYTE *pDstStr,
444 [in,out] UINT *pcDstSize);
446 HRESULT ConvertStringToUnicode(
447 [in,out] DWORD *pdwMode,
448 [in] DWORD dwEncoding,
449 [in] CHAR *pSrcStr,
450 [in,out] UINT *pcSrcSize,
451 [in] WCHAR *pDstStr,
452 [in,out] UINT *pcDstSize);
454 HRESULT ConvertStringFromUnicode(
455 [in,out] DWORD *pdwMode,
456 [in] DWORD dwEncoding,
457 [in] WCHAR *pSrcStr,
458 [in,out] UINT *pcSrcSize,
459 [in] CHAR *pDstStr,
460 [in,out] UINT *pcDstSize);
462 HRESULT ConvertStringReset();
464 HRESULT GetRfc1766FromLcid(
465 [in] LCID Locale,
466 [out] BSTR *pbstrRfc1766);
468 HRESULT GetLcidFromRfc1766(
469 [out] LCID *pLocale,
470 [in] BSTR bstrRfc1766);
472 HRESULT EnumRfc1766(
473 [in] LANGID LangId,
474 [out] IEnumRfc1766 **ppEnumRfc1766);
476 HRESULT GetRfc1766Info(
477 [in] LCID Locale,
478 [in] LANGID LangId,
479 [out] PRFC1766INFO pRfc1766Info);
481 HRESULT CreateConvertCharset(
482 [in] UINT uiSrcCodePage,
483 [in] UINT uiDstCodePage,
484 [in] DWORD dwProperty,
485 [out] IMLangConvertCharset **ppMLangConvertCharset);
487 HRESULT ConvertStringInIStream(
488 [in,out] DWORD *pdwMode,
489 [in] DWORD dwFlag,
490 [in] WCHAR *lpFallBack,
491 [in] DWORD dwSrcEncoding,
492 [in] DWORD dwDstEncoding,
493 [in] IStream *pstmIn,
494 [in] IStream *pstmOut);
496 HRESULT ConvertStringToUnicodeEx(
497 [in,out] DWORD *pdwMode,
498 [in] DWORD dwEncoding,
499 [in] CHAR *pSrcStr,
500 [in,out] UINT *pcSrcSize,
501 [in] WCHAR *pDstStr,
502 [in,out] UINT *pcDstSize,
503 [in] DWORD dwFlag,
504 [in] WCHAR *lpFallBack);
506 HRESULT ConvertStringFromUnicodeEx(
507 [in,out] DWORD *pdwMode,
508 [in] DWORD dwEncoding,
509 [in] WCHAR *pSrcStr,
510 [in,out] UINT *pcSrcSize,
511 [in] CHAR *pDstStr,
512 [in,out] UINT *pcDstSize,
513 [in] DWORD dwFlag,
514 [in] WCHAR *lpFallBack);
516 HRESULT DetectCodepageInIStream(
517 [in] DWORD dwFlag,
518 [in] DWORD dwPrefWinCodePage,
519 [in] IStream *pstmIn,
520 [in,out] DetectEncodingInfo *lpEncoding,
521 [in,out] INT *pnScores);
523 HRESULT DetectInputCodepage(
524 [in] DWORD dwFlag,
525 [in] DWORD dwPrefWinCodePage,
526 [in] CHAR *pSrcStr,
527 [in,out] INT *pcSrcSize,
528 [in,out] DetectEncodingInfo *lpEncoding,
529 [in,out] INT *pnScores);
531 HRESULT ValidateCodePage(
532 [in] UINT uiCodePage,
533 [in] HWND hwnd);
535 HRESULT GetCodePageDescription(
536 [in] UINT uiCodePage,
537 [in] LCID lcid,
538 [in,out] LPWSTR lpWideCharStr,
539 [in] int cchWideChar);
541 HRESULT IsCodePageInstallable(
542 [in] UINT uiCodePage);
544 HRESULT SetMimeDBSource(
545 [in] MIMECONTF dwSource);
547 HRESULT GetNumberOfScripts(
548 [out] UINT *pnScripts);
550 HRESULT EnumScripts(
551 [in] DWORD dwFlags,
552 [in] LANGID LangId,
553 [out] IEnumScript **ppEnumScript);
555 HRESULT ValidateCodePageEx( /* undocumented on MSDN */
556 [in] UINT uiCodePage,
557 [in] HWND hwnd,
558 [in] DWORD dwfIODControl);
562 object,
563 uuid(4e5868ab-b157-4623-9acc-6a1d9caebe04),
564 pointer_default(unique)
566 interface IMultiLanguage3 : IMultiLanguage2
568 typedef [unique] IMultiLanguage3 *LPMULTILANGUAGE3;
569 HRESULT DetectOutboundCodePage(
570 [in] DWORD dwFlags,
571 [in] LPCWSTR lpWideCharStr,
572 [in] UINT cchWideChar,
573 [in] UINT *puiPreferredCodePages,
574 [in] UINT nPreferredCodePages,
575 [in] UINT *puiDetectedCodePages,
576 [in, out] UINT *pnDetectedCodePages,
577 [in] WCHAR *lpSpecialChar);
579 HRESULT DetectOutboundCodePageInIStream(
580 [in] DWORD dwFlags,
581 [in] IStream *pStrIn,
582 [in] UINT *puiPreferredCodePages,
583 [in] UINT nPreferredCodePages,
584 [in] UINT *puiDetectedCodePages,
585 [in, out] UINT *pnDetectedCodePages,
586 [in] WCHAR *lpSpecialChar);
590 uuid(275C23E2-3747-11d0-9FEA-00AA003f8646)
592 coclass CMultiLanguage
594 [default] interface IMultiLanguage;
595 interface IMLangCodePages;
596 interface IMLangFontLink;
597 /* interface IMLangLineBreakConsole; */
600 cpp_quote("STDAPI LcidToRfc1766A(LCID, LPSTR, INT);")
601 cpp_quote("STDAPI LcidToRfc1766W(LCID, LPWSTR, INT);")
602 cpp_quote("#define LcidToRfc1766 WINELIB_NAME_AW(LcidToRfc1766)")
604 cpp_quote("STDAPI Rfc1766ToLcidA(LCID *, LPCSTR);")
605 cpp_quote("STDAPI Rfc1766ToLcidW(LCID *, LPCWSTR);")
606 cpp_quote("#define Rfc1766ToLcid WINELIB_NAME_AW(Rfc1766ToLcid)")
608 cpp_quote("STDAPI GetGlobalFontLinkObject(void);")
609 cpp_quote("STDAPI IsConvertINetStringAvailable(DWORD, DWORD);")
610 cpp_quote("STDAPI ConvertINetString(LPDWORD, DWORD, DWORD, LPCSTR, LPINT, LPSTR, LPINT);")
611 cpp_quote("STDAPI ConvertINetMultiByteToUnicode(LPDWORD, DWORD, LPCSTR, LPINT, LPWSTR, LPINT);")
612 cpp_quote("STDAPI ConvertINetUnicodeToMultiByte(LPDWORD, DWORD, LPCWSTR, LPINT, LPSTR, LPINT);")