2 * Defines the COM interfaces and APIs related to IShellFolder
4 * Depends on 'obj_base.h'.
7 #ifndef __WINE_WINE_OBJ_SHELLFOLDER_H
8 #define __WINE_WINE_OBJ_SHELLFOLDER_H
10 #include "wine/obj_base.h"
11 #include "wine/obj_moniker.h" /* for LPBC */
12 #include "wine/obj_enumidlist.h"
16 /****************************************************************************
17 * STRRET (temporary, move it away)
19 #define STRRET_WSTR 0x0000
20 #define STRRET_OFFSETA 0x0001
21 #define STRRET_CSTRA 0x0002
22 #define STRRET_ASTR 0X0003
23 #define STRRET_OFFSETW 0X0004
24 #define STRRET_CSTRW 0X0005
27 typedef struct _STRRET
28 { UINT uType; /* STRRET_xxx */
30 { LPWSTR pOleStr; /* OLESTR that will be freed */
32 UINT uOffset; /* OffsetINT32o SHITEMID (ANSI) */
33 char cStr[MAX_PATH]; /* Buffer to fill in */
34 WCHAR cStrW[MAX_PATH];
38 /*****************************************************************************
39 * Predeclare the interfaces
41 DEFINE_SHLGUID(IID_IShellFolder, 0x000214E6L, 0, 0);
42 typedef struct IShellFolder IShellFolder, *LPSHELLFOLDER;
44 DEFINE_SHLGUID(IID_IPersistFolder, 0x000214EAL, 0, 0);
45 typedef struct IPersistFolder IPersistFolder, *LPPERSISTFOLDER;
48 /*****************************************************************************
49 * IShellFolder::GetDisplayNameOf/SetNameOf uFlags
52 { SHGDN_NORMAL = 0, /* default (display purpose) */
53 SHGDN_INFOLDER = 1, /* displayed under a folder (relative)*/
54 SHGDN_FORPARSING = 0x8000 /* for ParseDisplayName or path */
57 /*****************************************************************************
58 * IShellFolder::EnumObjects
60 typedef enum tagSHCONTF
61 { SHCONTF_FOLDERS = 32, /* for shell browser */
62 SHCONTF_NONFOLDERS = 64, /* for default view */
63 SHCONTF_INCLUDEHIDDEN = 128 /* for hidden/system objects */
66 /*****************************************************************************
67 * IShellFolder::GetAttributesOf flags
69 #define SFGAO_CANCOPY DROPEFFECT_COPY /* Objects can be copied */
70 #define SFGAO_CANMOVE DROPEFFECT_MOVE /* Objects can be moved */
71 #define SFGAO_CANLINK DROPEFFECT_LINK /* Objects can be linked */
72 #define SFGAO_CANRENAME 0x00000010L /* Objects can be renamed */
73 #define SFGAO_CANDELETE 0x00000020L /* Objects can be deleted */
74 #define SFGAO_HASPROPSHEET 0x00000040L /* Objects have property sheets */
75 #define SFGAO_DROPTARGET 0x00000100L /* Objects are drop target */
76 #define SFGAO_CAPABILITYMASK 0x00000177L
77 #define SFGAO_LINK 0x00010000L /* Shortcut (link) */
78 #define SFGAO_SHARE 0x00020000L /* shared */
79 #define SFGAO_READONLY 0x00040000L /* read-only */
80 #define SFGAO_GHOSTED 0x00080000L /* ghosted icon */
81 #define SFGAO_DISPLAYATTRMASK 0x000F0000L
82 #define SFGAO_FILESYSANCESTOR 0x10000000L /* It contains file system folder */
83 #define SFGAO_FOLDER 0x20000000L /* It's a folder. */
84 #define SFGAO_FILESYSTEM 0x40000000L /* is a file system thing (file/folder/root) */
85 #define SFGAO_HASSUBFOLDER 0x80000000L /* Expandable in the map pane */
86 #define SFGAO_CONTENTSMASK 0x80000000L
87 #define SFGAO_VALIDATE 0x01000000L /* invalidate cached information */
88 #define SFGAO_REMOVABLE 0x02000000L /* is this removeable media? */
90 /************************************************************************
95 typedef LPBYTE LPVIEWSETTINGS;
98 /* FWF_DESKTOP implies FWF_TRANSPARENT/NOCLIENTEDGE/NOSCROLL */
100 { FWF_AUTOARRANGE = 0x0001,
101 FWF_ABBREVIATEDNAMES = 0x0002,
102 FWF_SNAPTOGRID = 0x0004,
103 FWF_OWNERDATA = 0x0008,
104 FWF_BESTFITWINDOW = 0x0010,
105 FWF_DESKTOP = 0x0020,
106 FWF_SINGLESEL = 0x0040,
107 FWF_NOSUBFOLDERS = 0x0080,
108 FWF_TRANSPARENT = 0x0100,
109 FWF_NOCLIENTEDGE = 0x0200,
110 FWF_NOSCROLL = 0x0400,
111 FWF_ALIGNLEFT = 0x0800,
112 FWF_SINGLECLICKACTIVATE=0x8000 /* TEMPORARY -- NO UI FOR THIS */
123 { UINT ViewMode; /* View mode (FOLDERVIEWMODE values) */
124 UINT fFlags; /* View options (FOLDERFLAGS bits) */
125 } FOLDERSETTINGS, *LPFOLDERSETTINGS;
127 typedef const FOLDERSETTINGS * LPCFOLDERSETTINGS;
129 /************************************************************************
133 extern IShellFolder * pdesktopfolder;
135 DWORD WINAPI SHGetDesktopFolder(IShellFolder * *);
137 /*****************************************************************************
138 * IShellFolder interface
140 #define ICOM_INTERFACE IShellFolder
141 #define IShellFolder_METHODS \
142 ICOM_METHOD6( HRESULT, ParseDisplayName, HWND, hwndOwner,LPBC, pbcReserved, LPOLESTR, lpszDisplayName, ULONG *, pchEaten, LPITEMIDLIST *, ppidl, ULONG *, pdwAttributes) \
143 ICOM_METHOD3( HRESULT, EnumObjects, HWND, hwndOwner, DWORD, grfFlags, LPENUMIDLIST *, ppenumIDList)\
144 ICOM_METHOD4( HRESULT, BindToObject, LPCITEMIDLIST, pidl, LPBC, pbcReserved, REFIID, riid, LPVOID *, ppvOut)\
145 ICOM_METHOD4( HRESULT, BindToStorage, LPCITEMIDLIST, pidl, LPBC, pbcReserved, REFIID, riid, LPVOID *, ppvObj)\
146 ICOM_METHOD3( HRESULT, CompareIDs, LPARAM, lParam, LPCITEMIDLIST, pidl1, LPCITEMIDLIST, pidl2)\
147 ICOM_METHOD3( HRESULT, CreateViewObject, HWND, hwndOwner, REFIID, riid, LPVOID *, ppvOut)\
148 ICOM_METHOD3( HRESULT, GetAttributesOf, UINT, cidl, LPCITEMIDLIST *, apidl, ULONG *, rgfInOut)\
149 ICOM_METHOD6( HRESULT, GetUIObjectOf, HWND, hwndOwner, UINT, cidl, LPCITEMIDLIST *, apidl, REFIID, riid, UINT *, prgfInOut, LPVOID *, ppvOut)\
150 ICOM_METHOD3( HRESULT, GetDisplayNameOf, LPCITEMIDLIST, pidl, DWORD, uFlags, LPSTRRET, lpName)\
151 ICOM_METHOD5( HRESULT, SetNameOf, HWND, hwndOwner, LPCITEMIDLIST, pidl,LPCOLESTR, lpszName, DWORD, uFlags,LPITEMIDLIST *, ppidlOut)\
152 ICOM_METHOD2( HRESULT, GetFolderPath, LPSTR, lpszOut, DWORD, dwOutSize)
153 #define IShellFolder_IMETHODS \
156 ICOM_DEFINE(IShellFolder,IUnknown)
157 #undef ICOM_INTERFACE
159 #ifdef ICOM_CINTERFACE
160 /*** IUnknown methods ***/
161 #define IShellFolder_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
162 #define IShellFolder_AddRef(p) ICOM_CALL (AddRef,p)
163 #define IShellFolder_Release(p) ICOM_CALL (Release,p)
164 /*** IShellFolder methods ***/
165 #define IShellFolder_ParseDisplayName(p,a,b,c,d,e,f) ICOM_CALL6(ParseDisplayName,p,a,b,c,d,e,f)
166 #define IShellFolder_EnumObjects(p,a,b,c) ICOM_CALL3(EnumObjects,p,a,b,c)
167 #define IShellFolder_BindToObject(p,a,b,c,d) ICOM_CALL4(BindToObject,p,a,b,c,d)
168 #define IShellFolder_BindToStorage(p,a,b,c,d) ICOM_CALL4(BindToStorage,p,a,b,c,d)
169 #define IShellFolder_CompareIDs(p,a,b,c) ICOM_CALL3(CompareIDs,p,a,b,c)
170 #define IShellFolder_CreateViewObject(p,a,b,c) ICOM_CALL3(CreateViewObject,p,a,b,c)
171 #define IShellFolder_GetAttributesOf(p,a,b,c) ICOM_CALL3(GetAttributesOf,p,a,b,c)
172 #define IShellFolder_GetUIObjectOf(p,a,b,c,d,e,f) ICOM_CALL6(GetUIObjectOf,p,a,b,c,d,e,f)
173 #define IShellFolder_GetDisplayNameOf(p,a,b,c) ICOM_CALL3(GetDisplayNameOf,p,a,b,c)
174 #define IShellFolder_SetNameOf(p,a,b,c,d,e) ICOM_CALL5(SetNameOf,p,a,b,c,d,e)
175 #define IShellFolder_GetFolderPath(p,a,b) ICOM_CALL2(GetFolderPath,p,a,b)
178 /*****************************************************************************
179 * IPersistFolder interface
181 #define ICOM_INTERFACE IPersistFolder
182 #define IPersistFolder_METHODS \
183 ICOM_METHOD1( HRESULT, Initialize, LPCITEMIDLIST, pidl)
184 #define IPersistFolder_IMETHODS \
186 IPersistFolder_METHODS
187 ICOM_DEFINE(IPersistFolder, IPersist)
188 #undef ICOM_INTERFACE
190 #ifdef ICOM_CINTERFACE
191 /*** IUnknown methods ***/
192 #define IPersistFolder_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
193 #define IPersistFolder_AddRef(p) ICOM_CALL (AddRef,p)
194 #define IPersistFolder_Release(p) ICOM_CALL (Release,p)
195 /*** IPersist methods ***/
196 #define IPersistFolder_GetClassID(p,a) ICOM_CALL1(GetClassID,p,a)
197 /*** IPersistFolder methods ***/
198 #define IPersistFolder_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
202 #endif /* __WINE_WINE_OBJ_SHELLLINK_H */