mirror of
https://github.com/reactos/reactos.git
synced 2024-11-20 14:30:57 +00:00
527f2f9057
* Create a branch for some evul shell experiments. svn path=/branches/shell-experiments/; revision=61927
95 lines
4.6 KiB
C++
95 lines
4.6 KiB
C++
/*
|
|
* Fonts folder
|
|
*
|
|
* Copyright 2008 Johannes Anderwald <johannes.anderwald@reactos.org>
|
|
* Copyright 2009 Andrew Hill
|
|
*
|
|
* 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
*/
|
|
|
|
#ifndef _SHFLDR_FONTS_H_
|
|
#define _SHFLDR_FONTS_H_
|
|
|
|
class CFontsFolder :
|
|
public CComCoClass<CFontsFolder, &CLSID_FontsFolderShortcut>,
|
|
public CComObjectRootEx<CComMultiThreadModelNoCS>,
|
|
public IShellFolder2,
|
|
public IPersistFolder2,
|
|
public IContextMenu2
|
|
{
|
|
private:
|
|
/* both paths are parsible from the desktop */
|
|
LPITEMIDLIST pidlRoot; /* absolute pidl */
|
|
LPCITEMIDLIST apidl; /* currently focused font item */
|
|
public:
|
|
CFontsFolder();
|
|
~CFontsFolder();
|
|
HRESULT WINAPI FinalConstruct();
|
|
|
|
// IShellFolder
|
|
virtual HRESULT WINAPI ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, LPITEMIDLIST *ppidl, DWORD *pdwAttributes);
|
|
virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList);
|
|
virtual HRESULT WINAPI BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
|
virtual HRESULT WINAPI BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
|
|
virtual HRESULT WINAPI CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2);
|
|
virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut);
|
|
virtual HRESULT WINAPI GetAttributesOf (UINT cidl, LPCITEMIDLIST *apidl, DWORD *rgfInOut);
|
|
virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut);
|
|
virtual HRESULT WINAPI GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet);
|
|
virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST *pPidlOut);
|
|
|
|
/* ShellFolder2 */
|
|
virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid);
|
|
virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum);
|
|
virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay);
|
|
virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags);
|
|
virtual HRESULT WINAPI GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv);
|
|
virtual HRESULT WINAPI GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd);
|
|
virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid);
|
|
|
|
// IPersist
|
|
virtual HRESULT WINAPI GetClassID(CLSID *lpClassId);
|
|
|
|
// IPersistFolder
|
|
virtual HRESULT WINAPI Initialize(LPCITEMIDLIST pidl);
|
|
|
|
// IPersistFolder2
|
|
virtual HRESULT WINAPI GetCurFolder(LPITEMIDLIST *pidl);
|
|
|
|
// IContextMenu
|
|
virtual HRESULT WINAPI QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags);
|
|
virtual HRESULT WINAPI InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi);
|
|
virtual HRESULT WINAPI GetCommandString(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen);
|
|
|
|
// IContextMenu2
|
|
virtual HRESULT WINAPI HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
DECLARE_REGISTRY_RESOURCEID(IDR_FONTSFOLDERSHORTCUT)
|
|
DECLARE_NOT_AGGREGATABLE(CFontsFolder)
|
|
|
|
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
|
|
|
BEGIN_COM_MAP(CFontsFolder)
|
|
COM_INTERFACE_ENTRY_IID(IID_IShellFolder2, IShellFolder2)
|
|
COM_INTERFACE_ENTRY_IID(IID_IShellFolder, IShellFolder)
|
|
COM_INTERFACE_ENTRY_IID(IID_IPersistFolder, IPersistFolder)
|
|
COM_INTERFACE_ENTRY_IID(IID_IPersistFolder2, IPersistFolder2)
|
|
COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist)
|
|
COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu)
|
|
COM_INTERFACE_ENTRY_IID(IID_IContextMenu2, IContextMenu2)
|
|
END_COM_MAP()
|
|
};
|
|
|
|
#endif /* _SHFLDR_FONTS_H_ */
|