1c2c66affSColin Finck /*
2c2c66affSColin Finck  * Fonts folder
3c2c66affSColin Finck  *
4c2c66affSColin Finck  * Copyright 2008       Johannes Anderwald <johannes.anderwald@reactos.org>
5c2c66affSColin Finck  * Copyright 2009       Andrew Hill
6c2c66affSColin Finck  *
7c2c66affSColin Finck  * This library is free software; you can redistribute it and/or
8c2c66affSColin Finck  * modify it under the terms of the GNU Lesser General Public
9c2c66affSColin Finck  * License as published by the Free Software Foundation; either
10c2c66affSColin Finck  * version 2.1 of the License, or (at your option) any later version.
11c2c66affSColin Finck  *
12c2c66affSColin Finck  * This library is distributed in the hope that it will be useful,
13c2c66affSColin Finck  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14c2c66affSColin Finck  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15c2c66affSColin Finck  * Lesser General Public License for more details.
16c2c66affSColin Finck  *
17c2c66affSColin Finck  * You should have received a copy of the GNU Lesser General Public
18c2c66affSColin Finck  * License along with this library; if not, write to the Free Software
19c2c66affSColin Finck  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20c2c66affSColin Finck  */
21c2c66affSColin Finck 
22c2c66affSColin Finck #ifndef _SHFLDR_FONTS_H_
23c2c66affSColin Finck #define _SHFLDR_FONTS_H_
24c2c66affSColin Finck 
25c2c66affSColin Finck class CFontsFolder :
26c2c66affSColin Finck     public CComCoClass<CFontsFolder, &CLSID_FontsFolderShortcut>,
27c2c66affSColin Finck     public CComObjectRootEx<CComMultiThreadModelNoCS>,
28c2c66affSColin Finck     public IShellFolder2,
29c2c66affSColin Finck     public IPersistFolder2
30c2c66affSColin Finck {
31c2c66affSColin Finck     private:
32c2c66affSColin Finck         CComPtr<IShellFolder2> m_pisfInner;
33c2c66affSColin Finck         LPITEMIDLIST m_pidlInner;
34c2c66affSColin Finck     public:
35c2c66affSColin Finck         CFontsFolder();
36c2c66affSColin Finck         ~CFontsFolder();
37c2c66affSColin Finck 
38c2c66affSColin Finck         // IShellFolder
39*49b2b1daSKatayama Hirofumi MZ         STDMETHOD(ParseDisplayName)(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes) override;
40*49b2b1daSKatayama Hirofumi MZ         STDMETHOD(EnumObjects)(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList) override;
41*49b2b1daSKatayama Hirofumi MZ         STDMETHOD(BindToObject)(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) override;
42*49b2b1daSKatayama Hirofumi MZ         STDMETHOD(BindToStorage)(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) override;
43*49b2b1daSKatayama Hirofumi MZ         STDMETHOD(CompareIDs)(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2) override;
44*49b2b1daSKatayama Hirofumi MZ         STDMETHOD(CreateViewObject)(HWND hwndOwner, REFIID riid, LPVOID *ppvOut) override;
45*49b2b1daSKatayama Hirofumi MZ         STDMETHOD(GetAttributesOf)(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut) override;
46*49b2b1daSKatayama Hirofumi MZ         STDMETHOD(GetUIObjectOf)(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) override;
47*49b2b1daSKatayama Hirofumi MZ         STDMETHOD(GetDisplayNameOf)(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet) override;
48*49b2b1daSKatayama Hirofumi MZ         STDMETHOD(SetNameOf)(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut) override;
49c2c66affSColin Finck 
50c2c66affSColin Finck         /* ShellFolder2 */
51*49b2b1daSKatayama Hirofumi MZ         STDMETHOD(GetDefaultSearchGUID)(GUID *pguid) override;
52*49b2b1daSKatayama Hirofumi MZ         STDMETHOD(EnumSearches)(IEnumExtraSearch **ppenum) override;
53*49b2b1daSKatayama Hirofumi MZ         STDMETHOD(GetDefaultColumn)(DWORD dwRes, ULONG *pSort, ULONG *pDisplay) override;
54*49b2b1daSKatayama Hirofumi MZ         STDMETHOD(GetDefaultColumnState)(UINT iColumn, DWORD *pcsFlags) override;
55*49b2b1daSKatayama Hirofumi MZ         STDMETHOD(GetDetailsEx)(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv) override;
56*49b2b1daSKatayama Hirofumi MZ         STDMETHOD(GetDetailsOf)(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd) override;
57*49b2b1daSKatayama Hirofumi MZ         STDMETHOD(MapColumnToSCID)(UINT column, SHCOLUMNID *pscid) override;
58c2c66affSColin Finck 
59c2c66affSColin Finck         // IPersist
60*49b2b1daSKatayama Hirofumi MZ         STDMETHOD(GetClassID)(CLSID *lpClassId) override;
61c2c66affSColin Finck 
62c2c66affSColin Finck         // IPersistFolder
63*49b2b1daSKatayama Hirofumi MZ         STDMETHOD(Initialize)(PCIDLIST_ABSOLUTE pidl) override;
64c2c66affSColin Finck 
65c2c66affSColin Finck         // IPersistFolder2
66*49b2b1daSKatayama Hirofumi MZ         STDMETHOD(GetCurFolder)(PIDLIST_ABSOLUTE *pidl) override;
67c2c66affSColin Finck 
68c2c66affSColin Finck         DECLARE_REGISTRY_RESOURCEID(IDR_FONTSFOLDERSHORTCUT)
69c2c66affSColin Finck         DECLARE_NOT_AGGREGATABLE(CFontsFolder)
70c2c66affSColin Finck 
71c2c66affSColin Finck         DECLARE_PROTECT_FINAL_CONSTRUCT()
72c2c66affSColin Finck 
73c2c66affSColin Finck         BEGIN_COM_MAP(CFontsFolder)
74c2c66affSColin Finck         COM_INTERFACE_ENTRY_IID(IID_IShellFolder2, IShellFolder2)
75c2c66affSColin Finck         COM_INTERFACE_ENTRY_IID(IID_IShellFolder, IShellFolder)
76c2c66affSColin Finck         COM_INTERFACE_ENTRY_IID(IID_IPersistFolder, IPersistFolder)
77c2c66affSColin Finck         COM_INTERFACE_ENTRY_IID(IID_IPersistFolder2, IPersistFolder2)
78c2c66affSColin Finck         COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist)
79c2c66affSColin Finck         END_COM_MAP()
80c2c66affSColin Finck };
81c2c66affSColin Finck 
82c2c66affSColin Finck #endif /* _SHFLDR_FONTS_H_ */
83