2002-07-24 03:56:03 +02:00
|
|
|
/*
|
|
|
|
* Virtual Folder
|
|
|
|
* common definitions
|
|
|
|
*
|
|
|
|
* Copyright 1997 Marcus Meissner
|
|
|
|
* Copyright 1998, 1999, 2002 Juergen Schmied
|
|
|
|
*
|
|
|
|
* 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
|
2004-01-20 02:26:39 +01:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2002-07-24 03:56:03 +02:00
|
|
|
* 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
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2002-07-24 03:56:03 +02:00
|
|
|
*/
|
|
|
|
|
2017-09-25 09:59:36 +02:00
|
|
|
#include "stgprop.h"
|
|
|
|
|
2004-09-28 21:33:44 +02:00
|
|
|
#define CHARS_IN_GUID 39
|
|
|
|
|
2002-07-24 03:56:03 +02:00
|
|
|
typedef struct {
|
2017-09-25 09:59:36 +02:00
|
|
|
const GUID *fmtid;
|
|
|
|
DWORD pid;
|
2002-07-24 03:56:03 +02:00
|
|
|
int colnameid;
|
|
|
|
int pcsFlags;
|
|
|
|
int fmt;
|
|
|
|
int cxChar;
|
|
|
|
} shvheader;
|
|
|
|
|
2011-04-26 19:23:52 +02:00
|
|
|
HRESULT SHELL32_GetColumnDetails(const shvheader *data, int column, SHELLDETAILS *details) DECLSPEC_HIDDEN;
|
2017-09-25 09:59:36 +02:00
|
|
|
HRESULT shellfolder_map_column_to_scid(const shvheader *data, UINT column, SHCOLUMNID *scid) DECLSPEC_HIDDEN;
|
2021-09-10 18:50:19 +02:00
|
|
|
HRESULT shellfolder_get_file_details(IShellFolder2 *iface, LPCITEMIDLIST pidl, const shvheader *header,
|
|
|
|
int column, SHELLDETAILS *psd) DECLSPEC_HIDDEN;
|
2010-04-18 16:04:25 +02:00
|
|
|
|
2002-07-24 03:56:03 +02:00
|
|
|
#define GET_SHGDN_FOR(dwFlags) ((DWORD)dwFlags & (DWORD)0x0000FF00)
|
|
|
|
#define GET_SHGDN_RELATION(dwFlags) ((DWORD)dwFlags & (DWORD)0x000000FF)
|
|
|
|
|
2011-04-26 19:23:52 +02:00
|
|
|
BOOL SHELL32_GetCustomFolderAttribute (LPCITEMIDLIST pidl, LPCWSTR pwszHeading, LPCWSTR pwszAttribute, LPWSTR pwszValue, DWORD cchValue) DECLSPEC_HIDDEN;
|
2004-09-28 21:33:44 +02:00
|
|
|
|
2011-04-26 19:23:52 +02:00
|
|
|
LPCWSTR GetNextElementW (LPCWSTR pszNext, LPWSTR pszOut, DWORD dwOut) DECLSPEC_HIDDEN;
|
2003-09-16 00:16:41 +02:00
|
|
|
HRESULT SHELL32_ParseNextElement (IShellFolder2 * psf, HWND hwndOwner, LPBC pbc, LPITEMIDLIST * pidlInOut,
|
2011-04-26 19:23:52 +02:00
|
|
|
LPOLESTR szNext, DWORD * pEaten, DWORD * pdwAttributes) DECLSPEC_HIDDEN;
|
2016-11-27 15:01:48 +01:00
|
|
|
HRESULT SHELL32_GetItemAttributes (IShellFolder2 *folder, LPCITEMIDLIST pidl, DWORD *attributes) DECLSPEC_HIDDEN;
|
2006-01-16 21:31:10 +01:00
|
|
|
HRESULT SHELL32_GetDisplayNameOfChild (IShellFolder2 * psf, LPCITEMIDLIST pidl, DWORD dwFlags, LPWSTR szOut,
|
2011-04-26 19:23:52 +02:00
|
|
|
DWORD dwOutLen) DECLSPEC_HIDDEN;
|
2002-07-24 03:56:03 +02:00
|
|
|
|
2021-09-15 09:53:56 +02:00
|
|
|
HRESULT SHELL32_BindToChild (LPCITEMIDLIST pidlRoot, const CLSID *clsidChild,
|
2011-04-26 19:23:52 +02:00
|
|
|
LPCWSTR pathRoot, LPCITEMIDLIST pidlComplete, REFIID riid, LPVOID * ppvOut) DECLSPEC_HIDDEN;
|
2002-07-24 03:56:03 +02:00
|
|
|
|
2013-02-25 23:46:57 +01:00
|
|
|
HRESULT SHELL32_CompareIDs(IShellFolder2 *iface, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) DECLSPEC_HIDDEN;
|
2011-04-26 19:23:52 +02:00
|
|
|
LPITEMIDLIST SHELL32_CreatePidlFromBindCtx(IBindCtx *pbc, LPCWSTR path) DECLSPEC_HIDDEN;
|
2003-12-30 20:24:22 +01:00
|
|
|
|
2021-09-16 17:16:57 +02:00
|
|
|
BOOL is_trash_available(void) DECLSPEC_HIDDEN;
|
|
|
|
BOOL trash_file( const WCHAR *path ) DECLSPEC_HIDDEN;
|
|
|
|
|
2004-01-20 02:26:39 +01:00
|
|
|
static inline int SHELL32_GUIDToStringA (REFGUID guid, LPSTR str)
|
2003-12-30 20:24:22 +01:00
|
|
|
{
|
2022-01-31 14:13:15 +01:00
|
|
|
return sprintf(str, "{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
|
2003-12-30 20:24:22 +01:00
|
|
|
guid->Data1, guid->Data2, guid->Data3,
|
|
|
|
guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3],
|
|
|
|
guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7]);
|
|
|
|
}
|
2004-01-20 00:54:55 +01:00
|
|
|
|
2005-03-02 11:16:41 +01:00
|
|
|
static inline int SHELL32_GUIDToStringW (REFGUID guid, LPWSTR str)
|
|
|
|
{
|
|
|
|
static const WCHAR fmtW[] =
|
|
|
|
{ '{','%','0','8','l','x','-','%','0','4','x','-','%','0','4','x','-',
|
|
|
|
'%','0','2','x','%','0','2','x','-',
|
|
|
|
'%','0','2','x','%','0','2','x','%','0','2','x','%','0','2','x',
|
|
|
|
'%','0','2','x','%','0','2','x','}',0 };
|
2021-09-17 17:16:11 +02:00
|
|
|
return swprintf(str, CHARS_IN_GUID, fmtW,
|
2005-03-02 11:16:41 +01:00
|
|
|
guid->Data1, guid->Data2, guid->Data3,
|
|
|
|
guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3],
|
|
|
|
guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7]);
|
|
|
|
}
|
|
|
|
|
2011-04-26 19:23:52 +02:00
|
|
|
void SHELL_FS_ProcessDisplayFilename(LPWSTR szPath, DWORD dwFlags) DECLSPEC_HIDDEN;
|
2006-06-09 21:10:25 +02:00
|
|
|
|
|
|
|
DEFINE_GUID( CLSID_UnixFolder, 0xcc702eb2, 0x7dc5, 0x11d9, 0xc6, 0x87, 0x00, 0x04, 0x23, 0x8a, 0x01, 0xcd );
|
|
|
|
DEFINE_GUID( CLSID_UnixDosFolder, 0x9d20aae8, 0x0625, 0x44b0, 0x9c, 0xa7, 0x71, 0x88, 0x9c, 0x22, 0x54, 0xd9 );
|