Call IDirectSound::Initialize() as per MSDN before using the
[wine/multimedia.git] / include / mlang.idl
blobd5840d57b8f715f2a1a6b1f159ead83cb201f0c8
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;
83 typedef BYTE SCRIPT_ID;
85 typedef struct tagSCRIPTINFO {
86 SCRIPT_ID ScriptId;
87 UINT uiCodePage;
88 WCHAR wszDescription[MAX_SCRIPT_NAME];
89 WCHAR wszFixedWidthFont[MAX_MIMEFACE_NAME];
90 WCHAR wszProportionalFont[MAX_MIMEFACE_NAME];
91 } SCRIPTINFO, *PSCRIPTINFO;
93 HRESULT Clone(
94 [out] IEnumScript **ppEnum);
96 HRESULT Next(
97 [in] ULONG celt,
98 [out] PSCRIPTINFO rgelt,
99 [out] ULONG *pceltFetched);
101 HRESULT Reset();
103 HRESULT Skip(
104 [in] ULONG celt);
108 object,
109 pointer_default(unique)
111 interface IEnumCodePage : IUnknown
113 const USHORT MAX_MIMECP_NAME = 64;
114 const USHORT MAX_MIMECSET_NAME = 50;
115 const USHORT MAX_MIMEFACE_NAME = 32;
117 typedef enum tagMIMECONTF
119 MIMECONTF_MAILNEWS = 0x00000001,
120 MIMECONTF_BROWSER = 0x00000002,
121 MIMECONTF_MINIMAL = 0x00000004,
122 MIMECONTF_IMPORT = 0x00000008,
123 MIMECONTF_SAVABLE_MAILNEWS = 0x00000100,
124 MIMECONTF_SAVABLE_BROWSER = 0x00000200,
125 MIMECONTF_EXPORT = 0x00000400,
126 MIMECONTF_PRIVCONVERTER = 0x00010000,
127 MIMECONTF_VALID = 0x00020000,
128 MIMECONTF_VALID_NLS = 0x00040000,
129 MIMECONTF_MIME_IE4 = 0x10000000,
130 MIMECONTF_MIME_LATEST = 0x20000000,
131 MIMECONTF_MIME_REGISTRY = 0x40000000
132 } MIMECONTF;
134 typedef struct tagMIMECPINFO {
135 DWORD dwFlags;
136 UINT uiCodePage;
137 UINT uiFamilyCodePage;
138 WCHAR wszDescription[MAX_MIMECP_NAME];
139 WCHAR wszWebCharset[MAX_MIMECSET_NAME];
140 WCHAR wszHeaderCharset[MAX_MIMECSET_NAME];
141 WCHAR wszBodyCharset[MAX_MIMECSET_NAME];
142 WCHAR wszFixedWidthFont[MAX_MIMEFACE_NAME];
143 WCHAR wszProportionalFont[MAX_MIMEFACE_NAME];
144 BYTE bGDICharset;
145 } MIMECPINFO, *PMIMECPINFO;
147 typedef struct tagMIMECSETINFO
149 UINT uiCodePage;
150 UINT uiInternetEncoding;
151 WCHAR wszCharset[MAX_MIMECSET_NAME];
152 } MIMECSETINFO, *PMIMECSETINFO;
154 HRESULT Clone(
155 [out] IEnumCodePage **ppEnum);
157 HRESULT Next(
158 [in] ULONG celt,
159 [out] PMIMECPINFO rgelt,
160 [out] ULONG *pceltFetched);
162 HRESULT Reset();
164 HRESULT Skip(
165 [in] ULONG celt);
169 object,
170 pointer_default(unique)
172 interface IMLangConvertCharset : IUnknown
174 HRESULT Initialize(
175 [in] UINT uiSrcCodePage,
176 [in] UINT uiDstCodePage,
177 [in] DWORD dwProperty);
179 HRESULT GetSourceCodePage(
180 [out] UINT *puiSrcCodePage);
182 HRESULT GetDestinationCodePage(
183 [out] UINT *puiDstCodePage);
185 HRESULT GetProperty(
186 [out] DWORD *pdwProperty);
188 HRESULT DoConversion(
189 [in] BYTE *pSrcStr,
190 [in,out] UINT *pcSrcSize,
191 [in] BYTE *pDstStr,
192 [in,out] UINT *pcDstSize);
194 HRESULT DoConversionToUnicode(
195 [in] CHAR *pSrcStr,
196 [in,out] UINT *pcSrcSize,
197 [in] WCHAR *pDstStr,
198 [in,out] UINT *pcDstSize);
200 HRESULT DoConversionFromUnicode(
201 [in] WCHAR *pSrcStr,
202 [in,out] UINT *pcSrcSize,
203 [in] CHAR *pDstStr,
204 [in,out] UINT *pcDstSize);
208 object,
209 pointer_default(unique)
211 interface IEnumRfc1766 : IUnknown
213 typedef struct tagRFC1766INFO
215 LCID lcid;
216 WCHAR wszRfc1766[MAX_RFC1766_NAME];
217 WCHAR wszLocaleName[MAX_LOCALE_NAME];
218 } RFC1766INFO, *PRFC1766INFO;
220 HRESULT Clone(
221 [out] IEnumRfc1766 **ppEnum);
223 HRESULT Next(
224 [in] ULONG celt,
225 [out] PRFC1766INFO rgelt,
226 [out] ULONG *pceltFetched);
228 HRESULT Reset();
230 HRESULT Skip(
231 [in] ULONG celt);
235 object,
236 pointer_default(unique)
238 interface IMultiLanguage : IUnknown
240 HRESULT GetNumberOfCodePageInfo(
241 [out] UINT *pcCodePage);
243 HRESULT GetCodePageInfo(
244 [in] UINT uiCodePage,
245 [out] PMIMECPINFO pCodePageInfo);
247 HRESULT GetFamilyCodePage(
248 [in] UINT uiCodePage,
249 [out] UINT *puiFamilyCodePage);
251 HRESULT EnumCodePages(
252 [in] DWORD grfFlags,
253 [out] IEnumCodePage **ppEnumCodePage);
255 HRESULT GetCharsetInfo(
256 [in] BSTR Charset,
257 [in] PMIMECSETINFO pCharsetInfo);
259 HRESULT IsConvertible(
260 [in] DWORD dwSrcEncoding,
261 [in] DWORD dwDstEncoding);
263 HRESULT ConvertString(
264 [in,out] DWORD *pdwMode,
265 [in] DWORD dwSrcEncoding,
266 [in] DWORD dwDstEncoding,
267 [in] BYTE *pSrcStr,
268 [in,out] UINT *pcSrcSize,
269 [in] BYTE *pDstStr,
270 [in,out] UINT *pcDstSize);
272 HRESULT ConvertStringToUnicode(
273 [in,out] DWORD *pdwMode,
274 [in] DWORD dwEncoding,
275 [in] CHAR *pSrcStr,
276 [in,out] UINT *pcSrcSize,
277 [in] WCHAR *pDstStr,
278 [in,out] UINT *pcDstSize);
280 HRESULT ConvertStringFromUnicode(
281 [in,out] DWORD *pdwMode,
282 [in] DWORD dwEncoding,
283 [in] WCHAR *pSrcStr,
284 [in,out] UINT *pcSrcSize,
285 [in] CHAR *pDstStr,
286 [in,out] UINT *pcDstSize);
288 HRESULT ConvertStringReset();
290 HRESULT GetRfc1766FromLcid(
291 [in] LCID Locale,
292 [out] BSTR *pbstrRfc1766);
294 HRESULT GetLcidFromRfc1766(
295 [out] LCID *pLocale,
296 [in] BSTR bstrRfc1766);
298 HRESULT EnumRfc1766(
299 [out] IEnumRfc1766 **ppEnumRfc1766);
301 HRESULT GetRfc1766Info(
302 [in] LCID Locale,
303 [out] PRFC1766INFO pRfc1766Info);
305 HRESULT CreateConvertCharset(
306 [in] UINT uiSrcCodePage,
307 [in] UINT uiDstCodePage,
308 [in] DWORD dwProperty,
309 [out] IMLangConvertCharset **ppMLangConvertCharset);
314 object,
315 pointer_default(unique)
317 interface IMultiLanguage2 : IUnknown
319 typedef struct tagDetectEncodingInfo
321 UINT nLangID;
322 UINT nCodePage;
323 INT nDocPercent;
324 INT nConfidence;
325 } DetectEncodingInfo, *pDetectEncodingInfo;
327 HRESULT GetNumberOfCodePageInfo(
328 [out] UINT *pcCodePage);
330 HRESULT GetCodePageInfo(
331 [in] UINT uiCodePage,
332 [in] LANGID LangId,
333 [out] PMIMECPINFO pCodePageInfo);
335 HRESULT GetFamilyCodePage(
336 [in] UINT uiCodePage,
337 [out] UINT *puiFamilyCodePage);
339 HRESULT EnumCodePages(
340 [in] DWORD grfFlags,
341 [in] LANGID LangId,
342 [out] IEnumCodePage **ppEnumCodePage);
344 HRESULT GetCharsetInfo(
345 [in] BSTR Charset,
346 [in] PMIMECSETINFO pCharsetInfo);
348 HRESULT IsConvertible(
349 [in] DWORD dwSrcEncoding,
350 [in] DWORD dwDstEncoding);
352 HRESULT ConvertString(
353 [in,out] DWORD *pdwMode,
354 [in] DWORD dwSrcEncoding,
355 [in] DWORD dwDstEncoding,
356 [in] BYTE *pSrcStr,
357 [in,out] UINT *pcSrcSize,
358 [in] BYTE *pDstStr,
359 [in,out] UINT *pcDstSize);
361 HRESULT ConvertStringToUnicode(
362 [in,out] DWORD *pdwMode,
363 [in] DWORD dwEncoding,
364 [in] CHAR *pSrcStr,
365 [in,out] UINT *pcSrcSize,
366 [in] WCHAR *pDstStr,
367 [in,out] UINT *pcDstSize);
369 HRESULT ConvertStringFromUnicode(
370 [in,out] DWORD *pdwMode,
371 [in] DWORD dwEncoding,
372 [in] WCHAR *pSrcStr,
373 [in,out] UINT *pcSrcSize,
374 [in] CHAR *pDstStr,
375 [in,out] UINT *pcDstSize);
377 HRESULT ConvertStringReset();
379 HRESULT GetRfc1766FromLcid(
380 [in] LCID Locale,
381 [out] BSTR *pbstrRfc1766);
383 HRESULT GetLcidFromRfc1766(
384 [out] LCID *pLocale,
385 [in] BSTR bstrRfc1766);
387 HRESULT EnumRfc1766(
388 [in] LANGID LangId,
389 [out] IEnumRfc1766 **ppEnumRfc1766);
391 HRESULT GetRfc1766Info(
392 [in] LCID Locale,
393 [in] LANGID LangId,
394 [out] PRFC1766INFO pRfc1766Info);
396 HRESULT CreateConvertCharset(
397 [in] UINT uiSrcCodePage,
398 [in] UINT uiDstCodePage,
399 [in] DWORD dwProperty,
400 [out] IMLangConvertCharset **ppMLangConvertCharset);
402 HRESULT ConvertStringInIStream(
403 [in,out] DWORD *pdwMode,
404 [in] DWORD dwFlag,
405 [in] WCHAR *lpFallBack,
406 [in] DWORD dwSrcEncoding,
407 [in] DWORD dwDstEncoding,
408 [in] IStream *pstmIn,
409 [in] IStream *pstmOut);
411 HRESULT ConvertStringToUnicodeEx(
412 [in,out] DWORD *pdwMode,
413 [in] DWORD dwEncoding,
414 [in] CHAR *pSrcStr,
415 [in,out] UINT *pcSrcSize,
416 [in] WCHAR *pDstStr,
417 [in,out] UINT *pcDstSize,
418 [in] DWORD dwFlag,
419 [in] WCHAR *lpFallBack);
421 HRESULT DetectCodepageInIStream(
422 [in] DWORD dwFlag,
423 [in] DWORD dwPrefWinCodePage,
424 [in] IStream *pstmIn,
425 [in,out] DetectEncodingInfo *lpEncoding,
426 [in,out] INT *pnScores);
428 HRESULT DetectInputCodepage(
429 [in] DWORD dwFlag,
430 [in] DWORD dwPrefWinCodePage,
431 [in] CHAR *pSrcStr,
432 [in,out] INT *pcSrcSize,
433 [in,out] DetectEncodingInfo *lpEncoding,
434 [in,out] INT *pnScores);
436 HRESULT ValidateCodePage(
437 [in] UINT uiCodePage,
438 [in] HWND hwnd);
440 HRESULT GetCodePageDescription(
441 [in] UINT uiCodePage,
442 [in] LCID lcid,
443 [in,out] LPWSTR lpWideCharStr,
444 [in] int cchWideChar);
446 HRESULT IsCodePageInstallable(
447 [in] UINT uiCodePage);
449 HRESULT SetMimeDBSource(
450 [in] MIMECONTF dwSource);
452 HRESULT GetNumberOfScripts(
453 [out] UINT *pnScripts);
455 HRESULT EnumScripts(
456 [in] DWORD dwFlags,
457 [in] LANGID LangId,
458 [out] IEnumScript **ppEnumScript);
460 HRESULT ValidateCodePageEx( /* undocumented on MSDN */
461 [in] UINT uiCodePage,
462 [in] HWND hwnd,
463 [in] DWORD dwfIODControl);