- New implementation of SendMessage, ReceiveMessage, ReplyMessage functions
[wine] / include / shlobj.h
1 #ifndef __WINE_SHLOBJ_H
2 #define __WINE_SHLOBJ_H
3
4 #include "wintypes.h"
5 #include "wine/obj_base.h"
6 #include "shell.h"
7 #include "oleobj.h"
8 #include "commctrl.h"
9 #include "prsht.h"
10
11 #define STDMETHOD(xfn) HRESULT (CALLBACK *fn##xfn)
12 #define STDMETHOD_(type,xfn) type (CALLBACK *fn##xfn)
13 #define PURE
14 #define FAR
15 #define THIS_ THIS,
16
17 /****************************************************************************
18 *  DllGetClassObject
19 */
20 DWORD WINAPI SHELL32_DllGetClassObject(REFCLSID,REFIID,LPVOID*);
21
22
23
24 /* foreward declaration of the objects*/
25 typedef struct tagCONTEXTMENU   *LPCONTEXTMENU, IContextMenu;
26 typedef struct tagSHELLEXTINIT  *LPSHELLEXTINIT,IShellExtInit;
27 typedef struct tagENUMIDLIST    *LPENUMIDLIST,  IEnumIDList;
28 typedef struct tagSHELLFOLDER   *LPSHELLFOLDER, IShellFolder;
29 typedef struct tagSHELLVIEW     *LPSHELLVIEW,   IShellView;
30 typedef struct tagSHELLBROWSER  *LPSHELLBROWSER,IShellBrowser;
31 typedef struct tagSHELLICON     *LPSHELLICON,   IShellIcon;
32 typedef struct tagDOCKINGWINDOWFRAME    *LPDOCKINGWINDOWFRAME,  IDockingWindowFrame;
33 typedef struct tagCOMMDLGBROWSER        *LPCOMMDLGBROWSER,      ICommDlgBrowser;
34  
35 /****************************************************************************
36 *  STRRET
37 */
38 #define STRRET_WSTR     0x0000
39 #define STRRET_OFFSETA  0x0001
40 #define STRRET_CSTRA    0x0002
41 #define STRRET_ASTR     0X0003
42 #define STRRET_OFFSETW  0X0004
43 #define STRRET_CSTRW    0X0005
44
45
46 typedef struct _STRRET
47 { UINT32 uType;         /* STRRET_xxx */
48   union
49   { LPWSTR      pOleStr;        /* OLESTR that will be freed */
50     LPSTR       pStr;
51     UINT32      uOffset;        /* OffsetINT32o SHITEMID (ANSI) */
52     char        cStr[MAX_PATH]; /* Buffer to fill in */
53     WCHAR       cStrW[MAX_PATH];
54   }u;
55 } STRRET,*LPSTRRET;
56
57
58 /*****************************************************************************
59  * IContextMenu interface
60  */
61 #define THIS LPCONTEXTMENU this
62
63 /* default menu items*/
64 #define IDM_EXPLORE  0
65 #define IDM_OPEN     1
66 #define IDM_RENAME   2
67 #define IDM_LAST     IDM_RENAME
68
69 /* QueryContextMenu uFlags */
70 #define CMF_NORMAL              0x00000000
71 #define CMF_DEFAULTONLY         0x00000001
72 #define CMF_VERBSONLY           0x00000002
73 #define CMF_EXPLORE             0x00000004
74 #define CMF_NOVERBS             0x00000008
75 #define CMF_CANRENAME           0x00000010
76 #define CMF_NODEFAULT           0x00000020
77 #define CMF_INCLUDESTATIC       0x00000040
78 #define CMF_RESERVED            0xffff0000      /* View specific */
79
80 /* GetCommandString uFlags */
81 #define GCS_VERBA        0x00000000     /* canonical verb */
82 #define GCS_HELPTEXTA    0x00000001     /* help text (for status bar) */
83 #define GCS_VALIDATEA    0x00000002     /* validate command exists */
84 #define GCS_VERBW        0x00000004     /* canonical verb (unicode) */
85 #define GCS_HELPTEXTW    0x00000005     /* help text (unicode version) */
86 #define GCS_VALIDATEW    0x00000006     /* validate command exists (unicode) */
87 #define GCS_UNICODE      0x00000004     /* for bit testing - Unicode string */
88
89 #define GCS_VERB        GCS_VERBA
90 #define GCS_HELPTEXT    GCS_HELPTEXTA
91 #define GCS_VALIDATE    GCS_VALIDATEA
92
93 #define CMDSTR_NEWFOLDERA   "NewFolder"
94 #define CMDSTR_VIEWLISTA    "ViewList"
95 #define CMDSTR_VIEWDETAILSA "ViewDetails"
96 #define CMDSTR_NEWFOLDERW   L"NewFolder"
97 #define CMDSTR_VIEWLISTW    L"ViewList"
98 #define CMDSTR_VIEWDETAILSW L"ViewDetails"
99
100 #define CMDSTR_NEWFOLDER    CMDSTR_NEWFOLDERA
101 #define CMDSTR_VIEWLIST     CMDSTR_VIEWLISTA
102 #define CMDSTR_VIEWDETAILS  CMDSTR_VIEWDETAILSA
103
104 #define CMIC_MASK_HOTKEY        SEE_MASK_HOTKEY
105 #define CMIC_MASK_ICON          SEE_MASK_ICON
106 #define CMIC_MASK_FLAG_NO_UI    SEE_MASK_FLAG_NO_UI
107 #define CMIC_MASK_UNICODE       SEE_MASK_UNICODE
108 #define CMIC_MASK_NO_CONSOLE    SEE_MASK_NO_CONSOLE
109 #define CMIC_MASK_HASLINKNAME   SEE_MASK_HASLINKNAME
110 #define CMIC_MASK_FLAG_SEP_VDM  SEE_MASK_FLAG_SEPVDM
111 #define CMIC_MASK_HASTITLE      SEE_MASK_HASTITLE
112 #define CMIC_MASK_ASYNCOK       SEE_MASK_ASYNCOK
113
114 #define CMIC_MASK_PTINVOKE      0x20000000
115
116 /*NOTE: When SEE_MASK_HMONITOR is set, hIcon is treated as hMonitor */
117 typedef struct tagCMINVOKECOMMANDINFO 
118 {   DWORD cbSize;        /* sizeof(CMINVOKECOMMANDINFO) */
119     DWORD fMask;         /* any combination of CMIC_MASK_* */
120     HWND32 hwnd;         /* might be NULL (indicating no owner window) */
121     LPCSTR lpVerb;       /* either a string or MAKEINTRESOURCE(idOffset) */
122     LPCSTR lpParameters; /* might be NULL (indicating no parameter) */
123     LPCSTR lpDirectory;  /* might be NULL (indicating no specific directory) */
124    INT32 nShow;           /* one of SW_ values for ShowWindow() API */
125
126     DWORD dwHotKey;
127     HANDLE32 hIcon;
128 } CMINVOKECOMMANDINFO32,  *LPCMINVOKECOMMANDINFO32;
129
130 typedef struct tagCMInvokeCommandInfoEx 
131 {   DWORD cbSize;        /* must be sizeof(CMINVOKECOMMANDINFOEX) */
132     DWORD fMask;         /* any combination of CMIC_MASK_* */
133     HWND32 hwnd;         /* might be NULL (indicating no owner window) */
134     LPCSTR lpVerb;       /* either a string or MAKEINTRESOURCE(idOffset) */
135     LPCSTR lpParameters; /* might be NULL (indicating no parameter) */
136     LPCSTR lpDirectory;  /* might be NULL (indicating no specific directory) */
137         INT32 nShow;           /* one of SW_ values for ShowWindow() API */
138
139     DWORD dwHotKey;
140     
141     HANDLE32 hIcon;
142     LPCSTR lpTitle;        /* For CreateProcess-StartupInfo.lpTitle */
143     LPCWSTR lpVerbW;       /* Unicode verb (for those who can use it) */
144     LPCWSTR lpParametersW; /* Unicode parameters (for those who can use it) */
145     LPCWSTR lpDirectoryW;  /* Unicode directory (for those who can use it) */
146     LPCWSTR lpTitleW;      /* Unicode title (for those who can use it) */
147     POINT32 ptInvoke;      /* Point where it's invoked */
148
149 } CMINVOKECOMMANDINFOEX32,  *LPCMINVOKECOMMANDINFOEX32;
150
151
152 typedef struct IContextMenu_VTable
153 {   /* *** IUnknown methods *** */
154     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
155     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
156     STDMETHOD_(ULONG,Release) (THIS) PURE;
157
158     STDMETHOD(QueryContextMenu)(THIS_ HMENU32 hmenu,UINT32 indexMenu,UINT32 idCmdFirst, UINT32 idCmdLast,UINT32 uFlags) PURE;
159     STDMETHOD(InvokeCommand)(THIS_ LPCMINVOKECOMMANDINFO32 lpici) PURE;
160     STDMETHOD(GetCommandString)(THIS_ UINT32 idCmd,UINT32 uType,UINT32 * pwReserved,LPSTR pszName,UINT32 cchMax) PURE;
161
162     /* undocumented not only in ContextMenu2 */
163     STDMETHOD(HandleMenuMsg)(THIS_  UINT32 uMsg,WPARAM32 wParam,LPARAM lParam) PURE;
164
165     /* possibly another nasty entry from ContextMenu3 ?*/    
166     void * guard;
167 } IContextMenu_VTable,*LPCONTEXTMENU_VTABLE;
168
169 struct tagCONTEXTMENU
170 { LPCONTEXTMENU_VTABLE  lpvtbl;
171   DWORD                 ref;
172   LPSHELLFOLDER pSFParent;
173   LPITEMIDLIST  *aPidls;
174   BOOL32                bAllValues;
175 };
176
177 #undef THIS
178 /*****************************************************************************
179  * structures for shell clipboard formats
180  */
181 typedef enum tagDVASPECT
182 {       DVASPECT_CONTENT        = 1,
183         DVASPECT_THUMBNAIL      = 2,
184         DVASPECT_ICON   = 4,
185         DVASPECT_DOCPRINT       = 8
186 } DVASPECT;
187
188 /* shell specific clipboard formats */
189
190 /* DATAOBJECT_InitShellIDList*/
191 #define CFSTR_SHELLIDLIST       "Shell IDList Array"      /* CF_IDLIST */
192
193 extern UINT32 cfShellIDList;
194
195 typedef struct
196 {       UINT32 cidl;
197         UINT32 aoffset[1];
198 } CIDA, *LPCIDA;
199
200 #define CFSTR_SHELLIDLISTOFFSET "Shell Object Offsets"    /* CF_OBJECTPOSITIONS */
201 #define CFSTR_NETRESOURCES      "Net Resource"            /* CF_NETRESOURCE */
202
203 /* DATAOBJECT_InitFileGroupDesc */
204 #define CFSTR_FILEDESCRIPTORA   "FileGroupDescriptor"     /* CF_FILEGROUPDESCRIPTORA */
205 extern UINT32 cfFileGroupDesc;
206
207 #define CFSTR_FILEDESCRIPTORW   "FileGroupDescriptorW"    /* CF_FILEGROUPDESCRIPTORW */
208
209 /* DATAOBJECT_InitFileContents*/
210 #define CFSTR_FILECONTENTS      "FileContents"            /* CF_FILECONTENTS */
211 extern UINT32 cfFileContents;
212
213 #define CFSTR_FILENAMEA         "FileName"                /* CF_FILENAMEA */
214 #define CFSTR_FILENAMEW         "FileNameW"               /* CF_FILENAMEW */
215 #define CFSTR_PRINTERGROUP      "PrinterFriendlyName"     /* CF_PRINTERS */
216 #define CFSTR_FILENAMEMAPA      "FileNameMap"             /* CF_FILENAMEMAPA */
217 #define CFSTR_FILENAMEMAPW      "FileNameMapW"            /* CF_FILENAMEMAPW */
218 #define CFSTR_SHELLURL          "UniformResourceLocator"
219 #define CFSTR_PREFERREDDROPEFFECT "Preferred DropEffect"
220 #define CFSTR_PERFORMEDDROPEFFECT "Performed DropEffect"
221 #define CFSTR_PASTESUCCEEDED    "Paste Succeeded"
222 #define CFSTR_INDRAGLOOP        "InShellDragLoop"
223
224 /**************************************************************************
225  *  IDLList "Item ID List List"
226  *
227  *  NOTES
228  *   interal data holder for IDataObject
229  */
230 typedef struct tagLPIDLLIST     *LPIDLLIST,     IDLList;
231
232 #define THIS LPIDLLIST this
233
234 typedef enum
235 {       State_UnInit=1,
236         State_Init=2,
237         State_OutOfMem=3
238 } IDLListState;
239  
240 typedef struct IDLList_VTable
241 {       STDMETHOD_(UINT32, GetState)(THIS);
242         STDMETHOD_(LPITEMIDLIST, GetElement)(THIS_ UINT32 nIndex);
243         STDMETHOD_(UINT32, GetCount)(THIS);
244         STDMETHOD_(BOOL32, StoreItem)(THIS_ LPITEMIDLIST pidl);
245         STDMETHOD_(BOOL32, AddItems)(THIS_ LPITEMIDLIST *apidl, UINT32 cidl);
246         STDMETHOD_(BOOL32, InitList)(THIS);
247         STDMETHOD_(void, CleanList)(THIS);
248 } IDLList_VTable,*LPIDLLIST_VTABLE;
249
250 struct tagLPIDLLIST
251 {       LPIDLLIST_VTABLE        lpvtbl;
252         HDPA    dpa;
253         UINT32  uStep;
254 };
255
256 extern LPIDLLIST IDLList_Constructor (UINT32 uStep);
257 extern void IDLList_Destructor(LPIDLLIST this);
258 #undef THIS
259
260
261 /*****************************************************************************
262  * IShellExtInit interface
263  */
264 #define THIS LPSHELLEXTINIT this
265
266 typedef struct IShellExtInit_VTable 
267 {   /* *** IUnknown methods *** */
268     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
269     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
270     STDMETHOD_(ULONG,Release) (THIS) PURE;
271
272     /* *** IShellExtInit methods *** */
273     STDMETHOD(Initialize)(THIS_ LPCITEMIDLIST pidlFolder, LPDATAOBJECT lpdobj, HKEY hkeyProgID) PURE;
274 } IShellExtInit_VTable,*LPSHELLEXTINIT_VTABLE;
275
276 struct tagSHELLEXTINIT
277 { LPSHELLEXTINIT_VTABLE lpvtbl;
278   DWORD                  ref;
279 };
280
281 #undef THIS
282
283 /*****************************************************************************
284  * IEnumIDList interface
285  */
286 #define THIS LPENUMIDLIST this
287
288 typedef struct tagENUMLIST
289 { struct tagENUMLIST    *pNext;
290   LPITEMIDLIST pidl;
291 } ENUMLIST, *LPENUMLIST;
292
293 typedef struct IEnumIDList_VTable 
294 {    /* *** IUnknown methods *** */
295     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
296     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
297     STDMETHOD_(ULONG,Release) (THIS) PURE;
298
299     /* *** IEnumIDList methods *** */
300     STDMETHOD(Next)  (THIS_ ULONG celt,
301                       LPITEMIDLIST *rgelt,
302                       ULONG *pceltFetched) PURE;
303     STDMETHOD(Skip)  (THIS_ ULONG celt) PURE;
304     STDMETHOD(Reset) (THIS) PURE;
305     STDMETHOD(Clone) (THIS_ IEnumIDList **ppenum) PURE;
306                 /* *** private methods *** */
307     STDMETHOD_(BOOL32,CreateEnumList)(THIS_ LPCSTR, DWORD) PURE;
308     STDMETHOD_(BOOL32,AddToEnumList)(THIS_ LPITEMIDLIST) PURE;
309     STDMETHOD_(BOOL32,DeleteList)(THIS) PURE;
310
311                 
312 } IEnumIDList_VTable,*LPENUMIDLIST_VTABLE;
313
314 struct tagENUMIDLIST
315 { LPENUMIDLIST_VTABLE   lpvtbl;
316   DWORD          ref;
317   LPENUMLIST mpFirst;
318   LPENUMLIST mpLast;
319   LPENUMLIST mpCurrent;
320 };
321
322 #undef THIS
323 /*-------------------------------------------------------------------------- */
324 /* */
325 /* FOLDERSETTINGS */
326 /* */
327 /*  FOLDERSETTINGS is a data structure that explorer passes from one folder */
328 /* view to another, when the user is browsing. It calls ISV::GetCurrentInfo */
329 /* member to get the current settings and pass it to ISV::CreateViewWindow */
330 /* to allow the next folder view "inherit" it. These settings assumes a */
331 /* particular UI (which the shell's folder view has), and shell extensions */
332 /* may or may not use those settings. */
333 /* */
334 /*-------------------------------------------------------------------------- */
335
336 typedef LPBYTE LPVIEWSETTINGS;
337
338 /* NB Bitfields. */
339 /* FWF_DESKTOP implies FWF_TRANSPARENT/NOCLIENTEDGE/NOSCROLL */
340 typedef enum
341 { FWF_AUTOARRANGE =       0x0001,
342   FWF_ABBREVIATEDNAMES =  0x0002,
343   FWF_SNAPTOGRID =        0x0004,
344   FWF_OWNERDATA =         0x0008,
345   FWF_BESTFITWINDOW =     0x0010,
346   FWF_DESKTOP =           0x0020,
347   FWF_SINGLESEL =         0x0040,
348   FWF_NOSUBFOLDERS =      0x0080,
349   FWF_TRANSPARENT  =      0x0100,
350   FWF_NOCLIENTEDGE =      0x0200,
351   FWF_NOSCROLL     =      0x0400,
352   FWF_ALIGNLEFT    =      0x0800,
353   FWF_SINGLECLICKACTIVATE=0x8000  /* TEMPORARY -- NO UI FOR THIS */
354 } FOLDERFLAGS;
355
356 typedef enum
357 { FVM_ICON =              1,
358   FVM_SMALLICON =         2,
359   FVM_LIST =              3,
360   FVM_DETAILS =           4
361 } FOLDERVIEWMODE;
362
363 typedef struct
364 { UINT32 ViewMode;       /* View mode (FOLDERVIEWMODE values) */
365   UINT32 fFlags;         /* View options (FOLDERFLAGS bits) */
366 } FOLDERSETTINGS, *LPFOLDERSETTINGS;
367
368 typedef const FOLDERSETTINGS * LPCFOLDERSETTINGS;
369
370 /************************************************************************
371  * IShellFolder interface
372  */
373
374 #define THIS LPSHELLFOLDER this
375
376 /* IShellFolder::GetDisplayNameOf/SetNameOf uFlags */
377 typedef enum
378 { SHGDN_NORMAL            = 0,        /* default (display purpose) */
379   SHGDN_INFOLDER          = 1,        /* displayed under a folder (relative)*/
380   SHGDN_FORPARSING        = 0x8000    /* for ParseDisplayName or path */
381 } SHGNO;
382
383 /* IShellFolder::EnumObjects */
384 typedef enum tagSHCONTF
385 { SHCONTF_FOLDERS         = 32,       /* for shell browser */
386   SHCONTF_NONFOLDERS      = 64,       /* for default view */
387   SHCONTF_INCLUDEHIDDEN   = 128       /* for hidden/system objects */
388 } SHCONTF;
389
390 /* IShellFolder::GetAttributesOf flags */
391 #define SFGAO_CANCOPY           DROPEFFECT_COPY /* Objects can be copied */
392 #define SFGAO_CANMOVE           DROPEFFECT_MOVE /* Objects can be moved */
393 #define SFGAO_CANLINK           DROPEFFECT_LINK /* Objects can be linked */
394 #define SFGAO_CANRENAME         0x00000010L     /* Objects can be renamed */
395 #define SFGAO_CANDELETE         0x00000020L     /* Objects can be deleted */
396 #define SFGAO_HASPROPSHEET      0x00000040L     /* Objects have property sheets */
397 #define SFGAO_DROPTARGET        0x00000100L     /* Objects are drop target */
398 #define SFGAO_CAPABILITYMASK    0x00000177L
399 #define SFGAO_LINK              0x00010000L     /* Shortcut (link) */
400 #define SFGAO_SHARE             0x00020000L     /* shared */
401 #define SFGAO_READONLY          0x00040000L     /* read-only */
402 #define SFGAO_GHOSTED           0x00080000L     /* ghosted icon */
403 #define SFGAO_DISPLAYATTRMASK   0x000F0000L
404 #define SFGAO_FILESYSANCESTOR   0x10000000L     /* It contains file system folder */
405 #define SFGAO_FOLDER            0x20000000L     /* It's a folder. */
406 #define SFGAO_FILESYSTEM        0x40000000L     /* is a file system thing (file/folder/root) */
407 #define SFGAO_HASSUBFOLDER      0x80000000L     /* Expandable in the map pane */
408 #define SFGAO_CONTENTSMASK      0x80000000L
409 #define SFGAO_VALIDATE          0x01000000L     /* invalidate cached information */
410 #define SFGAO_REMOVABLE        0x02000000L      /* is this removeable media? */
411
412 typedef struct IShellFolder_VTable {
413     /* *** IUnknown methods *** */
414     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
415     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
416     STDMETHOD_(ULONG,Release) (THIS) PURE;
417
418     /* *** IShellFolder methods *** */
419     STDMETHOD(ParseDisplayName) (THIS_ HWND32 hwndOwner,LPBC pbcReserved, LPOLESTR32 lpszDisplayName,ULONG * pchEaten, LPITEMIDLIST * ppidl, ULONG *pdwAttributes) PURE;
420     STDMETHOD(EnumObjects)( THIS_ HWND32 hwndOwner, DWORD grfFlags, LPENUMIDLIST * ppenumIDList) PURE;
421     STDMETHOD(BindToObject)(THIS_ LPCITEMIDLIST pidl, LPBC pbcReserved,REFIID riid, LPVOID * ppvOut) PURE;
422     STDMETHOD(BindToStorage)(THIS_ LPCITEMIDLIST pidl, LPBC pbcReserved,REFIID riid, LPVOID * ppvObj) PURE;
423     STDMETHOD(CompareIDs)(THIS_ LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE;
424     STDMETHOD(CreateViewObject)(THIS_ HWND32 hwndOwner, REFIID riid, LPVOID * ppvOut) PURE;
425     STDMETHOD(GetAttributesOf)(THIS_ UINT32 cidl, LPCITEMIDLIST * apidl,ULONG * rgfInOut) PURE;
426     STDMETHOD(GetUIObjectOf)(THIS_ HWND32 hwndOwner, UINT32 cidl, LPCITEMIDLIST * apidl,REFIID riid, UINT32 * prgfInOut, LPVOID * ppvOut) PURE;
427     STDMETHOD(GetDisplayNameOf)(THIS_ LPCITEMIDLIST pidl, DWORD uFlags, LPSTRRET lpName) PURE;
428     STDMETHOD(SetNameOf)(THIS_ HWND32 hwndOwner, LPCITEMIDLIST pidl,LPCOLESTR32 lpszName, DWORD uFlags,LPITEMIDLIST * ppidlOut) PURE;
429
430         /* utility functions */
431    STDMETHOD_(BOOL32,GetFolderPath)(THIS_ LPSTR, DWORD);
432    
433 } *LPSHELLFOLDER_VTABLE,IShellFolder_VTable;
434
435 struct tagSHELLFOLDER {
436         LPSHELLFOLDER_VTABLE    lpvtbl;
437         DWORD                   ref;
438         LPSTR                   sMyPath;
439         LPITEMIDLIST            pMyPidl;
440         LPITEMIDLIST            mpidl;
441 };
442
443 extern LPSHELLFOLDER pdesktopfolder;
444
445 /************************
446 * Shellfolder API
447 */
448 DWORD WINAPI SHGetDesktopFolder(LPSHELLFOLDER *);
449 #undef THIS
450
451 /************************************************************************
452 * IShellBrowser interface
453 */
454 #define THIS LPSHELLBROWSER this
455 /* targets for GetWindow/SendControlMsg */
456 #define FCW_STATUS              0x0001
457 #define FCW_TOOLBAR             0x0002
458 #define FCW_TREE                0x0003
459 #define FCW_INTERNETBAR         0x0006
460 #define FCW_PROGRESS            0x0008
461
462 /* wFlags for BrowseObject*/
463 #define SBSP_DEFBROWSER         0x0000
464 #define SBSP_SAMEBROWSER        0x0001
465 #define SBSP_NEWBROWSER         0x0002
466
467 #define SBSP_DEFMODE            0x0000
468 #define SBSP_OPENMODE           0x0010
469 #define SBSP_EXPLOREMODE        0x0020
470
471 #define SBSP_ABSOLUTE           0x0000
472 #define SBSP_RELATIVE           0x1000
473 #define SBSP_PARENT             0x2000
474 #define SBSP_NAVIGATEBACK       0x4000
475 #define SBSP_NAVIGATEFORWARD    0x8000
476
477 #define SBSP_ALLOW_AUTONAVIGATE         0x10000
478
479 #define SBSP_INITIATEDBYHLINKFRAME      0x80000000
480 #define SBSP_REDIRECT                   0x40000000
481 #define SBSP_WRITENOHISTORY             0x08000000
482
483 /* uFlage for SetToolbarItems */
484 #define FCT_MERGE       0x0001
485 #define FCT_CONFIGABLE  0x0002
486 #define FCT_ADDTOEND    0x0004
487
488 /* undocumented, found in the web posted by Chris Becke */ 
489 #define CWM_SETPATH     (WM_USER+2)
490 #define CWM_WANTIDLE    (WM_USER+3)
491 #define CWM_GETSETCURRENTINFO   (WM_USER+4)
492 #define CWM_SELECTITEM  (WM_USER+5)
493 #define CWM_STOPWAITING (WM_USER+6)
494 #define CWM_GETISHELLBROWSER (WM_USER+7)
495
496 typedef struct IShellBrowser_VTable 
497 {    /* *** IUnknown methods *** */
498     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
499     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
500     STDMETHOD_(ULONG,Release) (THIS) PURE;
501
502     /* *** IOleWindow methods *** */
503     STDMETHOD(GetWindow) (THIS_ HWND32 * lphwnd) PURE;
504     STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL32 fEnterMode) PURE;
505
506     /* *** IShellBrowser methods *** (same as IOleInPlaceFrame) */
507     STDMETHOD(InsertMenusSB) (THIS_ HMENU32 hmenuShared, LPOLEMENUGROUPWIDTHS32 lpMenuWidths) PURE;
508     STDMETHOD(SetMenuSB) (THIS_ HMENU32 hmenuShared, HOLEMENU32 holemenuReserved, HWND32 hwndActiveObject) PURE;
509     STDMETHOD(RemoveMenusSB) (THIS_ HMENU32 hmenuShared) PURE;
510     STDMETHOD(SetStatusTextSB) (THIS_ LPCOLESTR32 lpszStatusText) PURE;
511     STDMETHOD(EnableModelessSB) (THIS_ BOOL32 fEnable) PURE;
512     STDMETHOD(TranslateAcceleratorSB) (THIS_ LPMSG32 lpmsg, WORD wID) PURE;
513
514     /* *** IShellBrowser methods *** */
515     STDMETHOD(BrowseObject)(THIS_ LPCITEMIDLIST pidl, UINT32 wFlags) PURE;
516     STDMETHOD(GetViewStateStream)(THIS_ DWORD grfMode, LPSTREAM32  *ppStrm) PURE;
517     STDMETHOD(GetControlWindow)(THIS_ UINT32 id, HWND32 * lphwnd) PURE;
518     STDMETHOD(SendControlMsg)(THIS_ UINT32 id, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam, LRESULT * pret) PURE;
519     STDMETHOD(QueryActiveShellView)(THIS_ IShellView ** ppshv) PURE;
520     STDMETHOD(OnViewWindowActive)(THIS_ IShellView * ppshv) PURE;
521     STDMETHOD(SetToolbarItems)(THIS_ LPTBBUTTON lpButtons, UINT32 nButtons, UINT32 uFlags) PURE;
522 } *LPSHELLBROWSER_VTABLE,IShellBrowser_VTable;
523
524 struct tagSHELLBROWSER 
525 { LPSHELLBROWSER_VTABLE lpvtbl;
526   DWORD ref;
527 };
528
529 #undef THIS
530
531 /************************************************************************
532 * IShellView interface
533 */
534 #define THIS LPSHELLVIEW this
535
536 /* shellview select item flags*/
537 #define SVSI_DESELECT   0x0000
538 #define SVSI_SELECT     0x0001
539 #define SVSI_EDIT       0x0003  /* includes select */
540 #define SVSI_DESELECTOTHERS 0x0004
541 #define SVSI_ENSUREVISIBLE  0x0008
542 #define SVSI_FOCUSED        0x0010
543
544 /* shellview get item object flags */
545 #define SVGIO_BACKGROUND    0x00000000
546 #define SVGIO_SELECTION     0x00000001
547 #define SVGIO_ALLVIEW       0x00000002
548
549 /* The explorer dispatches WM_COMMAND messages based on the range of
550  command/menuitem IDs. All the IDs of menuitems that the view (right
551  pane) inserts must be in FCIDM_SHVIEWFIRST/LAST (otherwise, the explorer
552  won't dispatch them). The view should not deal with any menuitems
553  in FCIDM_BROWSERFIRST/LAST (otherwise, it won't work with the future
554  version of the shell).
555
556   FCIDM_SHVIEWFIRST/LAST      for the right pane (IShellView)
557   FCIDM_BROWSERFIRST/LAST     for the explorer frame (IShellBrowser)
558   FCIDM_GLOBAL/LAST           for the explorer's submenu IDs
559 */
560 #define FCIDM_SHVIEWFIRST       0x0000
561 /* undocumented */
562 #define FCIDM_SHVIEW_ARRANGE    0x7001
563 #define FCIDM_SHVIEW_DELETE     0x7011
564 #define FCIDM_SHVIEW_PROPERTIES 0x7013
565 #define FCIDM_SHVIEW_CUT        0x7018
566 #define FCIDM_SHVIEW_COPY       0x7019
567 #define FCIDM_SHVIEW_INSERT     0x701A
568 #define FCIDM_SHVIEW_UNDO       0x701B
569 #define FCIDM_SHVIEW_INSERTLINK 0x701C
570 #define FCIDM_SHVIEW_SELECTALL  0x7021
571 #define FCIDM_SHVIEW_INVERTSELECTION    0x7022
572 #define FCIDM_SHVIEW_BIGICON    0x7029
573 #define FCIDM_SHVIEW_SMALLICON  0x702A
574 #define FCIDM_SHVIEW_LISTVIEW   0x702B  
575 #define FCIDM_SHVIEW_REPORTVIEW 0x702C
576 #define FCIDM_SHVIEW_AUTOARRANGE        0x7031  
577 #define FCIDM_SHVIEW_SNAPTOGRID 0x7032
578 #define FCIDM_SHVIEW_HELP       0x7041
579
580 #define FCIDM_SHVIEWLAST        0x7fff
581 #define FCIDM_BROWSERFIRST      0xA000
582 /* undocumented toolbar items from stddlg's*/
583 #define FCIDM_TB_SMALLICON      0xA003
584 #define FCIDM_TB_REPORTVIEW     0xA004
585
586 #define FCIDM_BROWSERLAST       0xbf00
587 #define FCIDM_GLOBALFIRST       0x8000
588 #define FCIDM_GLOBALLAST        0x9fff
589
590 /*
591 * Global submenu IDs and separator IDs
592 */
593 #define FCIDM_MENU_FILE             (FCIDM_GLOBALFIRST+0x0000)
594 #define FCIDM_MENU_EDIT             (FCIDM_GLOBALFIRST+0x0040)
595 #define FCIDM_MENU_VIEW             (FCIDM_GLOBALFIRST+0x0080)
596 #define FCIDM_MENU_VIEW_SEP_OPTIONS (FCIDM_GLOBALFIRST+0x0081)
597 #define FCIDM_MENU_TOOLS            (FCIDM_GLOBALFIRST+0x00c0)
598 #define FCIDM_MENU_TOOLS_SEP_GOTO   (FCIDM_GLOBALFIRST+0x00c1)
599 #define FCIDM_MENU_HELP             (FCIDM_GLOBALFIRST+0x0100)
600 #define FCIDM_MENU_FIND             (FCIDM_GLOBALFIRST+0x0140)
601 #define FCIDM_MENU_EXPLORE          (FCIDM_GLOBALFIRST+0x0150)
602 #define FCIDM_MENU_FAVORITES        (FCIDM_GLOBALFIRST+0x0170)
603
604 /* control IDs known to the view */
605 #define FCIDM_TOOLBAR      (FCIDM_BROWSERFIRST + 0)
606 #define FCIDM_STATUS       (FCIDM_BROWSERFIRST + 1)
607
608 /* uState values for IShellView::UIActivate */
609 typedef enum 
610 { SVUIA_DEACTIVATE       = 0,
611   SVUIA_ACTIVATE_NOFOCUS = 1,
612   SVUIA_ACTIVATE_FOCUS   = 2,
613   SVUIA_INPLACEACTIVATE  = 3          /* new flag for IShellView2 */
614 } SVUIA_STATUS;
615
616
617
618 typedef struct IShellView_VTable
619 {   /* *** IUnknown methods *** */
620     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
621     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
622     STDMETHOD_(ULONG,Release) (THIS) PURE;
623
624     /* *** IOleWindow methods *** */
625     STDMETHOD(GetWindow) (THIS_ HWND32 * lphwnd) PURE;
626     STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL32 fEnterMode) PURE;
627
628     /* *** IShellView methods *** */
629     STDMETHOD(TranslateAccelerator) (THIS_ LPMSG32 lpmsg) PURE;
630     STDMETHOD(EnableModeless) (THIS_ BOOL32 fEnable) PURE;
631     STDMETHOD(UIActivate) (THIS_ UINT32 uState) PURE;
632     STDMETHOD(Refresh) (THIS) PURE;
633     STDMETHOD(CreateViewWindow)(THIS_ IShellView *lpPrevView,LPCFOLDERSETTINGS lpfs, IShellBrowser * psb,RECT32 * prcView, HWND32  *phWnd) PURE;
634     STDMETHOD(DestroyViewWindow)(THIS) PURE;
635     STDMETHOD(GetCurrentInfo)(THIS_ LPFOLDERSETTINGS lpfs) PURE;
636     STDMETHOD(AddPropertySheetPages)(THIS_ DWORD dwReserved,LPFNADDPROPSHEETPAGE lpfn, LPARAM lparam) PURE;
637     STDMETHOD(SaveViewState)(THIS) PURE;
638     STDMETHOD(SelectItem)(THIS_ LPCITEMIDLIST pidlItem, UINT32 uFlags) PURE;
639     STDMETHOD(GetItemObject)(THIS_ UINT32 uItem, REFIID riid,LPVOID *ppv) PURE;
640 } IShellView_VTable,*LPSHELLVIEW_VTABLE;
641
642 struct tagSHELLVIEW 
643 { LPSHELLVIEW_VTABLE lpvtbl;
644   DWORD         ref;
645   LPITEMIDLIST  mpidl;
646   LPSHELLFOLDER pSFParent;
647   LPSHELLBROWSER        pShellBrowser;
648   LPCOMMDLGBROWSER      pCommDlgBrowser;
649   HWND32        hWnd;
650   HWND32        hWndList;
651   HWND32        hWndParent;
652   FOLDERSETTINGS        FolderSettings;
653   HMENU32       hMenu;
654   UINT32        uState;
655   UINT32        uSelected;
656   LPITEMIDLIST  *aSelectedItems;
657 };
658
659 typedef GUID SHELLVIEWID;
660 #define SV_CLASS_NAME   ("SHELLDLL_DefView")
661
662 #undef THIS
663 /****************************************************************************
664  * ICommDlgBrowser interface
665  */
666 #define THIS LPCOMMDLGBROWSER this
667
668 /* for OnStateChange*/
669 #define CDBOSC_SETFOCUS     0x00000000
670 #define CDBOSC_KILLFOCUS    0x00000001
671 #define CDBOSC_SELCHANGE    0x00000002
672 #define CDBOSC_RENAME       0x00000003
673
674 typedef struct ICommDlgBrowser_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;
679
680     /* ICommDlgBrowser methods */
681     STDMETHOD(OnDefaultCommand) (THIS_  LPSHELLVIEW ppshv) PURE;
682     STDMETHOD(OnStateChange) (THIS_ LPSHELLVIEW ppshv, ULONG uChange) PURE;
683     STDMETHOD(IncludeObject) (THIS_ LPSHELLVIEW ppshv, LPCITEMIDLIST pidl) PURE;
684 } ICommDlgBrowser_VTable,*LPCOMMDLGBROWSER_VTABLE;
685
686 struct tagCOMMDLGBROWSER
687 { LPCOMMDLGBROWSER_VTABLE lpvtbl;
688   DWORD                      ref;
689 };
690 #undef THIS
691 /****************************************************************************
692  * IShellLink interface
693  */
694
695 #define THIS LPSHELLLINK this
696 /* IShellLink::Resolve fFlags */
697 typedef enum {
698     SLR_NO_UI           = 0x0001,
699     SLR_ANY_MATCH       = 0x0002,
700     SLR_UPDATE          = 0x0004
701 } SLR_FLAGS;
702
703 /* IShellLink::GetPath fFlags */
704 typedef enum {
705     SLGP_SHORTPATH      = 0x0001,
706     SLGP_UNCPRIORITY    = 0x0002
707 } SLGP_FLAGS;
708
709
710
711 typedef struct IShellLink IShellLink,*LPSHELLLINK;
712 typedef struct IShellLink_VTable
713 {
714     /* *** IUnknown methods *** */
715     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
716     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
717     STDMETHOD_(ULONG,Release) (THIS) PURE;
718
719     STDMETHOD(GetPath)(THIS_ LPSTR pszFile,INT32 cchMaxPath, WIN32_FIND_DATA32A *pfd, DWORD fFlags) PURE;
720
721     STDMETHOD(GetIDList)(THIS_ LPITEMIDLIST * ppidl) PURE;
722     STDMETHOD(SetIDList)(THIS_ LPCITEMIDLIST pidl) PURE;
723
724     STDMETHOD(GetDescription)(THIS_ LPSTR pszName,INT32 cchMaxName) PURE;
725     STDMETHOD(SetDescription)(THIS_ LPCSTR pszName) PURE;
726
727     STDMETHOD(GetWorkingDirectory)(THIS_ LPSTR pszDir,INT32 cchMaxPath) PURE;
728     STDMETHOD(SetWorkingDirectory)(THIS_ LPCSTR pszDir) PURE;
729
730     STDMETHOD(GetArguments)(THIS_ LPSTR pszArgs,INT32 cchMaxPath) PURE;
731     STDMETHOD(SetArguments)(THIS_ LPCSTR pszArgs) PURE;
732
733     STDMETHOD(GetHotkey)(THIS_ WORD *pwHotkey) PURE;
734     STDMETHOD(SetHotkey)(THIS_ WORD wHotkey) PURE;
735
736     STDMETHOD(GetShowCmd)(THIS_ INT32 *piShowCmd) PURE;
737     STDMETHOD(SetShowCmd)(THIS_ INT32 iShowCmd) PURE;
738
739     STDMETHOD(GetIconLocation)(THIS_ LPSTR pszIconPath,INT32 cchIconPath,INT32 *piIcon) PURE;
740     STDMETHOD(SetIconLocation)(THIS_ LPCSTR pszIconPath,INT32 iIcon) PURE;
741
742     STDMETHOD(SetRelativePath)(THIS_ LPCSTR pszPathRel, DWORD dwReserved) PURE;
743
744     STDMETHOD(Resolve)(THIS_ HWND32 hwnd, DWORD fFlags) PURE;
745
746     STDMETHOD(SetPath)(THIS_ LPCSTR pszFile) PURE;
747 } IShellLink_VTable,*LPSHELLLINK_VTABLE;
748
749 struct IShellLink {
750         LPSHELLLINK_VTABLE      lpvtbl;
751         DWORD                   ref;
752         /* IPersistfile interface */
753         LPPERSISTFILE           lppf;
754 };
755 #define IShellLinkA IShellLink 
756
757 #undef THIS
758
759 #define THIS LPSHELLLINKW this
760
761 typedef struct IShellLinkW IShellLinkW,*LPSHELLLINKW;
762 typedef struct IShellLinkW_VTable
763 {
764     /* *** IUnknown methods *** */
765     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
766     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
767     STDMETHOD_(ULONG,Release) (THIS) PURE;
768
769     STDMETHOD(GetPath)(THIS_ LPWSTR pszFile,INT32 cchMaxPath, WIN32_FIND_DATA32A *pfd, DWORD fFlags) PURE;
770
771     STDMETHOD(GetIDList)(THIS_ LPITEMIDLIST * ppidl) PURE;
772     STDMETHOD(SetIDList)(THIS_ LPCITEMIDLIST pidl) PURE;
773
774     STDMETHOD(GetDescription)(THIS_ LPWSTR pszName,INT32 cchMaxName) PURE;
775     STDMETHOD(SetDescription)(THIS_ LPCWSTR pszName) PURE;
776
777     STDMETHOD(GetWorkingDirectory)(THIS_ LPWSTR pszDir,INT32 cchMaxPath) PURE;
778     STDMETHOD(SetWorkingDirectory)(THIS_ LPCWSTR pszDir) PURE;
779
780     STDMETHOD(GetArguments)(THIS_ LPWSTR pszArgs,INT32 cchMaxPath) PURE;
781     STDMETHOD(SetArguments)(THIS_ LPCWSTR pszArgs) PURE;
782
783     STDMETHOD(GetHotkey)(THIS_ WORD *pwHotkey) PURE;
784     STDMETHOD(SetHotkey)(THIS_ WORD wHotkey) PURE;
785
786     STDMETHOD(GetShowCmd)(THIS_ INT32 *piShowCmd) PURE;
787     STDMETHOD(SetShowCmd)(THIS_ INT32 iShowCmd) PURE;
788
789     STDMETHOD(GetIconLocation)(THIS_ LPWSTR pszIconPath,INT32 cchIconPath,INT32 *piIcon) PURE;
790     STDMETHOD(SetIconLocation)(THIS_ LPCWSTR pszIconPath,INT32 iIcon) PURE;
791
792     STDMETHOD(SetRelativePath)(THIS_ LPCWSTR pszPathRel, DWORD dwReserved) PURE;
793
794     STDMETHOD(Resolve)(THIS_ HWND32 hwnd, DWORD fFlags) PURE;
795
796     STDMETHOD(SetPath)(THIS_ LPCWSTR pszFile) PURE;
797 } IShellLinkW_VTable,*LPSHELLLINKW_VTABLE;
798
799 struct IShellLinkW {
800         LPSHELLLINKW_VTABLE     lpvtbl;
801         DWORD                   ref;
802         /* IPersistfile interface */
803         LPPERSISTFILE           lppf;
804 };
805
806 #undef THIS
807
808 /****************************************************************************
809  * IExtractIconinterface
810  *
811  * FIXME
812  *  Is the ExtractIconA interface
813  */
814 #define THIS LPEXTRACTICON this
815
816 /* GetIconLocation() input flags*/
817 #define GIL_OPENICON     0x0001      /* allows containers to specify an "open" look */
818 #define GIL_FORSHELL     0x0002      /* icon is to be displayed in a ShellFolder */
819 #define GIL_ASYNC        0x0020      /* this is an async extract, return E_ASYNC */
820
821 /* GetIconLocation() return flags */
822 #define GIL_SIMULATEDOC  0x0001      /* simulate this document icon for this */
823 #define GIL_PERINSTANCE  0x0002      /* icons from this class are per instance (each file has its own) */
824 #define GIL_PERCLASS     0x0004      /* icons from this class per class (shared for all files of this type) */
825 #define GIL_NOTFILENAME  0x0008      /* location is not a filename, must call ::ExtractIcon */
826 #define GIL_DONTCACHE    0x0010      /* this icon should not be cached */
827
828 typedef struct IExtractIcon IExtractIcon,*LPEXTRACTICON;
829 typedef struct IExtractIcon_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;
834
835   /*** IExtractIcon methods ***/
836   STDMETHOD(GetIconLocation)(THIS_ UINT32 uFlags, LPSTR szIconFile, UINT32 cchMax,INT32 * piIndex, UINT32 * pwFlags) PURE;
837   STDMETHOD(Extract)(THIS_ LPCSTR pszFile, UINT32 nIconIndex, HICON32 *phiconLarge, HICON32 *phiconSmall, UINT32 nIconSize) PURE;
838 }IExtractIcon_VTable,*LPEXTRACTICON_VTABLE;
839
840 struct IExtractIcon 
841 { LPEXTRACTICON_VTABLE lpvtbl;
842   DWORD ref;
843   LPITEMIDLIST pidl;
844 };
845
846 #undef THIS
847
848 DWORD WINAPI SHMapPIDLToSystemImageListIndex(LPSHELLFOLDER sh,LPITEMIDLIST pidl,DWORD z);
849
850 /****************************************************************************
851  * IShellIcon interface
852  */
853
854 #define THIS LPSHELLICON this
855
856 typedef struct IShellIcon_VTable
857 { /*** IUnknown methods ***/
858   STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
859   STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
860   STDMETHOD_(ULONG,Release) (THIS) PURE;
861
862   /*** IShellIcon methods ***/
863   STDMETHOD(GetIconOf)(THIS_ LPCITEMIDLIST pidl, UINT32 flags, LPINT32 lpIconIndex) PURE;
864 } IShellIcon_VTable,*LPSHELLICON_VTABLE;
865
866 struct tagSHELLICON
867 { LPSHELLICON_VTABLE lpvtbl;
868   DWORD ref;
869 };
870 #undef THIS
871 /****************************************************************************
872  * IDockingWindowFrame interface
873  */
874 #define THIS LPDOCKINGWINDOWFRAME this
875
876 #define DWFRF_NORMAL            0x0000  /* femove toolbar flags*/
877 #define DWFRF_DELETECONFIGDATA  0x0001
878 #define DWFAF_HIDDEN            0x0001   /* add tolbar*/
879
880 typedef struct IDockingWindowFrame_VTable
881 {   STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
882     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
883     STDMETHOD_(ULONG,Release) (THIS) PURE;
884
885     /*** IOleWindow methods ***/
886     STDMETHOD(GetWindow) (THIS_ HWND32 * lphwnd) PURE;
887     STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL32 fEnterMode) PURE;
888
889     /*** IDockingWindowFrame methods ***/
890     STDMETHOD(AddToolbar) (THIS_ IUnknown* punkSrc, LPCWSTR pwszItem, DWORD dwAddFlags) PURE;
891     STDMETHOD(RemoveToolbar) (THIS_ IUnknown* punkSrc, DWORD dwRemoveFlags) PURE;
892     STDMETHOD(FindToolbar) (THIS_ LPCWSTR pwszItem, REFIID riid, LPVOID* ppvObj) PURE;
893 } IDockingWindowFrame_VTable, *LPDOCKINGWINDOWFRAME_VTABLE;
894
895 struct tagDOCKINGWINDOWFRAME
896 { LPDOCKINGWINDOWFRAME_VTABLE lpvtbl;
897   DWORD ref;
898 };
899
900 #undef THIS
901 /****************************************************************************
902  * Shell Execute API
903  */
904 #define SE_ERR_FNF              2       /* file not found */
905 #define SE_ERR_PNF              3       /* path not found */
906 #define SE_ERR_ACCESSDENIED     5       /* access denied */
907 #define SE_ERR_OOM              8       /* out of memory */
908 #define SE_ERR_DLLNOTFOUND      32
909 #define SE_ERR_SHARE                    26
910 #define SE_ERR_ASSOCINCOMPLETE          27
911 #define SE_ERR_DDETIMEOUT               28
912 #define SE_ERR_DDEFAIL                  29
913 #define SE_ERR_DDEBUSY                  30
914 #define SE_ERR_NOASSOC                  31
915
916 #define SEE_MASK_CLASSNAME        0x00000001
917 #define SEE_MASK_CLASSKEY         0x00000003
918 #define SEE_MASK_IDLIST           0x00000004
919 #define SEE_MASK_INVOKEIDLIST     0x0000000c
920 #define SEE_MASK_ICON             0x00000010
921 #define SEE_MASK_HOTKEY           0x00000020
922 #define SEE_MASK_NOCLOSEPROCESS   0x00000040
923 #define SEE_MASK_CONNECTNETDRV    0x00000080
924 #define SEE_MASK_FLAG_DDEWAIT     0x00000100
925 #define SEE_MASK_DOENVSUBST       0x00000200
926 #define SEE_MASK_FLAG_NO_UI       0x00000400
927 #define SEE_MASK_UNICODE          0x00004000
928 #define SEE_MASK_NO_CONSOLE       0x00008000
929 #define SEE_MASK_ASYNCOK          0x00100000
930 #define SEE_MASK_HMONITOR         0x00200000
931
932 typedef struct _SHELLEXECUTEINFOA
933 {       DWORD cbSize;
934         ULONG fMask;
935         HWND32 hwnd;
936         LPCSTR   lpVerb;
937         LPCSTR   lpFile;
938         LPCSTR   lpParameters;
939         LPCSTR   lpDirectory;
940        INT32 nShow;
941         HINSTANCE32 hInstApp;
942         /* Optional fields */
943         LPVOID lpIDList;
944         LPCSTR   lpClass;
945         HKEY hkeyClass;
946         DWORD dwHotKey;
947         union 
948         { HANDLE32 hIcon;
949           HANDLE32 hMonitor;
950         } u;
951         HANDLE32 hProcess;
952 } SHELLEXECUTEINFO32A, *LPSHELLEXECUTEINFO32A;
953
954 typedef struct _SHELLEXECUTEINFOW
955 {       DWORD cbSize;
956         ULONG fMask;
957         HWND32 hwnd;
958         LPCWSTR  lpVerb;
959         LPCWSTR  lpFile;
960         LPCWSTR  lpParameters;
961         LPCWSTR  lpDirectory;
962        INT32 nShow;
963         HINSTANCE32 hInstApp;
964         /* Optional fields*/
965         LPVOID lpIDList;
966         LPCWSTR  lpClass;
967         HKEY hkeyClass;
968         DWORD dwHotKey;
969         union
970         { HANDLE32 hIcon;
971           HANDLE32 hMonitor;
972         } u;
973         HANDLE32 hProcess;
974 } SHELLEXECUTEINFO32W, *LPSHELLEXECUTEINFO32W;
975
976 #define SHELLEXECUTEINFO   WINELIB_NAME_AW(SHELLEXECUTEINFO)
977 #define LPSHELLEXECUTEINFO WINELIB_NAME_AW(LPSHELLEXECUTEINFO)
978
979 BOOL32 WINAPI ShellExecuteEx32A(LPSHELLEXECUTEINFO32A lpExecInfo);
980 BOOL32 WINAPI ShellExecuteEx32W(LPSHELLEXECUTEINFO32W lpExecInfo);
981 #define ShellExecuteEx  WINELIB_NAME_AW(ShellExecuteEx)
982
983 void WINAPI WinExecError32A(HWND32 hwnd,INT32 error, LPCSTR lpstrFileName, LPCSTR lpstrTitle);
984 void WINAPI WinExecError32W(HWND32 hwnd,INT32 error, LPCWSTR lpstrFileName, LPCWSTR lpstrTitle);
985 #define WinExecError  WINELIB_NAME_AW(WinExecError)
986
987
988
989 /****************************************************************************
990  * SHBrowseForFolder API
991  */
992 typedef INT32 (CALLBACK* BFFCALLBACK)(HWND32 hwnd, UINT32 uMsg, LPARAM lParam, LPARAM lpData);
993
994 typedef struct tagBROWSEINFO32A {
995     HWND32        hwndOwner;
996     LPCITEMIDLIST pidlRoot;
997     LPSTR         pszDisplayName;
998     LPCSTR        lpszTitle;
999     UINT32        ulFlags;
1000     BFFCALLBACK   lpfn;
1001     LPARAM        lParam;
1002         INT32         iImage;
1003 } BROWSEINFO32A, *PBROWSEINFO32A, *LPBROWSEINFO32A;
1004
1005 typedef struct tagBROWSEINFO32W {
1006     HWND32        hwndOwner;
1007     LPCITEMIDLIST pidlRoot;
1008     LPWSTR        pszDisplayName;
1009     LPCWSTR       lpszTitle;
1010     UINT32        ulFlags;
1011     BFFCALLBACK   lpfn;
1012     LPARAM        lParam;
1013         INT32         iImage;
1014 } BROWSEINFO32W, *PBROWSEINFO32W, *LPBROWSEINFO32W; 
1015
1016 #define BROWSEINFO   WINELIB_NAME_AW(BROWSEINFO)
1017 #define PBROWSEINFO  WINELIB_NAME_AW(PBROWSEINFO)
1018 #define LPBROWSEINFO WINELIB_NAME_AW(LPBROWSEINFO)
1019
1020 /* Browsing for directory. */
1021 #define BIF_RETURNONLYFSDIRS   0x0001
1022 #define BIF_DONTGOBELOWDOMAIN  0x0002
1023 #define BIF_STATUSTEXT         0x0004
1024 #define BIF_RETURNFSANCESTORS  0x0008
1025 #define BIF_EDITBOX            0x0010
1026 #define BIF_VALIDATE           0x0020
1027  
1028 #define BIF_BROWSEFORCOMPUTER  0x1000
1029 #define BIF_BROWSEFORPRINTER   0x2000
1030 #define BIF_BROWSEINCLUDEFILES 0x4000
1031
1032 /* message from browser */
1033 #define BFFM_INITIALIZED        1
1034 #define BFFM_SELCHANGED         2
1035 #define BFFM_VALIDATEFAILEDA    3   /* lParam:szPath ret:1(cont),0(EndDialog) */
1036 #define BFFM_VALIDATEFAILEDW    4   /* lParam:wzPath ret:1(cont),0(EndDialog) */
1037
1038 /* messages to browser */
1039 #define BFFM_SETSTATUSTEXTA     (WM_USER+100)
1040 #define BFFM_ENABLEOK           (WM_USER+101)
1041 #define BFFM_SETSELECTIONA      (WM_USER+102)
1042 #define BFFM_SETSELECTIONW      (WM_USER+103)
1043 #define BFFM_SETSTATUSTEXTW     (WM_USER+104)
1044
1045 /*
1046 #ifdef UNICODE
1047 #define SHBrowseForFolder   SHBrowseForFolderW
1048 #define BFFM_SETSTATUSTEXT  BFFM_SETSTATUSTEXTW
1049 #define BFFM_SETSELECTION   BFFM_SETSELECTIONW
1050
1051 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDW
1052 #else
1053 #define SHBrowseForFolder   SHBrowseForFolderA
1054 #define BFFM_SETSTATUSTEXT  BFFM_SETSTATUSTEXTA
1055 #define BFFM_SETSELECTION   BFFM_SETSELECTIONA
1056
1057 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDA 
1058 #endif 
1059 */
1060
1061 LPITEMIDLIST WINAPI SHBrowseForFolder32A(LPBROWSEINFO32A lpbi);
1062 /*LPITEMIDLIST WINAPI SHBrowseForFolder32W(LPBROWSEINFO32W lpbi);*/
1063 #define  SHBrowseForFolder WINELIB_NAME_AW(SHBrowseForFolder)
1064
1065 /****************************************************************************
1066 *       SHGetDataFromIDList API
1067 */
1068 #define SHGDFIL_FINDDATA        1
1069 #define SHGDFIL_NETRESOURCE     2
1070 #define SHGDFIL_DESCRIPTIONID   3
1071
1072 #define SHDID_ROOT_REGITEM          1
1073 #define SHDID_FS_FILE               2
1074 #define SHDID_FS_DIRECTORY          3
1075 #define SHDID_FS_OTHER              4
1076 #define SHDID_COMPUTER_DRIVE35      5
1077 #define SHDID_COMPUTER_DRIVE525     6
1078 #define SHDID_COMPUTER_REMOVABLE    7
1079 #define SHDID_COMPUTER_FIXED        8
1080 #define SHDID_COMPUTER_NETDRIVE     9
1081 #define SHDID_COMPUTER_CDROM        10
1082 #define SHDID_COMPUTER_RAMDISK      11
1083 #define SHDID_COMPUTER_OTHER        12
1084 #define SHDID_NET_DOMAIN            13
1085 #define SHDID_NET_SERVER            14
1086 #define SHDID_NET_SHARE             15
1087 #define SHDID_NET_RESTOFNET         16
1088 #define SHDID_NET_OTHER             17
1089
1090 typedef struct _SHDESCRIPTIONID 
1091 {   DWORD   dwDescriptionId;
1092     CLSID   clsid;
1093 } SHDESCRIPTIONID, *LPSHDESCRIPTIONID;
1094
1095 HRESULT WINAPI SHGetDataFromIDListA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID pv, int cb);
1096 HRESULT WINAPI SHGetDataFromIDListW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID pv, int cb);
1097 #define  SHGetDataFromIDList WINELIB_NAME_AW(SHGetDataFromIDList)
1098
1099
1100 /****************************************************************************
1101 * shlview structures
1102 */
1103
1104 /*
1105 * IShellFolderViewCallback Callback
1106 *  This "callback" is called by the shells default IShellView implementation (that
1107 *  we got using SHCreateShellViewEx()), to notify us of the various things that
1108 *  are happening to the shellview (and ask for things too).
1109 *
1110 *  You don't have to support anything here - anything you don't want to 
1111 *  handle, the shell will do itself if you just return E_NOTIMPL. This parameters
1112 *  that the shell passes to this function are entirely undocumented.
1113 *
1114 *  HOWEVER, as the cabview sample as originally written used this callback, the
1115 *  writers implemented the callback mechanism on top of their own IShellView.
1116 *  Look there for some clues on what to do here.
1117 */
1118
1119 typedef HRESULT(CALLBACK *SHELLVIEWPROC)(DWORD dwUserParam,LPSHELLFOLDER psf,
1120                          HWND32 hwnd,UINT32 uMsg,UINT32 wParam,LPARAM lParam);
1121
1122 /* NF valid values for the "viewmode" item of the SHELLTEMPLATE*/
1123 #define NF_INHERITVIEW    0x0000
1124 #define NF_LOCALVIEW        0x0001
1125
1126 typedef struct _SHELLVIEWDATA   /* idl */
1127 { DWORD           dwSize;
1128   LPSHELLFOLDER   pShellFolder;
1129   DWORD           dwUserParam;
1130   LPCITEMIDLIST   pidl;
1131   DWORD           v3;        /* always 0 */
1132   SHELLVIEWPROC   pCallBack;
1133   DWORD           viewmode;  /* NF_* enum */
1134 } SHELLVIEWDATA, * LPSHELLVIEWDATA;
1135
1136 /*
1137  The shell keeps track of some per-user state to handle display
1138  options that is of majorinterest to ISVs.
1139  The key one requested right now is "DoubleClickInWebView".
1140 */
1141 typedef struct 
1142 {   BOOL32 fShowAllObjects : 1;
1143     BOOL32 fShowExtensions : 1;
1144     BOOL32 fNoConfirmRecycle : 1;
1145     BOOL32 fShowSysFiles : 1;
1146     BOOL32 fShowCompColor : 1;
1147     BOOL32 fDoubleClickInWebView : 1;
1148     BOOL32 fDesktopHTML : 1;
1149     BOOL32 fWin95Classic : 1;
1150     BOOL32 fDontPrettyPath : 1;
1151     BOOL32 fShowAttribCol : 1;
1152     BOOL32 fMapNetDrvBtn : 1;
1153     BOOL32 fShowInfoTip : 1;
1154     BOOL32 fHideIcons : 1;
1155     UINT32 fRestFlags : 3;
1156 } SHELLFLAGSTATE, * LPSHELLFLAGSTATE;
1157
1158
1159 DWORD WINAPI SHGetMalloc(LPMALLOC32 *lpmal) ;
1160
1161 #undef PURE
1162 #undef FAR
1163 #undef THIS
1164 #undef THIS_
1165 #undef STDMETHOD
1166 #undef STDMETHOD_
1167
1168 #endif /* __WINE_SHLOBJ_H */