465 lines
12 KiB
Plaintext
465 lines
12 KiB
Plaintext
/*
|
|
* Copyright (C) 2004 Mike McCormack
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
*/
|
|
|
|
import "unknwn.idl";
|
|
|
|
interface IStream;
|
|
|
|
/* FIXME: LANDID is defined in winnt.h and mlang.h in the platform SDK */
|
|
cpp_quote("#ifndef __WINE_WINNT_H")
|
|
typedef WORD LANGID;
|
|
cpp_quote("#endif")
|
|
|
|
[
|
|
object,
|
|
pointer_default(unique)
|
|
]
|
|
interface IMLangCodePages : IUnknown
|
|
{
|
|
HRESULT GetCharCodePages(
|
|
[in] WCHAR chSrc,
|
|
DWORD *pdwCodePages);
|
|
HRESULT GetStrCodePages(
|
|
[in, size_is(cchSrc)] const WCHAR *pszSrc,
|
|
[in] long cchSrc,
|
|
[in] DWORD dwPriorityCodePages,
|
|
[out] DWORD *pdwCodePages,
|
|
[out] long *pcchCodePages);
|
|
HRESULT CodePageToCodePages(
|
|
[in] UINT uCodePage,
|
|
[out] DWORD *pdwCodePages);
|
|
HRESULT CodePagesToCodePage(
|
|
[in] DWORD dwCodePages,
|
|
[in] UINT uDefaultCodePage,
|
|
[out] UINT *puCodePage);
|
|
};
|
|
|
|
[
|
|
object,
|
|
pointer_default(unique)
|
|
]
|
|
interface IMLangFontLink : IMLangCodePages
|
|
{
|
|
HRESULT GetFontCodePages(
|
|
[in] HDC hDC,
|
|
[in] HFONT hFont,
|
|
[out] DWORD *pdwCodePages );
|
|
|
|
HRESULT MapFont(
|
|
[in] HDC hDC,
|
|
[in] DWORD dwCodePages,
|
|
[in] HFONT hSrcFont,
|
|
[out] HFONT *phDestFont);
|
|
|
|
HRESULT ReleaseFont(
|
|
[in] HFONT hFont);
|
|
|
|
HRESULT ResetFontMapping();
|
|
};
|
|
|
|
[
|
|
object,
|
|
pointer_default(unique)
|
|
]
|
|
interface IEnumScript : IUnknown
|
|
{
|
|
const USHORT MAX_SCRIPT_NAME = 48;
|
|
|
|
typedef BYTE SCRIPT_ID;
|
|
|
|
typedef struct tagSCRIPTINFO {
|
|
SCRIPT_ID ScriptId;
|
|
UINT uiCodePage;
|
|
WCHAR wszDescription[MAX_SCRIPT_NAME];
|
|
WCHAR wszFixedWidthFont[MAX_MIMEFACE_NAME];
|
|
WCHAR wszProportionalFont[MAX_MIMEFACE_NAME];
|
|
} SCRIPTINFO, *PSCRIPTINFO;
|
|
|
|
HRESULT Clone(
|
|
[out] IEnumScript **ppEnum);
|
|
|
|
HRESULT Next(
|
|
[in] ULONG celt,
|
|
[out] PSCRIPTINFO rgelt,
|
|
[out] ULONG *pceltFetched);
|
|
|
|
HRESULT Reset();
|
|
|
|
HRESULT Skip(
|
|
[in] ULONG celt);
|
|
};
|
|
|
|
[
|
|
object,
|
|
pointer_default(unique)
|
|
]
|
|
interface IEnumCodePage : IUnknown
|
|
{
|
|
const USHORT MAX_MIMECP_NAME = 64;
|
|
const USHORT MAX_MIMECSET_NAME = 50;
|
|
const USHORT MAX_MIMEFACE_NAME = 32;
|
|
|
|
typedef enum tagMIMECONTF
|
|
{
|
|
MIMECONTF_MAILNEWS = 0x00000001,
|
|
MIMECONTF_BROWSER = 0x00000002,
|
|
MIMECONTF_MINIMAL = 0x00000004,
|
|
MIMECONTF_IMPORT = 0x00000008,
|
|
MIMECONTF_SAVABLE_MAILNEWS = 0x00000100,
|
|
MIMECONTF_SAVABLE_BROWSER = 0x00000200,
|
|
MIMECONTF_EXPORT = 0x00000400,
|
|
MIMECONTF_PRIVCONVERTER = 0x00010000,
|
|
MIMECONTF_VALID = 0x00020000,
|
|
MIMECONTF_VALID_NLS = 0x00040000,
|
|
MIMECONTF_MIME_IE4 = 0x10000000,
|
|
MIMECONTF_MIME_LATEST = 0x20000000,
|
|
MIMECONTF_MIME_REGISTRY = 0x40000000
|
|
} MIMECONTF;
|
|
|
|
typedef struct tagMIMECPINFO {
|
|
DWORD dwFlags;
|
|
UINT uiCodePage;
|
|
UINT uiFamilyCodePage;
|
|
WCHAR wszDescription[MAX_MIMECP_NAME];
|
|
WCHAR wszWebCharset[MAX_MIMECSET_NAME];
|
|
WCHAR wszHeaderCharset[MAX_MIMECSET_NAME];
|
|
WCHAR wszBodyCharset[MAX_MIMECSET_NAME];
|
|
WCHAR wszFixedWidthFont[MAX_MIMEFACE_NAME];
|
|
WCHAR wszProportionalFont[MAX_MIMEFACE_NAME];
|
|
BYTE bGDICharset;
|
|
} MIMECPINFO, *PMIMECPINFO;
|
|
|
|
typedef struct tagMIMECSETINFO
|
|
{
|
|
UINT uiCodePage;
|
|
UINT uiInternetEncoding;
|
|
WCHAR wszCharset[MAX_MIMECSET_NAME];
|
|
} MIMECSETINFO, *PMIMECSETINFO;
|
|
|
|
HRESULT Clone(
|
|
[out] IEnumCodePage **ppEnum);
|
|
|
|
HRESULT Next(
|
|
[in] ULONG celt,
|
|
[out] PMIMECPINFO rgelt,
|
|
[out] ULONG *pceltFetched);
|
|
|
|
HRESULT Reset();
|
|
|
|
HRESULT Skip(
|
|
[in] ULONG celt);
|
|
};
|
|
|
|
[
|
|
object,
|
|
pointer_default(unique)
|
|
]
|
|
interface IMLangConvertCharset : IUnknown
|
|
{
|
|
HRESULT Initialize(
|
|
[in] UINT uiSrcCodePage,
|
|
[in] UINT uiDstCodePage,
|
|
[in] DWORD dwProperty);
|
|
|
|
HRESULT GetSourceCodePage(
|
|
[out] UINT *puiSrcCodePage);
|
|
|
|
HRESULT GetDestinationCodePage(
|
|
[out] UINT *puiDstCodePage);
|
|
|
|
HRESULT GetProperty(
|
|
[out] DWORD *pdwProperty);
|
|
|
|
HRESULT DoConversion(
|
|
[in] BYTE *pSrcStr,
|
|
[in,out] UINT *pcSrcSize,
|
|
[in] BYTE *pDstStr,
|
|
[in,out] UINT *pcDstSize);
|
|
|
|
HRESULT DoConversionToUnicode(
|
|
[in] CHAR *pSrcStr,
|
|
[in,out] UINT *pcSrcSize,
|
|
[in] WCHAR *pDstStr,
|
|
[in,out] UINT *pcDstSize);
|
|
|
|
HRESULT DoConversionFromUnicode(
|
|
[in] WCHAR *pSrcStr,
|
|
[in,out] UINT *pcSrcSize,
|
|
[in] CHAR *pDstStr,
|
|
[in,out] UINT *pcDstSize);
|
|
};
|
|
|
|
[
|
|
object,
|
|
pointer_default(unique)
|
|
]
|
|
interface IEnumRfc1766 : IUnknown
|
|
{
|
|
typedef struct tagRFC1766INFO
|
|
{
|
|
LCID lcid;
|
|
WCHAR wszRfc1766[MAX_RFC1766_NAME];
|
|
WCHAR wszLocaleName[MAX_LOCALE_NAME];
|
|
} RFC1766INFO, *PRFC1766INFO;
|
|
|
|
HRESULT Clone(
|
|
[out] IEnumRfc1766 **ppEnum);
|
|
|
|
HRESULT Next(
|
|
[in] ULONG celt,
|
|
[out] PRFC1766INFO rgelt,
|
|
[out] ULONG *pceltFetched);
|
|
|
|
HRESULT Reset();
|
|
|
|
HRESULT Skip(
|
|
[in] ULONG celt);
|
|
};
|
|
|
|
[
|
|
object,
|
|
pointer_default(unique)
|
|
]
|
|
interface IMultiLanguage : IUnknown
|
|
{
|
|
HRESULT GetNumberOfCodePageInfo(
|
|
[out] UINT *pcCodePage);
|
|
|
|
HRESULT GetCodePageInfo(
|
|
[in] UINT uiCodePage,
|
|
[out] PMIMECPINFO pCodePageInfo);
|
|
|
|
HRESULT GetFamilyCodePage(
|
|
[in] UINT uiCodePage,
|
|
[out] UINT *puiFamilyCodePage);
|
|
|
|
HRESULT EnumCodePages(
|
|
[in] DWORD grfFlags,
|
|
[out] IEnumCodePage **ppEnumCodePage);
|
|
|
|
HRESULT GetCharsetInfo(
|
|
[in] BSTR Charset,
|
|
[in] PMIMECSETINFO pCharsetInfo);
|
|
|
|
HRESULT IsConvertible(
|
|
[in] DWORD dwSrcEncoding,
|
|
[in] DWORD dwDstEncoding);
|
|
|
|
HRESULT ConvertString(
|
|
[in,out] DWORD *pdwMode,
|
|
[in] DWORD dwSrcEncoding,
|
|
[in] DWORD dwDstEncoding,
|
|
[in] BYTE *pSrcStr,
|
|
[in,out] UINT *pcSrcSize,
|
|
[in] BYTE *pDstStr,
|
|
[in,out] UINT *pcDstSize);
|
|
|
|
HRESULT ConvertStringToUnicode(
|
|
[in,out] DWORD *pdwMode,
|
|
[in] DWORD dwEncoding,
|
|
[in] CHAR *pSrcStr,
|
|
[in,out] UINT *pcSrcSize,
|
|
[in] WCHAR *pDstStr,
|
|
[in,out] UINT *pcDstSize);
|
|
|
|
HRESULT ConvertStringFromUnicode(
|
|
[in,out] DWORD *pdwMode,
|
|
[in] DWORD dwEncoding,
|
|
[in] WCHAR *pSrcStr,
|
|
[in,out] UINT *pcSrcSize,
|
|
[in] CHAR *pDstStr,
|
|
[in,out] UINT *pcDstSize);
|
|
|
|
HRESULT ConvertStringReset();
|
|
|
|
HRESULT GetRfc1766FromLcid(
|
|
[in] LCID Locale,
|
|
[out] BSTR *pbstrRfc1766);
|
|
|
|
HRESULT GetLcidFromRfc1766(
|
|
[out] LCID *pLocale,
|
|
[in] BSTR bstrRfc1766);
|
|
|
|
HRESULT EnumRfc1766(
|
|
[out] IEnumRfc1766 **ppEnumRfc1766);
|
|
|
|
HRESULT GetRfc1766Info(
|
|
[in] LCID Locale,
|
|
[out] PRFC1766INFO pRfc1766Info);
|
|
|
|
HRESULT CreateConvertCharset(
|
|
[in] UINT uiSrcCodePage,
|
|
[in] UINT uiDstCodePage,
|
|
[in] DWORD dwProperty,
|
|
[out] IMLangConvertCharset **ppMLangConvertCharset);
|
|
|
|
};
|
|
|
|
[
|
|
object,
|
|
pointer_default(unique)
|
|
]
|
|
interface IMultiLanguage2 : IUnknown
|
|
{
|
|
typedef struct tagDetectEncodingInfo
|
|
{
|
|
UINT nLangID;
|
|
UINT nCodePage;
|
|
INT nDocPercent;
|
|
INT nConfidence;
|
|
} DetectEncodingInfo, *pDetectEncodingInfo;
|
|
|
|
HRESULT GetNumberOfCodePageInfo(
|
|
[out] UINT *pcCodePage);
|
|
|
|
HRESULT GetCodePageInfo(
|
|
[in] UINT uiCodePage,
|
|
[in] LANGID LangId,
|
|
[out] PMIMECPINFO pCodePageInfo);
|
|
|
|
HRESULT GetFamilyCodePage(
|
|
[in] UINT uiCodePage,
|
|
[out] UINT *puiFamilyCodePage);
|
|
|
|
HRESULT EnumCodePages(
|
|
[in] DWORD grfFlags,
|
|
[in] LANGID LangId,
|
|
[out] IEnumCodePage **ppEnumCodePage);
|
|
|
|
HRESULT GetCharsetInfo(
|
|
[in] BSTR Charset,
|
|
[in] PMIMECSETINFO pCharsetInfo);
|
|
|
|
HRESULT IsConvertible(
|
|
[in] DWORD dwSrcEncoding,
|
|
[in] DWORD dwDstEncoding);
|
|
|
|
HRESULT ConvertString(
|
|
[in,out] DWORD *pdwMode,
|
|
[in] DWORD dwSrcEncoding,
|
|
[in] DWORD dwDstEncoding,
|
|
[in] BYTE *pSrcStr,
|
|
[in,out] UINT *pcSrcSize,
|
|
[in] BYTE *pDstStr,
|
|
[in,out] UINT *pcDstSize);
|
|
|
|
HRESULT ConvertStringToUnicode(
|
|
[in,out] DWORD *pdwMode,
|
|
[in] DWORD dwEncoding,
|
|
[in] CHAR *pSrcStr,
|
|
[in,out] UINT *pcSrcSize,
|
|
[in] WCHAR *pDstStr,
|
|
[in,out] UINT *pcDstSize);
|
|
|
|
HRESULT ConvertStringFromUnicode(
|
|
[in,out] DWORD *pdwMode,
|
|
[in] DWORD dwEncoding,
|
|
[in] WCHAR *pSrcStr,
|
|
[in,out] UINT *pcSrcSize,
|
|
[in] CHAR *pDstStr,
|
|
[in,out] UINT *pcDstSize);
|
|
|
|
HRESULT ConvertStringReset();
|
|
|
|
HRESULT GetRfc1766FromLcid(
|
|
[in] LCID Locale,
|
|
[out] BSTR *pbstrRfc1766);
|
|
|
|
HRESULT GetLcidFromRfc1766(
|
|
[out] LCID *pLocale,
|
|
[in] BSTR bstrRfc1766);
|
|
|
|
HRESULT EnumRfc1766(
|
|
[in] LANGID LangId,
|
|
[out] IEnumRfc1766 **ppEnumRfc1766);
|
|
|
|
HRESULT GetRfc1766Info(
|
|
[in] LCID Locale,
|
|
[in] LANGID LangId,
|
|
[out] PRFC1766INFO pRfc1766Info);
|
|
|
|
HRESULT CreateConvertCharset(
|
|
[in] UINT uiSrcCodePage,
|
|
[in] UINT uiDstCodePage,
|
|
[in] DWORD dwProperty,
|
|
[out] IMLangConvertCharset **ppMLangConvertCharset);
|
|
|
|
HRESULT ConvertStringInIStream(
|
|
[in,out] DWORD *pdwMode,
|
|
[in] DWORD dwFlag,
|
|
[in] WCHAR *lpFallBack,
|
|
[in] DWORD dwSrcEncoding,
|
|
[in] DWORD dwDstEncoding,
|
|
[in] IStream *pstmIn,
|
|
[in] IStream *pstmOut);
|
|
|
|
HRESULT ConvertStringToUnicodeEx(
|
|
[in,out] DWORD *pdwMode,
|
|
[in] DWORD dwEncoding,
|
|
[in] CHAR *pSrcStr,
|
|
[in,out] UINT *pcSrcSize,
|
|
[in] WCHAR *pDstStr,
|
|
[in,out] UINT *pcDstSize,
|
|
[in] DWORD dwFlag,
|
|
[in] WCHAR *lpFallBack);
|
|
|
|
HRESULT DetectCodepageInIStream(
|
|
[in] DWORD dwFlag,
|
|
[in] DWORD dwPrefWinCodePage,
|
|
[in] IStream *pstmIn,
|
|
[in,out] DetectEncodingInfo *lpEncoding,
|
|
[in,out] INT *pnScores);
|
|
|
|
HRESULT DetectInputCodepage(
|
|
[in] DWORD dwFlag,
|
|
[in] DWORD dwPrefWinCodePage,
|
|
[in] CHAR *pSrcStr,
|
|
[in,out] INT *pcSrcSize,
|
|
[in,out] DetectEncodingInfo *lpEncoding,
|
|
[in,out] INT *pnScores);
|
|
|
|
HRESULT ValidateCodePage(
|
|
[in] UINT uiCodePage,
|
|
[in] HWND hwnd);
|
|
|
|
HRESULT GetCodePageDescription(
|
|
[in] UINT uiCodePage,
|
|
[in] LCID lcid,
|
|
[in,out] LPWSTR lpWideCharStr,
|
|
[in] int cchWideChar);
|
|
|
|
HRESULT IsCodePageInstallable(
|
|
[in] UINT uiCodePage);
|
|
|
|
HRESULT SetMimeDBSource(
|
|
[in] MIMECONTF dwSource);
|
|
|
|
HRESULT GetNumberOfScripts(
|
|
[out] UINT *pnScripts);
|
|
|
|
HRESULT EnumScripts(
|
|
[in] DWORD dwFlags,
|
|
[in] LANGID LangId,
|
|
[out] IEnumScript **ppEnumScript);
|
|
|
|
HRESULT ValidateCodePageEx( /* undocumented on MSDN */
|
|
[in] UINT uiCodePage,
|
|
[in] HWND hwnd,
|
|
[in] DWORD dwfIODControl);
|
|
};
|