1 #ifndef __WINE_SHLOBJ_H
2 #define __WINE_SHLOBJ_H
5 #include "winbase.h" /* WIN32_FIND_* */
6 #include "wine/obj_base.h"
7 #include "wine/obj_shelllink.h"
14 #define STDMETHOD(xfn) HRESULT (CALLBACK *fn##xfn)
15 #define STDMETHOD_(type,xfn) type (CALLBACK *fn##xfn)
20 /****************************************************************************
23 DWORD WINAPI SHELL32_DllGetClassObject(REFCLSID,REFIID,LPVOID*);
27 /* foreward declaration of the objects*/
28 typedef struct IContextMenu IContextMenu, *LPCONTEXTMENU;
29 typedef struct tagSHELLEXTINIT *LPSHELLEXTINIT,IShellExtInit;
30 typedef struct tagENUMIDLIST *LPENUMIDLIST, IEnumIDList;
31 typedef struct tagSHELLFOLDER *LPSHELLFOLDER, IShellFolder;
32 typedef struct tagSHELLVIEW *LPSHELLVIEW, IShellView;
33 typedef struct tagSHELLBROWSER *LPSHELLBROWSER,IShellBrowser;
34 typedef struct tagSHELLICON *LPSHELLICON, IShellIcon;
35 typedef struct tagDOCKINGWINDOWFRAME *LPDOCKINGWINDOWFRAME, IDockingWindowFrame;
36 typedef struct tagCOMMDLGBROWSER *LPCOMMDLGBROWSER, ICommDlgBrowser;
38 /****************************************************************************
41 #define STRRET_WSTR 0x0000
42 #define STRRET_OFFSETA 0x0001
43 #define STRRET_CSTRA 0x0002
44 #define STRRET_ASTR 0X0003
45 #define STRRET_OFFSETW 0X0004
46 #define STRRET_CSTRW 0X0005
49 typedef struct _STRRET
50 { UINT uType; /* STRRET_xxx */
52 { LPWSTR pOleStr; /* OLESTR that will be freed */
54 UINT uOffset; /* OffsetINT32o SHITEMID (ANSI) */
55 char cStr[MAX_PATH]; /* Buffer to fill in */
56 WCHAR cStrW[MAX_PATH];
61 /*****************************************************************************
62 * IContextMenu interface
64 #define THIS LPCONTEXTMENU this
66 /* default menu items*/
70 #define IDM_LAST IDM_RENAME
72 /* QueryContextMenu uFlags */
73 #define CMF_NORMAL 0x00000000
74 #define CMF_DEFAULTONLY 0x00000001
75 #define CMF_VERBSONLY 0x00000002
76 #define CMF_EXPLORE 0x00000004
77 #define CMF_NOVERBS 0x00000008
78 #define CMF_CANRENAME 0x00000010
79 #define CMF_NODEFAULT 0x00000020
80 #define CMF_INCLUDESTATIC 0x00000040
81 #define CMF_RESERVED 0xffff0000 /* View specific */
83 /* GetCommandString uFlags */
84 #define GCS_VERBA 0x00000000 /* canonical verb */
85 #define GCS_HELPTEXTA 0x00000001 /* help text (for status bar) */
86 #define GCS_VALIDATEA 0x00000002 /* validate command exists */
87 #define GCS_VERBW 0x00000004 /* canonical verb (unicode) */
88 #define GCS_HELPTEXTW 0x00000005 /* help text (unicode version) */
89 #define GCS_VALIDATEW 0x00000006 /* validate command exists (unicode) */
90 #define GCS_UNICODE 0x00000004 /* for bit testing - Unicode string */
92 #define GCS_VERB GCS_VERBA
93 #define GCS_HELPTEXT GCS_HELPTEXTA
94 #define GCS_VALIDATE GCS_VALIDATEA
96 #define CMDSTR_NEWFOLDERA "NewFolder"
97 #define CMDSTR_VIEWLISTA "ViewList"
98 #define CMDSTR_VIEWDETAILSA "ViewDetails"
99 #define CMDSTR_NEWFOLDERW L"NewFolder"
100 #define CMDSTR_VIEWLISTW L"ViewList"
101 #define CMDSTR_VIEWDETAILSW L"ViewDetails"
103 #define CMDSTR_NEWFOLDER CMDSTR_NEWFOLDERA
104 #define CMDSTR_VIEWLIST CMDSTR_VIEWLISTA
105 #define CMDSTR_VIEWDETAILS CMDSTR_VIEWDETAILSA
107 #define CMIC_MASK_HOTKEY SEE_MASK_HOTKEY
108 #define CMIC_MASK_ICON SEE_MASK_ICON
109 #define CMIC_MASK_FLAG_NO_UI SEE_MASK_FLAG_NO_UI
110 #define CMIC_MASK_UNICODE SEE_MASK_UNICODE
111 #define CMIC_MASK_NO_CONSOLE SEE_MASK_NO_CONSOLE
112 #define CMIC_MASK_HASLINKNAME SEE_MASK_HASLINKNAME
113 #define CMIC_MASK_FLAG_SEP_VDM SEE_MASK_FLAG_SEPVDM
114 #define CMIC_MASK_HASTITLE SEE_MASK_HASTITLE
115 #define CMIC_MASK_ASYNCOK SEE_MASK_ASYNCOK
117 #define CMIC_MASK_PTINVOKE 0x20000000
119 /*NOTE: When SEE_MASK_HMONITOR is set, hIcon is treated as hMonitor */
120 typedef struct tagCMINVOKECOMMANDINFO
121 { DWORD cbSize; /* sizeof(CMINVOKECOMMANDINFO) */
122 DWORD fMask; /* any combination of CMIC_MASK_* */
123 HWND hwnd; /* might be NULL (indicating no owner window) */
124 LPCSTR lpVerb; /* either a string or MAKEINTRESOURCE(idOffset) */
125 LPCSTR lpParameters; /* might be NULL (indicating no parameter) */
126 LPCSTR lpDirectory; /* might be NULL (indicating no specific directory) */
127 INT nShow; /* one of SW_ values for ShowWindow() API */
131 } CMINVOKECOMMANDINFO, *LPCMINVOKECOMMANDINFO;
133 typedef struct tagCMInvokeCommandInfoEx
134 { DWORD cbSize; /* must be sizeof(CMINVOKECOMMANDINFOEX) */
135 DWORD fMask; /* any combination of CMIC_MASK_* */
136 HWND hwnd; /* might be NULL (indicating no owner window) */
137 LPCSTR lpVerb; /* either a string or MAKEINTRESOURCE(idOffset) */
138 LPCSTR lpParameters; /* might be NULL (indicating no parameter) */
139 LPCSTR lpDirectory; /* might be NULL (indicating no specific directory) */
140 INT nShow; /* one of SW_ values for ShowWindow() API */
145 LPCSTR lpTitle; /* For CreateProcess-StartupInfo.lpTitle */
146 LPCWSTR lpVerbW; /* Unicode verb (for those who can use it) */
147 LPCWSTR lpParametersW; /* Unicode parameters (for those who can use it) */
148 LPCWSTR lpDirectoryW; /* Unicode directory (for those who can use it) */
149 LPCWSTR lpTitleW; /* Unicode title (for those who can use it) */
150 POINT ptInvoke; /* Point where it's invoked */
152 } CMINVOKECOMMANDINFOEX, *LPCMINVOKECOMMANDINFOEX;
156 #define ICOM_INTERFACE IContextMenu
157 #define IContextMenu_METHODS \
158 ICOM_METHOD5(HRESULT,QueryContextMenu, HMENU,hmenu, UINT,indexMenu, UINT,idCmdFirst, UINT,idCmdLast, UINT,uFlags) \
159 ICOM_METHOD1(HRESULT,InvokeCommand, LPCMINVOKECOMMANDINFO,lpici) \
160 ICOM_METHOD5(HRESULT,GetCommandString, UINT,idCmd, UINT,uType, UINT*,pwReserved, LPSTR,pszName, UINT,cchMax) \
161 ICOM_METHOD3(HRESULT,HandleMenuMsg, UINT,uMsg,WPARAM,wParam,LPARAM,lParam) \
162 void * guard; /*possibly another nasty entry from ContextMenu3 ?*/
163 #define IContextMenu_IMETHODS \
166 ICOM_DEFINE(IContextMenu, IUnknown)
167 #undef ICOM_INTERFACE
169 #ifdef ICOM_CINTERFACE
170 // *** IUnknown methods *** //
171 #define IContextMenu_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
172 #define IContextMenu_AddRef(p) ICOM_CALL (AddRef,p)
173 #define IContextMenu_Release(p) ICOM_CALL (Release,p)
174 // *** IContextMenu methods *** //
175 #define IContextMenu_QueryContextMenu(p,a,b,c,d,e) ICOM_CALL5(QueryContextMenu,p,a,b,c,d,e)
176 #define IContextMenu_InvokeCommand(p,a) ICOM_CALL1(InvokeCommand,p,a)
177 #define IContextMenu_GetCommandString(p,a,b,c,d,e) ICOM_CALL5(GetCommandString,p,a,b,c,d,e)
178 #define IContextMenu_HandleMenuMsg(p,a,b,c) ICOM_CALL3(HandleMenuMsg,p,a,b,c)
181 /*****************************************************************************
182 * structures for shell clipboard formats
184 typedef enum tagDVASPECT
185 { DVASPECT_CONTENT = 1,
186 DVASPECT_THUMBNAIL = 2,
188 DVASPECT_DOCPRINT = 8
191 /* shell specific clipboard formats */
193 /* DATAOBJECT_InitShellIDList*/
194 #define CFSTR_SHELLIDLIST "Shell IDList Array" /* CF_IDLIST */
196 extern UINT cfShellIDList;
203 #define CFSTR_SHELLIDLISTOFFSET "Shell Object Offsets" /* CF_OBJECTPOSITIONS */
204 #define CFSTR_NETRESOURCES "Net Resource" /* CF_NETRESOURCE */
206 /* DATAOBJECT_InitFileGroupDesc */
207 #define CFSTR_FILEDESCRIPTORA "FileGroupDescriptor" /* CF_FILEGROUPDESCRIPTORA */
208 extern UINT cfFileGroupDesc;
210 #define CFSTR_FILEDESCRIPTORW "FileGroupDescriptorW" /* CF_FILEGROUPDESCRIPTORW */
212 /* DATAOBJECT_InitFileContents*/
213 #define CFSTR_FILECONTENTS "FileContents" /* CF_FILECONTENTS */
214 extern UINT cfFileContents;
216 #define CFSTR_FILENAMEA "FileName" /* CF_FILENAMEA */
217 #define CFSTR_FILENAMEW "FileNameW" /* CF_FILENAMEW */
218 #define CFSTR_PRINTERGROUP "PrinterFriendlyName" /* CF_PRINTERS */
219 #define CFSTR_FILENAMEMAPA "FileNameMap" /* CF_FILENAMEMAPA */
220 #define CFSTR_FILENAMEMAPW "FileNameMapW" /* CF_FILENAMEMAPW */
221 #define CFSTR_SHELLURL "UniformResourceLocator"
222 #define CFSTR_PREFERREDDROPEFFECT "Preferred DropEffect"
223 #define CFSTR_PERFORMEDDROPEFFECT "Performed DropEffect"
224 #define CFSTR_PASTESUCCEEDED "Paste Succeeded"
225 #define CFSTR_INDRAGLOOP "InShellDragLoop"
227 /**************************************************************************
228 * IDLList "Item ID List List"
231 * interal data holder for IDataObject
233 typedef struct tagLPIDLLIST *LPIDLLIST, IDLList;
235 #define THIS LPIDLLIST this
243 typedef struct IDLList_VTable
244 { STDMETHOD_(UINT, GetState)(THIS);
245 STDMETHOD_(LPITEMIDLIST, GetElement)(THIS_ UINT nIndex);
246 STDMETHOD_(UINT, GetCount)(THIS);
247 STDMETHOD_(BOOL, StoreItem)(THIS_ LPITEMIDLIST pidl);
248 STDMETHOD_(BOOL, AddItems)(THIS_ LPITEMIDLIST *apidl, UINT cidl);
249 STDMETHOD_(BOOL, InitList)(THIS);
250 STDMETHOD_(void, CleanList)(THIS);
251 } IDLList_VTable,*LPIDLLIST_VTABLE;
254 { LPIDLLIST_VTABLE lpvtbl;
259 extern LPIDLLIST IDLList_Constructor (UINT uStep);
260 extern void IDLList_Destructor(LPIDLLIST this);
264 /*****************************************************************************
265 * IShellExtInit interface
267 #define THIS LPSHELLEXTINIT this
269 typedef struct IShellExtInit_VTable
270 { /* *** IUnknown methods *** */
271 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
272 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
273 STDMETHOD_(ULONG,Release) (THIS) PURE;
275 /* *** IShellExtInit methods *** */
276 STDMETHOD(Initialize)(THIS_ LPCITEMIDLIST pidlFolder, LPDATAOBJECT lpdobj, HKEY hkeyProgID) PURE;
277 } IShellExtInit_VTable,*LPSHELLEXTINIT_VTABLE;
279 struct tagSHELLEXTINIT
280 { LPSHELLEXTINIT_VTABLE lpvtbl;
286 /*****************************************************************************
287 * IEnumIDList interface
289 #define THIS LPENUMIDLIST this
291 typedef struct tagENUMLIST
292 { struct tagENUMLIST *pNext;
294 } ENUMLIST, *LPENUMLIST;
296 typedef struct IEnumIDList_VTable
297 { /* *** IUnknown methods *** */
298 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
299 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
300 STDMETHOD_(ULONG,Release) (THIS) PURE;
302 /* *** IEnumIDList methods *** */
303 STDMETHOD(Next) (THIS_ ULONG celt,
305 ULONG *pceltFetched) PURE;
306 STDMETHOD(Skip) (THIS_ ULONG celt) PURE;
307 STDMETHOD(Reset) (THIS) PURE;
308 STDMETHOD(Clone) (THIS_ IEnumIDList **ppenum) PURE;
309 /* *** private methods *** */
310 STDMETHOD_(BOOL,CreateEnumList)(THIS_ LPCSTR, DWORD) PURE;
311 STDMETHOD_(BOOL,AddToEnumList)(THIS_ LPITEMIDLIST) PURE;
312 STDMETHOD_(BOOL,DeleteList)(THIS) PURE;
315 } IEnumIDList_VTable,*LPENUMIDLIST_VTABLE;
318 { LPENUMIDLIST_VTABLE lpvtbl;
322 LPENUMLIST mpCurrent;
326 /*-------------------------------------------------------------------------- */
330 /* FOLDERSETTINGS is a data structure that explorer passes from one folder */
331 /* view to another, when the user is browsing. It calls ISV::GetCurrentInfo */
332 /* member to get the current settings and pass it to ISV::CreateViewWindow */
333 /* to allow the next folder view "inherit" it. These settings assumes a */
334 /* particular UI (which the shell's folder view has), and shell extensions */
335 /* may or may not use those settings. */
337 /*-------------------------------------------------------------------------- */
339 typedef LPBYTE LPVIEWSETTINGS;
342 /* FWF_DESKTOP implies FWF_TRANSPARENT/NOCLIENTEDGE/NOSCROLL */
344 { FWF_AUTOARRANGE = 0x0001,
345 FWF_ABBREVIATEDNAMES = 0x0002,
346 FWF_SNAPTOGRID = 0x0004,
347 FWF_OWNERDATA = 0x0008,
348 FWF_BESTFITWINDOW = 0x0010,
349 FWF_DESKTOP = 0x0020,
350 FWF_SINGLESEL = 0x0040,
351 FWF_NOSUBFOLDERS = 0x0080,
352 FWF_TRANSPARENT = 0x0100,
353 FWF_NOCLIENTEDGE = 0x0200,
354 FWF_NOSCROLL = 0x0400,
355 FWF_ALIGNLEFT = 0x0800,
356 FWF_SINGLECLICKACTIVATE=0x8000 /* TEMPORARY -- NO UI FOR THIS */
367 { UINT ViewMode; /* View mode (FOLDERVIEWMODE values) */
368 UINT fFlags; /* View options (FOLDERFLAGS bits) */
369 } FOLDERSETTINGS, *LPFOLDERSETTINGS;
371 typedef const FOLDERSETTINGS * LPCFOLDERSETTINGS;
373 /************************************************************************
374 * IShellFolder interface
377 #define THIS LPSHELLFOLDER this
379 /* IShellFolder::GetDisplayNameOf/SetNameOf uFlags */
381 { SHGDN_NORMAL = 0, /* default (display purpose) */
382 SHGDN_INFOLDER = 1, /* displayed under a folder (relative)*/
383 SHGDN_FORPARSING = 0x8000 /* for ParseDisplayName or path */
386 /* IShellFolder::EnumObjects */
387 typedef enum tagSHCONTF
388 { SHCONTF_FOLDERS = 32, /* for shell browser */
389 SHCONTF_NONFOLDERS = 64, /* for default view */
390 SHCONTF_INCLUDEHIDDEN = 128 /* for hidden/system objects */
393 /* IShellFolder::GetAttributesOf flags */
394 #define SFGAO_CANCOPY DROPEFFECT_COPY /* Objects can be copied */
395 #define SFGAO_CANMOVE DROPEFFECT_MOVE /* Objects can be moved */
396 #define SFGAO_CANLINK DROPEFFECT_LINK /* Objects can be linked */
397 #define SFGAO_CANRENAME 0x00000010L /* Objects can be renamed */
398 #define SFGAO_CANDELETE 0x00000020L /* Objects can be deleted */
399 #define SFGAO_HASPROPSHEET 0x00000040L /* Objects have property sheets */
400 #define SFGAO_DROPTARGET 0x00000100L /* Objects are drop target */
401 #define SFGAO_CAPABILITYMASK 0x00000177L
402 #define SFGAO_LINK 0x00010000L /* Shortcut (link) */
403 #define SFGAO_SHARE 0x00020000L /* shared */
404 #define SFGAO_READONLY 0x00040000L /* read-only */
405 #define SFGAO_GHOSTED 0x00080000L /* ghosted icon */
406 #define SFGAO_DISPLAYATTRMASK 0x000F0000L
407 #define SFGAO_FILESYSANCESTOR 0x10000000L /* It contains file system folder */
408 #define SFGAO_FOLDER 0x20000000L /* It's a folder. */
409 #define SFGAO_FILESYSTEM 0x40000000L /* is a file system thing (file/folder/root) */
410 #define SFGAO_HASSUBFOLDER 0x80000000L /* Expandable in the map pane */
411 #define SFGAO_CONTENTSMASK 0x80000000L
412 #define SFGAO_VALIDATE 0x01000000L /* invalidate cached information */
413 #define SFGAO_REMOVABLE 0x02000000L /* is this removeable media? */
415 typedef struct IShellFolder_VTable {
416 /* *** IUnknown methods *** */
417 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
418 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
419 STDMETHOD_(ULONG,Release) (THIS) PURE;
421 /* *** IShellFolder methods *** */
422 STDMETHOD(ParseDisplayName) (THIS_ HWND hwndOwner,LPBC pbcReserved, LPOLESTR lpszDisplayName,ULONG * pchEaten, LPITEMIDLIST * ppidl, ULONG *pdwAttributes) PURE;
423 STDMETHOD(EnumObjects)( THIS_ HWND hwndOwner, DWORD grfFlags, LPENUMIDLIST * ppenumIDList) PURE;
424 STDMETHOD(BindToObject)(THIS_ LPCITEMIDLIST pidl, LPBC pbcReserved,REFIID riid, LPVOID * ppvOut) PURE;
425 STDMETHOD(BindToStorage)(THIS_ LPCITEMIDLIST pidl, LPBC pbcReserved,REFIID riid, LPVOID * ppvObj) PURE;
426 STDMETHOD(CompareIDs)(THIS_ LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE;
427 STDMETHOD(CreateViewObject)(THIS_ HWND hwndOwner, REFIID riid, LPVOID * ppvOut) PURE;
428 STDMETHOD(GetAttributesOf)(THIS_ UINT cidl, LPCITEMIDLIST * apidl,ULONG * rgfInOut) PURE;
429 STDMETHOD(GetUIObjectOf)(THIS_ HWND hwndOwner, UINT cidl, LPCITEMIDLIST * apidl,REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) PURE;
430 STDMETHOD(GetDisplayNameOf)(THIS_ LPCITEMIDLIST pidl, DWORD uFlags, LPSTRRET lpName) PURE;
431 STDMETHOD(SetNameOf)(THIS_ HWND hwndOwner, LPCITEMIDLIST pidl,LPCOLESTR lpszName, DWORD uFlags,LPITEMIDLIST * ppidlOut) PURE;
433 /* utility functions */
434 STDMETHOD_(BOOL,GetFolderPath)(THIS_ LPSTR, DWORD);
436 } *LPSHELLFOLDER_VTABLE,IShellFolder_VTable;
438 struct tagSHELLFOLDER {
439 LPSHELLFOLDER_VTABLE lpvtbl;
442 LPITEMIDLIST pMyPidl;
446 extern LPSHELLFOLDER pdesktopfolder;
448 /************************
451 DWORD WINAPI SHGetDesktopFolder(LPSHELLFOLDER *);
454 /************************************************************************
455 * IShellBrowser interface
457 #define THIS LPSHELLBROWSER this
458 /* targets for GetWindow/SendControlMsg */
459 #define FCW_STATUS 0x0001
460 #define FCW_TOOLBAR 0x0002
461 #define FCW_TREE 0x0003
462 #define FCW_INTERNETBAR 0x0006
463 #define FCW_PROGRESS 0x0008
465 /* wFlags for BrowseObject*/
466 #define SBSP_DEFBROWSER 0x0000
467 #define SBSP_SAMEBROWSER 0x0001
468 #define SBSP_NEWBROWSER 0x0002
470 #define SBSP_DEFMODE 0x0000
471 #define SBSP_OPENMODE 0x0010
472 #define SBSP_EXPLOREMODE 0x0020
474 #define SBSP_ABSOLUTE 0x0000
475 #define SBSP_RELATIVE 0x1000
476 #define SBSP_PARENT 0x2000
477 #define SBSP_NAVIGATEBACK 0x4000
478 #define SBSP_NAVIGATEFORWARD 0x8000
480 #define SBSP_ALLOW_AUTONAVIGATE 0x10000
482 #define SBSP_INITIATEDBYHLINKFRAME 0x80000000
483 #define SBSP_REDIRECT 0x40000000
484 #define SBSP_WRITENOHISTORY 0x08000000
486 /* uFlage for SetToolbarItems */
487 #define FCT_MERGE 0x0001
488 #define FCT_CONFIGABLE 0x0002
489 #define FCT_ADDTOEND 0x0004
491 /* undocumented, found in the web posted by Chris Becke */
492 #define CWM_SETPATH (WM_USER+2)
493 #define CWM_WANTIDLE (WM_USER+3)
494 #define CWM_GETSETCURRENTINFO (WM_USER+4)
495 #define CWM_SELECTITEM (WM_USER+5)
496 #define CWM_STOPWAITING (WM_USER+6)
497 #define CWM_GETISHELLBROWSER (WM_USER+7)
499 typedef struct IShellBrowser_VTable
500 { /* *** IUnknown methods *** */
501 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
502 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
503 STDMETHOD_(ULONG,Release) (THIS) PURE;
505 /* *** IOleWindow methods *** */
506 STDMETHOD(GetWindow) (THIS_ HWND * lphwnd) PURE;
507 STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL fEnterMode) PURE;
509 /* *** IShellBrowser methods *** (same as IOleInPlaceFrame) */
510 STDMETHOD(InsertMenusSB) (THIS_ HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths) PURE;
511 STDMETHOD(SetMenuSB) (THIS_ HMENU hmenuShared, HOLEMENU holemenuReserved, HWND hwndActiveObject) PURE;
512 STDMETHOD(RemoveMenusSB) (THIS_ HMENU hmenuShared) PURE;
513 STDMETHOD(SetStatusTextSB) (THIS_ LPCOLESTR lpszStatusText) PURE;
514 STDMETHOD(EnableModelessSB) (THIS_ BOOL fEnable) PURE;
515 STDMETHOD(TranslateAcceleratorSB) (THIS_ LPMSG lpmsg, WORD wID) PURE;
517 /* *** IShellBrowser methods *** */
518 STDMETHOD(BrowseObject)(THIS_ LPCITEMIDLIST pidl, UINT wFlags) PURE;
519 STDMETHOD(GetViewStateStream)(THIS_ DWORD grfMode, LPSTREAM *ppStrm) PURE;
520 STDMETHOD(GetControlWindow)(THIS_ UINT id, HWND * lphwnd) PURE;
521 STDMETHOD(SendControlMsg)(THIS_ UINT id, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT * pret) PURE;
522 STDMETHOD(QueryActiveShellView)(THIS_ IShellView ** ppshv) PURE;
523 STDMETHOD(OnViewWindowActive)(THIS_ IShellView * ppshv) PURE;
524 STDMETHOD(SetToolbarItems)(THIS_ LPTBBUTTON lpButtons, UINT nButtons, UINT uFlags) PURE;
525 } *LPSHELLBROWSER_VTABLE,IShellBrowser_VTable;
527 struct tagSHELLBROWSER
528 { LPSHELLBROWSER_VTABLE lpvtbl;
534 /************************************************************************
535 * IShellView interface
537 #define THIS LPSHELLVIEW this
539 /* shellview select item flags*/
540 #define SVSI_DESELECT 0x0000
541 #define SVSI_SELECT 0x0001
542 #define SVSI_EDIT 0x0003 /* includes select */
543 #define SVSI_DESELECTOTHERS 0x0004
544 #define SVSI_ENSUREVISIBLE 0x0008
545 #define SVSI_FOCUSED 0x0010
547 /* shellview get item object flags */
548 #define SVGIO_BACKGROUND 0x00000000
549 #define SVGIO_SELECTION 0x00000001
550 #define SVGIO_ALLVIEW 0x00000002
552 /* The explorer dispatches WM_COMMAND messages based on the range of
553 command/menuitem IDs. All the IDs of menuitems that the view (right
554 pane) inserts must be in FCIDM_SHVIEWFIRST/LAST (otherwise, the explorer
555 won't dispatch them). The view should not deal with any menuitems
556 in FCIDM_BROWSERFIRST/LAST (otherwise, it won't work with the future
557 version of the shell).
559 FCIDM_SHVIEWFIRST/LAST for the right pane (IShellView)
560 FCIDM_BROWSERFIRST/LAST for the explorer frame (IShellBrowser)
561 FCIDM_GLOBAL/LAST for the explorer's submenu IDs
563 #define FCIDM_SHVIEWFIRST 0x0000
565 #define FCIDM_SHVIEW_ARRANGE 0x7001
566 #define FCIDM_SHVIEW_DELETE 0x7011
567 #define FCIDM_SHVIEW_PROPERTIES 0x7013
568 #define FCIDM_SHVIEW_CUT 0x7018
569 #define FCIDM_SHVIEW_COPY 0x7019
570 #define FCIDM_SHVIEW_INSERT 0x701A
571 #define FCIDM_SHVIEW_UNDO 0x701B
572 #define FCIDM_SHVIEW_INSERTLINK 0x701C
573 #define FCIDM_SHVIEW_SELECTALL 0x7021
574 #define FCIDM_SHVIEW_INVERTSELECTION 0x7022
575 #define FCIDM_SHVIEW_BIGICON 0x7029
576 #define FCIDM_SHVIEW_SMALLICON 0x702A
577 #define FCIDM_SHVIEW_LISTVIEW 0x702B
578 #define FCIDM_SHVIEW_REPORTVIEW 0x702C
579 #define FCIDM_SHVIEW_AUTOARRANGE 0x7031
580 #define FCIDM_SHVIEW_SNAPTOGRID 0x7032
581 #define FCIDM_SHVIEW_HELP 0x7041
583 #define FCIDM_SHVIEWLAST 0x7fff
584 #define FCIDM_BROWSERFIRST 0xA000
585 /* undocumented toolbar items from stddlg's*/
586 #define FCIDM_TB_SMALLICON 0xA003
587 #define FCIDM_TB_REPORTVIEW 0xA004
589 #define FCIDM_BROWSERLAST 0xbf00
590 #define FCIDM_GLOBALFIRST 0x8000
591 #define FCIDM_GLOBALLAST 0x9fff
594 * Global submenu IDs and separator IDs
596 #define FCIDM_MENU_FILE (FCIDM_GLOBALFIRST+0x0000)
597 #define FCIDM_MENU_EDIT (FCIDM_GLOBALFIRST+0x0040)
598 #define FCIDM_MENU_VIEW (FCIDM_GLOBALFIRST+0x0080)
599 #define FCIDM_MENU_VIEW_SEP_OPTIONS (FCIDM_GLOBALFIRST+0x0081)
600 #define FCIDM_MENU_TOOLS (FCIDM_GLOBALFIRST+0x00c0)
601 #define FCIDM_MENU_TOOLS_SEP_GOTO (FCIDM_GLOBALFIRST+0x00c1)
602 #define FCIDM_MENU_HELP (FCIDM_GLOBALFIRST+0x0100)
603 #define FCIDM_MENU_FIND (FCIDM_GLOBALFIRST+0x0140)
604 #define FCIDM_MENU_EXPLORE (FCIDM_GLOBALFIRST+0x0150)
605 #define FCIDM_MENU_FAVORITES (FCIDM_GLOBALFIRST+0x0170)
607 /* control IDs known to the view */
608 #define FCIDM_TOOLBAR (FCIDM_BROWSERFIRST + 0)
609 #define FCIDM_STATUS (FCIDM_BROWSERFIRST + 1)
611 /* uState values for IShellView::UIActivate */
613 { SVUIA_DEACTIVATE = 0,
614 SVUIA_ACTIVATE_NOFOCUS = 1,
615 SVUIA_ACTIVATE_FOCUS = 2,
616 SVUIA_INPLACEACTIVATE = 3 /* new flag for IShellView2 */
621 typedef struct IShellView_VTable
622 { /* *** IUnknown methods *** */
623 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
624 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
625 STDMETHOD_(ULONG,Release) (THIS) PURE;
627 /* *** IOleWindow methods *** */
628 STDMETHOD(GetWindow) (THIS_ HWND * lphwnd) PURE;
629 STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL fEnterMode) PURE;
631 /* *** IShellView methods *** */
632 STDMETHOD(TranslateAccelerator) (THIS_ LPMSG lpmsg) PURE;
633 STDMETHOD(EnableModeless) (THIS_ BOOL fEnable) PURE;
634 STDMETHOD(UIActivate) (THIS_ UINT uState) PURE;
635 STDMETHOD(Refresh) (THIS) PURE;
636 STDMETHOD(CreateViewWindow)(THIS_ IShellView *lpPrevView,LPCFOLDERSETTINGS lpfs, IShellBrowser * psb,RECT * prcView, HWND *phWnd) PURE;
637 STDMETHOD(DestroyViewWindow)(THIS) PURE;
638 STDMETHOD(GetCurrentInfo)(THIS_ LPFOLDERSETTINGS lpfs) PURE;
639 STDMETHOD(AddPropertySheetPages)(THIS_ DWORD dwReserved,LPFNADDPROPSHEETPAGE lpfn, LPARAM lparam) PURE;
640 STDMETHOD(SaveViewState)(THIS) PURE;
641 STDMETHOD(SelectItem)(THIS_ LPCITEMIDLIST pidlItem, UINT uFlags) PURE;
642 STDMETHOD(GetItemObject)(THIS_ UINT uItem, REFIID riid,LPVOID *ppv) PURE;
643 } IShellView_VTable,*LPSHELLVIEW_VTABLE;
646 { LPSHELLVIEW_VTABLE lpvtbl;
649 LPSHELLFOLDER pSFParent;
650 LPSHELLBROWSER pShellBrowser;
651 LPCOMMDLGBROWSER pCommDlgBrowser;
655 FOLDERSETTINGS FolderSettings;
659 LPITEMIDLIST *aSelectedItems;
662 typedef GUID SHELLVIEWID;
663 #define SV_CLASS_NAME ("SHELLDLL_DefView")
666 /****************************************************************************
667 * ICommDlgBrowser interface
669 #define THIS LPCOMMDLGBROWSER this
671 /* for OnStateChange*/
672 #define CDBOSC_SETFOCUS 0x00000000
673 #define CDBOSC_KILLFOCUS 0x00000001
674 #define CDBOSC_SELCHANGE 0x00000002
675 #define CDBOSC_RENAME 0x00000003
677 typedef struct ICommDlgBrowser_VTable
678 { /* IUnknown methods */
679 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
680 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
681 STDMETHOD_(ULONG,Release) (THIS) PURE;
683 /* ICommDlgBrowser methods */
684 STDMETHOD(OnDefaultCommand) (THIS_ LPSHELLVIEW ppshv) PURE;
685 STDMETHOD(OnStateChange) (THIS_ LPSHELLVIEW ppshv, ULONG uChange) PURE;
686 STDMETHOD(IncludeObject) (THIS_ LPSHELLVIEW ppshv, LPCITEMIDLIST pidl) PURE;
687 } ICommDlgBrowser_VTable,*LPCOMMDLGBROWSER_VTABLE;
689 struct tagCOMMDLGBROWSER
690 { LPCOMMDLGBROWSER_VTABLE lpvtbl;
695 /****************************************************************************
696 * IExtractIconinterface
699 * Is the ExtractIconA interface
701 #define THIS LPEXTRACTICON this
703 /* GetIconLocation() input flags*/
704 #define GIL_OPENICON 0x0001 /* allows containers to specify an "open" look */
705 #define GIL_FORSHELL 0x0002 /* icon is to be displayed in a ShellFolder */
706 #define GIL_ASYNC 0x0020 /* this is an async extract, return E_ASYNC */
708 /* GetIconLocation() return flags */
709 #define GIL_SIMULATEDOC 0x0001 /* simulate this document icon for this */
710 #define GIL_PERINSTANCE 0x0002 /* icons from this class are per instance (each file has its own) */
711 #define GIL_PERCLASS 0x0004 /* icons from this class per class (shared for all files of this type) */
712 #define GIL_NOTFILENAME 0x0008 /* location is not a filename, must call ::ExtractIcon */
713 #define GIL_DONTCACHE 0x0010 /* this icon should not be cached */
715 typedef struct IExtractIcon IExtractIcon,*LPEXTRACTICON;
716 typedef struct IExtractIcon_VTable
717 { /*** IUnknown methods ***/
718 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
719 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
720 STDMETHOD_(ULONG,Release) (THIS) PURE;
722 /*** IExtractIcon methods ***/
723 STDMETHOD(GetIconLocation)(THIS_ UINT uFlags, LPSTR szIconFile, UINT cchMax,INT * piIndex, UINT * pwFlags) PURE;
724 STDMETHOD(Extract)(THIS_ LPCSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize) PURE;
725 }IExtractIcon_VTable,*LPEXTRACTICON_VTABLE;
728 { LPEXTRACTICON_VTABLE lpvtbl;
735 DWORD WINAPI SHMapPIDLToSystemImageListIndex(LPSHELLFOLDER sh,LPITEMIDLIST pidl,DWORD z);
737 /****************************************************************************
738 * IShellIcon interface
741 #define THIS LPSHELLICON this
743 typedef struct IShellIcon_VTable
744 { /*** IUnknown methods ***/
745 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
746 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
747 STDMETHOD_(ULONG,Release) (THIS) PURE;
749 /*** IShellIcon methods ***/
750 STDMETHOD(GetIconOf)(THIS_ LPCITEMIDLIST pidl, UINT flags, LPINT lpIconIndex) PURE;
751 } IShellIcon_VTable,*LPSHELLICON_VTABLE;
754 { LPSHELLICON_VTABLE lpvtbl;
758 /****************************************************************************
759 * IDockingWindowFrame interface
761 #define THIS LPDOCKINGWINDOWFRAME this
763 #define DWFRF_NORMAL 0x0000 /* femove toolbar flags*/
764 #define DWFRF_DELETECONFIGDATA 0x0001
765 #define DWFAF_HIDDEN 0x0001 /* add tolbar*/
767 typedef struct IDockingWindowFrame_VTable
768 { STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
769 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
770 STDMETHOD_(ULONG,Release) (THIS) PURE;
772 /*** IOleWindow methods ***/
773 STDMETHOD(GetWindow) (THIS_ HWND * lphwnd) PURE;
774 STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL fEnterMode) PURE;
776 /*** IDockingWindowFrame methods ***/
777 STDMETHOD(AddToolbar) (THIS_ IUnknown* punkSrc, LPCWSTR pwszItem, DWORD dwAddFlags) PURE;
778 STDMETHOD(RemoveToolbar) (THIS_ IUnknown* punkSrc, DWORD dwRemoveFlags) PURE;
779 STDMETHOD(FindToolbar) (THIS_ LPCWSTR pwszItem, REFIID riid, LPVOID* ppvObj) PURE;
780 } IDockingWindowFrame_VTable, *LPDOCKINGWINDOWFRAME_VTABLE;
782 struct tagDOCKINGWINDOWFRAME
783 { LPDOCKINGWINDOWFRAME_VTABLE lpvtbl;
788 /****************************************************************************
791 #define SE_ERR_FNF 2 /* file not found */
792 #define SE_ERR_PNF 3 /* path not found */
793 #define SE_ERR_ACCESSDENIED 5 /* access denied */
794 #define SE_ERR_OOM 8 /* out of memory */
795 #define SE_ERR_DLLNOTFOUND 32
796 #define SE_ERR_SHARE 26
797 #define SE_ERR_ASSOCINCOMPLETE 27
798 #define SE_ERR_DDETIMEOUT 28
799 #define SE_ERR_DDEFAIL 29
800 #define SE_ERR_DDEBUSY 30
801 #define SE_ERR_NOASSOC 31
803 #define SEE_MASK_CLASSNAME 0x00000001
804 #define SEE_MASK_CLASSKEY 0x00000003
805 #define SEE_MASK_IDLIST 0x00000004
806 #define SEE_MASK_INVOKEIDLIST 0x0000000c
807 #define SEE_MASK_ICON 0x00000010
808 #define SEE_MASK_HOTKEY 0x00000020
809 #define SEE_MASK_NOCLOSEPROCESS 0x00000040
810 #define SEE_MASK_CONNECTNETDRV 0x00000080
811 #define SEE_MASK_FLAG_DDEWAIT 0x00000100
812 #define SEE_MASK_DOENVSUBST 0x00000200
813 #define SEE_MASK_FLAG_NO_UI 0x00000400
814 #define SEE_MASK_UNICODE 0x00004000
815 #define SEE_MASK_NO_CONSOLE 0x00008000
816 #define SEE_MASK_ASYNCOK 0x00100000
817 #define SEE_MASK_HMONITOR 0x00200000
819 typedef struct _SHELLEXECUTEINFOA
829 /* Optional fields */
839 } SHELLEXECUTEINFOA, *LPSHELLEXECUTEINFOA;
841 typedef struct _SHELLEXECUTEINFOW
847 LPCWSTR lpParameters;
861 } SHELLEXECUTEINFOW, *LPSHELLEXECUTEINFOW;
863 #define SHELLEXECUTEINFO WINELIB_NAME_AW(SHELLEXECUTEINFO)
864 #define LPSHELLEXECUTEINFO WINELIB_NAME_AW(LPSHELLEXECUTEINFO)
866 BOOL WINAPI ShellExecuteExA(LPSHELLEXECUTEINFOA lpExecInfo);
867 BOOL WINAPI ShellExecuteExW(LPSHELLEXECUTEINFOW lpExecInfo);
868 #define ShellExecuteEx WINELIB_NAME_AW(ShellExecuteEx)
870 void WINAPI WinExecErrorA(HWND hwnd,INT error, LPCSTR lpstrFileName, LPCSTR lpstrTitle);
871 void WINAPI WinExecErrorW(HWND hwnd,INT error, LPCWSTR lpstrFileName, LPCWSTR lpstrTitle);
872 #define WinExecError WINELIB_NAME_AW(WinExecError)
876 /****************************************************************************
877 * SHBrowseForFolder API
879 typedef INT (CALLBACK* BFFCALLBACK)(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData);
881 typedef struct tagBROWSEINFOA {
883 LPCITEMIDLIST pidlRoot;
884 LPSTR pszDisplayName;
890 } BROWSEINFOA, *PBROWSEINFOA, *LPBROWSEINFOA;
892 typedef struct tagBROWSEINFOW {
894 LPCITEMIDLIST pidlRoot;
895 LPWSTR pszDisplayName;
901 } BROWSEINFOW, *PBROWSEINFOW, *LPBROWSEINFOW;
903 #define BROWSEINFO WINELIB_NAME_AW(BROWSEINFO)
904 #define PBROWSEINFO WINELIB_NAME_AW(PBROWSEINFO)
905 #define LPBROWSEINFO WINELIB_NAME_AW(LPBROWSEINFO)
907 /* Browsing for directory. */
908 #define BIF_RETURNONLYFSDIRS 0x0001
909 #define BIF_DONTGOBELOWDOMAIN 0x0002
910 #define BIF_STATUSTEXT 0x0004
911 #define BIF_RETURNFSANCESTORS 0x0008
912 #define BIF_EDITBOX 0x0010
913 #define BIF_VALIDATE 0x0020
915 #define BIF_BROWSEFORCOMPUTER 0x1000
916 #define BIF_BROWSEFORPRINTER 0x2000
917 #define BIF_BROWSEINCLUDEFILES 0x4000
919 /* message from browser */
920 #define BFFM_INITIALIZED 1
921 #define BFFM_SELCHANGED 2
922 #define BFFM_VALIDATEFAILEDA 3 /* lParam:szPath ret:1(cont),0(EndDialog) */
923 #define BFFM_VALIDATEFAILEDW 4 /* lParam:wzPath ret:1(cont),0(EndDialog) */
925 /* messages to browser */
926 #define BFFM_SETSTATUSTEXTA (WM_USER+100)
927 #define BFFM_ENABLEOK (WM_USER+101)
928 #define BFFM_SETSELECTIONA (WM_USER+102)
929 #define BFFM_SETSELECTIONW (WM_USER+103)
930 #define BFFM_SETSTATUSTEXTW (WM_USER+104)
934 #define SHBrowseForFolder SHBrowseForFolderW
935 #define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTW
936 #define BFFM_SETSELECTION BFFM_SETSELECTIONW
938 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDW
940 #define SHBrowseForFolder SHBrowseForFolderA
941 #define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTA
942 #define BFFM_SETSELECTION BFFM_SETSELECTIONA
944 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDA
948 LPITEMIDLIST WINAPI SHBrowseForFolderA(LPBROWSEINFOA lpbi);
949 /*LPITEMIDLIST WINAPI SHBrowseForFolder32W(LPBROWSEINFO32W lpbi);*/
950 #define SHBrowseForFolder WINELIB_NAME_AW(SHBrowseForFolder)
952 /****************************************************************************
953 * SHGetDataFromIDList API
955 #define SHGDFIL_FINDDATA 1
956 #define SHGDFIL_NETRESOURCE 2
957 #define SHGDFIL_DESCRIPTIONID 3
959 #define SHDID_ROOT_REGITEM 1
960 #define SHDID_FS_FILE 2
961 #define SHDID_FS_DIRECTORY 3
962 #define SHDID_FS_OTHER 4
963 #define SHDID_COMPUTER_DRIVE35 5
964 #define SHDID_COMPUTER_DRIVE525 6
965 #define SHDID_COMPUTER_REMOVABLE 7
966 #define SHDID_COMPUTER_FIXED 8
967 #define SHDID_COMPUTER_NETDRIVE 9
968 #define SHDID_COMPUTER_CDROM 10
969 #define SHDID_COMPUTER_RAMDISK 11
970 #define SHDID_COMPUTER_OTHER 12
971 #define SHDID_NET_DOMAIN 13
972 #define SHDID_NET_SERVER 14
973 #define SHDID_NET_SHARE 15
974 #define SHDID_NET_RESTOFNET 16
975 #define SHDID_NET_OTHER 17
977 typedef struct _SHDESCRIPTIONID
978 { DWORD dwDescriptionId;
980 } SHDESCRIPTIONID, *LPSHDESCRIPTIONID;
982 HRESULT WINAPI SHGetDataFromIDListA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID pv, int cb);
983 HRESULT WINAPI SHGetDataFromIDListW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID pv, int cb);
984 #define SHGetDataFromIDList WINELIB_NAME_AW(SHGetDataFromIDList)
987 /****************************************************************************
992 * IShellFolderViewCallback Callback
993 * This "callback" is called by the shells default IShellView implementation (that
994 * we got using SHCreateShellViewEx()), to notify us of the various things that
995 * are happening to the shellview (and ask for things too).
997 * You don't have to support anything here - anything you don't want to
998 * handle, the shell will do itself if you just return E_NOTIMPL. This parameters
999 * that the shell passes to this function are entirely undocumented.
1001 * HOWEVER, as the cabview sample as originally written used this callback, the
1002 * writers implemented the callback mechanism on top of their own IShellView.
1003 * Look there for some clues on what to do here.
1006 typedef HRESULT(CALLBACK *SHELLVIEWPROC)(DWORD dwUserParam,LPSHELLFOLDER psf,
1007 HWND hwnd,UINT uMsg,UINT wParam,LPARAM lParam);
1009 /* NF valid values for the "viewmode" item of the SHELLTEMPLATE*/
1010 #define NF_INHERITVIEW 0x0000
1011 #define NF_LOCALVIEW 0x0001
1013 typedef struct _SHELLVIEWDATA /* idl */
1015 LPSHELLFOLDER pShellFolder;
1018 DWORD v3; /* always 0 */
1019 SHELLVIEWPROC pCallBack;
1020 DWORD viewmode; /* NF_* enum */
1021 } SHELLVIEWDATA, * LPSHELLVIEWDATA;
1024 The shell keeps track of some per-user state to handle display
1025 options that is of majorinterest to ISVs.
1026 The key one requested right now is "DoubleClickInWebView".
1029 { BOOL fShowAllObjects : 1;
1030 BOOL fShowExtensions : 1;
1031 BOOL fNoConfirmRecycle : 1;
1032 BOOL fShowSysFiles : 1;
1033 BOOL fShowCompColor : 1;
1034 BOOL fDoubleClickInWebView : 1;
1035 BOOL fDesktopHTML : 1;
1036 BOOL fWin95Classic : 1;
1037 BOOL fDontPrettyPath : 1;
1038 BOOL fShowAttribCol : 1;
1039 BOOL fMapNetDrvBtn : 1;
1040 BOOL fShowInfoTip : 1;
1041 BOOL fHideIcons : 1;
1042 UINT fRestFlags : 3;
1043 } SHELLFLAGSTATE, * LPSHELLFLAGSTATE;
1046 DWORD WINAPI SHGetMalloc(LPMALLOC *lpmal) ;
1055 #endif /* __WINE_SHLOBJ_H */