32-bit clipboard support.
[wine/multimedia.git] / include / shlobj.h
blob63ee03a1c7ad2d76e30e3545d8c5672c5fd4bc7c
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_OFFSETA 0x0001
113 #define STRRET_CSTRA 0x0002
114 #define STRRET_ASTR 0X0003
115 #define STRRET_OFFSETW 0X0004
116 #define STRRET_CSTRW 0X0005
119 typedef struct _STRRET
120 { UINT32 uType; /* STRRET_xxx */
121 union
122 { LPWSTR pOleStr; /* OLESTR that will be freed */
123 LPSTR pStr;
124 UINT32 uOffset; /* OffsetINT32o SHITEMID (ANSI) */
125 char cStr[MAX_PATH]; /* Buffer to fill in */
126 WCHAR cStrW[MAX_PATH];
128 } STRRET,*LPSTRRET;
130 /*****************************************************************************
131 * IContextMenu interface
133 #define THIS LPCONTEXTMENU this
135 /* default menu items*/
136 #define IDM_EXPLORE 0
137 #define IDM_OPEN 1
138 #define IDM_RENAME 2
139 #define IDM_LAST IDM_RENAME
141 /* QueryContextMenu uFlags */
142 #define CMF_NORMAL 0x00000000
143 #define CMF_DEFAULTONLY 0x00000001
144 #define CMF_VERBSONLY 0x00000002
145 #define CMF_EXPLORE 0x00000004
146 #define CMF_NOVERBS 0x00000008
147 #define CMF_CANRENAME 0x00000010
148 #define CMF_NODEFAULT 0x00000020
149 #define CMF_INCLUDESTATIC 0x00000040
150 #define CMF_RESERVED 0xffff0000 // View specific
152 /* GetCommandString uFlags */
153 #define GCS_VERBA 0x00000000 // canonical verb
154 #define GCS_HELPTEXTA 0x00000001 // help text (for status bar)
155 #define GCS_VALIDATEA 0x00000002 // validate command exists
156 #define GCS_VERBW 0x00000004 // canonical verb (unicode)
157 #define GCS_HELPTEXTW 0x00000005 // help text (unicode version)
158 #define GCS_VALIDATEW 0x00000006 // validate command exists (unicode)
159 #define GCS_UNICODE 0x00000004 // for bit testing - Unicode string
161 #define GCS_VERB GCS_VERBA
162 #define GCS_HELPTEXT GCS_HELPTEXTA
163 #define GCS_VALIDATE GCS_VALIDATEA
165 #define CMDSTR_NEWFOLDERA "NewFolder"
166 #define CMDSTR_VIEWLISTA "ViewList"
167 #define CMDSTR_VIEWDETAILSA "ViewDetails"
168 #define CMDSTR_NEWFOLDERW L"NewFolder"
169 #define CMDSTR_VIEWLISTW L"ViewList"
170 #define CMDSTR_VIEWDETAILSW L"ViewDetails"
172 #define CMDSTR_NEWFOLDER CMDSTR_NEWFOLDERA
173 #define CMDSTR_VIEWLIST CMDSTR_VIEWLISTA
174 #define CMDSTR_VIEWDETAILS CMDSTR_VIEWDETAILSA
176 #define CMIC_MASK_HOTKEY SEE_MASK_HOTKEY
177 #define CMIC_MASK_ICON SEE_MASK_ICON
178 #define CMIC_MASK_FLAG_NO_UI SEE_MASK_FLAG_NO_UI
179 #define CMIC_MASK_UNICODE SEE_MASK_UNICODE
180 #define CMIC_MASK_NO_CONSOLE SEE_MASK_NO_CONSOLE
181 #define CMIC_MASK_HASLINKNAME SEE_MASK_HASLINKNAME
182 #define CMIC_MASK_FLAG_SEP_VDM SEE_MASK_FLAG_SEPVDM
183 #define CMIC_MASK_HASTITLE SEE_MASK_HASTITLE
184 #define CMIC_MASK_ASYNCOK SEE_MASK_ASYNCOK
186 #define CMIC_MASK_PTINVOKE 0x20000000
188 /*NOTE: When SEE_MASK_HMONITOR is set, hIcon is treated as hMonitor */
189 typedef struct tagCMINVOKECOMMANDINFO
190 { DWORD cbSize; // sizeof(CMINVOKECOMMANDINFO)
191 DWORD fMask; // any combination of CMIC_MASK_*
192 HWND32 hwnd; // might be NULL (indicating no owner window)
193 LPCSTR lpVerb; // either a string or MAKEINTRESOURCE(idOffset)
194 LPCSTR lpParameters; // might be NULL (indicating no parameter)
195 LPCSTR lpDirectory; // might be NULL (indicating no specific directory)
196 INT32 nShow; // one of SW_ values for ShowWindow() API
198 DWORD dwHotKey;
199 HANDLE32 hIcon;
200 } CMINVOKECOMMANDINFO32, *LPCMINVOKECOMMANDINFO32;
202 typedef struct tagCMInvokeCommandInfoEx
203 { DWORD cbSize; // must be sizeof(CMINVOKECOMMANDINFOEX)
204 DWORD fMask; // any combination of CMIC_MASK_*
205 HWND32 hwnd; // might be NULL (indicating no owner window)
206 LPCSTR lpVerb; // either a string or MAKEINTRESOURCE(idOffset)
207 LPCSTR lpParameters; // might be NULL (indicating no parameter)
208 LPCSTR lpDirectory; // might be NULL (indicating no specific directory)
209 INT32 nShow; // one of SW_ values for ShowWindow() API
211 DWORD dwHotKey;
213 HANDLE32 hIcon;
214 LPCSTR lpTitle; // For CreateProcess-StartupInfo.lpTitle
215 LPCWSTR lpVerbW; // Unicode verb (for those who can use it)
216 LPCWSTR lpParametersW; // Unicode parameters (for those who can use it)
217 LPCWSTR lpDirectoryW; // Unicode directory (for those who can use it)
218 LPCWSTR lpTitleW; // Unicode title (for those who can use it)
219 POINT32 ptInvoke; // Point where it's invoked
221 } CMINVOKECOMMANDINFOEX32, *LPCMINVOKECOMMANDINFOEX32;
224 typedef struct IContextMenu_VTable
225 { // *** IUnknown methods ***
226 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
227 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
228 STDMETHOD_(ULONG,Release) (THIS) PURE;
230 STDMETHOD(QueryContextMenu)(THIS_ HMENU32 hmenu,UINT32 indexMenu,UINT32 idCmdFirst, UINT32 idCmdLast,UINT32 uFlags) PURE;
231 STDMETHOD(InvokeCommand)(THIS_ LPCMINVOKECOMMANDINFO32 lpici) PURE;
232 STDMETHOD(GetCommandString)(THIS_ UINT32 idCmd,UINT32 uType,UINT32 * pwReserved,LPSTR pszName,UINT32 cchMax) PURE;
234 /* undocumented not only in ContextMenu2 */
235 STDMETHOD(HandleMenuMsg)(THIS_ UINT32 uMsg,WPARAM32 wParam,LPARAM lParam) PURE;
237 /* possibly another nasty entry from ContextMenu3 ?*/
238 void * guard;
239 } IContextMenu_VTable,*LPCONTEXTMENU_VTABLE;
241 struct tagCONTEXTMENU
242 { LPCONTEXTMENU_VTABLE lpvtbl;
243 DWORD ref;
244 LPSHELLFOLDER pSFParent;
245 LPITEMIDLIST *aPidls;
246 BOOL32 bAllValues;
249 #undef THIS
250 /*****************************************************************************
251 * structures for shell clipboard formats
253 typedef enum tagDVASPECT
254 { DVASPECT_CONTENT = 1,
255 DVASPECT_THUMBNAIL = 2,
256 DVASPECT_ICON = 4,
257 DVASPECT_DOCPRINT = 8
258 } DVASPECT;
260 enum tagTYMED
261 { TYMED_HGLOBAL = 1,
262 TYMED_FILE = 2,
263 TYMED_ISTREAM = 4,
264 TYMED_ISTORAGE = 8,
265 TYMED_GDI = 16,
266 TYMED_MFPICT = 32,
267 TYMED_ENHMF = 64,
268 TYMED_NULL = 0
269 } TYMED;
271 typedef struct
272 { DWORD tdSize;
273 WORD tdDriverNameOffset;
274 WORD tdDeviceNameOffset;
275 WORD tdPortNameOffset;
276 WORD tdExtDevmodeOffset;
277 BYTE tdData[ 1 ];
278 } DVTARGETDEVICE32;
280 typedef WORD CLIPFORMAT32, *LPCLIPFORMAT32;
282 /* dataobject as answer to a request */
283 typedef struct
284 { DWORD tymed;
285 union
286 { HBITMAP32 hBitmap;
287 /*HMETAFILEPICT32 hMetaFilePict;*/
288 /*HENHMETAFILE32 hEnhMetaFile;*/
289 HGLOBAL32 hGlobal;
290 LPOLESTR32 lpszFileName;
291 IStream32 *pstm;
292 IStorage32 *pstg;
293 } u;
294 IUnknown *pUnkForRelease;
295 } STGMEDIUM32;
297 /* wished data format */
298 typedef struct
299 { CLIPFORMAT32 cfFormat;
300 DVTARGETDEVICE32 *ptd;
301 DWORD dwAspect;
302 LONG lindex;
303 DWORD tymed;
304 } FORMATETC32, *LPFORMATETC32;
306 /* shell specific clipboard formats */
308 /* DATAOBJECT_InitShellIDList*/
309 #define CFSTR_SHELLIDLIST TEXT("Shell IDList Array") /* CF_IDLIST */
311 extern UINT32 cfShellIDList;
313 typedef struct
314 { UINT32 cidl;
315 UINT32 aoffset[1];
316 } CIDA, *LPCIDA;
318 #define CFSTR_SHELLIDLISTOFFSET TEXT("Shell Object Offsets") /* CF_OBJECTPOSITIONS */
319 #define CFSTR_NETRESOURCES TEXT("Net Resource") /* CF_NETRESOURCE */
321 /* DATAOBJECT_InitFileGroupDesc */
322 #define CFSTR_FILEDESCRIPTORA TEXT("FileGroupDescriptor") /* CF_FILEGROUPDESCRIPTORA */
323 extern UINT32 cfFileGroupDesc;
325 #define CFSTR_FILEDESCRIPTORW TEXT("FileGroupDescriptorW") /* CF_FILEGROUPDESCRIPTORW */
327 /* DATAOBJECT_InitFileContents*/
328 #define CFSTR_FILECONTENTS TEXT("FileContents") /* CF_FILECONTENTS */
329 extern UINT32 cfFileContents;
331 #define CFSTR_FILENAMEA TEXT("FileName") /* CF_FILENAMEA */
332 #define CFSTR_FILENAMEW TEXT("FileNameW") /* CF_FILENAMEW */
333 #define CFSTR_PRINTERGROUP TEXT("PrinterFriendlyName") /* CF_PRINTERS */
334 #define CFSTR_FILENAMEMAPA TEXT("FileNameMap") /* CF_FILENAMEMAPA */
335 #define CFSTR_FILENAMEMAPW TEXT("FileNameMapW") /* CF_FILENAMEMAPW */
336 #define CFSTR_SHELLURL TEXT("UniformResourceLocator")
337 #define CFSTR_PREFERREDDROPEFFECT TEXT("Preferred DropEffect")
338 #define CFSTR_PERFORMEDDROPEFFECT TEXT("Performed DropEffect")
339 #define CFSTR_PASTESUCCEEDED TEXT("Paste Succeeded")
340 #define CFSTR_INDRAGLOOP TEXT("InShellDragLoop")
342 /**************************************************************************
343 * IDLList "Item ID List List"
345 * NOTES
346 * interal data holder for IDataObject
348 typedef struct tagLPIDLLIST *LPIDLLIST, IDLList;
350 #define THIS LPIDLLIST this
352 enum
353 { State_UnInit=1,
354 State_Init=2,
355 State_OutOfMem=3
356 } IDLListState;
358 typedef struct IDLList_VTable
359 { STDMETHOD_(UINT32, GetState)(THIS);
360 STDMETHOD_(LPITEMIDLIST, GetElement)(THIS_ UINT32 nIndex);
361 STDMETHOD_(UINT32, GetCount)(THIS);
362 STDMETHOD_(BOOL32, StoreItem)(THIS_ LPITEMIDLIST pidl);
363 STDMETHOD_(BOOL32, AddItems)(THIS_ LPITEMIDLIST *apidl, UINT32 cidl);
364 STDMETHOD_(BOOL32, InitList)(THIS);
365 STDMETHOD_(void, CleanList)(THIS);
366 } IDLList_VTable,*LPIDLLIST_VTABLE;
368 struct tagLPIDLLIST
369 { LPIDLLIST_VTABLE lpvtbl;
370 HDPA dpa;
371 UINT32 uStep;
374 extern LPIDLLIST IDLList_Constructor (UINT32 uStep);
375 extern void IDLList_Destructor(LPIDLLIST this);
376 #undef THIS
377 /*****************************************************************************
378 * IEnumFORMATETC interface
380 #define THIS LPENUMFORMATETC this
382 typedef struct IEnumFORMATETC_VTable
383 { /* IUnknown methods */
384 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
385 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
386 STDMETHOD_(ULONG,Release) (THIS) PURE;
388 /* IEnumFORMATETC methods */
389 STDMETHOD (Next)(THIS_ ULONG celt, FORMATETC32 *rgelt, ULONG *pceltFethed) PURE;
390 STDMETHOD (Skip)(THIS_ ULONG celt) PURE;
391 STDMETHOD (Reset)(THIS) PURE;
392 STDMETHOD (Clone)(THIS_ IEnumFORMATETC ** ppenum) PURE;
393 } IEnumFORMATETC_VTable,*LPENUMFORMATETC_VTABLE;
395 struct tagENUMFORMATETC
396 { LPENUMFORMATETC_VTABLE lpvtbl;
397 DWORD ref;
398 UINT32 posFmt;
399 UINT32 countFmt;
400 LPFORMATETC32 pFmt;
403 #undef THIS
405 /*****************************************************************************
406 * IDataObject interface
408 #define THIS LPDATAOBJECT this
410 typedef struct IDataObject_VTable
411 { /*** IUnknown methods ***/
412 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
413 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
414 STDMETHOD_(ULONG,Release) (THIS) PURE;
416 STDMETHOD (GetData )(THIS_ LPFORMATETC32 pformatetcIn, STGMEDIUM32 *pmedium) PURE;
417 STDMETHOD (GetDataHere)(THIS_ LPFORMATETC32 pformatetc, STGMEDIUM32 *pmedium) PURE;
418 STDMETHOD (QueryGetData)(THIS_ LPFORMATETC32 pformatetc) PURE;
419 STDMETHOD (GetCanonicalFormatEtc)(THIS_ LPFORMATETC32 pformatectIn, LPFORMATETC32 pformatetcOut) PURE;
420 STDMETHOD (SetData)(THIS_ LPFORMATETC32 pformatetc, STGMEDIUM32 *pmedium, BOOL32 fRelease) PURE;
421 STDMETHOD (EnumFormatEtc)(THIS_ DWORD dwDirection, IEnumFORMATETC **ppenumFormatEtc) PURE;
422 STDMETHOD (DAdvise )(THIS_ LPFORMATETC32 *pformatetc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection) PURE;
423 STDMETHOD (DUnadvise)(THIS_ DWORD dwConnection) PURE;
424 STDMETHOD (EnumDAdvise)(THIS_ IEnumSTATDATA **ppenumAdvise) PURE;
425 } IDataObject_VTable,*LPDATAOBJECT_VTABLE;
427 struct tagDATAOBJECT
428 { LPDATAOBJECT_VTABLE lpvtbl;
429 DWORD ref;
430 LPSHELLFOLDER psf;
431 LPIDLLIST lpill; /* the data of the dataobject */
432 LPITEMIDLIST pidl;
435 #undef THIS
438 /*****************************************************************************
439 * IShellExtInit interface
441 #define THIS LPSHELLEXTINIT this
443 typedef struct IShellExtInit_VTable
444 { // *** IUnknown methods ***
445 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
446 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
447 STDMETHOD_(ULONG,Release) (THIS) PURE;
449 // *** IShellExtInit methods ***
450 STDMETHOD(Initialize)(THIS_ LPCITEMIDLIST pidlFolder, LPDATAOBJECT lpdobj, HKEY hkeyProgID) PURE;
451 } IShellExtInit_VTable,*LPSHELLEXTINIT_VTABLE;
453 struct tagSHELLEXTINIT
454 { LPSHELLEXTINIT_VTABLE lpvtbl;
455 DWORD ref;
458 #undef THIS
460 /*****************************************************************************
461 * IEnumIDList interface
463 #define THIS LPENUMIDLIST this
465 typedef struct tagENUMLIST
466 { struct tagENUMLIST *pNext;
467 LPITEMIDLIST pidl;
468 } ENUMLIST, *LPENUMLIST;
470 typedef struct IEnumIDList_VTable
471 { /* *** IUnknown methods *** */
472 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
473 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
474 STDMETHOD_(ULONG,Release) (THIS) PURE;
476 /* *** IEnumIDList methods *** */
477 STDMETHOD(Next) (THIS_ ULONG celt,
478 LPITEMIDLIST *rgelt,
479 ULONG *pceltFetched) PURE;
480 STDMETHOD(Skip) (THIS_ ULONG celt) PURE;
481 STDMETHOD(Reset) (THIS) PURE;
482 STDMETHOD(Clone) (THIS_ IEnumIDList **ppenum) PURE;
483 /* *** private methods *** */
484 STDMETHOD_(BOOL32,CreateEnumList)(THIS_ LPCSTR, DWORD) PURE;
485 STDMETHOD_(BOOL32,AddToEnumList)(THIS_ LPITEMIDLIST) PURE;
486 STDMETHOD_(BOOL32,DeleteList)(THIS) PURE;
489 } IEnumIDList_VTable,*LPENUMIDLIST_VTABLE;
491 struct tagENUMIDLIST
492 { LPENUMIDLIST_VTABLE lpvtbl;
493 DWORD ref;
494 LPENUMLIST mpFirst;
495 LPENUMLIST mpLast;
496 LPENUMLIST mpCurrent;
499 #undef THIS
500 //--------------------------------------------------------------------------
502 // FOLDERSETTINGS
504 // FOLDERSETTINGS is a data structure that explorer passes from one folder
505 // view to another, when the user is browsing. It calls ISV::GetCurrentInfo
506 // member to get the current settings and pass it to ISV::CreateViewWindow
507 // to allow the next folder view "inherit" it. These settings assumes a
508 // particular UI (which the shell's folder view has), and shell extensions
509 // may or may not use those settings.
511 //--------------------------------------------------------------------------
513 typedef LPBYTE LPVIEWSETTINGS;
515 // NB Bitfields.
516 // FWF_DESKTOP implies FWF_TRANSPARENT/NOCLIENTEDGE/NOSCROLL
517 typedef enum
518 { FWF_AUTOARRANGE = 0x0001,
519 FWF_ABBREVIATEDNAMES = 0x0002,
520 FWF_SNAPTOGRID = 0x0004,
521 FWF_OWNERDATA = 0x0008,
522 FWF_BESTFITWINDOW = 0x0010,
523 FWF_DESKTOP = 0x0020,
524 FWF_SINGLESEL = 0x0040,
525 FWF_NOSUBFOLDERS = 0x0080,
526 FWF_TRANSPARENT = 0x0100,
527 FWF_NOCLIENTEDGE = 0x0200,
528 FWF_NOSCROLL = 0x0400,
529 FWF_ALIGNLEFT = 0x0800,
530 FWF_SINGLECLICKACTIVATE=0x8000 // TEMPORARY -- NO UI FOR THIS
531 } FOLDERFLAGS;
533 typedef enum
534 { FVM_ICON = 1,
535 FVM_SMALLICON = 2,
536 FVM_LIST = 3,
537 FVM_DETAILS = 4,
538 } FOLDERVIEWMODE;
540 typedef struct
541 { UINT32 ViewMode; // View mode (FOLDERVIEWMODE values)
542 UINT32 fFlags; // View options (FOLDERFLAGS bits)
543 } FOLDERSETTINGS, *LPFOLDERSETTINGS;
545 typedef const FOLDERSETTINGS * LPCFOLDERSETTINGS;
547 /* FIXME; the next two lines are propersheet related, move to prsht.h when created */
548 struct _PSP;
549 typedef struct _PSP FAR* HPROPSHEETPAGE;
551 typedef BOOL32 (CALLBACK FAR * LPFNADDPROPSHEETPAGE)(HPROPSHEETPAGE, LPARAM);
552 typedef BOOL32 (CALLBACK FAR * LPFNADDPROPSHEETPAGES)(LPVOID, LPFNADDPROPSHEETPAGE,LPARAM);
554 /************************************************************************
555 * IShellFolder interface
558 #define THIS LPSHELLFOLDER this
560 /* IShellFolder::GetDisplayNameOf/SetNameOf uFlags */
561 typedef enum
562 { SHGDN_NORMAL = 0, /* default (display purpose) */
563 SHGDN_INFOLDER = 1, /* displayed under a folder (relative)*/
564 SHGDN_FORPARSING = 0x8000 /* for ParseDisplayName or path */
565 } SHGNO;
567 /* IShellFolder::EnumObjects */
568 typedef enum tagSHCONTF
569 { SHCONTF_FOLDERS = 32, /* for shell browser */
570 SHCONTF_NONFOLDERS = 64, /* for default view */
571 SHCONTF_INCLUDEHIDDEN = 128 /* for hidden/system objects */
572 } SHCONTF;
574 /* from oleidl.h */
575 #define DROPEFFECT_NONE 0
576 #define DROPEFFECT_COPY 1
577 #define DROPEFFECT_MOVE 2
578 #define DROPEFFECT_LINK 4
579 #define DROPEFFECT_SCROLL 0x80000000
581 /* IShellFolder::GetAttributesOf flags */
582 #define SFGAO_CANCOPY DROPEFFECT_COPY /* Objects can be copied */
583 #define SFGAO_CANMOVE DROPEFFECT_MOVE /* Objects can be moved */
584 #define SFGAO_CANLINK DROPEFFECT_LINK /* Objects can be linked */
585 #define SFGAO_CANRENAME 0x00000010L /* Objects can be renamed */
586 #define SFGAO_CANDELETE 0x00000020L /* Objects can be deleted */
587 #define SFGAO_HASPROPSHEET 0x00000040L /* Objects have property sheets */
588 #define SFGAO_DROPTARGET 0x00000100L /* Objects are drop target */
589 #define SFGAO_CAPABILITYMASK 0x00000177L
590 #define SFGAO_LINK 0x00010000L /* Shortcut (link) */
591 #define SFGAO_SHARE 0x00020000L /* shared */
592 #define SFGAO_READONLY 0x00040000L /* read-only */
593 #define SFGAO_GHOSTED 0x00080000L /* ghosted icon */
594 #define SFGAO_DISPLAYATTRMASK 0x000F0000L
595 #define SFGAO_FILESYSANCESTOR 0x10000000L /* It contains file system folder */
596 #define SFGAO_FOLDER 0x20000000L /* It's a folder. */
597 #define SFGAO_FILESYSTEM 0x40000000L /* is a file system thing (file/folder/root) */
598 #define SFGAO_HASSUBFOLDER 0x80000000L /* Expandable in the map pane */
599 #define SFGAO_CONTENTSMASK 0x80000000L
600 #define SFGAO_VALIDATE 0x01000000L /* invalidate cached information */
601 #define SFGAO_REMOVABLE 0x02000000L /* is this removeable media? */
603 typedef struct IShellFolder_VTable {
604 /* *** IUnknown methods *** */
605 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
606 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
607 STDMETHOD_(ULONG,Release) (THIS) PURE;
609 /* *** IShellFolder methods *** */
610 STDMETHOD(ParseDisplayName) (THIS_ HWND32 hwndOwner,LPBC pbcReserved, LPOLESTR32 lpszDisplayName,ULONG * pchEaten, LPITEMIDLIST * ppidl, ULONG *pdwAttributes) PURE;
611 STDMETHOD(EnumObjects)( THIS_ HWND32 hwndOwner, DWORD grfFlags, LPENUMIDLIST * ppenumIDList) PURE;
612 STDMETHOD(BindToObject)(THIS_ LPCITEMIDLIST pidl, LPBC pbcReserved,REFIID riid, LPVOID * ppvOut) PURE;
613 STDMETHOD(BindToStorage)(THIS_ LPCITEMIDLIST pidl, LPBC pbcReserved,REFIID riid, LPVOID * ppvObj) PURE;
614 STDMETHOD(CompareIDs)(THIS_ LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE;
615 STDMETHOD(CreateViewObject)(THIS_ HWND32 hwndOwner, REFIID riid, LPVOID * ppvOut) PURE;
616 STDMETHOD(GetAttributesOf)(THIS_ UINT32 cidl, LPCITEMIDLIST * apidl,ULONG * rgfInOut) PURE;
617 STDMETHOD(GetUIObjectOf)(THIS_ HWND32 hwndOwner, UINT32 cidl, LPCITEMIDLIST * apidl,REFIID riid, UINT32 * prgfInOut, LPVOID * ppvOut) PURE;
618 STDMETHOD(GetDisplayNameOf)(THIS_ LPCITEMIDLIST pidl, DWORD uFlags, LPSTRRET lpName) PURE;
619 STDMETHOD(SetNameOf)(THIS_ HWND32 hwndOwner, LPCITEMIDLIST pidl,LPCOLESTR32 lpszName, DWORD uFlags,LPITEMIDLIST * ppidlOut) PURE;
621 /* utility functions */
622 STDMETHOD_(BOOL32,GetFolderPath)(THIS_ LPSTR, DWORD);
624 } *LPSHELLFOLDER_VTABLE,IShellFolder_VTable;
626 struct tagSHELLFOLDER {
627 LPSHELLFOLDER_VTABLE lpvtbl;
628 DWORD ref;
629 LPSTR mlpszFolder;
630 LPITEMIDLIST mpidl;
631 LPITEMIDLIST mpidlNSRoot;
632 LPSHELLFOLDER mpSFParent;
635 extern LPSHELLFOLDER pdesktopfolder;
637 /************************
638 * Shellfolder API
640 DWORD WINAPI SHGetDesktopFolder(LPSHELLFOLDER *);
641 #undef THIS
643 /************************************************************************
644 * IShellBrowser interface
646 #define THIS LPSHELLBROWSER this
647 /* targets for GetWindow/SendControlMsg */
648 #define FCW_STATUS 0x0001
649 #define FCW_TOOLBAR 0x0002
650 #define FCW_TREE 0x0003
651 #define FCW_INTERNETBAR 0x0006
652 #define FCW_PROGRESS 0x0008
654 /* wFlags for BrowseObject*/
655 #define SBSP_DEFBROWSER 0x0000
656 #define SBSP_SAMEBROWSER 0x0001
657 #define SBSP_NEWBROWSER 0x0002
659 #define SBSP_DEFMODE 0x0000
660 #define SBSP_OPENMODE 0x0010
661 #define SBSP_EXPLOREMODE 0x0020
663 #define SBSP_ABSOLUTE 0x0000
664 #define SBSP_RELATIVE 0x1000
665 #define SBSP_PARENT 0x2000
666 #define SBSP_NAVIGATEBACK 0x4000
667 #define SBSP_NAVIGATEFORWARD 0x8000
669 #define SBSP_ALLOW_AUTONAVIGATE 0x10000
671 #define SBSP_INITIATEDBYHLINKFRAME 0x80000000
672 #define SBSP_REDIRECT 0x40000000
673 #define SBSP_WRITENOHISTORY 0x08000000
675 /* uFlage for SetToolbarItems */
676 #define FCT_MERGE 0x0001
677 #define FCT_CONFIGABLE 0x0002
678 #define FCT_ADDTOEND 0x0004
680 typedef struct IShellBrowser_VTable
681 { // *** IUnknown methods ***
682 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
683 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
684 STDMETHOD_(ULONG,Release) (THIS) PURE;
686 // *** IOleWindow methods ***
687 STDMETHOD(GetWindow) (THIS_ HWND32 * lphwnd) PURE;
688 STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL32 fEnterMode) PURE;
690 // *** IShellBrowser methods *** (same as IOleInPlaceFrame)
691 STDMETHOD(InsertMenusSB) (THIS_ HMENU32 hmenuShared, LPOLEMENUGROUPWIDTHS32 lpMenuWidths) PURE;
692 STDMETHOD(SetMenuSB) (THIS_ HMENU32 hmenuShared, HOLEMENU32 holemenuReserved, HWND32 hwndActiveObject) PURE;
693 STDMETHOD(RemoveMenusSB) (THIS_ HMENU32 hmenuShared) PURE;
694 STDMETHOD(SetStatusTextSB) (THIS_ LPCOLESTR32 lpszStatusText) PURE;
695 STDMETHOD(EnableModelessSB) (THIS_ BOOL32 fEnable) PURE;
696 STDMETHOD(TranslateAcceleratorSB) (THIS_ LPMSG32 lpmsg, WORD wID) PURE;
698 // *** IShellBrowser methods ***
699 STDMETHOD(BrowseObject)(THIS_ LPCITEMIDLIST pidl, UINT32 wFlags) PURE;
700 STDMETHOD(GetViewStateStream)(THIS_ DWORD grfMode, LPSTREAM32 *ppStrm) PURE;
701 STDMETHOD(GetControlWindow)(THIS_ UINT32 id, HWND32 * lphwnd) PURE;
702 STDMETHOD(SendControlMsg)(THIS_ UINT32 id, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam, LRESULT * pret) PURE;
703 STDMETHOD(QueryActiveShellView)(THIS_ IShellView ** ppshv) PURE;
704 STDMETHOD(OnViewWindowActive)(THIS_ IShellView * ppshv) PURE;
705 STDMETHOD(SetToolbarItems)(THIS_ LPTBBUTTON lpButtons, UINT32 nButtons, UINT32 uFlags) PURE;
706 } *LPSHELLBROWSER_VTABLE,IShellBrowser_VTable;;
708 struct tagSHELLBROWSER
709 { LPSHELLBROWSER_VTABLE lpvtbl;
710 DWORD ref;
713 #undef THIS
715 /************************************************************************
716 * IShellView interface
718 #define THIS LPSHELLVIEW this
720 /* shellview select item flags*/
721 #define SVSI_DESELECT 0x0000
722 #define SVSI_SELECT 0x0001
723 #define SVSI_EDIT 0x0003 // includes select
724 #define SVSI_DESELECTOTHERS 0x0004
725 #define SVSI_ENSUREVISIBLE 0x0008
726 #define SVSI_FOCUSED 0x0010
728 /* shellview get item object flags */
729 #define SVGIO_BACKGROUND 0x00000000
730 #define SVGIO_SELECTION 0x00000001
731 #define SVGIO_ALLVIEW 0x00000002
733 /* The explorer dispatches WM_COMMAND messages based on the range of
734 command/menuitem IDs. All the IDs of menuitems that the view (right
735 pane) inserts must be in FCIDM_SHVIEWFIRST/LAST (otherwise, the explorer
736 won't dispatch them). The view should not deal with any menuitems
737 in FCIDM_BROWSERFIRST/LAST (otherwise, it won't work with the future
738 version of the shell).
740 FCIDM_SHVIEWFIRST/LAST for the right pane (IShellView)
741 FCIDM_BROWSERFIRST/LAST for the explorer frame (IShellBrowser)
742 FCIDM_GLOBAL/LAST for the explorer's submenu IDs
744 #define FCIDM_SHVIEWFIRST 0x0000
745 #define FCIDM_SHVIEWLAST 0x7fff
746 #define FCIDM_BROWSERFIRST 0xa000
747 #define FCIDM_BROWSERLAST 0xbf00
748 #define FCIDM_GLOBALFIRST 0x8000
749 #define FCIDM_GLOBALLAST 0x9fff
752 * Global submenu IDs and separator IDs
754 #define FCIDM_MENU_FILE (FCIDM_GLOBALFIRST+0x0000)
755 #define FCIDM_MENU_EDIT (FCIDM_GLOBALFIRST+0x0040)
756 #define FCIDM_MENU_VIEW (FCIDM_GLOBALFIRST+0x0080)
757 #define FCIDM_MENU_VIEW_SEP_OPTIONS (FCIDM_GLOBALFIRST+0x0081)
758 #define FCIDM_MENU_TOOLS (FCIDM_GLOBALFIRST+0x00c0)
759 #define FCIDM_MENU_TOOLS_SEP_GOTO (FCIDM_GLOBALFIRST+0x00c1)
760 #define FCIDM_MENU_HELP (FCIDM_GLOBALFIRST+0x0100)
761 #define FCIDM_MENU_FIND (FCIDM_GLOBALFIRST+0x0140)
762 #define FCIDM_MENU_EXPLORE (FCIDM_GLOBALFIRST+0x0150)
763 #define FCIDM_MENU_FAVORITES (FCIDM_GLOBALFIRST+0x0170)
765 /* control IDs known to the view */
766 #define FCIDM_TOOLBAR (FCIDM_BROWSERFIRST + 0)
767 #define FCIDM_STATUS (FCIDM_BROWSERFIRST + 1)
769 /* uState values for IShellView::UIActivate */
770 typedef enum
771 { SVUIA_DEACTIVATE = 0,
772 SVUIA_ACTIVATE_NOFOCUS = 1,
773 SVUIA_ACTIVATE_FOCUS = 2,
774 SVUIA_INPLACEACTIVATE = 3 // new flag for IShellView2
775 } SVUIA_STATUS;
779 typedef struct IShellView_VTable
780 { // *** IUnknown methods ***
781 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
782 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
783 STDMETHOD_(ULONG,Release) (THIS) PURE;
785 // *** IOleWindow methods ***
786 STDMETHOD(GetWindow) (THIS_ HWND32 * lphwnd) PURE;
787 STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL32 fEnterMode) PURE;
789 // *** IShellView methods ***
790 STDMETHOD(TranslateAccelerator) (THIS_ LPMSG32 lpmsg) PURE;
791 STDMETHOD(EnableModeless) (THIS_ BOOL32 fEnable) PURE;
792 STDMETHOD(UIActivate) (THIS_ UINT32 uState) PURE;
793 STDMETHOD(Refresh) (THIS) PURE;
794 STDMETHOD(CreateViewWindow)(THIS_ IShellView *lpPrevView,LPCFOLDERSETTINGS lpfs, IShellBrowser * psb,RECT32 * prcView, HWND32 *phWnd) PURE;
795 STDMETHOD(DestroyViewWindow)(THIS) PURE;
796 STDMETHOD(GetCurrentInfo)(THIS_ LPFOLDERSETTINGS lpfs) PURE;
797 STDMETHOD(AddPropertySheetPages)(THIS_ DWORD dwReserved,LPFNADDPROPSHEETPAGE lpfn, LPARAM lparam) PURE;
798 STDMETHOD(SaveViewState)(THIS) PURE;
799 STDMETHOD(SelectItem)(THIS_ LPCITEMIDLIST pidlItem, UINT32 uFlags) PURE;
800 STDMETHOD(GetItemObject)(THIS_ UINT32 uItem, REFIID riid,LPVOID *ppv) PURE;
801 } IShellView_VTable,*LPSHELLVIEW_VTABLE;
803 struct tagSHELLVIEW
804 { LPSHELLVIEW_VTABLE lpvtbl;
805 DWORD ref;
806 LPITEMIDLIST mpidl;
807 LPSHELLFOLDER pSFParent;
808 LPSHELLBROWSER pShellBrowser;
809 LPCOMMDLGBROWSER pCommDlgBrowser;
810 HWND32 hWnd;
811 HWND32 hWndList;
812 HWND32 hWndParent;
813 FOLDERSETTINGS FolderSettings;
814 HMENU32 hMenu;
815 UINT32 uState;
816 UINT32 uSelected;
817 LPITEMIDLIST *aSelectedItems;
820 typedef GUID SHELLVIEWID;
821 #define SV_CLASS_NAME ("SHELLDLL_DefView")
823 #undef THIS
824 /****************************************************************************
825 * ICommDlgBrowser interface
827 #define THIS LPCOMMDLGBROWSER this
829 /* for OnStateChange*/
830 #define CDBOSC_SETFOCUS 0x00000000
831 #define CDBOSC_KILLFOCUS 0x00000001
832 #define CDBOSC_SELCHANGE 0x00000002
833 #define CDBOSC_RENAME 0x00000003
835 typedef struct ICommDlgBrowser_VTable
836 { /* IUnknown methods */
837 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
838 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
839 STDMETHOD_(ULONG,Release) (THIS) PURE;
841 /* ICommDlgBrowser methods */
842 STDMETHOD(OnDefaultCommand) (THIS_ LPSHELLVIEW ppshv) PURE;
843 STDMETHOD(OnStateChange) (THIS_ LPSHELLVIEW ppshv, ULONG uChange) PURE;
844 STDMETHOD(IncludeObject) (THIS_ LPSHELLVIEW ppshv, LPCITEMIDLIST pidl) PURE;
845 } ICommDlgBrowser_VTable,*LPCOMMDLGBROWSER_VTABLE;
847 struct tagCOMMDLGBROWSER
848 { LPCOMMDLGBROWSER_VTABLE lpvtbl;
849 DWORD ref;
851 #undef THIS
852 /****************************************************************************
853 * IShellLink interface
856 #define THIS LPSHELLLINK this
857 /* IShellLink::Resolve fFlags */
858 typedef enum {
859 SLR_NO_UI = 0x0001,
860 SLR_ANY_MATCH = 0x0002,
861 SLR_UPDATE = 0x0004
862 } SLR_FLAGS;
864 /* IShellLink::GetPath fFlags */
865 typedef enum {
866 SLGP_SHORTPATH = 0x0001,
867 SLGP_UNCPRIORITY = 0x0002
868 } SLGP_FLAGS;
872 typedef struct IShellLink IShellLink,*LPSHELLLINK;
873 typedef struct IShellLink_VTable
875 /* *** IUnknown methods *** */
876 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
877 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
878 STDMETHOD_(ULONG,Release) (THIS) PURE;
880 STDMETHOD(GetPath)(THIS_ LPSTR pszFile,INT32 cchMaxPath, WIN32_FIND_DATA32A *pfd, DWORD fFlags) PURE;
882 STDMETHOD(GetIDList)(THIS_ LPITEMIDLIST * ppidl) PURE;
883 STDMETHOD(SetIDList)(THIS_ LPCITEMIDLIST pidl) PURE;
885 STDMETHOD(GetDescription)(THIS_ LPSTR pszName,INT32 cchMaxName) PURE;
886 STDMETHOD(SetDescription)(THIS_ LPCSTR pszName) PURE;
888 STDMETHOD(GetWorkingDirectory)(THIS_ LPSTR pszDir,INT32 cchMaxPath) PURE;
889 STDMETHOD(SetWorkingDirectory)(THIS_ LPCSTR pszDir) PURE;
891 STDMETHOD(GetArguments)(THIS_ LPSTR pszArgs,INT32 cchMaxPath) PURE;
892 STDMETHOD(SetArguments)(THIS_ LPCSTR pszArgs) PURE;
894 STDMETHOD(GetHotkey)(THIS_ WORD *pwHotkey) PURE;
895 STDMETHOD(SetHotkey)(THIS_ WORD wHotkey) PURE;
897 STDMETHOD(GetShowCmd)(THIS_ INT32 *piShowCmd) PURE;
898 STDMETHOD(SetShowCmd)(THIS_ INT32 iShowCmd) PURE;
900 STDMETHOD(GetIconLocation)(THIS_ LPSTR pszIconPath,INT32 cchIconPath,INT32 *piIcon) PURE;
901 STDMETHOD(SetIconLocation)(THIS_ LPCSTR pszIconPath,INT32 iIcon) PURE;
903 STDMETHOD(SetRelativePath)(THIS_ LPCSTR pszPathRel, DWORD dwReserved) PURE;
905 STDMETHOD(Resolve)(THIS_ HWND32 hwnd, DWORD fFlags) PURE;
907 STDMETHOD(SetPath)(THIS_ LPCSTR pszFile) PURE;
908 } IShellLink_VTable,*LPSHELLLINK_VTABLE;
910 struct IShellLink {
911 LPSHELLLINK_VTABLE lpvtbl;
912 DWORD ref;
915 #undef THIS
917 /****************************************************************************
918 * IExtractIconinterface
920 * FIXME
921 * Is the ExtractIconA interface
923 #define THIS LPEXTRACTICON this
925 /* GetIconLocation() input flags*/
926 #define GIL_OPENICON 0x0001 // allows containers to specify an "open" look
927 #define GIL_FORSHELL 0x0002 // icon is to be displayed in a ShellFolder
928 #define GIL_ASYNC 0x0020 // this is an async extract, return E_ASYNC
930 /* GetIconLocation() return flags */
931 #define GIL_SIMULATEDOC 0x0001 // simulate this document icon for this
932 #define GIL_PERINSTANCE 0x0002 // icons from this class are per instance (each file has its own)
933 #define GIL_PERCLASS 0x0004 // icons from this class per class (shared for all files of this type)
934 #define GIL_NOTFILENAME 0x0008 // location is not a filename, must call ::ExtractIcon
935 #define GIL_DONTCACHE 0x0010 // this icon should not be cached
937 typedef struct IExtractIcon IExtractIcon,*LPEXTRACTICON;
938 typedef struct IExtractIcon_VTable
939 { /*** IUnknown methods ***/
940 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
941 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
942 STDMETHOD_(ULONG,Release) (THIS) PURE;
944 /*** IExtractIcon methods ***/
945 STDMETHOD(GetIconLocation)(THIS_ UINT32 uFlags, LPSTR szIconFile, UINT32 cchMax,INT32 * piIndex, UINT32 * pwFlags) PURE;
946 STDMETHOD(Extract)(THIS_ LPCSTR pszFile, UINT32 nIconIndex, HICON32 *phiconLarge, HICON32 *phiconSmall, UINT32 nIconSize) PURE;
947 }IExtractIccon_VTable,*LPEXTRACTICON_VTABLE;
949 struct IExtractIcon
950 { LPEXTRACTICON_VTABLE lpvtbl;
951 DWORD ref;
952 LPITEMIDLIST pidl;
955 #undef THIS
956 /****************************************************************************
957 * IShellIcon interface
960 #define THIS LPSHELLICON this
962 typedef struct IShellIcon_VTable
963 { /*** IUnknown methods ***/
964 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
965 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
966 STDMETHOD_(ULONG,Release) (THIS) PURE;
968 /*** IShellIcon methods ***/
969 STDMETHOD(GetIconOf)(THIS_ LPCITEMIDLIST pidl, UINT32 flags, LPINT32 lpIconIndex) PURE;
970 } IShellIcon_VTable,*LPSHELLICON_VTABLE;
972 struct tagSHELLICON
973 { LPSHELLICON_VTABLE lpvtbl;
974 DWORD ref;
976 #undef THIS
977 /****************************************************************************
978 * IDockingWindowFrame interface
980 #define THIS LPDOCKINGWINDOWFRAME this
982 #define DWFRF_NORMAL 0x0000 /* femove toolbar flags*/
983 #define DWFRF_DELETECONFIGDATA 0x0001
984 #define DWFAF_HIDDEN 0x0001 /* add tolbar*/
986 typedef struct IDockingWindowFrame_VTable
987 { STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
988 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
989 STDMETHOD_(ULONG,Release) (THIS) PURE;
991 /*** IOleWindow methods ***/
992 STDMETHOD(GetWindow) (THIS_ HWND32 * lphwnd) PURE;
993 STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL32 fEnterMode) PURE;
995 /*** IDockingWindowFrame methods ***/
996 STDMETHOD(AddToolbar) (THIS_ IUnknown* punkSrc, LPCWSTR pwszItem, DWORD dwAddFlags) PURE;
997 STDMETHOD(RemoveToolbar) (THIS_ IUnknown* punkSrc, DWORD dwRemoveFlags) PURE;
998 STDMETHOD(FindToolbar) (THIS_ LPCWSTR pwszItem, REFIID riid, LPVOID* ppvObj) PURE;
999 } IDockingWindowFrame_VTable, *LPDOCKINGWINDOWFRAME_VTABLE;
1001 struct tagDOCKINGWINDOWFRAME
1002 { LPDOCKINGWINDOWFRAME_VTABLE lpvtbl;
1003 DWORD ref;
1006 #undef THIS
1007 /****************************************************************************
1008 * IServiceProvider interface
1010 #define THIS LPSERVICEPROVIDER this
1012 typedef struct IServiceProvider_VTable
1013 { /*** IUnknown methods ***/
1014 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
1015 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
1016 STDMETHOD_(ULONG,Release) (THIS) PURE;
1018 STDMETHOD(QueryService)(THIS_ REFGUID guidService, REFIID riid, void **ppvObject);
1019 } IServiceProvider_VTable, *LPSERVICEPROVIDER_VTABLE;
1021 struct tagSERVICEPROVIDER
1022 { LPSERVICEPROVIDER_VTABLE lpvtbl;
1023 DWORD ref;
1025 /****************************************************************************
1026 * Class constructors
1028 #ifdef __WINE__
1029 extern LPDATAOBJECT IDataObject_Constructor();
1030 extern LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT32, const FORMATETC32 []);
1032 extern LPCLASSFACTORY IClassFactory_Constructor();
1033 extern LPCONTEXTMENU IContextMenu_Constructor(LPSHELLFOLDER, LPCITEMIDLIST *, UINT32);
1034 extern LPSHELLFOLDER IShellFolder_Constructor(LPSHELLFOLDER,LPITEMIDLIST);
1035 extern LPSHELLVIEW IShellView_Constructor(LPSHELLFOLDER, LPCITEMIDLIST);
1036 extern LPSHELLLINK IShellLink_Constructor();
1037 extern LPENUMIDLIST IEnumIDList_Constructor(LPCSTR,DWORD);
1038 extern LPEXTRACTICON IExtractIcon_Constructor(LPITEMIDLIST);
1039 #endif
1040 /****************************************************************************
1041 * Shell Execute API
1043 #define SE_ERR_FNF 2 // file not found
1044 #define SE_ERR_PNF 3 // path not found
1045 #define SE_ERR_ACCESSDENIED 5 // access denied
1046 #define SE_ERR_OOM 8 // out of memory
1047 #define SE_ERR_DLLNOTFOUND 32
1048 #define SE_ERR_SHARE 26
1049 #define SE_ERR_ASSOCINCOMPLETE 27
1050 #define SE_ERR_DDETIMEOUT 28
1051 #define SE_ERR_DDEFAIL 29
1052 #define SE_ERR_DDEBUSY 30
1053 #define SE_ERR_NOASSOC 31
1055 #define SEE_MASK_CLASSNAME 0x00000001
1056 #define SEE_MASK_CLASSKEY 0x00000003
1057 #define SEE_MASK_IDLIST 0x00000004
1058 #define SEE_MASK_INVOKEIDLIST 0x0000000c
1059 #define SEE_MASK_ICON 0x00000010
1060 #define SEE_MASK_HOTKEY 0x00000020
1061 #define SEE_MASK_NOCLOSEPROCESS 0x00000040
1062 #define SEE_MASK_CONNECTNETDRV 0x00000080
1063 #define SEE_MASK_FLAG_DDEWAIT 0x00000100
1064 #define SEE_MASK_DOENVSUBST 0x00000200
1065 #define SEE_MASK_FLAG_NO_UI 0x00000400
1066 #define SEE_MASK_UNICODE 0x00004000
1067 #define SEE_MASK_NO_CONSOLE 0x00008000
1068 #define SEE_MASK_ASYNCOK 0x00100000
1069 #define SEE_MASK_HMONITOR 0x00200000
1071 typedef struct _SHELLEXECUTEINFOA
1072 { DWORD cbSize;
1073 ULONG fMask;
1074 HWND32 hwnd;
1075 LPCSTR lpVerb;
1076 LPCSTR lpFile;
1077 LPCSTR lpParameters;
1078 LPCSTR lpDirectory;
1079 INT32 nShow;
1080 HINSTANCE32 hInstApp;
1081 /* Optional fields */
1082 LPVOID lpIDList;
1083 LPCSTR lpClass;
1084 HKEY hkeyClass;
1085 DWORD dwHotKey;
1086 union
1087 { HANDLE32 hIcon;
1088 HANDLE32 hMonitor;
1089 } u;
1090 HANDLE32 hProcess;
1091 } SHELLEXECUTEINFO32A, *LPSHELLEXECUTEINFO32A;
1093 typedef struct _SHELLEXECUTEINFOW
1094 { DWORD cbSize;
1095 ULONG fMask;
1096 HWND32 hwnd;
1097 LPCWSTR lpVerb;
1098 LPCWSTR lpFile;
1099 LPCWSTR lpParameters;
1100 LPCWSTR lpDirectory;
1101 INT32 nShow;
1102 HINSTANCE32 hInstApp;
1103 /* Optional fields*/
1104 LPVOID lpIDList;
1105 LPCWSTR lpClass;
1106 HKEY hkeyClass;
1107 DWORD dwHotKey;
1108 union
1109 { HANDLE32 hIcon;
1110 HANDLE32 hMonitor;
1111 } u;
1112 HANDLE32 hProcess;
1113 } SHELLEXECUTEINFO32W, *LPSHELLEXECUTEINFO32W;
1115 #define SHELLEXECUTEINFO WINELIB_NAME_AW(SHELLEXECUTEINFO)
1116 #define LPSHELLEXECUTEINFO WINELIB_NAME_AW(LPSHELLEXECUTEINFO)
1118 BOOL32 WINAPI ShellExecuteEx32A(LPSHELLEXECUTEINFO32A lpExecInfo);
1119 BOOL32 WINAPI ShellExecuteEx32W(LPSHELLEXECUTEINFO32W lpExecInfo);
1120 #define ShellExecuteEx WINELIB_NAME_AW(ShellExecuteEx)
1122 void WINAPI WinExecError32A(HWND32 hwnd,INT32 error, LPCSTR lpstrFileName, LPCSTR lpstrTitle);
1123 void WINAPI WinExecError32W(HWND32 hwnd,INT32 error, LPCWSTR lpstrFileName, LPCWSTR lpstrTitle);
1124 #define WinExecError WINELIB_NAME_AW(WinExecError)
1128 /****************************************************************************
1129 * SHBrowseForFolder API
1131 typedef INT32 (CALLBACK* BFFCALLBACK)(HWND32 hwnd, UINT32 uMsg, LPARAM lParam, LPARAM lpData);
1133 typedef struct tagBROWSEINFO32A {
1134 HWND32 hwndOwner;
1135 LPCITEMIDLIST pidlRoot;
1136 LPSTR pszDisplayName;
1137 LPCSTR lpszTitle;
1138 UINT32 ulFlags;
1139 BFFCALLBACK lpfn;
1140 LPARAM lParam;
1141 INT32 iImage;
1142 } BROWSEINFO32A, *PBROWSEINFO32A, *LPBROWSEINFO32A;
1144 typedef struct tagBROWSEINFO32W {
1145 HWND32 hwndOwner;
1146 LPCITEMIDLIST pidlRoot;
1147 LPWSTR pszDisplayName;
1148 LPCWSTR lpszTitle;
1149 UINT32 ulFlags;
1150 BFFCALLBACK lpfn;
1151 LPARAM lParam;
1152 INT32 iImage;
1153 } BROWSEINFO32W, *PBROWSEINFO32W, *LPBROWSEINFO32W;
1155 #define BROWSEINFO WINELIB_NAME_AW(BROWSEINFO)
1156 #define PBROWSEINFO WINELIB_NAME_AW(PBROWSEINFO)
1157 #define LPBROWSEINFO WINELIB_NAME_AW(LPBROWSEINFO)
1159 // Browsing for directory.
1160 #define BIF_RETURNONLYFSDIRS 0x0001
1161 #define BIF_DONTGOBELOWDOMAIN 0x0002
1162 #define BIF_STATUSTEXT 0x0004
1163 #define BIF_RETURNFSANCESTORS 0x0008
1164 #define BIF_EDITBOX 0x0010
1165 #define BIF_VALIDATE 0x0020
1167 #define BIF_BROWSEFORCOMPUTER 0x1000
1168 #define BIF_BROWSEFORPRINTER 0x2000
1169 #define BIF_BROWSEINCLUDEFILES 0x4000
1171 // message from browser
1172 #define BFFM_INITIALIZED 1
1173 #define BFFM_SELCHANGED 2
1174 #define BFFM_VALIDATEFAILEDA 3 // lParam:szPath ret:1(cont),0(EndDialog)
1175 #define BFFM_VALIDATEFAILEDW 4 // lParam:wzPath ret:1(cont),0(EndDialog)
1177 // messages to browser
1178 #define BFFM_SETSTATUSTEXTA (WM_USER+100)
1179 #define BFFM_ENABLEOK (WM_USER+101)
1180 #define BFFM_SETSELECTIONA (WM_USER+102)
1181 #define BFFM_SETSELECTIONW (WM_USER+103)
1182 #define BFFM_SETSTATUSTEXTW (WM_USER+104)
1185 #ifdef UNICODE
1186 #define SHBrowseForFolder SHBrowseForFolderW
1187 #define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTW
1188 #define BFFM_SETSELECTION BFFM_SETSELECTIONW
1190 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDW
1191 #else
1192 #define SHBrowseForFolder SHBrowseForFolderA
1193 #define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTA
1194 #define BFFM_SETSELECTION BFFM_SETSELECTIONA
1196 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDA
1197 #endif
1200 LPITEMIDLIST WINAPI SHBrowseForFolder32A(LPBROWSEINFO32A lpbi);
1201 /*LPITEMIDLIST WINAPI SHBrowseForFolder32W(LPBROWSEINFO32W lpbi);*/
1202 #define SHBrowseForFolder WINELIB_NAME_AW(SHBrowseForFolder)
1204 /****************************************************************************
1205 * shlview structures
1209 * IShellFolderViewCallback Callback
1210 * This "callback" is called by the shells default IShellView implementation (that
1211 * we got using SHCreateShellViewEx()), to notify us of the various things that
1212 * are happening to the shellview (and ask for things too).
1214 * You don't have to support anything here - anything you don't want to
1215 * handle, the shell will do itself if you just return E_NOTIMPL. This parameters
1216 * that the shell passes to this function are entirely undocumented.
1218 * HOWEVER, as the cabview sample as originally written used this callback, the
1219 * writers implemented the callback mechanism on top of their own IShellView.
1220 * Look there for some clues on what to do here.
1223 typedef HRESULT(CALLBACK *SHELLVIEWPROC)(DWORD dwUserParam,LPSHELLFOLDER psf,
1224 HWND32 hwnd,UINT32 uMsg,UINT32 wParam,LPARAM lParam);
1226 /* NF valid values for the "viewmode" item of the SHELLTEMPLATE*/
1227 #define NF_INHERITVIEW 0x0000
1228 #define NF_LOCALVIEW 0x0001
1230 typedef struct _SHELLVIEWDATA // idl
1231 { DWORD dwSize;
1232 LPSHELLFOLDER pShellFolder;
1233 DWORD dwUserParam;
1234 LPCITEMIDLIST pidl;
1235 DWORD v3; // always 0
1236 SHELLVIEWPROC pCallBack;
1237 DWORD viewmode; // NF_* enum
1238 } SHELLVIEWDATA, * LPSHELLVIEWDATA;
1241 The shell keeps track of some per-user state to handle display
1242 options that is of majorinterest to ISVs.
1243 The key one requested right now is "DoubleClickInWebView".
1245 typedef struct
1246 { BOOL32 fShowAllObjects : 1;
1247 BOOL32 fShowExtensions : 1;
1248 BOOL32 fNoConfirmRecycle : 1;
1249 BOOL32 fShowSysFiles : 1;
1250 BOOL32 fShowCompColor : 1;
1251 BOOL32 fDoubleClickInWebView : 1;
1252 BOOL32 fDesktopHTML : 1;
1253 BOOL32 fWin95Classic : 1;
1254 BOOL32 fDontPrettyPath : 1;
1255 BOOL32 fShowAttribCol : 1;
1256 BOOL32 fMapNetDrvBtn : 1;
1257 BOOL32 fShowInfoTip : 1;
1258 BOOL32 fHideIcons : 1;
1259 UINT32 fRestFlags : 3;
1260 } SHELLFLAGSTATE, * LPSHELLFLAGSTATE;
1263 #undef PURE
1264 #undef FAR
1265 #undef THIS
1266 #undef THIS_
1267 #undef STDMETHOD
1268 #undef STDMETHOD_
1269 #endif /*_WINE_SHLOBJ_H*/