Moved Multimonitor API declarations to windows.h.
[wine/multimedia.git] / include / shlobj.h
blob9d5b58af9b84ac4d9fd015edd5a5964e82b28bfc
1 #ifndef _WINE_SHLOBJ_H
2 #define _WINE_SHLOBJ_H
4 #include "shell.h"
5 #include "ole.h"
6 #include "ole2.h"
7 #include "compobj.h"
8 #include "storage.h"
9 #include "commctrl.h"
10 #include "interfaces.h"
12 #define STDMETHOD(xfn) HRESULT (CALLBACK *fn##xfn)
13 #define STDMETHOD_(type,xfn) type (CALLBACK *fn##xfn)
14 #define PURE
15 #define FAR
16 #define THIS_ THIS,
18 #define __T(x) x
19 #define _T(x) __T(x)
20 #define TEXT _T
22 /****************************************************************************
23 * DllGetClassObject
25 DWORD WINAPI SHELL32_DllGetClassObject(LPCLSID,REFIID,LPVOID*);
28 typedef LPVOID LPBC; /* *IBindCtx really */
30 /* foreward declaration of the objects*/
31 typedef struct tagCONTEXTMENU *LPCONTEXTMENU, IContextMenu;
32 typedef struct tagSHELLEXTINIT *LPSHELLEXTINIT,IShellExtInit;
33 typedef struct tagENUMIDLIST *LPENUMIDLIST, IEnumIDList;
34 typedef struct tagSHELLFOLDER *LPSHELLFOLDER, IShellFolder;
35 typedef struct tagSHELLVIEW *LPSHELLVIEW, IShellView;
36 typedef struct tagSHELLBROWSER *LPSHELLBROWSER,IShellBrowser;
37 typedef struct tagDATAOBJECT *LPDATAOBJECT, IDataObject;
38 typedef struct tagSHELLICON *LPSHELLICON, IShellIcon;
39 typedef struct tagDOCKINGWINDOWFRAME *LPDOCKINGWINDOWFRAME, IDockingWindowFrame;
40 typedef struct tagSERVICEPROVIDER *LPSERVICEPROVIDER, IServiceProvider;
41 typedef struct tagCOMMDLGBROWSER *LPCOMMDLGBROWSER, ICommDlgBrowser;
42 typedef struct tagENUMFORMATETC *LPENUMFORMATETC, IEnumFORMATETC;
44 typedef struct IAdviseSink IAdviseSink, *LPIADVISESINK;
45 typedef struct IEnumSTATDATA IEnumSTATDATA, *LPENUMSTATDATA;
46 /****************************************************************************
47 * SHELL ID
49 /* strange Objects */
50 DEFINE_SHLGUID(IID_IEnumUnknown, 0x00000100L, 0, 0);
51 DEFINE_SHLGUID(IID_IEnumString, 0x00000101L, 0, 0);
52 DEFINE_SHLGUID(IID_IEnumMoniker, 0x00000102L, 0, 0);
53 DEFINE_SHLGUID(IID_IEnumFORMATETC, 0x00000103L, 0, 0);
54 DEFINE_SHLGUID(IID_IEnumOLEVERB, 0x00000104L, 0, 0);
55 DEFINE_SHLGUID(IID_IEnumSTATDATA, 0x00000105L, 0, 0);
57 DEFINE_SHLGUID(IID_IPersistStream, 0x00000109L, 0, 0);
58 DEFINE_SHLGUID(IID_IPersistStorage, 0x0000010AL, 0, 0);
59 DEFINE_SHLGUID(IID_IPersistFile, 0x0000010BL, 0, 0);
60 DEFINE_SHLGUID(IID_IPersist, 0x0000010CL, 0, 0);
61 DEFINE_SHLGUID(IID_IViewObject, 0x0000010DL, 0, 0);
62 DEFINE_SHLGUID(IID_IDataObject, 0x0000010EL, 0, 0);
64 DEFINE_SHLGUID(IID_IDropSource, 0x00000121L, 0, 0);
65 DEFINE_SHLGUID(IID_IDropTarget, 0x00000122L, 0, 0);
67 DEFINE_GUID (IID_IServiceProvider, 0x6D5140C1L, 0x7436, 0x11CE, 0x80, 0x34, 0x00, 0xAA, 0x00, 0x60, 0x09, 0xFA);
68 DEFINE_GUID (IID_IDockingWindow, 0x012dd920L, 0x7B26, 0x11D0, 0x8C, 0xA9, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8);
69 DEFINE_GUID (IID_IDockingWindowSite, 0x2A342FC2L, 0x7B26, 0x11D0, 0x8C, 0xA9, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8);
70 DEFINE_GUID (IID_IDockingWindowFrame, 0x47D2657AL, 0x7B27, 0x11D0, 0x8C, 0xA9, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8);
72 DEFINE_SHLGUID(CLSID_ShellDesktop, 0x00021400L, 0, 0);
73 DEFINE_SHLGUID(CLSID_ShellLink, 0x00021401L, 0, 0);
74 /* shell32 formatids */
75 DEFINE_SHLGUID(FMTID_Intshcut, 0x000214A0L, 0, 0);
76 DEFINE_SHLGUID(FMTID_InternetSite, 0x000214A1L, 0, 0);
77 /* command group ids */
78 DEFINE_SHLGUID(CGID_Explorer, 0x000214D0L, 0, 0);
79 DEFINE_SHLGUID(CGID_ShellDocView, 0x000214D1L, 0, 0);
81 /* shell32interface ids */
82 DEFINE_SHLGUID(IID_INewShortcutHookA, 0x000214E1L, 0, 0);
83 DEFINE_SHLGUID(IID_IShellBrowser, 0x000214E2L, 0, 0);
84 #define SID_SShellBrowser IID_IShellBrowser
85 DEFINE_SHLGUID(IID_IShellView, 0x000214E3L, 0, 0);
86 DEFINE_SHLGUID(IID_IContextMenu, 0x000214E4L, 0, 0);
87 DEFINE_SHLGUID(IID_IShellIcon, 0x000214E5L, 0, 0);
88 DEFINE_SHLGUID(IID_IShellFolder, 0x000214E6L, 0, 0);
89 DEFINE_SHLGUID(IID_IShellExtInit, 0x000214E8L, 0, 0);
90 DEFINE_SHLGUID(IID_IShellPropSheetExt, 0x000214E9L, 0, 0);
91 DEFINE_SHLGUID(IID_IExtractIcon, 0x000214EBL, 0, 0);
92 DEFINE_SHLGUID(IID_IShellLink, 0x000214EEL, 0, 0);
93 DEFINE_SHLGUID(IID_IShellCopyHook, 0x000214EFL, 0, 0);
94 DEFINE_SHLGUID(IID_IFileViewer, 0x000214F0L, 0, 0);
95 DEFINE_SHLGUID(IID_ICommDlgBrowser, 0x000214F1L, 0, 0);
96 DEFINE_SHLGUID(IID_IEnumIDList, 0x000214F2L, 0, 0);
97 DEFINE_SHLGUID(IID_IFileViewerSite, 0x000214F3L, 0, 0);
98 DEFINE_SHLGUID(IID_IContextMenu2, 0x000214F4L, 0, 0);
99 DEFINE_SHLGUID(IID_IShellExecuteHookA, 0x000214F5L, 0, 0);
100 DEFINE_SHLGUID(IID_IPropSheetPage, 0x000214F6L, 0, 0);
101 DEFINE_SHLGUID(IID_INewShortcutHookW, 0x000214F7L, 0, 0);
102 DEFINE_SHLGUID(IID_IFileViewerW, 0x000214F8L, 0, 0);
103 DEFINE_SHLGUID(IID_IShellLinkW, 0x000214F9L, 0, 0);
104 DEFINE_SHLGUID(IID_IExtractIconW, 0x000214FAL, 0, 0);
105 DEFINE_SHLGUID(IID_IShellExecuteHookW, 0x000214FBL, 0, 0);
106 DEFINE_SHLGUID(IID_IShellCopyHookW, 0x000214FCL, 0, 0);
108 /****************************************************************************
109 * STRRET
111 #define STRRET_WSTR 0x0000
112 #define STRRET_OFFSET 0x0001
113 #define STRRET_CSTR 0x0002
115 typedef struct _STRRET
116 { UINT32 uType; /* STRRET_xxx */
117 union
118 { LPWSTR pOleStr; /* OLESTR that will be freed */
119 UINT32 uOffset; /* OffsetINT32o SHITEMID (ANSI) */
120 char cStr[MAX_PATH]; /* Buffer to fill in */
122 } STRRET,*LPSTRRET;
124 /*****************************************************************************
125 * IContextMenu interface
127 #define THIS LPCONTEXTMENU this
129 /* default menu items*/
130 #define IDM_EXPLORE 0
131 #define IDM_OPEN 1
132 #define IDM_RENAME 2
133 #define IDM_LAST IDM_RENAME
135 /* QueryContextMenu uFlags */
136 #define CMF_NORMAL 0x00000000
137 #define CMF_DEFAULTONLY 0x00000001
138 #define CMF_VERBSONLY 0x00000002
139 #define CMF_EXPLORE 0x00000004
140 #define CMF_NOVERBS 0x00000008
141 #define CMF_CANRENAME 0x00000010
142 #define CMF_NODEFAULT 0x00000020
143 #define CMF_INCLUDESTATIC 0x00000040
144 #define CMF_RESERVED 0xffff0000 // View specific
146 /* GetCommandString uFlags */
147 #define GCS_VERBA 0x00000000 // canonical verb
148 #define GCS_HELPTEXTA 0x00000001 // help text (for status bar)
149 #define GCS_VALIDATEA 0x00000002 // validate command exists
150 #define GCS_VERBW 0x00000004 // canonical verb (unicode)
151 #define GCS_HELPTEXTW 0x00000005 // help text (unicode version)
152 #define GCS_VALIDATEW 0x00000006 // validate command exists (unicode)
153 #define GCS_UNICODE 0x00000004 // for bit testing - Unicode string
155 #define GCS_VERB GCS_VERBA
156 #define GCS_HELPTEXT GCS_HELPTEXTA
157 #define GCS_VALIDATE GCS_VALIDATEA
159 #define CMDSTR_NEWFOLDERA "NewFolder"
160 #define CMDSTR_VIEWLISTA "ViewList"
161 #define CMDSTR_VIEWDETAILSA "ViewDetails"
162 #define CMDSTR_NEWFOLDERW L"NewFolder"
163 #define CMDSTR_VIEWLISTW L"ViewList"
164 #define CMDSTR_VIEWDETAILSW L"ViewDetails"
166 #define CMDSTR_NEWFOLDER CMDSTR_NEWFOLDERA
167 #define CMDSTR_VIEWLIST CMDSTR_VIEWLISTA
168 #define CMDSTR_VIEWDETAILS CMDSTR_VIEWDETAILSA
170 #define CMIC_MASK_HOTKEY SEE_MASK_HOTKEY
171 #define CMIC_MASK_ICON SEE_MASK_ICON
172 #define CMIC_MASK_FLAG_NO_UI SEE_MASK_FLAG_NO_UI
173 #define CMIC_MASK_UNICODE SEE_MASK_UNICODE
174 #define CMIC_MASK_NO_CONSOLE SEE_MASK_NO_CONSOLE
175 #define CMIC_MASK_HASLINKNAME SEE_MASK_HASLINKNAME
176 #define CMIC_MASK_FLAG_SEP_VDM SEE_MASK_FLAG_SEPVDM
177 #define CMIC_MASK_HASTITLE SEE_MASK_HASTITLE
178 #define CMIC_MASK_ASYNCOK SEE_MASK_ASYNCOK
180 #define CMIC_MASK_PTINVOKE 0x20000000
182 /*NOTE: When SEE_MASK_HMONITOR is set, hIcon is treated as hMonitor */
183 typedef struct tagCMINVOKECOMMANDINFO
184 { DWORD cbSize; // sizeof(CMINVOKECOMMANDINFO)
185 DWORD fMask; // any combination of CMIC_MASK_*
186 HWND32 hwnd; // might be NULL (indicating no owner window)
187 LPCSTR lpVerb; // either a string or MAKEINTRESOURCE(idOffset)
188 LPCSTR lpParameters; // might be NULL (indicating no parameter)
189 LPCSTR lpDirectory; // might be NULL (indicating no specific directory)
190 INT32 nShow; // one of SW_ values for ShowWindow() API
192 DWORD dwHotKey;
193 HANDLE32 hIcon;
194 } CMINVOKECOMMANDINFO32, *LPCMINVOKECOMMANDINFO32;
196 typedef struct tagCMInvokeCommandInfoEx
197 { DWORD cbSize; // must be sizeof(CMINVOKECOMMANDINFOEX)
198 DWORD fMask; // any combination of CMIC_MASK_*
199 HWND32 hwnd; // might be NULL (indicating no owner window)
200 LPCSTR lpVerb; // either a string or MAKEINTRESOURCE(idOffset)
201 LPCSTR lpParameters; // might be NULL (indicating no parameter)
202 LPCSTR lpDirectory; // might be NULL (indicating no specific directory)
203 INT32 nShow; // one of SW_ values for ShowWindow() API
205 DWORD dwHotKey;
207 HANDLE32 hIcon;
208 LPCSTR lpTitle; // For CreateProcess-StartupInfo.lpTitle
209 LPCWSTR lpVerbW; // Unicode verb (for those who can use it)
210 LPCWSTR lpParametersW; // Unicode parameters (for those who can use it)
211 LPCWSTR lpDirectoryW; // Unicode directory (for those who can use it)
212 LPCWSTR lpTitleW; // Unicode title (for those who can use it)
213 POINT32 ptInvoke; // Point where it's invoked
215 } CMINVOKECOMMANDINFOEX32, *LPCMINVOKECOMMANDINFOEX32;
218 typedef struct IContextMenu_VTable
219 { // *** IUnknown methods ***
220 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
221 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
222 STDMETHOD_(ULONG,Release) (THIS) PURE;
224 STDMETHOD(QueryContextMenu)(THIS_ HMENU32 hmenu,UINT32 indexMenu,UINT32 idCmdFirst, UINT32 idCmdLast,UINT32 uFlags) PURE;
225 STDMETHOD(InvokeCommand)(THIS_ LPCMINVOKECOMMANDINFO32 lpici) PURE;
226 STDMETHOD(GetCommandString)(THIS_ UINT32 idCmd,UINT32 uType,UINT32 * pwReserved,LPSTR pszName,UINT32 cchMax) PURE;
228 /* undocumented not only in ContextMenu2 */
229 STDMETHOD(HandleMenuMsg)(THIS_ UINT32 uMsg,WPARAM32 wParam,LPARAM lParam) PURE;
231 /* possibly another nasty entry from ContextMenu3 ?*/
232 void * guard;
233 } IContextMenu_VTable,*LPCONTEXTMENU_VTABLE;
235 struct tagCONTEXTMENU
236 { LPCONTEXTMENU_VTABLE lpvtbl;
237 DWORD ref;
238 LPSHELLFOLDER pSFParent;
239 LPITEMIDLIST *aPidls;
240 BOOL32 bAllValues;
243 #undef THIS
244 /*****************************************************************************
245 * structures for shell clipboard formats
247 typedef enum tagDVASPECT
248 { DVASPECT_CONTENT = 1,
249 DVASPECT_THUMBNAIL = 2,
250 DVASPECT_ICON = 4,
251 DVASPECT_DOCPRINT = 8
252 } DVASPECT;
254 enum tagTYMED
255 { TYMED_HGLOBAL = 1,
256 TYMED_FILE = 2,
257 TYMED_ISTREAM = 4,
258 TYMED_ISTORAGE = 8,
259 TYMED_GDI = 16,
260 TYMED_MFPICT = 32,
261 TYMED_ENHMF = 64,
262 TYMED_NULL = 0
263 } TYMED;
265 typedef struct
266 { DWORD tdSize;
267 WORD tdDriverNameOffset;
268 WORD tdDeviceNameOffset;
269 WORD tdPortNameOffset;
270 WORD tdExtDevmodeOffset;
271 BYTE tdData[ 1 ];
272 } DVTARGETDEVICE32;
274 typedef WORD CLIPFORMAT32, *LPCLIPFORMAT32;
276 /* dataobject as answer to a request */
277 typedef struct
278 { DWORD tymed;
279 union
280 { HBITMAP32 hBitmap;
281 /*HMETAFILEPICT32 hMetaFilePict;*/
282 /*HENHMETAFILE32 hEnhMetaFile;*/
283 HGLOBAL32 hGlobal;
284 LPOLESTR32 lpszFileName;
285 IStream32 *pstm;
286 IStorage32 *pstg;
287 } u;
288 IUnknown *pUnkForRelease;
289 } STGMEDIUM32;
291 /* wished data format */
292 typedef struct
293 { CLIPFORMAT32 cfFormat;
294 DVTARGETDEVICE32 *ptd;
295 DWORD dwAspect;
296 LONG lindex;
297 DWORD tymed;
298 } FORMATETC32, *LPFORMATETC32;
300 /* shell specific clipboard formats */
302 /* DATAOBJECT_InitShellIDList*/
303 #define CFSTR_SHELLIDLIST TEXT("Shell IDList Array") /* CF_IDLIST */
305 extern UINT32 cfShellIDList;
307 typedef struct
308 { UINT32 cidl;
309 UINT32 aoffset[1];
310 } CIDA, *LPCIDA;
312 #define CFSTR_SHELLIDLISTOFFSET TEXT("Shell Object Offsets") /* CF_OBJECTPOSITIONS */
313 #define CFSTR_NETRESOURCES TEXT("Net Resource") /* CF_NETRESOURCE */
315 /* DATAOBJECT_InitFileGroupDesc */
316 #define CFSTR_FILEDESCRIPTORA TEXT("FileGroupDescriptor") /* CF_FILEGROUPDESCRIPTORA */
317 extern UINT32 cfFileGroupDesc;
319 #define CFSTR_FILEDESCRIPTORW TEXT("FileGroupDescriptorW") /* CF_FILEGROUPDESCRIPTORW */
321 /* DATAOBJECT_InitFileContents*/
322 #define CFSTR_FILECONTENTS TEXT("FileContents") /* CF_FILECONTENTS */
323 extern UINT32 cfFileContents;
325 #define CFSTR_FILENAMEA TEXT("FileName") /* CF_FILENAMEA */
326 #define CFSTR_FILENAMEW TEXT("FileNameW") /* CF_FILENAMEW */
327 #define CFSTR_PRINTERGROUP TEXT("PrinterFriendlyName") /* CF_PRINTERS */
328 #define CFSTR_FILENAMEMAPA TEXT("FileNameMap") /* CF_FILENAMEMAPA */
329 #define CFSTR_FILENAMEMAPW TEXT("FileNameMapW") /* CF_FILENAMEMAPW */
330 #define CFSTR_SHELLURL TEXT("UniformResourceLocator")
331 #define CFSTR_PREFERREDDROPEFFECT TEXT("Preferred DropEffect")
332 #define CFSTR_PERFORMEDDROPEFFECT TEXT("Performed DropEffect")
333 #define CFSTR_PASTESUCCEEDED TEXT("Paste Succeeded")
334 #define CFSTR_INDRAGLOOP TEXT("InShellDragLoop")
336 /**************************************************************************
337 * IDLList "Item ID List List"
339 * NOTES
340 * interal data holder for IDataObject
342 typedef struct tagLPIDLLIST *LPIDLLIST, IDLList;
344 #define THIS LPIDLLIST this
346 enum
347 { State_UnInit=1,
348 State_Init=2,
349 State_OutOfMem=3
350 } IDLListState;
352 typedef struct IDLList_VTable
353 { STDMETHOD_(UINT32, GetState)(THIS);
354 STDMETHOD_(LPITEMIDLIST, GetElement)(THIS_ UINT32 nIndex);
355 STDMETHOD_(UINT32, GetCount)(THIS);
356 STDMETHOD_(BOOL32, StoreItem)(THIS_ LPITEMIDLIST pidl);
357 STDMETHOD_(BOOL32, AddItems)(THIS_ LPITEMIDLIST *apidl, UINT32 cidl);
358 STDMETHOD_(BOOL32, InitList)(THIS);
359 STDMETHOD_(void, CleanList)(THIS);
360 } IDLList_VTable,*LPIDLLIST_VTABLE;
362 struct tagLPIDLLIST
363 { LPIDLLIST_VTABLE lpvtbl;
364 HDPA dpa;
365 UINT32 uStep;
368 extern LPIDLLIST IDLList_Constructor (UINT32 uStep);
369 extern void IDLList_Destructor(LPIDLLIST this);
370 #undef THIS
371 /*****************************************************************************
372 * IEnumFORMATETC interface
374 #define THIS LPENUMFORMATETC this
376 typedef struct IEnumFORMATETC_VTable
377 { /* IUnknown methods */
378 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
379 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
380 STDMETHOD_(ULONG,Release) (THIS) PURE;
382 /* IEnumFORMATETC methods */
383 STDMETHOD (Next)(THIS_ ULONG celt, FORMATETC32 *rgelt, ULONG *pceltFethed) PURE;
384 STDMETHOD (Skip)(THIS_ ULONG celt) PURE;
385 STDMETHOD (Reset)(THIS) PURE;
386 STDMETHOD (Clone)(THIS_ IEnumFORMATETC ** ppenum) PURE;
387 } IEnumFORMATETC_VTable,*LPENUMFORMATETC_VTABLE;
389 struct tagENUMFORMATETC
390 { LPENUMFORMATETC_VTABLE lpvtbl;
391 DWORD ref;
392 UINT32 posFmt;
393 UINT32 countFmt;
394 LPFORMATETC32 pFmt;
397 #undef THIS
399 /*****************************************************************************
400 * IDataObject interface
402 #define THIS LPDATAOBJECT this
404 typedef struct IDataObject_VTable
405 { /*** IUnknown methods ***/
406 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
407 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
408 STDMETHOD_(ULONG,Release) (THIS) PURE;
410 STDMETHOD (GetData )(THIS_ LPFORMATETC32 pformatetcIn, STGMEDIUM32 *pmedium) PURE;
411 STDMETHOD (GetDataHere)(THIS_ LPFORMATETC32 pformatetc, STGMEDIUM32 *pmedium) PURE;
412 STDMETHOD (QueryGetData)(THIS_ LPFORMATETC32 pformatetc) PURE;
413 STDMETHOD (GetCanonicalFormatEtc)(THIS_ LPFORMATETC32 pformatectIn, LPFORMATETC32 pformatetcOut) PURE;
414 STDMETHOD (SetData)(THIS_ LPFORMATETC32 pformatetc, STGMEDIUM32 *pmedium, BOOL32 fRelease) PURE;
415 STDMETHOD (EnumFormatEtc)(THIS_ DWORD dwDirection, IEnumFORMATETC **ppenumFormatEtc) PURE;
416 STDMETHOD (DAdvise )(THIS_ LPFORMATETC32 *pformatetc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection) PURE;
417 STDMETHOD (DUnadvise)(THIS_ DWORD dwConnection) PURE;
418 STDMETHOD (EnumDAdvise)(THIS_ IEnumSTATDATA **ppenumAdvise) PURE;
419 } IDataObject_VTable,*LPDATAOBJECT_VTABLE;
421 struct tagDATAOBJECT
422 { LPDATAOBJECT_VTABLE lpvtbl;
423 DWORD ref;
424 LPSHELLFOLDER psf;
425 LPIDLLIST lpill; /* the data of the dataobject */
426 LPITEMIDLIST pidl;
429 #undef THIS
432 /*****************************************************************************
433 * IShellExtInit interface
435 #define THIS LPSHELLEXTINIT this
437 typedef struct IShellExtInit_VTable
438 { // *** IUnknown methods ***
439 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
440 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
441 STDMETHOD_(ULONG,Release) (THIS) PURE;
443 // *** IShellExtInit methods ***
444 STDMETHOD(Initialize)(THIS_ LPCITEMIDLIST pidlFolder, LPDATAOBJECT lpdobj, HKEY hkeyProgID) PURE;
445 } IShellExtInit_VTable,*LPSHELLEXTINIT_VTABLE;
447 struct tagSHELLEXTINIT
448 { LPSHELLEXTINIT_VTABLE lpvtbl;
449 DWORD ref;
452 #undef THIS
454 /*****************************************************************************
455 * IEnumIDList interface
457 #define THIS LPENUMIDLIST this
459 typedef struct tagENUMLIST
460 { struct tagENUMLIST *pNext;
461 LPITEMIDLIST pidl;
462 } ENUMLIST, *LPENUMLIST;
464 typedef struct IEnumIDList_VTable
465 { /* *** IUnknown methods *** */
466 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
467 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
468 STDMETHOD_(ULONG,Release) (THIS) PURE;
470 /* *** IEnumIDList methods *** */
471 STDMETHOD(Next) (THIS_ ULONG celt,
472 LPITEMIDLIST *rgelt,
473 ULONG *pceltFetched) PURE;
474 STDMETHOD(Skip) (THIS_ ULONG celt) PURE;
475 STDMETHOD(Reset) (THIS) PURE;
476 STDMETHOD(Clone) (THIS_ IEnumIDList **ppenum) PURE;
477 /* *** private methods *** */
478 STDMETHOD_(BOOL32,CreateEnumList)(THIS_ LPCSTR, DWORD) PURE;
479 STDMETHOD_(BOOL32,AddToEnumList)(THIS_ LPITEMIDLIST) PURE;
480 STDMETHOD_(BOOL32,DeleteList)(THIS) PURE;
483 } IEnumIDList_VTable,*LPENUMIDLIST_VTABLE;
485 struct tagENUMIDLIST
486 { LPENUMIDLIST_VTABLE lpvtbl;
487 DWORD ref;
488 LPENUMLIST mpFirst;
489 LPENUMLIST mpLast;
490 LPENUMLIST mpCurrent;
493 #undef THIS
494 //--------------------------------------------------------------------------
496 // FOLDERSETTINGS
498 // FOLDERSETTINGS is a data structure that explorer passes from one folder
499 // view to another, when the user is browsing. It calls ISV::GetCurrentInfo
500 // member to get the current settings and pass it to ISV::CreateViewWindow
501 // to allow the next folder view "inherit" it. These settings assumes a
502 // particular UI (which the shell's folder view has), and shell extensions
503 // may or may not use those settings.
505 //--------------------------------------------------------------------------
507 typedef LPBYTE LPVIEWSETTINGS;
509 // NB Bitfields.
510 // FWF_DESKTOP implies FWF_TRANSPARENT/NOCLIENTEDGE/NOSCROLL
511 typedef enum
512 { FWF_AUTOARRANGE = 0x0001,
513 FWF_ABBREVIATEDNAMES = 0x0002,
514 FWF_SNAPTOGRID = 0x0004,
515 FWF_OWNERDATA = 0x0008,
516 FWF_BESTFITWINDOW = 0x0010,
517 FWF_DESKTOP = 0x0020,
518 FWF_SINGLESEL = 0x0040,
519 FWF_NOSUBFOLDERS = 0x0080,
520 FWF_TRANSPARENT = 0x0100,
521 FWF_NOCLIENTEDGE = 0x0200,
522 FWF_NOSCROLL = 0x0400,
523 FWF_ALIGNLEFT = 0x0800,
524 FWF_SINGLECLICKACTIVATE=0x8000 // TEMPORARY -- NO UI FOR THIS
525 } FOLDERFLAGS;
527 typedef enum
528 { FVM_ICON = 1,
529 FVM_SMALLICON = 2,
530 FVM_LIST = 3,
531 FVM_DETAILS = 4,
532 } FOLDERVIEWMODE;
534 typedef struct
535 { UINT32 ViewMode; // View mode (FOLDERVIEWMODE values)
536 UINT32 fFlags; // View options (FOLDERFLAGS bits)
537 } FOLDERSETTINGS, *LPFOLDERSETTINGS;
539 typedef const FOLDERSETTINGS * LPCFOLDERSETTINGS;
541 /* FIXME; the next two lines are propersheet related, move to prsht.h when created */
542 struct _PSP;
543 typedef struct _PSP FAR* HPROPSHEETPAGE;
545 typedef BOOL32 (CALLBACK FAR * LPFNADDPROPSHEETPAGE)(HPROPSHEETPAGE, LPARAM);
546 typedef BOOL32 (CALLBACK FAR * LPFNADDPROPSHEETPAGES)(LPVOID, LPFNADDPROPSHEETPAGE,LPARAM);
548 /************************************************************************
549 * IShellFolder interface
552 #define THIS LPSHELLFOLDER this
554 /* IShellFolder::GetDisplayNameOf/SetNameOf uFlags */
555 typedef enum
556 { SHGDN_NORMAL = 0, /* default (display purpose) */
557 SHGDN_INFOLDER = 1, /* displayed under a folder (relative)*/
558 SHGDN_FORPARSING = 0x8000 /* for ParseDisplayName or path */
559 } SHGNO;
561 /* IShellFolder::EnumObjects */
562 typedef enum tagSHCONTF
563 { SHCONTF_FOLDERS = 32, /* for shell browser */
564 SHCONTF_NONFOLDERS = 64, /* for default view */
565 SHCONTF_INCLUDEHIDDEN = 128 /* for hidden/system objects */
566 } SHCONTF;
568 /* from oleidl.h */
569 #define DROPEFFECT_NONE 0
570 #define DROPEFFECT_COPY 1
571 #define DROPEFFECT_MOVE 2
572 #define DROPEFFECT_LINK 4
573 #define DROPEFFECT_SCROLL 0x80000000
575 /* IShellFolder::GetAttributesOf flags */
576 #define SFGAO_CANCOPY DROPEFFECT_COPY /* Objects can be copied */
577 #define SFGAO_CANMOVE DROPEFFECT_MOVE /* Objects can be moved */
578 #define SFGAO_CANLINK DROPEFFECT_LINK /* Objects can be linked */
579 #define SFGAO_CANRENAME 0x00000010L /* Objects can be renamed */
580 #define SFGAO_CANDELETE 0x00000020L /* Objects can be deleted */
581 #define SFGAO_HASPROPSHEET 0x00000040L /* Objects have property sheets */
582 #define SFGAO_DROPTARGET 0x00000100L /* Objects are drop target */
583 #define SFGAO_CAPABILITYMASK 0x00000177L
584 #define SFGAO_LINK 0x00010000L /* Shortcut (link) */
585 #define SFGAO_SHARE 0x00020000L /* shared */
586 #define SFGAO_READONLY 0x00040000L /* read-only */
587 #define SFGAO_GHOSTED 0x00080000L /* ghosted icon */
588 #define SFGAO_DISPLAYATTRMASK 0x000F0000L
589 #define SFGAO_FILESYSANCESTOR 0x10000000L /* It contains file system folder */
590 #define SFGAO_FOLDER 0x20000000L /* It's a folder. */
591 #define SFGAO_FILESYSTEM 0x40000000L /* is a file system thing (file/folder/root) */
592 #define SFGAO_HASSUBFOLDER 0x80000000L /* Expandable in the map pane */
593 #define SFGAO_CONTENTSMASK 0x80000000L
594 #define SFGAO_VALIDATE 0x01000000L /* invalidate cached information */
595 #define SFGAO_REMOVABLE 0x02000000L /* is this removeable media? */
597 typedef struct IShellFolder_VTable {
598 /* *** IUnknown methods *** */
599 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
600 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
601 STDMETHOD_(ULONG,Release) (THIS) PURE;
603 /* *** IShellFolder methods *** */
604 STDMETHOD(ParseDisplayName) (THIS_ HWND32 hwndOwner,LPBC pbcReserved, LPOLESTR32 lpszDisplayName,ULONG * pchEaten, LPITEMIDLIST * ppidl, ULONG *pdwAttributes) PURE;
605 STDMETHOD(EnumObjects)( THIS_ HWND32 hwndOwner, DWORD grfFlags, LPENUMIDLIST * ppenumIDList) PURE;
606 STDMETHOD(BindToObject)(THIS_ LPCITEMIDLIST pidl, LPBC pbcReserved,REFIID riid, LPVOID * ppvOut) PURE;
607 STDMETHOD(BindToStorage)(THIS_ LPCITEMIDLIST pidl, LPBC pbcReserved,REFIID riid, LPVOID * ppvObj) PURE;
608 STDMETHOD(CompareIDs)(THIS_ LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE;
609 STDMETHOD(CreateViewObject)(THIS_ HWND32 hwndOwner, REFIID riid, LPVOID * ppvOut) PURE;
610 STDMETHOD(GetAttributesOf)(THIS_ UINT32 cidl, LPCITEMIDLIST * apidl,ULONG * rgfInOut) PURE;
611 STDMETHOD(GetUIObjectOf)(THIS_ HWND32 hwndOwner, UINT32 cidl, LPCITEMIDLIST * apidl,REFIID riid, UINT32 * prgfInOut, LPVOID * ppvOut) PURE;
612 STDMETHOD(GetDisplayNameOf)(THIS_ LPCITEMIDLIST pidl, DWORD uFlags, LPSTRRET lpName) PURE;
613 STDMETHOD(SetNameOf)(THIS_ HWND32 hwndOwner, LPCITEMIDLIST pidl,LPCOLESTR32 lpszName, DWORD uFlags,LPITEMIDLIST * ppidlOut) PURE;
615 /* utility functions */
616 STDMETHOD_(BOOL32,GetFolderPath)(THIS_ LPSTR, DWORD);
618 } *LPSHELLFOLDER_VTABLE,IShellFolder_VTable;
620 struct tagSHELLFOLDER {
621 LPSHELLFOLDER_VTABLE lpvtbl;
622 DWORD ref;
623 LPSTR mlpszFolder;
624 LPITEMIDLIST mpidl;
625 LPITEMIDLIST mpidlNSRoot;
626 LPSHELLFOLDER mpSFParent;
629 extern LPSHELLFOLDER pdesktopfolder;
631 /************************
632 * Shellfolder API
634 DWORD WINAPI SHGetDesktopFolder(LPSHELLFOLDER *);
635 #undef THIS
637 /************************************************************************
638 * IShellBrowser interface
640 #define THIS LPSHELLBROWSER this
641 /* targets for GetWindow/SendControlMsg */
642 #define FCW_STATUS 0x0001
643 #define FCW_TOOLBAR 0x0002
644 #define FCW_TREE 0x0003
645 #define FCW_INTERNETBAR 0x0006
646 #define FCW_PROGRESS 0x0008
648 /* wFlags for BrowseObject*/
649 #define SBSP_DEFBROWSER 0x0000
650 #define SBSP_SAMEBROWSER 0x0001
651 #define SBSP_NEWBROWSER 0x0002
653 #define SBSP_DEFMODE 0x0000
654 #define SBSP_OPENMODE 0x0010
655 #define SBSP_EXPLOREMODE 0x0020
657 #define SBSP_ABSOLUTE 0x0000
658 #define SBSP_RELATIVE 0x1000
659 #define SBSP_PARENT 0x2000
660 #define SBSP_NAVIGATEBACK 0x4000
661 #define SBSP_NAVIGATEFORWARD 0x8000
663 #define SBSP_ALLOW_AUTONAVIGATE 0x10000
665 #define SBSP_INITIATEDBYHLINKFRAME 0x80000000
666 #define SBSP_REDIRECT 0x40000000
667 #define SBSP_WRITENOHISTORY 0x08000000
669 /* uFlage for SetToolbarItems */
670 #define FCT_MERGE 0x0001
671 #define FCT_CONFIGABLE 0x0002
672 #define FCT_ADDTOEND 0x0004
674 typedef struct IShellBrowser_VTable
675 { // *** IUnknown methods ***
676 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
677 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
678 STDMETHOD_(ULONG,Release) (THIS) PURE;
680 // *** IOleWindow methods ***
681 STDMETHOD(GetWindow) (THIS_ HWND32 * lphwnd) PURE;
682 STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL32 fEnterMode) PURE;
684 // *** IShellBrowser methods *** (same as IOleInPlaceFrame)
685 STDMETHOD(InsertMenusSB) (THIS_ HMENU32 hmenuShared, LPOLEMENUGROUPWIDTHS32 lpMenuWidths) PURE;
686 STDMETHOD(SetMenuSB) (THIS_ HMENU32 hmenuShared, HOLEMENU32 holemenuReserved, HWND32 hwndActiveObject) PURE;
687 STDMETHOD(RemoveMenusSB) (THIS_ HMENU32 hmenuShared) PURE;
688 STDMETHOD(SetStatusTextSB) (THIS_ LPCOLESTR32 lpszStatusText) PURE;
689 STDMETHOD(EnableModelessSB) (THIS_ BOOL32 fEnable) PURE;
690 STDMETHOD(TranslateAcceleratorSB) (THIS_ LPMSG32 lpmsg, WORD wID) PURE;
692 // *** IShellBrowser methods ***
693 STDMETHOD(BrowseObject)(THIS_ LPCITEMIDLIST pidl, UINT32 wFlags) PURE;
694 STDMETHOD(GetViewStateStream)(THIS_ DWORD grfMode, LPSTREAM32 *ppStrm) PURE;
695 STDMETHOD(GetControlWindow)(THIS_ UINT32 id, HWND32 * lphwnd) PURE;
696 STDMETHOD(SendControlMsg)(THIS_ UINT32 id, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam, LRESULT * pret) PURE;
697 STDMETHOD(QueryActiveShellView)(THIS_ IShellView ** ppshv) PURE;
698 STDMETHOD(OnViewWindowActive)(THIS_ IShellView * ppshv) PURE;
699 STDMETHOD(SetToolbarItems)(THIS_ LPTBBUTTON lpButtons, UINT32 nButtons, UINT32 uFlags) PURE;
700 } *LPSHELLBROWSER_VTABLE,IShellBrowser_VTable;;
702 struct tagSHELLBROWSER
703 { LPSHELLBROWSER_VTABLE lpvtbl;
704 DWORD ref;
707 #undef THIS
709 /************************************************************************
710 * IShellView interface
712 #define THIS LPSHELLVIEW this
714 /* shellview select item flags*/
715 #define SVSI_DESELECT 0x0000
716 #define SVSI_SELECT 0x0001
717 #define SVSI_EDIT 0x0003 // includes select
718 #define SVSI_DESELECTOTHERS 0x0004
719 #define SVSI_ENSUREVISIBLE 0x0008
720 #define SVSI_FOCUSED 0x0010
722 /* shellview get item object flags */
723 #define SVGIO_BACKGROUND 0x00000000
724 #define SVGIO_SELECTION 0x00000001
725 #define SVGIO_ALLVIEW 0x00000002
727 /* The explorer dispatches WM_COMMAND messages based on the range of
728 command/menuitem IDs. All the IDs of menuitems that the view (right
729 pane) inserts must be in FCIDM_SHVIEWFIRST/LAST (otherwise, the explorer
730 won't dispatch them). The view should not deal with any menuitems
731 in FCIDM_BROWSERFIRST/LAST (otherwise, it won't work with the future
732 version of the shell).
734 FCIDM_SHVIEWFIRST/LAST for the right pane (IShellView)
735 FCIDM_BROWSERFIRST/LAST for the explorer frame (IShellBrowser)
736 FCIDM_GLOBAL/LAST for the explorer's submenu IDs
738 #define FCIDM_SHVIEWFIRST 0x0000
739 #define FCIDM_SHVIEWLAST 0x7fff
740 #define FCIDM_BROWSERFIRST 0xa000
741 #define FCIDM_BROWSERLAST 0xbf00
742 #define FCIDM_GLOBALFIRST 0x8000
743 #define FCIDM_GLOBALLAST 0x9fff
746 * Global submenu IDs and separator IDs
748 #define FCIDM_MENU_FILE (FCIDM_GLOBALFIRST+0x0000)
749 #define FCIDM_MENU_EDIT (FCIDM_GLOBALFIRST+0x0040)
750 #define FCIDM_MENU_VIEW (FCIDM_GLOBALFIRST+0x0080)
751 #define FCIDM_MENU_VIEW_SEP_OPTIONS (FCIDM_GLOBALFIRST+0x0081)
752 #define FCIDM_MENU_TOOLS (FCIDM_GLOBALFIRST+0x00c0)
753 #define FCIDM_MENU_TOOLS_SEP_GOTO (FCIDM_GLOBALFIRST+0x00c1)
754 #define FCIDM_MENU_HELP (FCIDM_GLOBALFIRST+0x0100)
755 #define FCIDM_MENU_FIND (FCIDM_GLOBALFIRST+0x0140)
756 #define FCIDM_MENU_EXPLORE (FCIDM_GLOBALFIRST+0x0150)
757 #define FCIDM_MENU_FAVORITES (FCIDM_GLOBALFIRST+0x0170)
759 /* control IDs known to the view */
760 #define FCIDM_TOOLBAR (FCIDM_BROWSERFIRST + 0)
761 #define FCIDM_STATUS (FCIDM_BROWSERFIRST + 1)
763 /* uState values for IShellView::UIActivate */
764 typedef enum
765 { SVUIA_DEACTIVATE = 0,
766 SVUIA_ACTIVATE_NOFOCUS = 1,
767 SVUIA_ACTIVATE_FOCUS = 2,
768 SVUIA_INPLACEACTIVATE = 3 // new flag for IShellView2
769 } SVUIA_STATUS;
773 typedef struct IShellView_VTable
774 { // *** IUnknown methods ***
775 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
776 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
777 STDMETHOD_(ULONG,Release) (THIS) PURE;
779 // *** IOleWindow methods ***
780 STDMETHOD(GetWindow) (THIS_ HWND32 * lphwnd) PURE;
781 STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL32 fEnterMode) PURE;
783 // *** IShellView methods ***
784 STDMETHOD(TranslateAccelerator) (THIS_ LPMSG32 lpmsg) PURE;
785 STDMETHOD(EnableModeless) (THIS_ BOOL32 fEnable) PURE;
786 STDMETHOD(UIActivate) (THIS_ UINT32 uState) PURE;
787 STDMETHOD(Refresh) (THIS) PURE;
788 STDMETHOD(CreateViewWindow)(THIS_ IShellView *lpPrevView,LPCFOLDERSETTINGS lpfs, IShellBrowser * psb,RECT32 * prcView, HWND32 *phWnd) PURE;
789 STDMETHOD(DestroyViewWindow)(THIS) PURE;
790 STDMETHOD(GetCurrentInfo)(THIS_ LPFOLDERSETTINGS lpfs) PURE;
791 STDMETHOD(AddPropertySheetPages)(THIS_ DWORD dwReserved,LPFNADDPROPSHEETPAGE lpfn, LPARAM lparam) PURE;
792 STDMETHOD(SaveViewState)(THIS) PURE;
793 STDMETHOD(SelectItem)(THIS_ LPCITEMIDLIST pidlItem, UINT32 uFlags) PURE;
794 STDMETHOD(GetItemObject)(THIS_ UINT32 uItem, REFIID riid,LPVOID *ppv) PURE;
795 } IShellView_VTable,*LPSHELLVIEW_VTABLE;
797 struct tagSHELLVIEW
798 { LPSHELLVIEW_VTABLE lpvtbl;
799 DWORD ref;
800 LPITEMIDLIST mpidl;
801 LPSHELLFOLDER pSFParent;
802 LPSHELLBROWSER pShellBrowser;
803 LPCOMMDLGBROWSER pCommDlgBrowser;
804 HWND32 hWnd;
805 HWND32 hWndList;
806 HWND32 hWndParent;
807 FOLDERSETTINGS FolderSettings;
808 HMENU32 hMenu;
809 UINT32 uState;
810 UINT32 uSelected;
811 LPITEMIDLIST *aSelectedItems;
814 typedef GUID SHELLVIEWID;
815 #define SV_CLASS_NAME ("SHELLDLL_DefView")
817 #undef THIS
818 /****************************************************************************
819 * ICommDlgBrowser interface
821 #define THIS LPCOMMDLGBROWSER this
823 /* for OnStateChange*/
824 #define CDBOSC_SETFOCUS 0x00000000
825 #define CDBOSC_KILLFOCUS 0x00000001
826 #define CDBOSC_SELCHANGE 0x00000002
827 #define CDBOSC_RENAME 0x00000003
829 typedef struct ICommDlgBrowser_VTable
830 { /* IUnknown methods */
831 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
832 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
833 STDMETHOD_(ULONG,Release) (THIS) PURE;
835 /* ICommDlgBrowser methods */
836 STDMETHOD(OnDefaultCommand) (THIS_ LPSHELLVIEW ppshv) PURE;
837 STDMETHOD(OnStateChange) (THIS_ LPSHELLVIEW ppshv, ULONG uChange) PURE;
838 STDMETHOD(IncludeObject) (THIS_ LPSHELLVIEW ppshv, LPCITEMIDLIST pidl) PURE;
839 } ICommDlgBrowser_VTable,*LPCOMMDLGBROWSER_VTABLE;
841 struct tagCOMMDLGBROWSER
842 { LPCOMMDLGBROWSER_VTABLE lpvtbl;
843 DWORD ref;
845 #undef THIS
846 /****************************************************************************
847 * IShellLink interface
850 #define THIS LPSHELLLINK this
851 /* IShellLink::Resolve fFlags */
852 typedef enum {
853 SLR_NO_UI = 0x0001,
854 SLR_ANY_MATCH = 0x0002,
855 SLR_UPDATE = 0x0004
856 } SLR_FLAGS;
858 /* IShellLink::GetPath fFlags */
859 typedef enum {
860 SLGP_SHORTPATH = 0x0001,
861 SLGP_UNCPRIORITY = 0x0002
862 } SLGP_FLAGS;
866 typedef struct IShellLink IShellLink,*LPSHELLLINK;
867 typedef struct IShellLink_VTable
869 /* *** IUnknown methods *** */
870 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
871 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
872 STDMETHOD_(ULONG,Release) (THIS) PURE;
874 STDMETHOD(GetPath)(THIS_ LPSTR pszFile,INT32 cchMaxPath, WIN32_FIND_DATA32A *pfd, DWORD fFlags) PURE;
876 STDMETHOD(GetIDList)(THIS_ LPITEMIDLIST * ppidl) PURE;
877 STDMETHOD(SetIDList)(THIS_ LPCITEMIDLIST pidl) PURE;
879 STDMETHOD(GetDescription)(THIS_ LPSTR pszName,INT32 cchMaxName) PURE;
880 STDMETHOD(SetDescription)(THIS_ LPCSTR pszName) PURE;
882 STDMETHOD(GetWorkingDirectory)(THIS_ LPSTR pszDir,INT32 cchMaxPath) PURE;
883 STDMETHOD(SetWorkingDirectory)(THIS_ LPCSTR pszDir) PURE;
885 STDMETHOD(GetArguments)(THIS_ LPSTR pszArgs,INT32 cchMaxPath) PURE;
886 STDMETHOD(SetArguments)(THIS_ LPCSTR pszArgs) PURE;
888 STDMETHOD(GetHotkey)(THIS_ WORD *pwHotkey) PURE;
889 STDMETHOD(SetHotkey)(THIS_ WORD wHotkey) PURE;
891 STDMETHOD(GetShowCmd)(THIS_ INT32 *piShowCmd) PURE;
892 STDMETHOD(SetShowCmd)(THIS_ INT32 iShowCmd) PURE;
894 STDMETHOD(GetIconLocation)(THIS_ LPSTR pszIconPath,INT32 cchIconPath,INT32 *piIcon) PURE;
895 STDMETHOD(SetIconLocation)(THIS_ LPCSTR pszIconPath,INT32 iIcon) PURE;
897 STDMETHOD(SetRelativePath)(THIS_ LPCSTR pszPathRel, DWORD dwReserved) PURE;
899 STDMETHOD(Resolve)(THIS_ HWND32 hwnd, DWORD fFlags) PURE;
901 STDMETHOD(SetPath)(THIS_ LPCSTR pszFile) PURE;
902 } IShellLink_VTable,*LPSHELLLINK_VTABLE;
904 struct IShellLink {
905 LPSHELLLINK_VTABLE lpvtbl;
906 DWORD ref;
909 #undef THIS
911 /****************************************************************************
912 * IExtractIconinterface
914 * FIXME
915 * Is the ExtractIconA interface
917 #define THIS LPEXTRACTICON this
919 /* GetIconLocation() input flags*/
920 #define GIL_OPENICON 0x0001 // allows containers to specify an "open" look
921 #define GIL_FORSHELL 0x0002 // icon is to be displayed in a ShellFolder
922 #define GIL_ASYNC 0x0020 // this is an async extract, return E_ASYNC
924 /* GetIconLocation() return flags */
925 #define GIL_SIMULATEDOC 0x0001 // simulate this document icon for this
926 #define GIL_PERINSTANCE 0x0002 // icons from this class are per instance (each file has its own)
927 #define GIL_PERCLASS 0x0004 // icons from this class per class (shared for all files of this type)
928 #define GIL_NOTFILENAME 0x0008 // location is not a filename, must call ::ExtractIcon
929 #define GIL_DONTCACHE 0x0010 // this icon should not be cached
931 typedef struct IExtractIcon IExtractIcon,*LPEXTRACTICON;
932 typedef struct IExtractIcon_VTable
933 { /*** IUnknown methods ***/
934 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
935 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
936 STDMETHOD_(ULONG,Release) (THIS) PURE;
938 /*** IExtractIcon methods ***/
939 STDMETHOD(GetIconLocation)(THIS_ UINT32 uFlags, LPSTR szIconFile, UINT32 cchMax,INT32 * piIndex, UINT32 * pwFlags) PURE;
940 STDMETHOD(Extract)(THIS_ LPCSTR pszFile, UINT32 nIconIndex, HICON32 *phiconLarge, HICON32 *phiconSmall, UINT32 nIconSize) PURE;
941 }IExtractIccon_VTable,*LPEXTRACTICON_VTABLE;
943 struct IExtractIcon
944 { LPEXTRACTICON_VTABLE lpvtbl;
945 DWORD ref;
946 LPITEMIDLIST pidl;
949 #undef THIS
950 /****************************************************************************
951 * IShellIcon interface
954 #define THIS LPSHELLICON this
956 typedef struct IShellIcon_VTable
957 { /*** IUnknown methods ***/
958 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
959 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
960 STDMETHOD_(ULONG,Release) (THIS) PURE;
962 /*** IShellIcon methods ***/
963 STDMETHOD(GetIconOf)(THIS_ LPCITEMIDLIST pidl, UINT32 flags, LPINT32 lpIconIndex) PURE;
964 } IShellIcon_VTable,*LPSHELLICON_VTABLE;
966 struct tagSHELLICON
967 { LPSHELLICON_VTABLE lpvtbl;
968 DWORD ref;
970 #undef THIS
971 /****************************************************************************
972 * IDockingWindowFrame interface
974 #define THIS LPDOCKINGWINDOWFRAME this
976 #define DWFRF_NORMAL 0x0000 /* femove toolbar flags*/
977 #define DWFRF_DELETECONFIGDATA 0x0001
978 #define DWFAF_HIDDEN 0x0001 /* add tolbar*/
980 typedef struct IDockingWindowFrame_VTable
981 { STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
982 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
983 STDMETHOD_(ULONG,Release) (THIS) PURE;
985 /*** IOleWindow methods ***/
986 STDMETHOD(GetWindow) (THIS_ HWND32 * lphwnd) PURE;
987 STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL32 fEnterMode) PURE;
989 /*** IDockingWindowFrame methods ***/
990 STDMETHOD(AddToolbar) (THIS_ IUnknown* punkSrc, LPCWSTR pwszItem, DWORD dwAddFlags) PURE;
991 STDMETHOD(RemoveToolbar) (THIS_ IUnknown* punkSrc, DWORD dwRemoveFlags) PURE;
992 STDMETHOD(FindToolbar) (THIS_ LPCWSTR pwszItem, REFIID riid, LPVOID* ppvObj) PURE;
993 } IDockingWindowFrame_VTable, *LPDOCKINGWINDOWFRAME_VTABLE;
995 struct tagDOCKINGWINDOWFRAME
996 { LPDOCKINGWINDOWFRAME_VTABLE lpvtbl;
997 DWORD ref;
1000 #undef THIS
1001 /****************************************************************************
1002 * IServiceProvider interface
1004 #define THIS LPSERVICEPROVIDER this
1006 typedef struct IServiceProvider_VTable
1007 { /*** IUnknown methods ***/
1008 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
1009 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
1010 STDMETHOD_(ULONG,Release) (THIS) PURE;
1012 STDMETHOD(QueryService)(THIS_ REFGUID guidService, REFIID riid, void **ppvObject);
1013 } IServiceProvider_VTable, *LPSERVICEPROVIDER_VTABLE;
1015 struct tagSERVICEPROVIDER
1016 { LPSERVICEPROVIDER_VTABLE lpvtbl;
1017 DWORD ref;
1019 /****************************************************************************
1020 * Class constructors
1022 #ifdef __WINE__
1023 extern LPDATAOBJECT IDataObject_Constructor();
1024 extern LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT32, const FORMATETC32 []);
1026 extern LPCLASSFACTORY IClassFactory_Constructor();
1027 extern LPCONTEXTMENU IContextMenu_Constructor(LPSHELLFOLDER, LPCITEMIDLIST *, UINT32);
1028 extern LPSHELLFOLDER IShellFolder_Constructor(LPSHELLFOLDER,LPITEMIDLIST);
1029 extern LPSHELLVIEW IShellView_Constructor(LPSHELLFOLDER, LPCITEMIDLIST);
1030 extern LPSHELLLINK IShellLink_Constructor();
1031 extern LPENUMIDLIST IEnumIDList_Constructor(LPCSTR,DWORD);
1032 extern LPEXTRACTICON IExtractIcon_Constructor(LPITEMIDLIST);
1033 #endif
1034 /****************************************************************************
1035 * Shell Execute API
1037 #define SE_ERR_FNF 2 // file not found
1038 #define SE_ERR_PNF 3 // path not found
1039 #define SE_ERR_ACCESSDENIED 5 // access denied
1040 #define SE_ERR_OOM 8 // out of memory
1041 #define SE_ERR_DLLNOTFOUND 32
1042 #define SE_ERR_SHARE 26
1043 #define SE_ERR_ASSOCINCOMPLETE 27
1044 #define SE_ERR_DDETIMEOUT 28
1045 #define SE_ERR_DDEFAIL 29
1046 #define SE_ERR_DDEBUSY 30
1047 #define SE_ERR_NOASSOC 31
1049 #define SEE_MASK_CLASSNAME 0x00000001
1050 #define SEE_MASK_CLASSKEY 0x00000003
1051 #define SEE_MASK_IDLIST 0x00000004
1052 #define SEE_MASK_INVOKEIDLIST 0x0000000c
1053 #define SEE_MASK_ICON 0x00000010
1054 #define SEE_MASK_HOTKEY 0x00000020
1055 #define SEE_MASK_NOCLOSEPROCESS 0x00000040
1056 #define SEE_MASK_CONNECTNETDRV 0x00000080
1057 #define SEE_MASK_FLAG_DDEWAIT 0x00000100
1058 #define SEE_MASK_DOENVSUBST 0x00000200
1059 #define SEE_MASK_FLAG_NO_UI 0x00000400
1060 #define SEE_MASK_UNICODE 0x00004000
1061 #define SEE_MASK_NO_CONSOLE 0x00008000
1062 #define SEE_MASK_ASYNCOK 0x00100000
1063 #define SEE_MASK_HMONITOR 0x00200000
1065 typedef struct _SHELLEXECUTEINFOA
1066 { DWORD cbSize;
1067 ULONG fMask;
1068 HWND32 hwnd;
1069 LPCSTR lpVerb;
1070 LPCSTR lpFile;
1071 LPCSTR lpParameters;
1072 LPCSTR lpDirectory;
1073 INT32 nShow;
1074 HINSTANCE32 hInstApp;
1075 /* Optional fields */
1076 LPVOID lpIDList;
1077 LPCSTR lpClass;
1078 HKEY hkeyClass;
1079 DWORD dwHotKey;
1080 union
1081 { HANDLE32 hIcon;
1082 HANDLE32 hMonitor;
1083 } u;
1084 HANDLE32 hProcess;
1085 } SHELLEXECUTEINFO32A, *LPSHELLEXECUTEINFO32A;
1087 typedef struct _SHELLEXECUTEINFOW
1088 { DWORD cbSize;
1089 ULONG fMask;
1090 HWND32 hwnd;
1091 LPCWSTR lpVerb;
1092 LPCWSTR lpFile;
1093 LPCWSTR lpParameters;
1094 LPCWSTR lpDirectory;
1095 INT32 nShow;
1096 HINSTANCE32 hInstApp;
1097 /* Optional fields*/
1098 LPVOID lpIDList;
1099 LPCWSTR lpClass;
1100 HKEY hkeyClass;
1101 DWORD dwHotKey;
1102 union
1103 { HANDLE32 hIcon;
1104 HANDLE32 hMonitor;
1105 } u;
1106 HANDLE32 hProcess;
1107 } SHELLEXECUTEINFO32W, *LPSHELLEXECUTEINFO32W;
1109 #define SHELLEXECUTEINFO WINELIB_NAME_AW(SHELLEXECUTEINFO)
1110 #define LPSHELLEXECUTEINFO WINELIB_NAME_AW(LPSHELLEXECUTEINFO)
1112 BOOL32 WINAPI ShellExecuteEx32A(LPSHELLEXECUTEINFO32A lpExecInfo);
1113 BOOL32 WINAPI ShellExecuteEx32W(LPSHELLEXECUTEINFO32W lpExecInfo);
1114 #define ShellExecuteEx WINELIB_NAME_AW(ShellExecuteEx)
1116 void WINAPI WinExecError32A(HWND32 hwnd,INT32 error, LPCSTR lpstrFileName, LPCSTR lpstrTitle);
1117 void WINAPI WinExecError32W(HWND32 hwnd,INT32 error, LPCWSTR lpstrFileName, LPCWSTR lpstrTitle);
1118 #define WinExecError WINELIB_NAME_AW(WinExecError)
1122 /****************************************************************************
1123 * SHBrowseForFolder API
1125 typedef INT32 (CALLBACK* BFFCALLBACK)(HWND32 hwnd, UINT32 uMsg, LPARAM lParam, LPARAM lpData);
1127 typedef struct tagBROWSEINFO32A {
1128 HWND32 hwndOwner;
1129 LPCITEMIDLIST pidlRoot;
1130 LPSTR pszDisplayName;
1131 LPCSTR lpszTitle;
1132 UINT32 ulFlags;
1133 BFFCALLBACK lpfn;
1134 LPARAM lParam;
1135 INT32 iImage;
1136 } BROWSEINFO32A, *PBROWSEINFO32A, *LPBROWSEINFO32A;
1138 typedef struct tagBROWSEINFO32W {
1139 HWND32 hwndOwner;
1140 LPCITEMIDLIST pidlRoot;
1141 LPWSTR pszDisplayName;
1142 LPCWSTR lpszTitle;
1143 UINT32 ulFlags;
1144 BFFCALLBACK lpfn;
1145 LPARAM lParam;
1146 INT32 iImage;
1147 } BROWSEINFO32W, *PBROWSEINFO32W, *LPBROWSEINFO32W;
1149 #define BROWSEINFO WINELIB_NAME_AW(BROWSEINFO)
1150 #define PBROWSEINFO WINELIB_NAME_AW(PBROWSEINFO)
1151 #define LPBROWSEINFO WINELIB_NAME_AW(LPBROWSEINFO)
1153 // Browsing for directory.
1154 #define BIF_RETURNONLYFSDIRS 0x0001
1155 #define BIF_DONTGOBELOWDOMAIN 0x0002
1156 #define BIF_STATUSTEXT 0x0004
1157 #define BIF_RETURNFSANCESTORS 0x0008
1158 #define BIF_EDITBOX 0x0010
1159 #define BIF_VALIDATE 0x0020
1161 #define BIF_BROWSEFORCOMPUTER 0x1000
1162 #define BIF_BROWSEFORPRINTER 0x2000
1163 #define BIF_BROWSEINCLUDEFILES 0x4000
1165 // message from browser
1166 #define BFFM_INITIALIZED 1
1167 #define BFFM_SELCHANGED 2
1168 #define BFFM_VALIDATEFAILEDA 3 // lParam:szPath ret:1(cont),0(EndDialog)
1169 #define BFFM_VALIDATEFAILEDW 4 // lParam:wzPath ret:1(cont),0(EndDialog)
1171 // messages to browser
1172 #define BFFM_SETSTATUSTEXTA (WM_USER+100)
1173 #define BFFM_ENABLEOK (WM_USER+101)
1174 #define BFFM_SETSELECTIONA (WM_USER+102)
1175 #define BFFM_SETSELECTIONW (WM_USER+103)
1176 #define BFFM_SETSTATUSTEXTW (WM_USER+104)
1179 #ifdef UNICODE
1180 #define SHBrowseForFolder SHBrowseForFolderW
1181 #define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTW
1182 #define BFFM_SETSELECTION BFFM_SETSELECTIONW
1184 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDW
1185 #else
1186 #define SHBrowseForFolder SHBrowseForFolderA
1187 #define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTA
1188 #define BFFM_SETSELECTION BFFM_SETSELECTIONA
1190 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDA
1191 #endif
1194 LPITEMIDLIST WINAPI SHBrowseForFolder32A(LPBROWSEINFO32A lpbi);
1195 /*LPITEMIDLIST WINAPI SHBrowseForFolder32W(LPBROWSEINFO32W lpbi);*/
1196 #define SHBrowseForFolder WINELIB_NAME_AW(SHBrowseForFolder)
1198 /****************************************************************************
1199 * shlview structures
1203 * IShellFolderViewCallback Callback
1204 * This "callback" is called by the shells default IShellView implementation (that
1205 * we got using SHCreateShellViewEx()), to notify us of the various things that
1206 * are happening to the shellview (and ask for things too).
1208 * You don't have to support anything here - anything you don't want to
1209 * handle, the shell will do itself if you just return E_NOTIMPL. This parameters
1210 * that the shell passes to this function are entirely undocumented.
1212 * HOWEVER, as the cabview sample as originally written used this callback, the
1213 * writers implemented the callback mechanism on top of their own IShellView.
1214 * Look there for some clues on what to do here.
1217 typedef HRESULT(CALLBACK *SHELLVIEWPROC)(DWORD dwUserParam,LPSHELLFOLDER psf,
1218 HWND32 hwnd,UINT32 uMsg,UINT32 wParam,LPARAM lParam);
1220 /* NF valid values for the "viewmode" item of the SHELLTEMPLATE*/
1221 #define NF_INHERITVIEW 0x0000
1222 #define NF_LOCALVIEW 0x0001
1224 typedef struct _SHELLVIEWDATA // idl
1225 { DWORD dwSize;
1226 LPSHELLFOLDER pShellFolder;
1227 DWORD dwUserParam;
1228 LPCITEMIDLIST pidl;
1229 DWORD v3; // always 0
1230 SHELLVIEWPROC pCallBack;
1231 DWORD viewmode; // NF_* enum
1232 } SHELLVIEWDATA, * LPSHELLVIEWDATA;
1235 The shell keeps track of some per-user state to handle display
1236 options that is of majorinterest to ISVs.
1237 The key one requested right now is "DoubleClickInWebView".
1239 typedef struct
1240 { BOOL32 fShowAllObjects : 1;
1241 BOOL32 fShowExtensions : 1;
1242 BOOL32 fNoConfirmRecycle : 1;
1243 BOOL32 fShowSysFiles : 1;
1244 BOOL32 fShowCompColor : 1;
1245 BOOL32 fDoubleClickInWebView : 1;
1246 BOOL32 fDesktopHTML : 1;
1247 BOOL32 fWin95Classic : 1;
1248 BOOL32 fDontPrettyPath : 1;
1249 BOOL32 fShowAttribCol : 1;
1250 BOOL32 fMapNetDrvBtn : 1;
1251 BOOL32 fShowInfoTip : 1;
1252 BOOL32 fHideIcons : 1;
1253 UINT32 fRestFlags : 3;
1254 } SHELLFLAGSTATE, * LPSHELLFLAGSTATE;
1257 #undef PURE
1258 #undef FAR
1259 #undef THIS
1260 #undef THIS_
1261 #undef STDMETHOD
1262 #undef STDMETHOD_
1263 #endif /*_WINE_SHLOBJ_H*/