Fixed some difficulties with the font on vertical tabs. Also plugged a
[wine.git] / include / wine / obj_shellfolder.h
blob0a2540321aceb2f0b7bcfde076fc33f593fc5f30
1 /*
2 * Defines the COM interfaces and APIs related to IShellFolder
4 * Depends on 'obj_base.h'.
5 */
7 #ifndef __WINE_WINE_OBJ_SHELLFOLDER_H
8 #define __WINE_WINE_OBJ_SHELLFOLDER_H
10 #ifdef __cplusplus
11 extern "C" {
12 #endif /* defined(__cplusplus) */
14 /****************************************************************************
15 * STRRET
17 #define STRRET_WSTR 0x0000
18 #define STRRET_ASTR 0x0003
20 #define STRRET_OFFSETA 0x0001
21 #define STRRET_OFFSETW 0x0004
22 #define STRRET_OFFSET WINELIB_NAME_AW(STRRET_OFFSET)
24 #define STRRET_CSTRA 0x0002
25 #define STRRET_CSTRW 0x0005
26 #define STRRET_CSTR WINELIB_NAME_AW(STRRET_CSTR)
28 typedef struct _STRRET
29 { UINT uType; /* STRRET_xxx */
30 union
31 { LPWSTR pOleStr; /* OLESTR that will be freed */
32 LPSTR pStr;
33 UINT uOffset; /* OffsetINT32o SHITEMID (ANSI) */
34 char cStr[MAX_PATH]; /* Buffer to fill in */
35 WCHAR cStrW[MAX_PATH];
36 } DUMMYUNIONNAME;
37 } STRRET,*LPSTRRET;
39 /*****************************************************************************
40 * Predeclare the interfaces
42 typedef struct IShellFolder IShellFolder, *LPSHELLFOLDER;
44 typedef struct IPersistFolder IPersistFolder, *LPPERSISTFOLDER;
46 DEFINE_GUID(IID_IPersistFolder2, 0x1ac3d9f0L, 0x175C, 0x11D1, 0x95, 0xBE, 0x00, 0x60, 0x97, 0x97, 0xEA, 0x4F);
47 typedef struct IPersistFolder2 IPersistFolder2, *LPPERSISTFOLDER2;
49 DEFINE_GUID(IID_IShellFolder2, 0xB82C5AA8, 0xA41B, 0x11D2, 0xBE, 0x32, 0x0, 0xc0, 0x4F, 0xB9, 0x36, 0x61);
50 typedef struct IShellFolder2 IShellFolder2, *LPSHELLFOLDER2;
52 DEFINE_GUID(IID_IEnumExtraSearch, 0xE700BE1, 0x9DB6, 0x11D1, 0xA1, 0xCE, 0x0, 0xc0, 0x4F, 0xD7, 0x5D, 0x13);
53 typedef struct IEnumExtraSearch IEnumExtraSearch, *LPENUMEXTRASEARCH;
55 /*****************************************************************************
56 * IEnumExtraSearch interface
59 typedef struct
61 GUID guidSearch;
62 WCHAR wszFriendlyName[80];
63 WCHAR wszMenuText[80];
64 WCHAR wszHelpText[MAX_PATH];
65 WCHAR wszUrl[2084];
66 WCHAR wszIcon[MAX_PATH+10];
67 WCHAR wszGreyIcon[MAX_PATH+10];
68 WCHAR wszClrIcon[MAX_PATH+10];
69 } EXTRASEARCH,* LPEXTRASEARCH;
71 #define ICOM_INTERFACE IEnumExtraSearch
72 #define IEnumExtraSearch_METHODS \
73 ICOM_METHOD3(HRESULT, Next, ULONG, celt, LPEXTRASEARCH*, rgelt, ULONG*, pceltFetched) \
74 ICOM_METHOD1(HRESULT, Skip, ULONG, celt) \
75 ICOM_METHOD (HRESULT, Reset) \
76 ICOM_METHOD1(HRESULT, Clone, IEnumExtraSearch**, ppenum)
77 #define IEnumExtraSearch_IMETHODS \
78 IUnknown_IMETHODS \
79 IEnumExtraSearch_METHODS
80 ICOM_DEFINE(IEnumExtraSearch,IUnknown)
81 #undef ICOM_INTERFACE
83 /*** IUnknown methods ***/
84 #define IEnumIDList_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
85 #define IEnumIDList_AddRef(p) ICOM_CALL (AddRef,p)
86 #define IEnumIDList_Release(p) ICOM_CALL (Release,p)
87 /*** IEnumIDList methods ***/
88 #define IEnumIDList_Next(p,a,b,c) ICOM_CALL3(Next,p,a,b,c)
89 #define IEnumIDList_Skip(p,a) ICOM_CALL1(Skip,p,a)
90 #define IEnumIDList_Reset(p) ICOM_CALL(Reset,p)
91 #define IEnumIDList_Clone(p,a) ICOM_CALL1(Clone,p,a)
93 /*****************************************************************************
94 * IShellFolder::GetDisplayNameOf/SetNameOf uFlags
96 typedef enum
97 { SHGDN_NORMAL = 0, /* default (display purpose) */
98 SHGDN_INFOLDER = 1, /* displayed under a folder (relative)*/
99 SHGDN_FORPARSING = 0x8000 /* for ParseDisplayName or path */
100 } SHGNO;
102 /*****************************************************************************
103 * IShellFolder::EnumObjects
105 typedef enum tagSHCONTF
106 { SHCONTF_FOLDERS = 32, /* for shell browser */
107 SHCONTF_NONFOLDERS = 64, /* for default view */
108 SHCONTF_INCLUDEHIDDEN = 128 /* for hidden/system objects */
109 } SHCONTF;
111 /*****************************************************************************
112 * IShellFolder::GetAttributesOf flags
114 #define SFGAO_CANCOPY DROPEFFECT_COPY /* Objects can be copied */
115 #define SFGAO_CANMOVE DROPEFFECT_MOVE /* Objects can be moved */
116 #define SFGAO_CANLINK DROPEFFECT_LINK /* Objects can be linked */
117 #define SFGAO_CANRENAME 0x00000010L /* Objects can be renamed */
118 #define SFGAO_CANDELETE 0x00000020L /* Objects can be deleted */
119 #define SFGAO_HASPROPSHEET 0x00000040L /* Objects have property sheets */
120 #define SFGAO_DROPTARGET 0x00000100L /* Objects are drop target */
121 #define SFGAO_CAPABILITYMASK 0x00000177L
122 #define SFGAO_LINK 0x00010000L /* Shortcut (link) */
123 #define SFGAO_SHARE 0x00020000L /* shared */
124 #define SFGAO_READONLY 0x00040000L /* read-only */
125 #define SFGAO_GHOSTED 0x00080000L /* ghosted icon */
126 #define SFGAO_HIDDEN 0x00080000L /* hidden object */
127 #define SFGAO_DISPLAYATTRMASK 0x000F0000L
128 #define SFGAO_FILESYSANCESTOR 0x10000000L /* It contains file system folder */
129 #define SFGAO_FOLDER 0x20000000L /* It's a folder. */
130 #define SFGAO_FILESYSTEM 0x40000000L /* is a file system thing (file/folder/root) */
131 #define SFGAO_HASSUBFOLDER 0x80000000L /* Expandable in the map pane */
132 #define SFGAO_CONTENTSMASK 0x80000000L
133 #define SFGAO_VALIDATE 0x01000000L /* invalidate cached information */
134 #define SFGAO_REMOVABLE 0x02000000L /* is this removeable media? */
135 #define SFGAO_BROWSABLE 0x08000000L /* is in-place browsable */
136 #define SFGAO_NONENUMERATED 0x00100000L /* is a non-enumerated object */
137 #define SFGAO_NEWCONTENT 0x00200000L /* should show bold in explorer tree */
139 /************************************************************************
141 * FOLDERSETTINGS
144 typedef LPBYTE LPVIEWSETTINGS;
146 /* NB Bitfields. */
147 /* FWF_DESKTOP implies FWF_TRANSPARENT/NOCLIENTEDGE/NOSCROLL */
148 typedef enum
149 { FWF_AUTOARRANGE = 0x0001,
150 FWF_ABBREVIATEDNAMES = 0x0002,
151 FWF_SNAPTOGRID = 0x0004,
152 FWF_OWNERDATA = 0x0008,
153 FWF_BESTFITWINDOW = 0x0010,
154 FWF_DESKTOP = 0x0020,
155 FWF_SINGLESEL = 0x0040,
156 FWF_NOSUBFOLDERS = 0x0080,
157 FWF_TRANSPARENT = 0x0100,
158 FWF_NOCLIENTEDGE = 0x0200,
159 FWF_NOSCROLL = 0x0400,
160 FWF_ALIGNLEFT = 0x0800,
161 FWF_SINGLECLICKACTIVATE=0x8000 /* TEMPORARY -- NO UI FOR THIS */
162 } FOLDERFLAGS;
164 typedef enum
165 { FVM_ICON = 1,
166 FVM_SMALLICON = 2,
167 FVM_LIST = 3,
168 FVM_DETAILS = 4
169 } FOLDERVIEWMODE;
171 typedef struct
172 { UINT ViewMode; /* View mode (FOLDERVIEWMODE values) */
173 UINT fFlags; /* View options (FOLDERFLAGS bits) */
174 } FOLDERSETTINGS, *LPFOLDERSETTINGS;
176 typedef const FOLDERSETTINGS * LPCFOLDERSETTINGS;
178 /************************************************************************
179 * Desktopfolder
182 extern IShellFolder * pdesktopfolder;
184 DWORD WINAPI SHGetDesktopFolder(IShellFolder * *);
186 /*****************************************************************************
187 * IShellFolder interface
189 #define ICOM_INTERFACE IShellFolder
190 #define IShellFolder_METHODS \
191 ICOM_METHOD6( HRESULT, ParseDisplayName, HWND, hwndOwner,LPBC, pbcReserved, LPOLESTR, lpszDisplayName, ULONG *, pchEaten, LPITEMIDLIST *, ppidl, ULONG *, pdwAttributes) \
192 ICOM_METHOD3( HRESULT, EnumObjects, HWND, hwndOwner, DWORD, grfFlags, LPENUMIDLIST *, ppenumIDList)\
193 ICOM_METHOD4( HRESULT, BindToObject, LPCITEMIDLIST, pidl, LPBC, pbcReserved, REFIID, riid, LPVOID *, ppvOut)\
194 ICOM_METHOD4( HRESULT, BindToStorage, LPCITEMIDLIST, pidl, LPBC, pbcReserved, REFIID, riid, LPVOID *, ppvObj)\
195 ICOM_METHOD3( HRESULT, CompareIDs, LPARAM, lParam, LPCITEMIDLIST, pidl1, LPCITEMIDLIST, pidl2)\
196 ICOM_METHOD3( HRESULT, CreateViewObject, HWND, hwndOwner, REFIID, riid, LPVOID *, ppvOut)\
197 ICOM_METHOD3( HRESULT, GetAttributesOf, UINT, cidl, LPCITEMIDLIST *, apidl, ULONG *, rgfInOut)\
198 ICOM_METHOD6( HRESULT, GetUIObjectOf, HWND, hwndOwner, UINT, cidl, LPCITEMIDLIST *, apidl, REFIID, riid, UINT *, prgfInOut, LPVOID *, ppvOut)\
199 ICOM_METHOD3( HRESULT, GetDisplayNameOf, LPCITEMIDLIST, pidl, DWORD, uFlags, LPSTRRET, lpName)\
200 ICOM_METHOD5( HRESULT, SetNameOf, HWND, hwndOwner, LPCITEMIDLIST, pidl,LPCOLESTR, lpszName, DWORD, uFlags,LPITEMIDLIST *, ppidlOut)
201 #define IShellFolder_IMETHODS \
202 IUnknown_IMETHODS \
203 IShellFolder_METHODS
204 ICOM_DEFINE(IShellFolder,IUnknown)
205 #undef ICOM_INTERFACE
207 /*** IUnknown methods ***/
208 #define IShellFolder_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
209 #define IShellFolder_AddRef(p) ICOM_CALL (AddRef,p)
210 #define IShellFolder_Release(p) ICOM_CALL (Release,p)
211 /*** IShellFolder methods ***/
212 #define IShellFolder_ParseDisplayName(p,a,b,c,d,e,f) ICOM_CALL6(ParseDisplayName,p,a,b,c,d,e,f)
213 #define IShellFolder_EnumObjects(p,a,b,c) ICOM_CALL3(EnumObjects,p,a,b,c)
214 #define IShellFolder_BindToObject(p,a,b,c,d) ICOM_CALL4(BindToObject,p,a,b,c,d)
215 #define IShellFolder_BindToStorage(p,a,b,c,d) ICOM_CALL4(BindToStorage,p,a,b,c,d)
216 #define IShellFolder_CompareIDs(p,a,b,c) ICOM_CALL3(CompareIDs,p,a,b,c)
217 #define IShellFolder_CreateViewObject(p,a,b,c) ICOM_CALL3(CreateViewObject,p,a,b,c)
218 #define IShellFolder_GetAttributesOf(p,a,b,c) ICOM_CALL3(GetAttributesOf,p,a,b,c)
219 #define IShellFolder_GetUIObjectOf(p,a,b,c,d,e,f) ICOM_CALL6(GetUIObjectOf,p,a,b,c,d,e,f)
220 #define IShellFolder_GetDisplayNameOf(p,a,b,c) ICOM_CALL3(GetDisplayNameOf,p,a,b,c)
221 #define IShellFolder_SetNameOf(p,a,b,c,d,e) ICOM_CALL5(SetNameOf,p,a,b,c,d,e)
223 /*****************************************************************************
224 * IShellFolder2 interface
226 /* IShellFolder2 */
228 /* GetDefaultColumnState */
229 typedef enum
231 SHCOLSTATE_TYPE_STR = 0x00000001,
232 SHCOLSTATE_TYPE_INT = 0x00000002,
233 SHCOLSTATE_TYPE_DATE = 0x00000003,
234 SHCOLSTATE_TYPEMASK = 0x0000000F,
235 SHCOLSTATE_ONBYDEFAULT = 0x00000010,
236 SHCOLSTATE_SLOW = 0x00000020,
237 SHCOLSTATE_EXTENDED = 0x00000040,
238 SHCOLSTATE_SECONDARYUI = 0x00000080,
239 SHCOLSTATE_HIDDEN = 0x00000100,
240 } SHCOLSTATE;
242 typedef struct
244 GUID fmtid;
245 DWORD pid;
246 } SHCOLUMNID, *LPSHCOLUMNID;
247 typedef const SHCOLUMNID* LPCSHCOLUMNID;
249 /* GetDetailsEx */
250 #define PID_FINDDATA 0
251 #define PID_NETRESOURCE 1
252 #define PID_DESCRIPTIONID 2
254 typedef struct
256 int fmt;
257 int cxChar;
258 STRRET str;
259 } SHELLDETAILS, *LPSHELLDETAILS;
261 #define ICOM_INTERFACE IShellFolder2
262 #define IShellFolder2_METHODS \
263 ICOM_METHOD1( HRESULT, GetDefaultSearchGUID, LPGUID, lpguid)\
264 ICOM_METHOD1( HRESULT, EnumSearches, LPENUMEXTRASEARCH *, ppEnum) \
265 ICOM_METHOD3( HRESULT, GetDefaultColumn, DWORD, dwReserved, ULONG *, pSort, ULONG *, pDisplay)\
266 ICOM_METHOD2( HRESULT, GetDefaultColumnState, UINT, iColumn, DWORD *, pcsFlags)\
267 ICOM_METHOD3( HRESULT, GetDetailsEx, LPCITEMIDLIST, pidl, const SHCOLUMNID *, pscid, VARIANT *, pv)\
268 ICOM_METHOD3( HRESULT, GetDetailsOf, LPCITEMIDLIST, pidl, UINT, iColumn, LPSHELLDETAILS, pDetails)\
269 ICOM_METHOD2( HRESULT, MapNameToSCID, LPCWSTR, pwszName, SHCOLUMNID *, pscid)
270 #define IShellFolder2_IMETHODS \
271 IShellFolder_METHODS \
272 IShellFolder2_METHODS
273 ICOM_DEFINE(IShellFolder2, IShellFolder)
274 #undef ICOM_INTERFACE
276 /*** IUnknown methods ***/
277 #define IShellFolder2_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
278 #define IShellFolder2_AddRef(p) ICOM_CALL (AddRef,p)
279 #define IShellFolder2_Release(p) ICOM_CALL (Release,p)
280 /*** IShellFolder methods ***/
281 #define IShellFolder2_ParseDisplayName(p,a,b,c,d,e,f) ICOM_CALL6(ParseDisplayName,p,a,b,c,d,e,f)
282 #define IShellFolder2_EnumObjects(p,a,b,c) ICOM_CALL3(EnumObjects,p,a,b,c)
283 #define IShellFolder2_BindToObject(p,a,b,c,d) ICOM_CALL4(BindToObject,p,a,b,c,d)
284 #define IShellFolder2_BindToStorage(p,a,b,c,d) ICOM_CALL4(BindToStorage,p,a,b,c,d)
285 #define IShellFolder2_CompareIDs(p,a,b,c) ICOM_CALL3(CompareIDs,p,a,b,c)
286 #define IShellFolder2_CreateViewObject(p,a,b,c) ICOM_CALL3(CreateViewObject,p,a,b,c)
287 #define IShellFolder2_GetAttributesOf(p,a,b,c) ICOM_CALL3(GetAttributesOf,p,a,b,c)
288 #define IShellFolder2_GetUIObjectOf(p,a,b,c,d,e,f) ICOM_CALL6(GetUIObjectOf,p,a,b,c,d,e,f)
289 #define IShellFolder2_GetDisplayNameOf(p,a,b,c) ICOM_CALL3(GetDisplayNameOf,p,a,b,c)
290 #define IShellFolder2_SetNameOf(p,a,b,c,d,e) ICOM_CALL5(SetNameOf,p,a,b,c,d,e)
291 /*** IShellFolder2 methods ***/
292 #define IShellFolder2_GetDefaultSearchGUID(p,a) ICOM_CALL1(GetDefaultSearchGUID,p,a)
293 #define IShellFolder2_EnumSearches(p,a) ICOM_CALL1(EnumSearches,p,a)
294 #define IShellFolder2_GetDefaultColumn(p,a,b,c) ICOM_CALL3(GetDefaultColumn,p,a,b,c)
295 #define IShellFolder2_GetDefaultColumnState(p,a,b) ICOM_CALL2(GetDefaultColumnState,p,a,b)
296 #define IShellFolder2_GetDetailsEx(p,a,b,c) ICOM_CALL3(GetDetailsEx,p,a,b,c)
297 #define IShellFolder2_GetDetailsOf(p,a,b,c) ICOM_CALL3(GetDetailsOf,p,a,b,c)
298 #define IShellFolder2_MapNameToSCID(p,a,b) ICOM_CALL2(MapNameToSCID,p,a,b)
300 /*****************************************************************************
301 * IPersistFolder interface
304 /* ClassID's */
305 DEFINE_GUID (CLSID_SFMyComp,0x20D04FE0,0x3AEA,0x1069,0xA2,0xD8,0x08,0x00,0x2B,0x30,0x30,0x9D);
306 DEFINE_GUID (CLSID_SFINet, 0x871C5380,0x42A0,0x1069,0xA2,0xEA,0x08,0x00,0x2B,0x30,0x30,0x9D);
307 DEFINE_GUID (CLSID_SFFile, 0xF3364BA0,0x65B9,0x11CE,0xA9,0xBA,0x00,0xAA,0x00,0x4A,0xE8,0x37);
309 #define ICOM_INTERFACE IPersistFolder
310 #define IPersistFolder_METHODS \
311 ICOM_METHOD1( HRESULT, Initialize, LPCITEMIDLIST, pidl)
312 #define IPersistFolder_IMETHODS \
313 IPersist_IMETHODS \
314 IPersistFolder_METHODS
315 ICOM_DEFINE(IPersistFolder, IPersist)
316 #undef ICOM_INTERFACE
318 /*** IUnknown methods ***/
319 #define IPersistFolder_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
320 #define IPersistFolder_AddRef(p) ICOM_CALL (AddRef,p)
321 #define IPersistFolder_Release(p) ICOM_CALL (Release,p)
322 /*** IPersist methods ***/
323 #define IPersistFolder_GetClassID(p,a) ICOM_CALL1(GetClassID,p,a)
324 /*** IPersistFolder methods ***/
325 #define IPersistFolder_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
327 /*****************************************************************************
328 * IPersistFolder2 interface
331 #define ICOM_INTERFACE IPersistFolder2
332 #define IPersistFolder2_METHODS \
333 ICOM_METHOD1( HRESULT, GetCurFolder, LPITEMIDLIST*, pidl)
334 #define IPersistFolder2_IMETHODS \
335 IPersist_IMETHODS \
336 IPersistFolder_METHODS \
337 IPersistFolder2_METHODS
338 ICOM_DEFINE(IPersistFolder2, IPersistFolder)
339 #undef ICOM_INTERFACE
341 /*** IUnknown methods ***/
342 #define IPersistFolder2_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
343 #define IPersistFolder2_AddRef(p) ICOM_CALL (AddRef,p)
344 #define IPersistFolder2_Release(p) ICOM_CALL (Release,p)
345 /*** IPersist methods ***/
346 #define IPersistFolder2_GetClassID(p,a) ICOM_CALL1(GetClassID,p,a)
347 /*** IPersistFolder methods ***/
348 #define IPersistFolder2_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
349 /*** IPersistFolder2 methods ***/
350 #define IPersistFolder2_GetCurFolder(p,a) ICOM_CALL1(GetCurFolder,p,a)
352 #ifdef __cplusplus
353 } /* extern "C" */
354 #endif /* defined(__cplusplus) */
356 #endif /* __WINE_WINE_OBJ_SHELLFOLDER_H */