1d9e7c48cSMark Jansen #ifndef FONTEXT_PRECOMP_H
2d9e7c48cSMark Jansen #define FONTEXT_PRECOMP_H
3d9e7c48cSMark Jansen
4d9e7c48cSMark Jansen
5d9e7c48cSMark Jansen #define WIN32_NO_STATUS
6d9e7c48cSMark Jansen #define COM_NO_WINDOWS_H
7d9e7c48cSMark Jansen
8d9e7c48cSMark Jansen #include <windef.h>
9d9e7c48cSMark Jansen #include <winbase.h>
10d9e7c48cSMark Jansen #include <winreg.h>
11d9e7c48cSMark Jansen #include <shlobj.h>
12d9e7c48cSMark Jansen #include <shlwapi.h>
13d9e7c48cSMark Jansen #include <tchar.h>
14d9e7c48cSMark Jansen #include <strsafe.h>
15d9e7c48cSMark Jansen #include <atlbase.h>
16d9e7c48cSMark Jansen #include <atlcom.h>
17d9e7c48cSMark Jansen #include <atlcoll.h>
18d9e7c48cSMark Jansen #include <atlstr.h>
19d9e7c48cSMark Jansen #include <wine/debug.h>
20d9e7c48cSMark Jansen #include <shellutils.h>
21d9e7c48cSMark Jansen
22d9e7c48cSMark Jansen extern const GUID CLSID_CFontExt;
23d9e7c48cSMark Jansen extern LONG g_ModuleRefCnt;
24d9e7c48cSMark Jansen
25d9e7c48cSMark Jansen #include "resource.h"
26d9e7c48cSMark Jansen #include "fontpidl.hpp"
27d9e7c48cSMark Jansen #include "CFontCache.hpp"
28d9e7c48cSMark Jansen #include "CFontExt.hpp"
29d9e7c48cSMark Jansen
30*c214c049SKatayama Hirofumi MZ #define FONT_HIVE HKEY_LOCAL_MACHINE
31*c214c049SKatayama Hirofumi MZ #define FONT_KEY L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts"
32d9e7c48cSMark Jansen
33d9e7c48cSMark Jansen HRESULT _CEnumFonts_CreateInstance(CFontExt* zip, DWORD flags, REFIID riid, LPVOID* ppvOut);
34d9e7c48cSMark Jansen HRESULT _CFontMenu_CreateInstance(HWND hwnd, UINT cidl, PCUITEMID_CHILD_ARRAY apidl,
35d9e7c48cSMark Jansen IShellFolder *psf, REFIID riid, LPVOID* ppvOut);
36d9e7c48cSMark Jansen HRESULT _CDataObject_CreateInstance(PCIDLIST_ABSOLUTE folder, UINT cidl, PCUITEMID_CHILD_ARRAY apidl,
37d9e7c48cSMark Jansen REFIID riid, LPVOID* ppvOut);
38d9e7c48cSMark Jansen
IsFontDotExt(LPCWSTR pchDotExt)39*c214c049SKatayama Hirofumi MZ inline BOOL IsFontDotExt(LPCWSTR pchDotExt)
40*c214c049SKatayama Hirofumi MZ {
41*c214c049SKatayama Hirofumi MZ static const LPCWSTR array[] =
42*c214c049SKatayama Hirofumi MZ {
43*c214c049SKatayama Hirofumi MZ L".ttf", L".ttc", L".otf", L".otc", L".fon", L".fnt", NULL
44*c214c049SKatayama Hirofumi MZ };
45*c214c049SKatayama Hirofumi MZ for (const LPCWSTR *pp = array; *pp; ++pp)
46*c214c049SKatayama Hirofumi MZ {
47*c214c049SKatayama Hirofumi MZ if (!_wcsicmp(*pp, pchDotExt))
48*c214c049SKatayama Hirofumi MZ return TRUE;
49*c214c049SKatayama Hirofumi MZ }
50*c214c049SKatayama Hirofumi MZ return FALSE;
51*c214c049SKatayama Hirofumi MZ }
52d9e7c48cSMark Jansen
53d9e7c48cSMark Jansen #endif /* FONTEXT_PRECOMP_H */
54