4 #pragma GCC system_header
14 #define MAX_MIMECP_NAME 64
15 #define MAX_MIMECSET_NAME 50
16 #define MAX_SCRIPT_NAME 48
17 #define MAX_MIMEFACE_NAME 32
18 #define MAX_RFC1766_NAME 6
19 #define MAX_LOCALE_NAME 32
21 typedef enum tagMIMECONTF
{
22 MIMECONTF_MAILNEWS
= 0x00000001,
23 MIMECONTF_BROWSER
= 0x00000002,
24 MIMECONTF_MINIMAL
= 0x00000004,
25 MIMECONTF_IMPORT
= 0x00000008,
26 MIMECONTF_SAVABLE_MAILNEWS
= 0x00000100,
27 MIMECONTF_SAVABLE_BROWSER
= 0x00000200,
28 MIMECONTF_EXPORT
= 0x00000400,
29 MIMECONTF_PRIVCONVERTER
= 0x00010000,
30 MIMECONTF_VALID
= 0x00020000,
31 MIMECONTF_VALID_NLS
= 0x00040000,
32 MIMECONTF_MIME_IE4
= 0x10000000,
33 MIMECONTF_MIME_LATEST
= 0x20000000,
34 MIMECONTF_MIME_REGISTRY
= 0x40000000
36 typedef enum tagMLCONVCHARF
{
38 MLCONVCHARF_AUTODETECT
= 1,
39 MLCONVCHARF_NCR_ENTITIZE
= 2,
40 MLCONVCHARF_NAME_ENTITIZE
= 4,
41 MLCONVCHARF_USEDEFCHAR
= 8,
42 MLCONVCHARF_NOBESTFITCHARS
= 16
44 typedef enum tagMLCPF
{
45 MLDETECTF_MAILNEWS
= 0x0001,
46 MLDETECTF_BROWSER
= 0x0002,
47 MLDETECTF_VALID
= 0x0004,
48 MLDETECTF_VALID_NLS
= 0x0008,
49 MLDETECTF_PRESERVE_ORDER
= 0x0010,
50 MLDETECTF_PREFERRED_ONLY
= 0x0020,
51 MLDETECTF_FILTER_SPECIALCHAR
= 0x0040
53 typedef enum tagMLDETECTCP
{
60 typedef enum tagSCRIPTFONTCONTF
{
61 SCRIPTCONTF_FIXED_FONT
= 0x00000001,
62 SCRIPTCONTF_PROPORTIONAL_FONT
= 0x00000002,
63 SCRIPTCONTF_SCRIPT_USER
= 0x00010000,
64 SCRIPTCONTF_SCRIPT_HIDE
= 0x00020000,
65 SCRIPTCONTF_SCRIPT_SYSTEM
= 0x00040000
67 typedef enum tagSCRIPTCONTF
{
109 sidFEFirst
= sidHangul
,
113 typedef struct tagDetectEncodingInfo
{
118 } DetectEncodingInfo
, *pDetectEncodingInfo
;
119 typedef struct tagMIMECPINFO
{
122 UINT uiFamilyCodePage
;
123 WCHAR wszDescription
[MAX_MIMECP_NAME
];
124 WCHAR wszWebCharset
[MAX_MIMECSET_NAME
];
125 WCHAR wszHeaderCharset
[MAX_MIMECSET_NAME
];
126 WCHAR wszBodyCharset
[MAX_MIMECSET_NAME
];
127 WCHAR wszFixedWidthFont
[MAX_MIMEFACE_NAME
];
128 WCHAR wszProportionalFont
[MAX_MIMEFACE_NAME
];
130 } MIMECPINFO
, *PMIMECPINFO
;
131 typedef struct tagMIMECSETINFO
{
133 UINT uiInternetEncoding
;
134 WCHAR wszCharset
[MAX_MIMECSET_NAME
];
135 } MIMECSETINFO
, *PMIMECSETINFO
;
136 typedef struct tagRFC1766INFO
{
138 WCHAR wszRfc1766
[MAX_RFC1766_NAME
];
139 WCHAR wszLocaleName
[MAX_LOCALE_NAME
];
140 } RFC1766INFO
, *PRFC1766INFO
;
141 typedef BYTE SCRIPT_ID
;
142 typedef struct tagSCRIPTINFO
{
145 WCHAR wszDescription
[MAX_SCRIPT_NAME
];
146 WCHAR wszFixedWidthFont
[MAX_MIMEFACE_NAME
];
147 WCHAR wszProportionalFont
[MAX_MIMEFACE_NAME
];
148 } SCRIPTINFO
, *PSCRIPTINFO
;
149 typedef struct tagUNICODERANGE
{
154 typedef struct tagSCRIPTFONTINFO SCRIPTFONTINFO
;
156 EXTERN_C
const IID IID_IEnumCodePage
;
157 #define INTERFACE IEnumCodePage
158 DECLARE_INTERFACE_(IEnumCodePage
,IUnknown
)
160 STDMETHOD(QueryInterface
)(THIS_ REFIID
,PVOID
*) PURE
;
161 STDMETHOD_(ULONG
,AddRef
)(THIS
) PURE
;
162 STDMETHOD_(ULONG
,Release
)(THIS
) PURE
;
163 STDMETHOD(Clone
)(THIS_ IEnumCodePage
**) PURE
;
164 STDMETHOD(Next
)(THIS_ ULONG
,PMIMECPINFO
,ULONG
*) PURE
;
165 STDMETHOD(Reset
)(THIS
) PURE
;
166 STDMETHOD(Skip
)(THIS_ ULONG
) PURE
;
170 EXTERN_C
const IID IID_IEnumRfc1766
;
171 #define INTERFACE IEnumRfc1766
172 DECLARE_INTERFACE_(IEnumRfc1766
,IUnknown
)
174 STDMETHOD(QueryInterface
)(THIS_ REFIID
,PVOID
*) PURE
;
175 STDMETHOD_(ULONG
,AddRef
)(THIS
) PURE
;
176 STDMETHOD_(ULONG
,Release
)(THIS
) PURE
;
177 STDMETHOD(Clone
)(THIS_ IEnumRfc1766
**) PURE
;
178 STDMETHOD(Next
)(THIS_ ULONG
,PRFC1766INFO
,ULONG
*) PURE
;
179 STDMETHOD(Reset
)(THIS
) PURE
;
180 STDMETHOD(Skip
)(THIS_ ULONG
) PURE
;
184 EXTERN_C
const IID IID_IEnumScript
;
185 #define INTERFACE IEnumScript
186 DECLARE_INTERFACE_(IEnumScript
,IUnknown
)
188 STDMETHOD(QueryInterface
)(THIS_ REFIID
,PVOID
*) PURE
;
189 STDMETHOD_(ULONG
,AddRef
)(THIS
) PURE
;
190 STDMETHOD_(ULONG
,Release
)(THIS
) PURE
;
191 STDMETHOD(Clone
)(THIS_ IEnumScript
**) PURE
;
192 STDMETHOD(Next
)(THIS_ ULONG
,PSCRIPTINFO
,ULONG
*) PURE
;
193 STDMETHOD(Reset
)(THIS
) PURE
;
194 STDMETHOD(Skip
)(THIS_ ULONG
) PURE
;
198 EXTERN_C
const IID IID_IMLangCodePages
;
199 #define INTERFACE IMLangCodePages
200 DECLARE_INTERFACE_(IMLangCodePages
,IUnknown
)
202 STDMETHOD(QueryInterface
)(THIS_ REFIID
,PVOID
*) PURE
;
203 STDMETHOD_(ULONG
,AddRef
)(THIS
) PURE
;
204 STDMETHOD_(ULONG
,Release
)(THIS
) PURE
;
205 STDMETHOD(GetCharCodePages
)(THIS_ WCHAR
,DWORD
*) PURE
;
206 STDMETHOD(GetStrCodePages
)(THIS_
const WCHAR
*,long,DWORD
,DWORD
*,long*) PURE
;
207 STDMETHOD(CodePageToCodePages
)(THIS_ UINT
,DWORD
*) PURE
;
208 STDMETHOD(CodePagesToCodePage
)(THIS_ DWORD
,UINT
,UINT
*) PURE
;
212 EXTERN_C
const IID IID_IMLangConvertCharset
;
213 #define INTERFACE IMLangConvertCharset
214 DECLARE_INTERFACE_(IMLangConvertCharset
,IUnknown
)
216 STDMETHOD(QueryInterface
)(THIS_ REFIID
,PVOID
*) PURE
;
217 STDMETHOD_(ULONG
,AddRef
)(THIS
) PURE
;
218 STDMETHOD_(ULONG
,Release
)(THIS
) PURE
;
219 STDMETHOD(Initialize
)(THIS_ UINT
,UINT
,DWORD
) PURE
;
220 STDMETHOD(GetSourceCodePage
)(THIS_ UINT
*) PURE
;
221 STDMETHOD(GetDestinationCodePage
)(THIS_ UINT
*) PURE
;
222 STDMETHOD(GetProperty
)(THIS_ DWORD
*) PURE
;
223 STDMETHOD(DoConversion
)(THIS_ BYTE
*,UINT
*,BYTE
*,UINT
*) PURE
;
224 STDMETHOD(DoConversionToUnicode
)(THIS_ CHAR
*,UINT
*,WCHAR
*,UINT
*) PURE
;
225 STDMETHOD(DoConversionFromUnicode
)(THIS_ WCHAR
*,UINT
*,CHAR
*,UINT
*) PURE
;
228 EXTERN_C
const CLSID CLSID_CMLangConvertCharset
;
230 EXTERN_C
const IID IID_IMLangFontLink
;
231 #define INTERFACE IMLangFontLink
232 DECLARE_INTERFACE_(IMLangFontLink
,IMLangCodePages
)
234 STDMETHOD(QueryInterface
)(THIS_ REFIID
,PVOID
*) PURE
;
235 STDMETHOD_(ULONG
,AddRef
)(THIS
) PURE
;
236 STDMETHOD_(ULONG
,Release
)(THIS
) PURE
;
237 STDMETHOD(GetCharCodePages
)(THIS_ WCHAR
,DWORD
*) PURE
;
238 STDMETHOD(GetStrCodePages
)(THIS_
const WCHAR
*,long,DWORD
,DWORD
*,long*) PURE
;
239 STDMETHOD(CodePageToCodePages
)(THIS_ UINT
,DWORD
*) PURE
;
240 STDMETHOD(CodePagesToCodePage
)(THIS_ DWORD
,UINT
,UINT
*) PURE
;
241 STDMETHOD(GetFontCodePages
)(THIS_ HDC
,HFONT
,DWORD
*) PURE
;
242 STDMETHOD(MapFont
)(THIS_ HDC
,DWORD
,HFONT
,HFONT
*) PURE
;
243 STDMETHOD(ReleaseFont
)(THIS_ HFONT
) PURE
;
244 STDMETHOD(ResetFontMapping
)(THIS
) PURE
;
248 EXTERN_C
const IID IID_IMLangFontLink2
;
249 #define INTERFACE IMLangFontLink2
250 DECLARE_INTERFACE_(IMLangFontLink2
,IMLangCodePages
)
252 STDMETHOD(QueryInterface
)(THIS_ REFIID
,PVOID
*) PURE
;
253 STDMETHOD_(ULONG
,AddRef
)(THIS
) PURE
;
254 STDMETHOD_(ULONG
,Release
)(THIS
) PURE
;
255 STDMETHOD(GetCharCodePages
)(THIS_ WCHAR
,DWORD
*) PURE
;
256 STDMETHOD(GetStrCodePages
)(THIS_
const WCHAR
*,long,DWORD
,DWORD
*,long*) PURE
;
257 STDMETHOD(CodePageToCodePages
)(THIS_ UINT
,DWORD
*) PURE
;
258 STDMETHOD(CodePagesToCodePage
)(THIS_ DWORD
,UINT
,UINT
*) PURE
;
259 STDMETHOD(GetFontCodePages
)(THIS_ HDC
,HFONT
,DWORD
*) PURE
;
260 STDMETHOD(ReleaseFont
)(THIS_ HFONT
) PURE
;
261 STDMETHOD(ResetFontMapping
)(THIS
) PURE
;
262 STDMETHOD(MapFont
)(THIS_ HDC
,DWORD
,WCHAR
,HFONT
*) PURE
;
263 STDMETHOD(GetFontUnicodeRange
)(THIS_ HDC
,UINT
*,UNICODERANGE
*) PURE
;
264 STDMETHOD(GetScriptFontInfo
)(THIS_ SCRIPT_ID
,DWORD
,UINT
*,SCRIPTFONTINFO
*) PURE
;
265 STDMETHOD(CodePageToScriptID
)(THIS
) PURE
;
269 EXTERN_C
const IID IID_IMLangLineBreakConsole
;
270 #define INTERFACE IMLangLineBreakConsole
271 DECLARE_INTERFACE_(IMLangLineBreakConsole
,IMLangCodePages
)
273 STDMETHOD(QueryInterface
)(THIS_ REFIID
,PVOID
*) PURE
;
274 STDMETHOD_(ULONG
,AddRef
)(THIS
) PURE
;
275 STDMETHOD_(ULONG
,Release
)(THIS
) PURE
;
276 STDMETHOD(BreakLineML
)(THIS
) PURE
;
277 STDMETHOD(BreakLineW
)(THIS_ LCID
,const WCHAR
*,long,long,long*,long*) PURE
;
278 STDMETHOD(BreakLineA
)(THIS_ LCID
,UINT
,const CHAR
*,long,long,long*,long*) PURE
;
282 EXTERN_C
const IID IID_IMultiLanguage
;
283 #define INTERFACE IMultiLanguage
284 DECLARE_INTERFACE_(IMultiLanguage
,IUnknown
)
286 STDMETHOD(QueryInterface
)(THIS_ REFIID
,PVOID
*) PURE
;
287 STDMETHOD_(ULONG
,AddRef
)(THIS
) PURE
;
288 STDMETHOD_(ULONG
,Release
)(THIS
) PURE
;
289 STDMETHOD(GetNumberOfCodePageInfo
)(THIS_ UINT
*) PURE
;
290 STDMETHOD(GetCodePageInfo
)(THIS_ UINT
,PMIMECPINFO
) PURE
;
291 STDMETHOD(GetFamilyCodePage
)(THIS_ UINT
,UINT
*) PURE
;
292 STDMETHOD(EnumCodePages
)(THIS_ DWORD
,IEnumCodePage
**) PURE
;
293 STDMETHOD(GetCharsetInfo
)(THIS_ BSTR
,PMIMECSETINFO
) PURE
;
294 STDMETHOD(IsConvertible
)(THIS_ DWORD
,DWORD
) PURE
;
295 STDMETHOD(ConvertString
)(THIS_ DWORD
*,DWORD
,DWORD
,BYTE
*,UINT
*,BYTE
*,UINT
*) PURE
;
296 STDMETHOD(ConvertStringToUnicode
)(THIS_ DWORD
*,DWORD
,CHAR
*,UINT
*,WCHAR
*,UINT
*) PURE
;
297 STDMETHOD(ConvertStringFromUnicode
)(THIS_ DWORD
*,DWORD
,WCHAR
*,UINT
*,CHAR
*,UINT
*) PURE
;
298 STDMETHOD(ConvertStringReset
)(THIS
) PURE
;
299 STDMETHOD(GetRfc1766FromLcid
)(THIS_ LCID
,BSTR
*) PURE
;
300 STDMETHOD(GetLcidFromRfc1766
)(THIS_ LCID
*,BSTR
) PURE
;
301 STDMETHOD(EnumRfc1766
)(THIS_ IEnumRfc1766
**) PURE
;
302 STDMETHOD(GetRfc1766Info
)(THIS_ LCID
,PRFC1766INFO
) PURE
;
303 STDMETHOD(CreateConvertCharset
)(THIS_ UINT
,UINT
,DWORD
,IMLangConvertCharset
**) PURE
;
306 EXTERN_C
const CLSID CLSID_CMultiLanguage
;
308 EXTERN_C
const IID IID_IMultiLanguage2
;
309 #define INTERFACE IMultiLanguage2
310 DECLARE_INTERFACE_(IMultiLanguage2
,IUnknown
)
312 STDMETHOD(QueryInterface
)(THIS_ REFIID
,PVOID
*) PURE
;
313 STDMETHOD_(ULONG
,AddRef
)(THIS
) PURE
;
314 STDMETHOD_(ULONG
,Release
)(THIS
) PURE
;
315 STDMETHOD(GetNumberOfCodePageInfo
)(THIS_ UINT
*) PURE
;
316 STDMETHOD(GetCodePageInfo
)(THIS_ UINT
,PMIMECPINFO
) PURE
;
317 STDMETHOD(GetFamilyCodePage
)(THIS_ UINT
,UINT
*) PURE
;
318 STDMETHOD(EnumCodePages
)(THIS_ DWORD
,IEnumCodePage
**) PURE
;
319 STDMETHOD(GetCharsetInfo
)(THIS_ BSTR
,PMIMECSETINFO
) PURE
;
320 STDMETHOD(IsConvertible
)(THIS_ DWORD
,DWORD
) PURE
;
321 STDMETHOD(ConvertString
)(THIS_ DWORD
*,DWORD
,DWORD
,BYTE
*,UINT
*,BYTE
*,UINT
*) PURE
;
322 STDMETHOD(ConvertStringToUnicode
)(THIS_ DWORD
*,DWORD
,CHAR
*,UINT
*,WCHAR
*,UINT
*) PURE
;
323 STDMETHOD(ConvertStringFromUnicode
)(THIS_ DWORD
*,DWORD
,WCHAR
*,UINT
*,CHAR
*,UINT
*) PURE
;
324 STDMETHOD(ConvertStringReset
)(THIS
) PURE
;
325 STDMETHOD(GetRfc1766FromLcid
)(THIS_ LCID
,BSTR
*) PURE
;
326 STDMETHOD(GetLcidFromRfc1766
)(THIS_ LCID
*,BSTR
) PURE
;
327 STDMETHOD(EnumRfc1766
)(THIS_ IEnumRfc1766
**) PURE
;
328 STDMETHOD(GetRfc1766Info
)(THIS_ LCID
,PRFC1766INFO
) PURE
;
329 STDMETHOD(CreateConvertCharset
)(THIS_ UINT
,UINT
,DWORD
,IMLangConvertCharset
**) PURE
;
330 STDMETHOD(ConvertStringInIStream
)(THIS_ DWORD
*,DWORD
,WCHAR
*,DWORD
,DWORD
,IStream
*,IStream
*) PURE
;
331 STDMETHOD(ConvertStringToUnicodeEx
)(THIS_ DWORD
*,DWORD
,CHAR
*,UINT
*,WCHAR
*,UINT
*,DWORD
,WCHAR
*) PURE
;
332 STDMETHOD(ConvertStringFromUnicodeEx
)(THIS_ DWORD
*,DWORD
,WCHAR
*,UINT
*,CHAR
*,UINT
*,DWORD
,WCHAR
*) PURE
;
333 STDMETHOD(DetectCodepageInIStream
)(THIS_ DWORD
,DWORD
,IStream
*,DetectEncodingInfo
*,INT
*) PURE
;
334 STDMETHOD(DetectInputCodepage
)(THIS_ DWORD
,DWORD
,CHAR
*,INT
*,DetectEncodingInfo
*,INT
*) PURE
;
335 STDMETHOD(ValidateCodePage
)(THIS
) PURE
;
336 STDMETHOD(GetCodePageDescription
)(THIS_ UINT
,LCID
,LPWSTR
,int) PURE
;
337 STDMETHOD(IsCodePageInstallable
)(THIS
) PURE
;
338 STDMETHOD(SetMimeDBSource
)(THIS_ MIMECONTF
) PURE
;
339 STDMETHOD(GetNumberOfScripts
)(THIS_ UINT
*) PURE
;
340 STDMETHOD(EnumScripts
)(THIS_ DWORD
,LANGID
,IEnumScript
**) PURE
;