14#ifndef SHCIDS_ALLFIELDS
15#define SHCIDS_ALLFIELDS 0x80000000L
143 if (curpidl->mkid.cb != 0)
145 ERR(
"ERROR, unhandled PIDL!\n");
156 ERR(
"ERROR, not a font PIDL!\n");
164 ERR(
"Unable to query info about %S\n", fontEntry->
Name);
186 ERR(
"GetDateFormatA failed\n");
196 ERR(
"IDS_COL_ATTR_LETTERS does not contain 5 letters!\n");
257 if (!fontEntry1 || !fontEntry2)
273 if (!info1 || !info2)
275 ERR(
"Unable to find font %S or %S in cache!\n", fontEntry1->
Name, fontEntry2->
Name);
291 result = (
int)info1->FileSize().HighPart - info2->FileSize().HighPart;
293 result = (
int)info1->FileSize().LowPart - info2->FileSize().LowPart;
300 result = (
int)info1->FileAttributes() - info2->FileAttributes();
303 ERR(
"Unimplemented column %u\n",
column);
319 ERR(
"IDropTarget not implemented\n");
326 ERR(
"IContextMenu not implemented\n");
342 if (!rgfInOut || !cidl || !apidl)
346 while (cidl > 0 && *apidl)
352 rgf |= ( SFGAO_HASPROPSHEET | SFGAO_CANCOPY | SFGAO_FILESYSTEM);
371 if (
riid == IID_IContextMenu ||
372 riid == IID_IContextMenu2 ||
373 riid == IID_IContextMenu3)
377 else if (
riid == IID_IExtractIconA ||
riid == IID_IExtractIconW)
393 ERR(
"IID_IExtractIcon with cidl != 1 UNIMPLEMENTED\n");
404 ERR(
"IID_IDataObject with cidl == 0 UNIMPLEMENTED\n");
419 if (curpidl->mkid.cb != 0)
421 ERR(
"ERROR, unhandled PIDL!\n");
434 return SHSetStrRet(strRet,
File);
438 return SHSetStrRet(strRet, fontEntry->
Name);
466 ERR(
"Unable to extract path from pidl\n");
473 ERR(
"Unable to get fonts path (0x%x)\n",
hr);
479 ERR(
"CFontExt View initializing on unexpected folder: '%S'\n", PidlPath);
503 CDataObjectHIDA cida(pDataObj);
525 CDataObjectHIDA cida(pDataObj);
532 ERR(
"pidlParent is NULL\n");
538 for (
UINT n = 0;
n < cida->cidl; ++
n)
547 ERR(
"ILCombine failed\n");
558 ERR(
"SHGetPathFromIDListW failed\n");
565 ERR(
"PathIsDirectory\n");
573 ERR(
"'%S' is not supported\n", pchDotExt);
587 ERR(
"keyFonts.Open failed\n");
591 for (
size_t iItem = 0; iItem < FontPaths.
GetCount(); ++iItem)
622 ERR(
"AddFontResourceW('%S') failed\n", pszFontPath);
635 ERR(
"DoGetFontTitle failed (err=0x%x)!\n",
hr);
645 ERR(
"CopyFileW('%S', '%S') failed\n", pszFontPath, szDestFile);
651 (
const BYTE *)pszFileTitle, cbData);
654 ERR(
"RegSetValueExW failed with %ld\n", nError);
675 LPWSTR pszBuffer = strFontName.GetBuffer(cbInfo /
sizeof(
WCHAR));
678 strFontName.ReleaseBuffer();
685 ERR(
"GetFontResourceInfoW failed (err: %u)\n",
dwErr);
HRESULT _CDataObject_CreateInstance(PCIDLIST_ABSOLUTE folder, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, LPVOID *ppvOut)
HRESULT WINAPI SHCreateShellFolderView(const SFV_CREATE *pcsfv, IShellView **ppsv)
HRESULT _CEnumFonts_CreateInstance(CFontExt *zip, DWORD flags, REFIID riid, LPVOID *ppvOut)
bool GetInterfaceName(const WCHAR *InterfaceString, WCHAR *buf, size_t size)
static FolderViewColumns g_ColumnDefs[]
WCHAR * g2s(REFCLSID iid)
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
EXTERN_C void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2)
size_t Add(INARGTYPE element)
LONG Open(HKEY hKeyParent, LPCTSTR lpszKeyName, REGSAM samDesired=KEY_READ|KEY_WRITE) noexcept
PXSTR GetString() noexcept
int GetLength() const noexcept
BOOL LoadString(_In_ UINT nID)
CStringW Filename(CFontInfo *info, bool alwaysFullPath=false)
CFontInfo * Find(const FontPidlEntry *fontEntry)
const CStringW & FontPath() const
void SetFontDir(const LPCWSTR Path)
virtual STDMETHODIMP GetDefaultColumnState(UINT iColumn, SHCOLSTATEF *pcsFlags)
virtual STDMETHODIMP GetClassID(CLSID *lpClassId)
virtual STDMETHODIMP SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut)
HRESULT DoGetFontTitle(IN LPCWSTR pszFontPath, OUT CStringW &strFontName)
virtual STDMETHODIMP GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd)
CComHeapPtr< ITEMIDLIST > m_Folder
virtual STDMETHODIMP Drop(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
virtual STDMETHODIMP DragLeave()
virtual STDMETHODIMP GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut)
virtual STDMETHODIMP EnumSearches(IEnumExtraSearch **ppenum)
virtual STDMETHODIMP GetDefaultColumn(DWORD dwReserved, ULONG *pSort, ULONG *pDisplay)
virtual STDMETHODIMP Initialize(LPCITEMIDLIST pidl)
virtual STDMETHODIMP GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet)
virtual STDMETHODIMP ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes)
virtual STDMETHODIMP GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv)
virtual STDMETHODIMP GetCurFolder(LPITEMIDLIST *ppidl)
virtual STDMETHODIMP DragOver(DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
HRESULT DoInstallFontFile(LPCWSTR pszFontPath, LPCWSTR pszFontsDir, HKEY hkeyFonts)
virtual STDMETHODIMP EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList)
virtual STDMETHODIMP CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut)
virtual STDMETHODIMP BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
virtual STDMETHODIMP GetDefaultSearchGUID(GUID *lpguid)
virtual STDMETHODIMP CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2)
virtual STDMETHODIMP GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT *prgfInOut, LPVOID *ppvOut)
virtual STDMETHODIMP DragEnter(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
virtual STDMETHODIMP BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
virtual STDMETHODIMP MapColumnToSCID(UINT iColumn, SHCOLUMNID *pscid)
BOOL IsFontDotExt(LPCWSTR pchDotExt)
#define IDS_COL_ATTR_LETTERS
LSTATUS WINAPI RegGetValueW(HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, DWORD dwFlags, LPDWORD pdwType, PVOID pvData, LPDWORD pcbData)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
#define FILE_ATTRIBUTE_NORMAL
#define FAILED_UNEXPECTEDLY(hr)
BOOL WINAPI CopyFileW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName, IN BOOL bFailIfExists)
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
BOOL WINAPI FileTimeToSystemTime(IN CONST FILETIME *lpFileTime, OUT LPSYSTEMTIME lpSystemTime)
LONG WINAPI CompareFileTime(IN CONST FILETIME *lpFileTime1, IN CONST FILETIME *lpFileTime2)
HRESULT WINAPI DECLSPEC_HOTPATCH ProgIDFromCLSID(REFCLSID clsid, LPOLESTR *ppszProgID)
INT WINAPI StringFromGUID2(REFGUID id, LPOLESTR str, INT cmax)
HRESULT WINAPI SHGetFolderPathW(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwFlags, LPWSTR pszPath)
LPWSTR WINAPI PathFindFileNameW(LPCWSTR lpszPath)
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
BOOL WINAPI PathIsDirectoryW(LPCWSTR lpszPath)
LPSTR WINAPI StrFormatKBSizeA(LONGLONG llBytes, LPSTR lpszDest, UINT cchMax)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
const GUID CLSID_CFontExt
const FontPidlEntry * _FontFromIL(LPCITEMIDLIST pidl)
BOOL WINAPI GetFontResourceInfoW(LPCWSTR lpFileName, DWORD *pdwBufSize, void *lpBuffer, DWORD dwType)
GLenum GLuint GLenum GLsizei const GLchar * buf
VOID WINAPI CoTaskMemFree(LPVOID ptr)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
const DWORD DROPEFFECT_NONE
const DWORD DROPEFFECT_COPY
#define ERROR_FILE_NOT_FOUND
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
#define FILE_ATTRIBUTE_READONLY
#define FILE_ATTRIBUTE_COMPRESSED
#define FILE_ATTRIBUTE_HIDDEN
#define FILE_ATTRIBUTE_SYSTEM
#define FILE_ATTRIBUTE_ARCHIVE
#define LOCALE_USER_DEFAULT
interface IBindCtx * LPBC
const GUID IID_IDataObject
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
void WINAPI ILFree(LPITEMIDLIST pidl)
LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
LPITEMIDLIST WINAPI ILGetNext(LPCITEMIDLIST pidl)
#define IsEqualIID(riid1, riid2)
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
static PCUIDLIST_RELATIVE HIDA_GetPIDLItem(CIDA const *pida, SIZE_T i)
static PCUIDLIST_ABSOLUTE HIDA_GetPIDLFolder(CIDA const *pida)
#define MAKE_COMPARE_HRESULT(x)
struct _SFV_CREATE SFV_CREATE
ITEMIDLIST UNALIGNED * LPITEMIDLIST
const ITEMIDLIST_ABSOLUTE UNALIGNED * PCUIDLIST_ABSOLUTE
const PCUITEMID_CHILD * PCUITEMID_CHILD_ARRAY
const ITEMID_CHILD UNALIGNED * PCUITEMID_CHILD
const ITEMIDLIST_RELATIVE UNALIGNED * PCUIDLIST_RELATIVE
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
STRSAFEAPI StringCchCatW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
DWORD WINAPI GetLastError(void)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
#define HRESULT_FROM_WIN32(x)
int WINAPI AddFontResourceW(_In_ LPCWSTR pszFilename)
BOOL WINAPI RemoveFontResourceW(_In_ LPCWSTR)
#define HKEY_CLASSES_ROOT
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define IID_PPV_ARG(Itype, ppType)