ReactOS  0.4.15-dev-3331-g8ebe441
CFontsFolder.h
Go to the documentation of this file.
1 /*
2  * Fonts folder
3  *
4  * Copyright 2008 Johannes Anderwald <johannes.anderwald@reactos.org>
5  * Copyright 2009 Andrew Hill
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20  */
21 
22 #ifndef _SHFLDR_FONTS_H_
23 #define _SHFLDR_FONTS_H_
24 
25 class CFontsFolder :
26  public CComCoClass<CFontsFolder, &CLSID_FontsFolderShortcut>,
27  public CComObjectRootEx<CComMultiThreadModelNoCS>,
28  public IShellFolder2,
29  public IPersistFolder2
30 {
31  private:
32  CComPtr<IShellFolder2> m_pisfInner;
34  public:
35  CFontsFolder();
36  ~CFontsFolder();
37 
38  // IShellFolder
39  virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes);
40  virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList);
41  virtual HRESULT WINAPI BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
42  virtual HRESULT WINAPI BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
44  virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut);
45  virtual HRESULT WINAPI GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut);
46  virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut);
48  virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut);
49 
50  /* ShellFolder2 */
51  virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid);
52  virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum);
53  virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay);
54  virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags);
55  virtual HRESULT WINAPI GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv);
56  virtual HRESULT WINAPI GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd);
58 
59  // IPersist
60  virtual HRESULT WINAPI GetClassID(CLSID *lpClassId);
61 
62  // IPersistFolder
64 
65  // IPersistFolder2
67 
70 
72 
74  COM_INTERFACE_ENTRY_IID(IID_IShellFolder2, IShellFolder2)
75  COM_INTERFACE_ENTRY_IID(IID_IShellFolder, IShellFolder)
76  COM_INTERFACE_ENTRY_IID(IID_IPersistFolder, IPersistFolder)
77  COM_INTERFACE_ENTRY_IID(IID_IPersistFolder2, IPersistFolder2)
79  END_COM_MAP()
80 };
81 
82 #endif /* _SHFLDR_FONTS_H_ */
virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum)
virtual HRESULT WINAPI GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv)
virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid)
#define REFIID
Definition: guiddef.h:118
virtual HRESULT WINAPI GetCurFolder(PIDLIST_ABSOLUTE *pidl)
virtual HRESULT WINAPI BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut)
interface IBindCtx * LPBC
Definition: objfwd.h:18
virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid)
virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut)
REFIID riid
Definition: precomp.h:44
virtual HRESULT WINAPI BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
const GUID IID_IPersist
Definition: proxy.cpp:14
virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags)
_In_ LPCSTR lpName
Definition: winbase.h:2768
const ITEMID_CHILD UNALIGNED * PCUITEMID_CHILD
Definition: shtypes.idl:70
#define DECLARE_NOT_AGGREGATABLE(x)
Definition: atlcom.h:612
CComPtr< IShellFolder2 > m_pisfInner
Definition: CFontsFolder.h:32
virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList)
static LPOLESTR
Definition: stg_prop.c:27
virtual HRESULT WINAPI GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd)
virtual HRESULT WINAPI GetClassID(CLSID *lpClassId)
const PCUITEMID_CHILD * PCUITEMID_CHILD_ARRAY
Definition: shtypes.idl:71
LONG_PTR LPARAM
Definition: windef.h:208
virtual HRESULT WINAPI Initialize(PCIDLIST_ABSOLUTE pidl)
LPITEMIDLIST m_pidlInner
Definition: CFontsFolder.h:33
#define BEGIN_COM_MAP(x)
Definition: atlcom.h:542
virtual HRESULT WINAPI GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet)
LONG HRESULT
Definition: typedefs.h:79
#define WINAPI
Definition: msvc.h:6
unsigned long DWORD
Definition: ntddk_ex.h:95
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes)
#define DECLARE_REGISTRY_RESOURCEID(x)
Definition: atlcom.h:606
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition: atlcom.h:562
unsigned int UINT
Definition: ndis.h:50
#define DECLARE_PROTECT_FINAL_CONSTRUCT()
Definition: atlcom.h:640
virtual HRESULT WINAPI GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut)
const ITEMIDLIST_RELATIVE UNALIGNED * PCUIDLIST_RELATIVE
Definition: shtypes.idl:57
unsigned int ULONG
Definition: retypes.h:1
#define IDR_FONTSFOLDERSHORTCUT
Definition: shresdef.h:853
virtual HRESULT WINAPI CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2)
#define END_COM_MAP()
Definition: atlcom.h:553
virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay)
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
LPARAM lParam
Definition: combotst.c:139
virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT *prgfInOut, LPVOID *ppvOut)