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"
8 #include "wine/obj_shellfolder.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 tagSHELLVIEW
*LPSHELLVIEW
, IShellView
;
31 typedef struct tagSHELLBROWSER
*LPSHELLBROWSER
,IShellBrowser
;
32 typedef struct tagSHELLICON
*LPSHELLICON
, IShellIcon
;
33 typedef struct tagDOCKINGWINDOWFRAME
*LPDOCKINGWINDOWFRAME
, IDockingWindowFrame
;
34 typedef struct tagCOMMDLGBROWSER
*LPCOMMDLGBROWSER
, ICommDlgBrowser
;
37 /*****************************************************************************
38 * IContextMenu interface
40 #define THIS LPCONTEXTMENU me
42 /* default menu items*/
46 #define IDM_LAST IDM_RENAME
48 /* QueryContextMenu uFlags */
49 #define CMF_NORMAL 0x00000000
50 #define CMF_DEFAULTONLY 0x00000001
51 #define CMF_VERBSONLY 0x00000002
52 #define CMF_EXPLORE 0x00000004
53 #define CMF_NOVERBS 0x00000008
54 #define CMF_CANRENAME 0x00000010
55 #define CMF_NODEFAULT 0x00000020
56 #define CMF_INCLUDESTATIC 0x00000040
57 #define CMF_RESERVED 0xffff0000 /* View specific */
59 /* GetCommandString uFlags */
60 #define GCS_VERBA 0x00000000 /* canonical verb */
61 #define GCS_HELPTEXTA 0x00000001 /* help text (for status bar) */
62 #define GCS_VALIDATEA 0x00000002 /* validate command exists */
63 #define GCS_VERBW 0x00000004 /* canonical verb (unicode) */
64 #define GCS_HELPTEXTW 0x00000005 /* help text (unicode version) */
65 #define GCS_VALIDATEW 0x00000006 /* validate command exists (unicode) */
66 #define GCS_UNICODE 0x00000004 /* for bit testing - Unicode string */
68 #define GCS_VERB GCS_VERBA
69 #define GCS_HELPTEXT GCS_HELPTEXTA
70 #define GCS_VALIDATE GCS_VALIDATEA
72 #define CMDSTR_NEWFOLDERA "NewFolder"
73 #define CMDSTR_VIEWLISTA "ViewList"
74 #define CMDSTR_VIEWDETAILSA "ViewDetails"
75 #define CMDSTR_NEWFOLDERW L"NewFolder"
76 #define CMDSTR_VIEWLISTW L"ViewList"
77 #define CMDSTR_VIEWDETAILSW L"ViewDetails"
79 #define CMDSTR_NEWFOLDER CMDSTR_NEWFOLDERA
80 #define CMDSTR_VIEWLIST CMDSTR_VIEWLISTA
81 #define CMDSTR_VIEWDETAILS CMDSTR_VIEWDETAILSA
83 #define CMIC_MASK_HOTKEY SEE_MASK_HOTKEY
84 #define CMIC_MASK_ICON SEE_MASK_ICON
85 #define CMIC_MASK_FLAG_NO_UI SEE_MASK_FLAG_NO_UI
86 #define CMIC_MASK_UNICODE SEE_MASK_UNICODE
87 #define CMIC_MASK_NO_CONSOLE SEE_MASK_NO_CONSOLE
88 #define CMIC_MASK_HASLINKNAME SEE_MASK_HASLINKNAME
89 #define CMIC_MASK_FLAG_SEP_VDM SEE_MASK_FLAG_SEPVDM
90 #define CMIC_MASK_HASTITLE SEE_MASK_HASTITLE
91 #define CMIC_MASK_ASYNCOK SEE_MASK_ASYNCOK
93 #define CMIC_MASK_PTINVOKE 0x20000000
95 /*NOTE: When SEE_MASK_HMONITOR is set, hIcon is treated as hMonitor */
96 typedef struct tagCMINVOKECOMMANDINFO
97 { DWORD cbSize
; /* sizeof(CMINVOKECOMMANDINFO) */
98 DWORD fMask
; /* any combination of CMIC_MASK_* */
99 HWND hwnd
; /* might be NULL (indicating no owner window) */
100 LPCSTR lpVerb
; /* either a string or MAKEINTRESOURCE(idOffset) */
101 LPCSTR lpParameters
; /* might be NULL (indicating no parameter) */
102 LPCSTR lpDirectory
; /* might be NULL (indicating no specific directory) */
103 INT nShow
; /* one of SW_ values for ShowWindow() API */
107 } CMINVOKECOMMANDINFO
, *LPCMINVOKECOMMANDINFO
;
109 typedef struct tagCMInvokeCommandInfoEx
110 { DWORD cbSize
; /* must be sizeof(CMINVOKECOMMANDINFOEX) */
111 DWORD fMask
; /* any combination of CMIC_MASK_* */
112 HWND hwnd
; /* might be NULL (indicating no owner window) */
113 LPCSTR lpVerb
; /* either a string or MAKEINTRESOURCE(idOffset) */
114 LPCSTR lpParameters
; /* might be NULL (indicating no parameter) */
115 LPCSTR lpDirectory
; /* might be NULL (indicating no specific directory) */
116 INT nShow
; /* one of SW_ values for ShowWindow() API */
121 LPCSTR lpTitle
; /* For CreateProcess-StartupInfo.lpTitle */
122 LPCWSTR lpVerbW
; /* Unicode verb (for those who can use it) */
123 LPCWSTR lpParametersW
; /* Unicode parameters (for those who can use it) */
124 LPCWSTR lpDirectoryW
; /* Unicode directory (for those who can use it) */
125 LPCWSTR lpTitleW
; /* Unicode title (for those who can use it) */
126 POINT ptInvoke
; /* Point where it's invoked */
128 } CMINVOKECOMMANDINFOEX
, *LPCMINVOKECOMMANDINFOEX
;
132 #define ICOM_INTERFACE IContextMenu
133 #define IContextMenu_METHODS \
134 ICOM_METHOD5(HRESULT,QueryContextMenu, HMENU,hmenu, UINT,indexMenu, UINT,idCmdFirst, UINT,idCmdLast, UINT,uFlags) \
135 ICOM_METHOD1(HRESULT,InvokeCommand, LPCMINVOKECOMMANDINFO,lpici) \
136 ICOM_METHOD5(HRESULT,GetCommandString, UINT,idCmd, UINT,uType, UINT*,pwReserved, LPSTR,pszName, UINT,cchMax) \
137 ICOM_METHOD3(HRESULT,HandleMenuMsg, UINT,uMsg,WPARAM,wParam,LPARAM,lParam) \
138 void * guard; /*possibly another nasty entry from ContextMenu3 ?*/
139 #define IContextMenu_IMETHODS \
142 ICOM_DEFINE(IContextMenu
, IUnknown
)
143 #undef ICOM_INTERFACE
145 #ifdef ICOM_CINTERFACE
146 // *** IUnknown methods *** //
147 #define IContextMenu_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
148 #define IContextMenu_AddRef(p) ICOM_CALL (AddRef,p)
149 #define IContextMenu_Release(p) ICOM_CALL (Release,p)
150 // *** IContextMenu methods *** //
151 #define IContextMenu_QueryContextMenu(p,a,b,c,d,e) ICOM_CALL5(QueryContextMenu,p,a,b,c,d,e)
152 #define IContextMenu_InvokeCommand(p,a) ICOM_CALL1(InvokeCommand,p,a)
153 #define IContextMenu_GetCommandString(p,a,b,c,d,e) ICOM_CALL5(GetCommandString,p,a,b,c,d,e)
154 #define IContextMenu_HandleMenuMsg(p,a,b,c) ICOM_CALL3(HandleMenuMsg,p,a,b,c)
157 /* DATAOBJECT_InitShellIDList*/
158 #define CFSTR_SHELLIDLIST "Shell IDList Array" /* CF_IDLIST */
160 extern UINT cfShellIDList
;
167 #define CFSTR_SHELLIDLISTOFFSET "Shell Object Offsets" /* CF_OBJECTPOSITIONS */
168 #define CFSTR_NETRESOURCES "Net Resource" /* CF_NETRESOURCE */
170 /* DATAOBJECT_InitFileGroupDesc */
171 #define CFSTR_FILEDESCRIPTORA "FileGroupDescriptor" /* CF_FILEGROUPDESCRIPTORA */
172 extern UINT cfFileGroupDesc
;
174 #define CFSTR_FILEDESCRIPTORW "FileGroupDescriptorW" /* CF_FILEGROUPDESCRIPTORW */
176 /* DATAOBJECT_InitFileContents*/
177 #define CFSTR_FILECONTENTS "FileContents" /* CF_FILECONTENTS */
178 extern UINT cfFileContents
;
180 #define CFSTR_FILENAMEA "FileName" /* CF_FILENAMEA */
181 #define CFSTR_FILENAMEW "FileNameW" /* CF_FILENAMEW */
182 #define CFSTR_PRINTERGROUP "PrinterFriendlyName" /* CF_PRINTERS */
183 #define CFSTR_FILENAMEMAPA "FileNameMap" /* CF_FILENAMEMAPA */
184 #define CFSTR_FILENAMEMAPW "FileNameMapW" /* CF_FILENAMEMAPW */
185 #define CFSTR_SHELLURL "UniformResourceLocator"
186 #define CFSTR_PREFERREDDROPEFFECT "Preferred DropEffect"
187 #define CFSTR_PERFORMEDDROPEFFECT "Performed DropEffect"
188 #define CFSTR_PASTESUCCEEDED "Paste Succeeded"
189 #define CFSTR_INDRAGLOOP "InShellDragLoop"
191 /**************************************************************************
192 * IDLList "Item ID List List"
195 * interal data holder for IDataObject
197 typedef struct tagLPIDLLIST
*LPIDLLIST
, IDLList
;
199 #define THIS LPIDLLIST me
207 typedef struct IDLList_VTable
208 { STDMETHOD_(UINT
, GetState
)(THIS
);
209 STDMETHOD_(LPITEMIDLIST
, GetElement
)(THIS_ UINT nIndex
);
210 STDMETHOD_(UINT
, GetCount
)(THIS
);
211 STDMETHOD_(BOOL
, StoreItem
)(THIS_ LPITEMIDLIST pidl
);
212 STDMETHOD_(BOOL
, AddItems
)(THIS_ LPITEMIDLIST
*apidl
, UINT cidl
);
213 STDMETHOD_(BOOL
, InitList
)(THIS
);
214 STDMETHOD_(void, CleanList
)(THIS
);
215 } IDLList_VTable
,*LPIDLLIST_VTABLE
;
218 { LPIDLLIST_VTABLE lpvtbl
;
223 extern LPIDLLIST
IDLList_Constructor (UINT uStep
);
224 extern void IDLList_Destructor(LPIDLLIST me
);
228 /*****************************************************************************
229 * IShellExtInit interface
231 #define THIS LPSHELLEXTINIT me
233 typedef struct IShellExtInit_VTable
234 { /* *** IUnknown methods *** */
235 STDMETHOD(QueryInterface
) (THIS_ REFIID riid
, LPVOID
* ppvObj
) PURE
;
236 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
237 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
239 /* *** IShellExtInit methods *** */
240 STDMETHOD(Initialize
)(THIS_ LPCITEMIDLIST pidlFolder
, LPDATAOBJECT lpdobj
, HKEY hkeyProgID
) PURE
;
241 } IShellExtInit_VTable
,*LPSHELLEXTINIT_VTABLE
;
243 struct tagSHELLEXTINIT
244 { LPSHELLEXTINIT_VTABLE lpvtbl
;
250 /*-------------------------------------------------------------------------- */
254 /* FOLDERSETTINGS is a data structure that explorer passes from one folder */
255 /* view to another, when the user is browsing. It calls ISV::GetCurrentInfo */
256 /* member to get the current settings and pass it to ISV::CreateViewWindow */
257 /* to allow the next folder view "inherit" it. These settings assumes a */
258 /* particular UI (which the shell's folder view has), and shell extensions */
259 /* may or may not use those settings. */
261 /*-------------------------------------------------------------------------- */
263 typedef LPBYTE LPVIEWSETTINGS
;
266 /* FWF_DESKTOP implies FWF_TRANSPARENT/NOCLIENTEDGE/NOSCROLL */
268 { FWF_AUTOARRANGE
= 0x0001,
269 FWF_ABBREVIATEDNAMES
= 0x0002,
270 FWF_SNAPTOGRID
= 0x0004,
271 FWF_OWNERDATA
= 0x0008,
272 FWF_BESTFITWINDOW
= 0x0010,
273 FWF_DESKTOP
= 0x0020,
274 FWF_SINGLESEL
= 0x0040,
275 FWF_NOSUBFOLDERS
= 0x0080,
276 FWF_TRANSPARENT
= 0x0100,
277 FWF_NOCLIENTEDGE
= 0x0200,
278 FWF_NOSCROLL
= 0x0400,
279 FWF_ALIGNLEFT
= 0x0800,
280 FWF_SINGLECLICKACTIVATE
=0x8000 /* TEMPORARY -- NO UI FOR THIS */
291 { UINT ViewMode
; /* View mode (FOLDERVIEWMODE values) */
292 UINT fFlags
; /* View options (FOLDERFLAGS bits) */
293 } FOLDERSETTINGS
, *LPFOLDERSETTINGS
;
295 typedef const FOLDERSETTINGS
* LPCFOLDERSETTINGS
;
298 /************************************************************************
299 * IShellBrowser interface
301 #define THIS LPSHELLBROWSER me
302 /* targets for GetWindow/SendControlMsg */
303 #define FCW_STATUS 0x0001
304 #define FCW_TOOLBAR 0x0002
305 #define FCW_TREE 0x0003
306 #define FCW_INTERNETBAR 0x0006
307 #define FCW_PROGRESS 0x0008
309 /* wFlags for BrowseObject*/
310 #define SBSP_DEFBROWSER 0x0000
311 #define SBSP_SAMEBROWSER 0x0001
312 #define SBSP_NEWBROWSER 0x0002
314 #define SBSP_DEFMODE 0x0000
315 #define SBSP_OPENMODE 0x0010
316 #define SBSP_EXPLOREMODE 0x0020
318 #define SBSP_ABSOLUTE 0x0000
319 #define SBSP_RELATIVE 0x1000
320 #define SBSP_PARENT 0x2000
321 #define SBSP_NAVIGATEBACK 0x4000
322 #define SBSP_NAVIGATEFORWARD 0x8000
324 #define SBSP_ALLOW_AUTONAVIGATE 0x10000
326 #define SBSP_INITIATEDBYHLINKFRAME 0x80000000
327 #define SBSP_REDIRECT 0x40000000
328 #define SBSP_WRITENOHISTORY 0x08000000
330 /* uFlage for SetToolbarItems */
331 #define FCT_MERGE 0x0001
332 #define FCT_CONFIGABLE 0x0002
333 #define FCT_ADDTOEND 0x0004
335 /* undocumented, found in the web posted by Chris Becke */
336 #define CWM_SETPATH (WM_USER+2)
337 #define CWM_WANTIDLE (WM_USER+3)
338 #define CWM_GETSETCURRENTINFO (WM_USER+4)
339 #define CWM_SELECTITEM (WM_USER+5)
340 #define CWM_STOPWAITING (WM_USER+6)
341 #define CWM_GETISHELLBROWSER (WM_USER+7)
343 typedef struct IShellBrowser_VTable
344 { /* *** IUnknown methods *** */
345 STDMETHOD(QueryInterface
) (THIS_ REFIID riid
, LPVOID
* ppvObj
) PURE
;
346 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
347 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
349 /* *** IOleWindow methods *** */
350 STDMETHOD(GetWindow
) (THIS_ HWND
* lphwnd
) PURE
;
351 STDMETHOD(ContextSensitiveHelp
) (THIS_ BOOL fEnterMode
) PURE
;
353 /* *** IShellBrowser methods *** (same as IOleInPlaceFrame) */
354 STDMETHOD(InsertMenusSB
) (THIS_ HMENU hmenuShared
, LPOLEMENUGROUPWIDTHS lpMenuWidths
) PURE
;
355 STDMETHOD(SetMenuSB
) (THIS_ HMENU hmenuShared
, HOLEMENU holemenuReserved
, HWND hwndActiveObject
) PURE
;
356 STDMETHOD(RemoveMenusSB
) (THIS_ HMENU hmenuShared
) PURE
;
357 STDMETHOD(SetStatusTextSB
) (THIS_ LPCOLESTR lpszStatusText
) PURE
;
358 STDMETHOD(EnableModelessSB
) (THIS_ BOOL fEnable
) PURE
;
359 STDMETHOD(TranslateAcceleratorSB
) (THIS_ LPMSG lpmsg
, WORD wID
) PURE
;
361 /* *** IShellBrowser methods *** */
362 STDMETHOD(BrowseObject
)(THIS_ LPCITEMIDLIST pidl
, UINT wFlags
) PURE
;
363 STDMETHOD(GetViewStateStream
)(THIS_ DWORD grfMode
, LPSTREAM
*ppStrm
) PURE
;
364 STDMETHOD(GetControlWindow
)(THIS_ UINT id
, HWND
* lphwnd
) PURE
;
365 STDMETHOD(SendControlMsg
)(THIS_ UINT id
, UINT uMsg
, WPARAM wParam
, LPARAM lParam
, LRESULT
* pret
) PURE
;
366 STDMETHOD(QueryActiveShellView
)(THIS_ IShellView
** ppshv
) PURE
;
367 STDMETHOD(OnViewWindowActive
)(THIS_ IShellView
* ppshv
) PURE
;
368 STDMETHOD(SetToolbarItems
)(THIS_ LPTBBUTTON lpButtons
, UINT nButtons
, UINT uFlags
) PURE
;
369 } *LPSHELLBROWSER_VTABLE
,IShellBrowser_VTable
;
371 struct tagSHELLBROWSER
372 { LPSHELLBROWSER_VTABLE lpvtbl
;
378 /************************************************************************
379 * IShellView interface
381 #define THIS LPSHELLVIEW me
383 /* shellview select item flags*/
384 #define SVSI_DESELECT 0x0000
385 #define SVSI_SELECT 0x0001
386 #define SVSI_EDIT 0x0003 /* includes select */
387 #define SVSI_DESELECTOTHERS 0x0004
388 #define SVSI_ENSUREVISIBLE 0x0008
389 #define SVSI_FOCUSED 0x0010
391 /* shellview get item object flags */
392 #define SVGIO_BACKGROUND 0x00000000
393 #define SVGIO_SELECTION 0x00000001
394 #define SVGIO_ALLVIEW 0x00000002
396 /* The explorer dispatches WM_COMMAND messages based on the range of
397 command/menuitem IDs. All the IDs of menuitems that the view (right
398 pane) inserts must be in FCIDM_SHVIEWFIRST/LAST (otherwise, the explorer
399 won't dispatch them). The view should not deal with any menuitems
400 in FCIDM_BROWSERFIRST/LAST (otherwise, it won't work with the future
401 version of the shell).
403 FCIDM_SHVIEWFIRST/LAST for the right pane (IShellView)
404 FCIDM_BROWSERFIRST/LAST for the explorer frame (IShellBrowser)
405 FCIDM_GLOBAL/LAST for the explorer's submenu IDs
407 #define FCIDM_SHVIEWFIRST 0x0000
409 #define FCIDM_SHVIEW_ARRANGE 0x7001
410 #define FCIDM_SHVIEW_DELETE 0x7011
411 #define FCIDM_SHVIEW_PROPERTIES 0x7013
412 #define FCIDM_SHVIEW_CUT 0x7018
413 #define FCIDM_SHVIEW_COPY 0x7019
414 #define FCIDM_SHVIEW_INSERT 0x701A
415 #define FCIDM_SHVIEW_UNDO 0x701B
416 #define FCIDM_SHVIEW_INSERTLINK 0x701C
417 #define FCIDM_SHVIEW_SELECTALL 0x7021
418 #define FCIDM_SHVIEW_INVERTSELECTION 0x7022
419 #define FCIDM_SHVIEW_BIGICON 0x7029
420 #define FCIDM_SHVIEW_SMALLICON 0x702A
421 #define FCIDM_SHVIEW_LISTVIEW 0x702B
422 #define FCIDM_SHVIEW_REPORTVIEW 0x702C
423 #define FCIDM_SHVIEW_AUTOARRANGE 0x7031
424 #define FCIDM_SHVIEW_SNAPTOGRID 0x7032
425 #define FCIDM_SHVIEW_HELP 0x7041
427 #define FCIDM_SHVIEWLAST 0x7fff
428 #define FCIDM_BROWSERFIRST 0xA000
429 /* undocumented toolbar items from stddlg's*/
430 #define FCIDM_TB_SMALLICON 0xA003
431 #define FCIDM_TB_REPORTVIEW 0xA004
433 #define FCIDM_BROWSERLAST 0xbf00
434 #define FCIDM_GLOBALFIRST 0x8000
435 #define FCIDM_GLOBALLAST 0x9fff
438 * Global submenu IDs and separator IDs
440 #define FCIDM_MENU_FILE (FCIDM_GLOBALFIRST+0x0000)
441 #define FCIDM_MENU_EDIT (FCIDM_GLOBALFIRST+0x0040)
442 #define FCIDM_MENU_VIEW (FCIDM_GLOBALFIRST+0x0080)
443 #define FCIDM_MENU_VIEW_SEP_OPTIONS (FCIDM_GLOBALFIRST+0x0081)
444 #define FCIDM_MENU_TOOLS (FCIDM_GLOBALFIRST+0x00c0)
445 #define FCIDM_MENU_TOOLS_SEP_GOTO (FCIDM_GLOBALFIRST+0x00c1)
446 #define FCIDM_MENU_HELP (FCIDM_GLOBALFIRST+0x0100)
447 #define FCIDM_MENU_FIND (FCIDM_GLOBALFIRST+0x0140)
448 #define FCIDM_MENU_EXPLORE (FCIDM_GLOBALFIRST+0x0150)
449 #define FCIDM_MENU_FAVORITES (FCIDM_GLOBALFIRST+0x0170)
451 /* control IDs known to the view */
452 #define FCIDM_TOOLBAR (FCIDM_BROWSERFIRST + 0)
453 #define FCIDM_STATUS (FCIDM_BROWSERFIRST + 1)
455 /* uState values for IShellView::UIActivate */
457 { SVUIA_DEACTIVATE
= 0,
458 SVUIA_ACTIVATE_NOFOCUS
= 1,
459 SVUIA_ACTIVATE_FOCUS
= 2,
460 SVUIA_INPLACEACTIVATE
= 3 /* new flag for IShellView2 */
465 typedef struct IShellView_VTable
466 { /* *** IUnknown methods *** */
467 STDMETHOD(QueryInterface
) (THIS_ REFIID riid
, LPVOID
* ppvObj
) PURE
;
468 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
469 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
471 /* *** IOleWindow methods *** */
472 STDMETHOD(GetWindow
) (THIS_ HWND
* lphwnd
) PURE
;
473 STDMETHOD(ContextSensitiveHelp
) (THIS_ BOOL fEnterMode
) PURE
;
475 /* *** IShellView methods *** */
476 STDMETHOD(TranslateAccelerator
) (THIS_ LPMSG lpmsg
) PURE
;
477 STDMETHOD(EnableModeless
) (THIS_ BOOL fEnable
) PURE
;
478 STDMETHOD(UIActivate
) (THIS_ UINT uState
) PURE
;
479 STDMETHOD(Refresh
) (THIS
) PURE
;
480 STDMETHOD(CreateViewWindow
)(THIS_ IShellView
*lpPrevView
,LPCFOLDERSETTINGS lpfs
, IShellBrowser
* psb
,RECT
* prcView
, HWND
*phWnd
) PURE
;
481 STDMETHOD(DestroyViewWindow
)(THIS
) PURE
;
482 STDMETHOD(GetCurrentInfo
)(THIS_ LPFOLDERSETTINGS lpfs
) PURE
;
483 STDMETHOD(AddPropertySheetPages
)(THIS_ DWORD dwReserved
,LPFNADDPROPSHEETPAGE lpfn
, LPARAM lparam
) PURE
;
484 STDMETHOD(SaveViewState
)(THIS
) PURE
;
485 STDMETHOD(SelectItem
)(THIS_ LPCITEMIDLIST pidlItem
, UINT uFlags
) PURE
;
486 STDMETHOD(GetItemObject
)(THIS_ UINT uItem
, REFIID riid
,LPVOID
*ppv
) PURE
;
487 } IShellView_VTable
,*LPSHELLVIEW_VTABLE
;
490 { LPSHELLVIEW_VTABLE lpvtbl
;
493 LPSHELLFOLDER pSFParent
;
494 LPSHELLBROWSER pShellBrowser
;
495 LPCOMMDLGBROWSER pCommDlgBrowser
;
499 FOLDERSETTINGS FolderSettings
;
503 LPITEMIDLIST
*aSelectedItems
;
506 typedef GUID SHELLVIEWID
;
507 #define SV_CLASS_NAME ("SHELLDLL_DefView")
510 /****************************************************************************
511 * ICommDlgBrowser interface
513 #define THIS LPCOMMDLGBROWSER me
515 /* for OnStateChange*/
516 #define CDBOSC_SETFOCUS 0x00000000
517 #define CDBOSC_KILLFOCUS 0x00000001
518 #define CDBOSC_SELCHANGE 0x00000002
519 #define CDBOSC_RENAME 0x00000003
521 typedef struct ICommDlgBrowser_VTable
522 { /* IUnknown methods */
523 STDMETHOD(QueryInterface
) (THIS_ REFIID riid
, LPVOID
* ppvObj
) PURE
;
524 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
525 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
527 /* ICommDlgBrowser methods */
528 STDMETHOD(OnDefaultCommand
) (THIS_ LPSHELLVIEW ppshv
) PURE
;
529 STDMETHOD(OnStateChange
) (THIS_ LPSHELLVIEW ppshv
, ULONG uChange
) PURE
;
530 STDMETHOD(IncludeObject
) (THIS_ LPSHELLVIEW ppshv
, LPCITEMIDLIST pidl
) PURE
;
531 } ICommDlgBrowser_VTable
,*LPCOMMDLGBROWSER_VTABLE
;
533 struct tagCOMMDLGBROWSER
534 { LPCOMMDLGBROWSER_VTABLE lpvtbl
;
539 /****************************************************************************
540 * IExtractIconinterface
543 * Is the ExtractIconA interface
545 #define THIS LPEXTRACTICON me
547 /* GetIconLocation() input flags*/
548 #define GIL_OPENICON 0x0001 /* allows containers to specify an "open" look */
549 #define GIL_FORSHELL 0x0002 /* icon is to be displayed in a ShellFolder */
550 #define GIL_ASYNC 0x0020 /* this is an async extract, return E_ASYNC */
552 /* GetIconLocation() return flags */
553 #define GIL_SIMULATEDOC 0x0001 /* simulate this document icon for this */
554 #define GIL_PERINSTANCE 0x0002 /* icons from this class are per instance (each file has its own) */
555 #define GIL_PERCLASS 0x0004 /* icons from this class per class (shared for all files of this type) */
556 #define GIL_NOTFILENAME 0x0008 /* location is not a filename, must call ::ExtractIcon */
557 #define GIL_DONTCACHE 0x0010 /* this icon should not be cached */
559 typedef struct IExtractIcon IExtractIcon
,*LPEXTRACTICON
;
560 typedef struct IExtractIcon_VTable
561 { /*** IUnknown methods ***/
562 STDMETHOD(QueryInterface
) (THIS_ REFIID riid
, LPVOID
* ppvObj
) PURE
;
563 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
564 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
566 /*** IExtractIcon methods ***/
567 STDMETHOD(GetIconLocation
)(THIS_ UINT uFlags
, LPSTR szIconFile
, UINT cchMax
,INT
* piIndex
, UINT
* pwFlags
) PURE
;
568 STDMETHOD(Extract
)(THIS_ LPCSTR pszFile
, UINT nIconIndex
, HICON
*phiconLarge
, HICON
*phiconSmall
, UINT nIconSize
) PURE
;
569 }IExtractIcon_VTable
,*LPEXTRACTICON_VTABLE
;
572 { LPEXTRACTICON_VTABLE lpvtbl
;
579 DWORD WINAPI
SHMapPIDLToSystemImageListIndex(LPSHELLFOLDER sh
,LPITEMIDLIST pidl
,DWORD z
);
581 /****************************************************************************
582 * IShellIcon interface
585 #define THIS LPSHELLICON me
587 typedef struct IShellIcon_VTable
588 { /*** IUnknown methods ***/
589 STDMETHOD(QueryInterface
) (THIS_ REFIID riid
, LPVOID
* ppvObj
) PURE
;
590 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
591 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
593 /*** IShellIcon methods ***/
594 STDMETHOD(GetIconOf
)(THIS_ LPCITEMIDLIST pidl
, UINT flags
, LPINT lpIconIndex
) PURE
;
595 } IShellIcon_VTable
,*LPSHELLICON_VTABLE
;
598 { LPSHELLICON_VTABLE lpvtbl
;
602 /****************************************************************************
603 * IDockingWindowFrame interface
605 #define THIS LPDOCKINGWINDOWFRAME me
607 #define DWFRF_NORMAL 0x0000 /* femove toolbar flags*/
608 #define DWFRF_DELETECONFIGDATA 0x0001
609 #define DWFAF_HIDDEN 0x0001 /* add tolbar*/
611 typedef struct IDockingWindowFrame_VTable
612 { STDMETHOD(QueryInterface
) (THIS_ REFIID riid
, LPVOID
* ppvObj
) PURE
;
613 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
614 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
616 /*** IOleWindow methods ***/
617 STDMETHOD(GetWindow
) (THIS_ HWND
* lphwnd
) PURE
;
618 STDMETHOD(ContextSensitiveHelp
) (THIS_ BOOL fEnterMode
) PURE
;
620 /*** IDockingWindowFrame methods ***/
621 STDMETHOD(AddToolbar
) (THIS_ IUnknown
* punkSrc
, LPCWSTR pwszItem
, DWORD dwAddFlags
) PURE
;
622 STDMETHOD(RemoveToolbar
) (THIS_ IUnknown
* punkSrc
, DWORD dwRemoveFlags
) PURE
;
623 STDMETHOD(FindToolbar
) (THIS_ LPCWSTR pwszItem
, REFIID riid
, LPVOID
* ppvObj
) PURE
;
624 } IDockingWindowFrame_VTable
, *LPDOCKINGWINDOWFRAME_VTABLE
;
626 struct tagDOCKINGWINDOWFRAME
627 { LPDOCKINGWINDOWFRAME_VTABLE lpvtbl
;
632 /****************************************************************************
635 #define SE_ERR_FNF 2 /* file not found */
636 #define SE_ERR_PNF 3 /* path not found */
637 #define SE_ERR_ACCESSDENIED 5 /* access denied */
638 #define SE_ERR_OOM 8 /* out of memory */
639 #define SE_ERR_DLLNOTFOUND 32
640 #define SE_ERR_SHARE 26
641 #define SE_ERR_ASSOCINCOMPLETE 27
642 #define SE_ERR_DDETIMEOUT 28
643 #define SE_ERR_DDEFAIL 29
644 #define SE_ERR_DDEBUSY 30
645 #define SE_ERR_NOASSOC 31
647 #define SEE_MASK_CLASSNAME 0x00000001
648 #define SEE_MASK_CLASSKEY 0x00000003
649 #define SEE_MASK_IDLIST 0x00000004
650 #define SEE_MASK_INVOKEIDLIST 0x0000000c
651 #define SEE_MASK_ICON 0x00000010
652 #define SEE_MASK_HOTKEY 0x00000020
653 #define SEE_MASK_NOCLOSEPROCESS 0x00000040
654 #define SEE_MASK_CONNECTNETDRV 0x00000080
655 #define SEE_MASK_FLAG_DDEWAIT 0x00000100
656 #define SEE_MASK_DOENVSUBST 0x00000200
657 #define SEE_MASK_FLAG_NO_UI 0x00000400
658 #define SEE_MASK_UNICODE 0x00004000
659 #define SEE_MASK_NO_CONSOLE 0x00008000
660 #define SEE_MASK_ASYNCOK 0x00100000
661 #define SEE_MASK_HMONITOR 0x00200000
663 typedef struct _SHELLEXECUTEINFOA
673 /* Optional fields */
683 } SHELLEXECUTEINFOA
, *LPSHELLEXECUTEINFOA
;
685 typedef struct _SHELLEXECUTEINFOW
691 LPCWSTR lpParameters
;
705 } SHELLEXECUTEINFOW
, *LPSHELLEXECUTEINFOW
;
707 #define SHELLEXECUTEINFO WINELIB_NAME_AW(SHELLEXECUTEINFO)
708 #define LPSHELLEXECUTEINFO WINELIB_NAME_AW(LPSHELLEXECUTEINFO)
710 BOOL WINAPI
ShellExecuteExA(LPSHELLEXECUTEINFOA lpExecInfo
);
711 BOOL WINAPI
ShellExecuteExW(LPSHELLEXECUTEINFOW lpExecInfo
);
712 #define ShellExecuteEx WINELIB_NAME_AW(ShellExecuteEx)
714 void WINAPI
WinExecErrorA(HWND hwnd
,INT error
, LPCSTR lpstrFileName
, LPCSTR lpstrTitle
);
715 void WINAPI
WinExecErrorW(HWND hwnd
,INT error
, LPCWSTR lpstrFileName
, LPCWSTR lpstrTitle
);
716 #define WinExecError WINELIB_NAME_AW(WinExecError)
720 /****************************************************************************
721 * SHBrowseForFolder API
723 typedef INT (CALLBACK
* BFFCALLBACK
)(HWND hwnd
, UINT uMsg
, LPARAM lParam
, LPARAM lpData
);
725 typedef struct tagBROWSEINFOA
{
727 LPCITEMIDLIST pidlRoot
;
728 LPSTR pszDisplayName
;
734 } BROWSEINFOA
, *PBROWSEINFOA
, *LPBROWSEINFOA
;
736 typedef struct tagBROWSEINFOW
{
738 LPCITEMIDLIST pidlRoot
;
739 LPWSTR pszDisplayName
;
745 } BROWSEINFOW
, *PBROWSEINFOW
, *LPBROWSEINFOW
;
747 #define BROWSEINFO WINELIB_NAME_AW(BROWSEINFO)
748 #define PBROWSEINFO WINELIB_NAME_AW(PBROWSEINFO)
749 #define LPBROWSEINFO WINELIB_NAME_AW(LPBROWSEINFO)
751 /* Browsing for directory. */
752 #define BIF_RETURNONLYFSDIRS 0x0001
753 #define BIF_DONTGOBELOWDOMAIN 0x0002
754 #define BIF_STATUSTEXT 0x0004
755 #define BIF_RETURNFSANCESTORS 0x0008
756 #define BIF_EDITBOX 0x0010
757 #define BIF_VALIDATE 0x0020
759 #define BIF_BROWSEFORCOMPUTER 0x1000
760 #define BIF_BROWSEFORPRINTER 0x2000
761 #define BIF_BROWSEINCLUDEFILES 0x4000
763 /* message from browser */
764 #define BFFM_INITIALIZED 1
765 #define BFFM_SELCHANGED 2
766 #define BFFM_VALIDATEFAILEDA 3 /* lParam:szPath ret:1(cont),0(EndDialog) */
767 #define BFFM_VALIDATEFAILEDW 4 /* lParam:wzPath ret:1(cont),0(EndDialog) */
769 /* messages to browser */
770 #define BFFM_SETSTATUSTEXTA (WM_USER+100)
771 #define BFFM_ENABLEOK (WM_USER+101)
772 #define BFFM_SETSELECTIONA (WM_USER+102)
773 #define BFFM_SETSELECTIONW (WM_USER+103)
774 #define BFFM_SETSTATUSTEXTW (WM_USER+104)
778 #define SHBrowseForFolder SHBrowseForFolderW
779 #define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTW
780 #define BFFM_SETSELECTION BFFM_SETSELECTIONW
782 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDW
784 #define SHBrowseForFolder SHBrowseForFolderA
785 #define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTA
786 #define BFFM_SETSELECTION BFFM_SETSELECTIONA
788 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDA
792 LPITEMIDLIST WINAPI
SHBrowseForFolderA(LPBROWSEINFOA lpbi
);
793 /*LPITEMIDLIST WINAPI SHBrowseForFolder32W(LPBROWSEINFO32W lpbi);*/
794 #define SHBrowseForFolder WINELIB_NAME_AW(SHBrowseForFolder)
796 /****************************************************************************
797 * SHGetDataFromIDList API
799 #define SHGDFIL_FINDDATA 1
800 #define SHGDFIL_NETRESOURCE 2
801 #define SHGDFIL_DESCRIPTIONID 3
803 #define SHDID_ROOT_REGITEM 1
804 #define SHDID_FS_FILE 2
805 #define SHDID_FS_DIRECTORY 3
806 #define SHDID_FS_OTHER 4
807 #define SHDID_COMPUTER_DRIVE35 5
808 #define SHDID_COMPUTER_DRIVE525 6
809 #define SHDID_COMPUTER_REMOVABLE 7
810 #define SHDID_COMPUTER_FIXED 8
811 #define SHDID_COMPUTER_NETDRIVE 9
812 #define SHDID_COMPUTER_CDROM 10
813 #define SHDID_COMPUTER_RAMDISK 11
814 #define SHDID_COMPUTER_OTHER 12
815 #define SHDID_NET_DOMAIN 13
816 #define SHDID_NET_SERVER 14
817 #define SHDID_NET_SHARE 15
818 #define SHDID_NET_RESTOFNET 16
819 #define SHDID_NET_OTHER 17
821 typedef struct _SHDESCRIPTIONID
822 { DWORD dwDescriptionId
;
824 } SHDESCRIPTIONID
, *LPSHDESCRIPTIONID
;
826 HRESULT WINAPI
SHGetDataFromIDListA(LPSHELLFOLDER psf
, LPCITEMIDLIST pidl
, int nFormat
, LPVOID pv
, int cb
);
827 HRESULT WINAPI
SHGetDataFromIDListW(LPSHELLFOLDER psf
, LPCITEMIDLIST pidl
, int nFormat
, LPVOID pv
, int cb
);
828 #define SHGetDataFromIDList WINELIB_NAME_AW(SHGetDataFromIDList)
831 /****************************************************************************
836 * IShellFolderViewCallback Callback
837 * This "callback" is called by the shells default IShellView implementation (that
838 * we got using SHCreateShellViewEx()), to notify us of the various things that
839 * are happening to the shellview (and ask for things too).
841 * You don't have to support anything here - anything you don't want to
842 * handle, the shell will do itself if you just return E_NOTIMPL. This parameters
843 * that the shell passes to this function are entirely undocumented.
845 * HOWEVER, as the cabview sample as originally written used this callback, the
846 * writers implemented the callback mechanism on top of their own IShellView.
847 * Look there for some clues on what to do here.
850 typedef HRESULT(CALLBACK
*SHELLVIEWPROC
)(DWORD dwUserParam
,LPSHELLFOLDER psf
,
851 HWND hwnd
,UINT uMsg
,UINT wParam
,LPARAM lParam
);
853 /* NF valid values for the "viewmode" item of the SHELLTEMPLATE*/
854 #define NF_INHERITVIEW 0x0000
855 #define NF_LOCALVIEW 0x0001
857 typedef struct _SHELLVIEWDATA
/* idl */
859 LPSHELLFOLDER pShellFolder
;
862 DWORD v3
; /* always 0 */
863 SHELLVIEWPROC pCallBack
;
864 DWORD viewmode
; /* NF_* enum */
865 } SHELLVIEWDATA
, * LPSHELLVIEWDATA
;
868 The shell keeps track of some per-user state to handle display
869 options that is of majorinterest to ISVs.
870 The key one requested right now is "DoubleClickInWebView".
873 { BOOL fShowAllObjects
: 1;
874 BOOL fShowExtensions
: 1;
875 BOOL fNoConfirmRecycle
: 1;
876 BOOL fShowSysFiles
: 1;
877 BOOL fShowCompColor
: 1;
878 BOOL fDoubleClickInWebView
: 1;
879 BOOL fDesktopHTML
: 1;
880 BOOL fWin95Classic
: 1;
881 BOOL fDontPrettyPath
: 1;
882 BOOL fShowAttribCol
: 1;
883 BOOL fMapNetDrvBtn
: 1;
884 BOOL fShowInfoTip
: 1;
887 } SHELLFLAGSTATE
, * LPSHELLFLAGSTATE
;
890 DWORD WINAPI
SHGetMalloc(LPMALLOC
*lpmal
) ;
899 #endif /* __WINE_SHLOBJ_H */