Release 980822
[wine/multimedia.git] / include / shlobj.h
blob4a900ac4c20ff2f8b84eb53af24680e6dbb85f12
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,
20 /****************************************************************************
21 * DllGetClassObject
23 DWORD WINAPI SHELL32_DllGetClassObject(LPCLSID,REFIID,LPVOID*);
26 typedef LPVOID LPBC; /* *IBindCtx really */
28 /* foreward declaration of the objects*/
30 typedef struct IContextMenu IContextMenu, *LPCONTEXTMENU;
31 typedef struct IShellExtInit IShellExtInit, *LPSHELLEXTINIT;
32 typedef struct IEnumIDList IEnumIDList, *LPENUMIDLIST;
33 typedef struct tagSHELLFOLDER *LPSHELLFOLDER, IShellFolder;
34 typedef struct tagSHELLVIEW *LPSHELLVIEW, IShellView;
35 typedef struct tagSHELLBROWSER *LPSHELLBROWSER,IShellBrowser;
37 typedef struct IDataObject IDataObject, *LPDATAOBJECT;
38 /****************************************************************************
39 * SHELL ID
41 /* shell32 classids */
42 DEFINE_SHLGUID(CLSID_ShellDesktop, 0x00021400L, 0, 0);
43 DEFINE_SHLGUID(CLSID_ShellLink, 0x00021401L, 0, 0);
44 /* shell32 formatids */
45 DEFINE_SHLGUID(FMTID_Intshcut, 0x000214A0L, 0, 0);
46 DEFINE_SHLGUID(FMTID_InternetSite, 0x000214A1L, 0, 0);
47 /* command group ids */
48 DEFINE_SHLGUID(CGID_Explorer, 0x000214D0L, 0, 0);
49 DEFINE_SHLGUID(CGID_ShellDocView, 0x000214D1L, 0, 0);
51 /* shell32 Interface ids */
52 DEFINE_SHLGUID(IID_INewShortcutHookA, 0x000214E1L, 0, 0);
53 DEFINE_SHLGUID(IID_IShellBrowser, 0x000214E2L, 0, 0);
54 DEFINE_SHLGUID(IID_IShellView, 0x000214E3L, 0, 0);
55 DEFINE_SHLGUID(IID_IContextMenu, 0x000214E4L, 0, 0);
56 DEFINE_SHLGUID(IID_IShellIcon, 0x000214E5L, 0, 0);
57 DEFINE_SHLGUID(IID_IShellFolder, 0x000214E6L, 0, 0);
58 DEFINE_SHLGUID(IID_IShellExtInit, 0x000214E8L, 0, 0);
59 DEFINE_SHLGUID(IID_IShellPropSheetExt, 0x000214E9L, 0, 0);
60 DEFINE_SHLGUID(IID_IExtractIcon, 0x000214EBL, 0, 0);
61 DEFINE_SHLGUID(IID_IShellLink, 0x000214EEL, 0, 0);
62 DEFINE_SHLGUID(IID_IShellCopyHook, 0x000214EFL, 0, 0);
63 DEFINE_SHLGUID(IID_IFileViewer, 0x000214F0L, 0, 0);
64 DEFINE_SHLGUID(IID_ICommDlgBrowser, 0x000214F1L, 0, 0);
65 DEFINE_SHLGUID(IID_IEnumIDList, 0x000214F2L, 0, 0);
66 DEFINE_SHLGUID(IID_IFileViewerSite, 0x000214F3L, 0, 0);
67 DEFINE_SHLGUID(IID_IContextMenu2, 0x000214F4L, 0, 0);
68 DEFINE_SHLGUID(IID_IShellExecuteHookA, 0x000214F5L, 0, 0);
69 DEFINE_SHLGUID(IID_IPropSheetPage, 0x000214F6L, 0, 0);
70 DEFINE_SHLGUID(IID_INewShortcutHookW, 0x000214F7L, 0, 0);
71 DEFINE_SHLGUID(IID_IFileViewerW, 0x000214F8L, 0, 0);
72 DEFINE_SHLGUID(IID_IShellLinkW, 0x000214F9L, 0, 0);
73 DEFINE_SHLGUID(IID_IExtractIconW, 0x000214FAL, 0, 0);
74 DEFINE_SHLGUID(IID_IShellExecuteHookW, 0x000214FBL, 0, 0);
75 DEFINE_SHLGUID(IID_IShellCopyHookW, 0x000214FCL, 0, 0);
77 /****************************************************************************
78 * STRRET
80 #define STRRET_WSTR 0x0000
81 #define STRRET_OFFSET 0x0001
82 #define STRRET_CSTR 0x0002
84 typedef struct _STRRET
85 { UINT32 uType; /* STRRET_xxx */
86 union
87 { LPWSTR pOleStr; /* OLESTR that will be freed */
88 UINT32 uOffset; /* Offset into SHITEMID (ANSI) */
89 char cStr[MAX_PATH]; /* Buffer to fill in */
90 }u;
91 } STRRET,*LPSTRRET;
93 /****************************************************************************
94 * INTERNAL CLASS: PIDL-Manager
95 * Source: HOWTO extend the explorer namespace
96 * ftp.microsoft.com/ ... softlib ... regview.exe
98 #define THIS LPPIDLMGR this
99 typedef enum tagPIDLTYPE
100 { PT_DESKTOP = 0x00000000,
101 PT_MYCOMP = 0x00000001,
102 PT_CONTROL = 0x00000002,
103 PT_RECYCLER =0x00000004,
104 PT_DRIVE = 0x00000008,
105 PT_FOLDER = 0x00000010,
106 PT_VALUE = 0x00000020,
107 PT_TEXT = PT_FOLDER | PT_VALUE
108 } PIDLTYPE;
110 typedef struct tagPIDLDATA
111 { PIDLTYPE type;
112 CHAR szText[1];
113 } PIDLDATA, FAR *LPPIDLDATA;
115 typedef struct pidlmgr pidlmgr,*LPPIDLMGR;
116 typedef struct PidlMgr_VTable
117 { STDMETHOD_(LPITEMIDLIST, CreateDesktop) (THIS);
118 STDMETHOD_(LPITEMIDLIST, CreateMyComputer) (THIS);
119 STDMETHOD_(LPITEMIDLIST, CreateDrive) (THIS_ LPCSTR);
120 STDMETHOD_(LPITEMIDLIST, CreateFolder) (THIS_ LPCSTR);
121 STDMETHOD_(LPITEMIDLIST, CreateValue) (THIS_ LPCSTR);
123 STDMETHOD_(BOOL32, GetDesktop) (THIS_ LPCITEMIDLIST, LPSTR);
124 STDMETHOD_(BOOL32, GetDrive) (THIS_ LPCITEMIDLIST, LPSTR, UINT16);
125 STDMETHOD_(LPITEMIDLIST, GetLastItem) (THIS_ LPCITEMIDLIST);
126 STDMETHOD_(DWORD, GetItemText) (THIS_ LPCITEMIDLIST, LPSTR, UINT16);
128 STDMETHOD_(BOOL32, IsDesktop) (THIS_ LPCITEMIDLIST);
129 STDMETHOD_(BOOL32, IsMyComputer) (THIS_ LPCITEMIDLIST);
130 STDMETHOD_(BOOL32, IsDrive) (THIS_ LPCITEMIDLIST);
131 STDMETHOD_(BOOL32, IsFolder) (THIS_ LPCITEMIDLIST);
132 STDMETHOD_(BOOL32, IsValue) (THIS_ LPCITEMIDLIST);
134 STDMETHOD_(BOOL32, HasFolders) (THIS_ LPSTR, LPCITEMIDLIST);
135 STDMETHOD_(DWORD, GetFolderText) (THIS_ LPCITEMIDLIST, LPSTR, DWORD);
136 STDMETHOD_(DWORD, GetValueText) (THIS_ LPCITEMIDLIST, LPSTR, DWORD);
137 STDMETHOD_(BOOL32, GetValueType) (THIS_ LPCITEMIDLIST, LPCITEMIDLIST, LPDWORD);
138 STDMETHOD_(DWORD, GetDataText) (THIS_ LPCITEMIDLIST, LPCITEMIDLIST, LPSTR, DWORD);
139 STDMETHOD_(DWORD, GetPidlPath) (THIS_ LPCITEMIDLIST, LPSTR, DWORD);
140 STDMETHOD_(LPITEMIDLIST, Create) (THIS_ PIDLTYPE, LPVOID, UINT16);
141 STDMETHOD_(DWORD, GetData) (THIS_ PIDLTYPE, LPCITEMIDLIST, LPVOID, UINT16);
142 STDMETHOD_(LPPIDLDATA, GetDataPointer) (THIS_ LPCITEMIDLIST);
143 STDMETHOD_(BOOL32, SeparatePathAndValue) (THIS_ LPCITEMIDLIST, LPITEMIDLIST*, LPITEMIDLIST*);
145 } *LPPIDLMGR_VTABLE,PidlMgr_VTable;
147 struct pidlmgr
148 { LPPIDLMGR_VTABLE lpvtbl;
151 #ifdef __WINE__
152 extern LPPIDLMGR PidlMgr_Constructor();
153 extern void PidlMgr_Destructor(THIS);
154 #endif
156 #undef THIS
157 /*****************************************************************************
158 * IContextMenu interface
160 #define THIS LPCONTEXTMENU this
162 /* QueryContextMenu uFlags */
163 #define CMF_NORMAL 0x00000000
164 #define CMF_DEFAULTONLY 0x00000001
165 #define CMF_VERBSONLY 0x00000002
166 #define CMF_EXPLORE 0x00000004
167 #define CMF_NOVERBS 0x00000008
168 #define CMF_CANRENAME 0x00000010
169 #define CMF_NODEFAULT 0x00000020
170 #define CMF_INCLUDESTATIC 0x00000040
171 #define CMF_RESERVED 0xffff0000 // View specific
173 /* GetCommandString uFlags */
174 #define GCS_VERBA 0x00000000 // canonical verb
175 #define GCS_HELPTEXTA 0x00000001 // help text (for status bar)
176 #define GCS_VALIDATEA 0x00000002 // validate command exists
177 #define GCS_VERBW 0x00000004 // canonical verb (unicode)
178 #define GCS_HELPTEXTW 0x00000005 // help text (unicode version)
179 #define GCS_VALIDATEW 0x00000006 // validate command exists (unicode)
180 #define GCS_UNICODE 0x00000004 // for bit testing - Unicode string
182 #define GCS_VERB GCS_VERBA
183 #define GCS_HELPTEXT GCS_HELPTEXTA
184 #define GCS_VALIDATE GCS_VALIDATEA
186 #define CMDSTR_NEWFOLDERA "NewFolder"
187 #define CMDSTR_VIEWLISTA "ViewList"
188 #define CMDSTR_VIEWDETAILSA "ViewDetails"
189 #define CMDSTR_NEWFOLDERW L"NewFolder"
190 #define CMDSTR_VIEWLISTW L"ViewList"
191 #define CMDSTR_VIEWDETAILSW L"ViewDetails"
193 #define CMDSTR_NEWFOLDER CMDSTR_NEWFOLDERA
194 #define CMDSTR_VIEWLIST CMDSTR_VIEWLISTA
195 #define CMDSTR_VIEWDETAILS CMDSTR_VIEWDETAILSA
197 #define CMIC_MASK_HOTKEY SEE_MASK_HOTKEY
198 #define CMIC_MASK_ICON SEE_MASK_ICON
199 #define CMIC_MASK_FLAG_NO_UI SEE_MASK_FLAG_NO_UI
200 #define CMIC_MASK_UNICODE SEE_MASK_UNICODE
201 #define CMIC_MASK_NO_CONSOLE SEE_MASK_NO_CONSOLE
202 #define CMIC_MASK_HASLINKNAME SEE_MASK_HASLINKNAME
203 #define CMIC_MASK_FLAG_SEP_VDM SEE_MASK_FLAG_SEPVDM
204 #define CMIC_MASK_HASTITLE SEE_MASK_HASTITLE
205 #define CMIC_MASK_ASYNCOK SEE_MASK_ASYNCOK
207 #define CMIC_MASK_PTINVOKE 0x20000000
209 /*NOTE: When SEE_MASK_HMONITOR is set, hIcon is treated as hMonitor */
210 typedef struct _CMINVOKECOMMANDINFO
211 { DWORD cbSize; // sizeof(CMINVOKECOMMANDINFO)
212 DWORD fMask; // any combination of CMIC_MASK_*
213 HWND32 hwnd; // might be NULL (indicating no owner window)
214 LPCSTR lpVerb; // either a string or MAKEINTRESOURCE(idOffset)
215 LPCSTR lpParameters; // might be NULL (indicating no parameter)
216 LPCSTR lpDirectory; // might be NULL (indicating no specific directory)
217 int nShow; // one of SW_ values for ShowWindow() API
219 DWORD dwHotKey;
220 HANDLE32 hIcon;
221 } CMINVOKECOMMANDINFO, *LPCMINVOKECOMMANDINFO;
223 typedef struct _CMInvokeCommandInfoEx
224 { DWORD cbSize; // must be sizeof(CMINVOKECOMMANDINFOEX)
225 DWORD fMask; // any combination of CMIC_MASK_*
226 HWND32 hwnd; // might be NULL (indicating no owner window)
227 LPCSTR lpVerb; // either a string or MAKEINTRESOURCE(idOffset)
228 LPCSTR lpParameters; // might be NULL (indicating no parameter)
229 LPCSTR lpDirectory; // might be NULL (indicating no specific directory)
230 int nShow; // one of SW_ values for ShowWindow() API
232 DWORD dwHotKey;
234 HANDLE32 hIcon;
235 LPCSTR lpTitle; // For CreateProcess-StartupInfo.lpTitle
236 LPCWSTR lpVerbW; // Unicode verb (for those who can use it)
237 LPCWSTR lpParametersW; // Unicode parameters (for those who can use it)
238 LPCWSTR lpDirectoryW; // Unicode directory (for those who can use it)
239 LPCWSTR lpTitleW; // Unicode title (for those who can use it)
240 POINT32 ptInvoke; // Point where it's invoked
242 } CMINVOKECOMMANDINFOEX, *LPCMINVOKECOMMANDINFOEX;
245 typedef struct IContextMenu_VTable
246 { // *** IUnknown methods ***
247 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
248 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
249 STDMETHOD_(ULONG,Release) (THIS) PURE;
251 STDMETHOD(QueryContextMenu)(THIS_ HMENU32 hmenu,UINT32 indexMenu,UINT32 idCmdFirst, UINT32 idCmdLast,UINT32 uFlags) PURE;
252 STDMETHOD(InvokeCommand)(THIS_ LPCMINVOKECOMMANDINFO lpici) PURE;
253 STDMETHOD(GetCommandString)(THIS_ UINT32 idCmd,UINT32 uType,UINT32 * pwReserved,LPSTR pszName,UINT32 cchMax) PURE;
254 } IContextMenu_VTable,*LPCONTEXTMENU_VTABLE;
256 struct IContextMenu
257 { LPCONTEXTMENU_VTABLE lpvtbl;
258 DWORD ref;
259 LPSHELLFOLDER pSFParent;
260 LPITEMIDLIST *aPidls;
261 LPPIDLMGR pPidlMgr;
262 BOOL32 bAllValues;
265 #undef THIS
266 /*****************************************************************************
267 * IShellExtInit interface
269 #define THIS LPSHELLEXTINIT this
271 typedef struct IShellExtInit_VTable
272 { // *** IUnknown methods ***
273 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
274 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
275 STDMETHOD_(ULONG,Release) (THIS) PURE;
277 // *** IShellExtInit methods ***
278 STDMETHOD(Initialize)(THIS_ LPCITEMIDLIST pidlFolder, LPDATAOBJECT lpdobj, HKEY hkeyProgID) PURE;
279 } IShellExtInit_VTable,*LPSHELLEXTINIT_VTABLE;
281 struct IShellExtInit
282 { LPSHELLEXTINIT_VTABLE lpvtbl;
283 DWORD ref;
286 #undef THIS
288 /*****************************************************************************
289 * IEnumIDList interface
291 #define THIS LPENUMIDLIST this
293 typedef struct tagENUMLIST
294 { struct tagENUMLIST *pNext;
295 LPITEMIDLIST pidl;
296 } ENUMLIST, *LPENUMLIST;
298 typedef struct IEnumIDList_VTable
299 { /* *** IUnknown methods *** */
300 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
301 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
302 STDMETHOD_(ULONG,Release) (THIS) PURE;
304 /* *** IEnumIDList methods *** */
305 STDMETHOD(Next) (THIS_ ULONG celt,
306 LPITEMIDLIST *rgelt,
307 ULONG *pceltFetched) PURE;
308 STDMETHOD(Skip) (THIS_ ULONG celt) PURE;
309 STDMETHOD(Reset) (THIS) PURE;
310 STDMETHOD(Clone) (THIS_ IEnumIDList **ppenum) PURE;
311 /* *** private methods *** */
312 STDMETHOD_(BOOL32,CreateEnumList)(THIS_ LPCSTR, DWORD) PURE;
313 STDMETHOD_(BOOL32,AddToEnumList)(THIS_ LPITEMIDLIST) PURE;
314 STDMETHOD_(BOOL32,DeleteList)(THIS) PURE;
317 } IEnumIDList_VTable,*LPENUMIDLIST_VTABLE;
319 struct IEnumIDList
320 { LPENUMIDLIST_VTABLE lpvtbl;
321 DWORD ref;
322 LPPIDLMGR mpPidlMgr;
323 LPENUMLIST mpFirst;
324 LPENUMLIST mpLast;
325 LPENUMLIST mpCurrent;
328 #undef THIS
329 //--------------------------------------------------------------------------
331 // FOLDERSETTINGS
333 // FOLDERSETTINGS is a data structure that explorer passes from one folder
334 // view to another, when the user is browsing. It calls ISV::GetCurrentInfo
335 // member to get the current settings and pass it to ISV::CreateViewWindow
336 // to allow the next folder view "inherit" it. These settings assumes a
337 // particular UI (which the shell's folder view has), and shell extensions
338 // may or may not use those settings.
340 //--------------------------------------------------------------------------
342 typedef LPBYTE LPVIEWSETTINGS;
344 // NB Bitfields.
345 // FWF_DESKTOP implies FWF_TRANSPARENT/NOCLIENTEDGE/NOSCROLL
346 typedef enum
347 { FWF_AUTOARRANGE = 0x0001,
348 FWF_ABBREVIATEDNAMES = 0x0002,
349 FWF_SNAPTOGRID = 0x0004,
350 FWF_OWNERDATA = 0x0008,
351 FWF_BESTFITWINDOW = 0x0010,
352 FWF_DESKTOP = 0x0020,
353 FWF_SINGLESEL = 0x0040,
354 FWF_NOSUBFOLDERS = 0x0080,
355 FWF_TRANSPARENT = 0x0100,
356 FWF_NOCLIENTEDGE = 0x0200,
357 FWF_NOSCROLL = 0x0400,
358 FWF_ALIGNLEFT = 0x0800,
359 FWF_SINGLECLICKACTIVATE=0x8000 // TEMPORARY -- NO UI FOR THIS
360 } FOLDERFLAGS;
362 typedef enum
363 { FVM_ICON = 1,
364 FVM_SMALLICON = 2,
365 FVM_LIST = 3,
366 FVM_DETAILS = 4,
367 } FOLDERVIEWMODE;
369 typedef struct
370 { UINT32 ViewMode; // View mode (FOLDERVIEWMODE values)
371 UINT32 fFlags; // View options (FOLDERFLAGS bits)
372 } FOLDERSETTINGS, *LPFOLDERSETTINGS;
374 typedef const FOLDERSETTINGS * LPCFOLDERSETTINGS;
376 /* FIXME; the next two lines are propersheet related, move to prsht.h when created */
377 struct _PSP;
378 typedef struct _PSP FAR* HPROPSHEETPAGE;
380 typedef BOOL32 (CALLBACK FAR * LPFNADDPROPSHEETPAGE)(HPROPSHEETPAGE, LPARAM);
381 typedef BOOL32 (CALLBACK FAR * LPFNADDPROPSHEETPAGES)(LPVOID, LPFNADDPROPSHEETPAGE,LPARAM);
383 /************************************************************************
384 * IShellFolder interface
387 #define THIS LPSHELLFOLDER this
389 /* IShellFolder::GetDisplayNameOf/SetNameOf uFlags */
390 typedef enum
391 { SHGDN_NORMAL = 0, /* default (display purpose) */
392 SHGDN_INFOLDER = 1, /* displayed under a folder (relative)*/
393 SHGDN_FORPARSING = 0x8000 /* for ParseDisplayName or path */
394 } SHGNO;
396 /* IShellFolder::EnumObjects */
397 typedef enum tagSHCONTF
398 { SHCONTF_FOLDERS = 32, /* for shell browser */
399 SHCONTF_NONFOLDERS = 64, /* for default view */
400 SHCONTF_INCLUDEHIDDEN = 128 /* for hidden/system objects */
401 } SHCONTF;
403 /* from oleidl.h */
404 #define DROPEFFECT_NONE 0
405 #define DROPEFFECT_COPY 1
406 #define DROPEFFECT_MOVE 2
407 #define DROPEFFECT_LINK 4
408 #define DROPEFFECT_SCROLL 0x80000000
410 /* IShellFolder::GetAttributesOf flags */
411 #define SFGAO_CANCOPY DROPEFFECT_COPY /* Objects can be copied */
412 #define SFGAO_CANMOVE DROPEFFECT_MOVE /* Objects can be moved */
413 #define SFGAO_CANLINK DROPEFFECT_LINK /* Objects can be linked */
414 #define SFGAO_CANRENAME 0x00000010L /* Objects can be renamed */
415 #define SFGAO_CANDELETE 0x00000020L /* Objects can be deleted */
416 #define SFGAO_HASPROPSHEET 0x00000040L /* Objects have property sheets */
417 #define SFGAO_DROPTARGET 0x00000100L /* Objects are drop target */
418 #define SFGAO_CAPABILITYMASK 0x00000177L
419 #define SFGAO_LINK 0x00010000L /* Shortcut (link) */
420 #define SFGAO_SHARE 0x00020000L /* shared */
421 #define SFGAO_READONLY 0x00040000L /* read-only */
422 #define SFGAO_GHOSTED 0x00080000L /* ghosted icon */
423 #define SFGAO_DISPLAYATTRMASK 0x000F0000L
424 #define SFGAO_FILESYSANCESTOR 0x10000000L /* It contains file system folder */
425 #define SFGAO_FOLDER 0x20000000L /* It's a folder. */
426 #define SFGAO_FILESYSTEM 0x40000000L /* is a file system thing (file/folder/root) */
427 #define SFGAO_HASSUBFOLDER 0x80000000L /* Expandable in the map pane */
428 #define SFGAO_CONTENTSMASK 0x80000000L
429 #define SFGAO_VALIDATE 0x01000000L /* invalidate cached information */
430 #define SFGAO_REMOVABLE 0x02000000L /* is this removeable media? */
432 typedef struct IShellFolder_VTable {
433 /* *** IUnknown methods *** */
434 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
435 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
436 STDMETHOD_(ULONG,Release) (THIS) PURE;
438 /* *** IShellFolder methods *** */
439 STDMETHOD(ParseDisplayName) (THIS_ HWND32 hwndOwner,LPBC pbcReserved, LPOLESTR32 lpszDisplayName,ULONG * pchEaten, LPITEMIDLIST * ppidl, ULONG *pdwAttributes) PURE;
440 STDMETHOD(EnumObjects)( THIS_ HWND32 hwndOwner, DWORD grfFlags, LPENUMIDLIST * ppenumIDList) PURE;
441 STDMETHOD(BindToObject)(THIS_ LPCITEMIDLIST pidl, LPBC pbcReserved,REFIID riid, LPVOID * ppvOut) PURE;
442 STDMETHOD(BindToStorage)(THIS_ LPCITEMIDLIST pidl, LPBC pbcReserved,REFIID riid, LPVOID * ppvObj) PURE;
443 STDMETHOD(CompareIDs)(THIS_ LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE;
444 STDMETHOD(CreateViewObject)(THIS_ HWND32 hwndOwner, REFIID riid, LPVOID * ppvOut) PURE;
445 STDMETHOD(GetAttributesOf)(THIS_ UINT32 cidl, LPCITEMIDLIST * apidl,ULONG * rgfInOut) PURE;
446 STDMETHOD(GetUIObjectOf)(THIS_ HWND32 hwndOwner, UINT32 cidl, LPCITEMIDLIST * apidl,REFIID riid, UINT32 * prgfInOut, LPVOID * ppvOut) PURE;
447 STDMETHOD(GetDisplayNameOf)(THIS_ LPCITEMIDLIST pidl, DWORD uFlags, LPSTRRET lpName) PURE;
448 STDMETHOD(SetNameOf)(THIS_ HWND32 hwndOwner, LPCITEMIDLIST pidl,LPCOLESTR32 lpszName, DWORD uFlags,LPITEMIDLIST * ppidlOut) PURE;
450 /* utility functions */
451 STDMETHOD_(BOOL32,GetFolderPath)(THIS_ LPSTR, DWORD);
453 } *LPSHELLFOLDER_VTABLE,IShellFolder_VTable;
455 struct tagSHELLFOLDER {
456 LPSHELLFOLDER_VTABLE lpvtbl;
457 DWORD ref;
458 LPSTR mlpszFolder;
459 LPPIDLMGR pPidlMgr;
460 LPITEMIDLIST mpidl;
461 LPITEMIDLIST mpidlNSRoot;
462 LPSHELLFOLDER mpSFParent;
465 extern LPSHELLFOLDER pdesktopfolder;
466 #undef THIS
468 /************************************************************************
469 * IShellBrowser Inteface
471 #define THIS LPSHELLBROWSER this
473 #define FCW_STATUS 0x0001
474 #define FCW_TOOLBAR 0x0002
475 #define FCW_TREE 0x0003
476 #define FCW_INTERNETBAR 0x0006
477 #define FCW_PROGRESS 0x0008
479 typedef struct IShellBrowser_VTable
480 { // *** IUnknown methods ***
481 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
482 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
483 STDMETHOD_(ULONG,Release) (THIS) PURE;
485 // *** IOleWindow methods ***
486 STDMETHOD(GetWindow) (THIS_ HWND32 * lphwnd) PURE;
487 STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL32 fEnterMode) PURE;
489 // *** IShellBrowser methods *** (same as IOleInPlaceFrame)
490 STDMETHOD(InsertMenusSB) (THIS_ HMENU32 hmenuShared, LPOLEMENUGROUPWIDTHS32 lpMenuWidths) PURE;
491 STDMETHOD(SetMenuSB) (THIS_ HMENU32 hmenuShared, HOLEMENU32 holemenuReserved, HWND32 hwndActiveObject) PURE;
492 STDMETHOD(RemoveMenusSB) (THIS_ HMENU32 hmenuShared) PURE;
493 STDMETHOD(SetStatusTextSB) (THIS_ LPCOLESTR32 lpszStatusText) PURE;
494 STDMETHOD(EnableModelessSB) (THIS_ BOOL32 fEnable) PURE;
495 STDMETHOD(TranslateAcceleratorSB) (THIS_ LPMSG32 lpmsg, WORD wID) PURE;
497 // *** IShellBrowser methods ***
498 STDMETHOD(BrowseObject)(THIS_ LPCITEMIDLIST pidl, UINT32 wFlags) PURE;
499 STDMETHOD(GetViewStateStream)(THIS_ DWORD grfMode, LPSTREAM32 *ppStrm) PURE;
500 STDMETHOD(GetControlWindow)(THIS_ UINT32 id, HWND32 * lphwnd) PURE;
501 STDMETHOD(SendControlMsg)(THIS_ UINT32 id, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam, LRESULT * pret) PURE;
502 STDMETHOD(QueryActiveShellView)(THIS_ IShellView ** ppshv) PURE;
503 STDMETHOD(OnViewWindowActive)(THIS_ IShellView * ppshv) PURE;
504 STDMETHOD(SetToolbarItems)(THIS_ LPTBBUTTON lpButtons, UINT32 nButtons, UINT32 uFlags) PURE;
505 } *LPSHELLBROWSER_VTABLE,IShellBrowser_VTable;;
507 struct tagSHELLBROWSER
508 { LPSHELLBROWSER_VTABLE lpvtbl;
509 DWORD ref;
512 #undef THIS
514 /************************************************************************
515 * IShellView Inteface
517 #define THIS LPSHELLVIEW this
519 /* shellview select item flags*/
520 #define SVSI_DESELECT 0x0000
521 #define SVSI_SELECT 0x0001
522 #define SVSI_EDIT 0x0003 // includes select
523 #define SVSI_DESELECTOTHERS 0x0004
524 #define SVSI_ENSUREVISIBLE 0x0008
525 #define SVSI_FOCUSED 0x0010
527 /* shellview get item object flags */
528 #define SVGIO_BACKGROUND 0x00000000
529 #define SVGIO_SELECTION 0x00000001
530 #define SVGIO_ALLVIEW 0x00000002
532 /* The explorer dispatches WM_COMMAND messages based on the range of
533 command/menuitem IDs. All the IDs of menuitems that the view (right
534 pane) inserts must be in FCIDM_SHVIEWFIRST/LAST (otherwise, the explorer
535 won't dispatch them). The view should not deal with any menuitems
536 in FCIDM_BROWSERFIRST/LAST (otherwise, it won't work with the future
537 version of the shell).
539 FCIDM_SHVIEWFIRST/LAST for the right pane (IShellView)
540 FCIDM_BROWSERFIRST/LAST for the explorer frame (IShellBrowser)
541 FCIDM_GLOBAL/LAST for the explorer's submenu IDs
543 #define FCIDM_SHVIEWFIRST 0x0000
544 #define FCIDM_SHVIEWLAST 0x7fff
545 #define FCIDM_BROWSERFIRST 0xa000
546 #define FCIDM_BROWSERLAST 0xbf00
547 #define FCIDM_GLOBALFIRST 0x8000
548 #define FCIDM_GLOBALLAST 0x9fff
551 * Global submenu IDs and separator IDs
553 #define FCIDM_MENU_FILE (FCIDM_GLOBALFIRST+0x0000)
554 #define FCIDM_MENU_EDIT (FCIDM_GLOBALFIRST+0x0040)
555 #define FCIDM_MENU_VIEW (FCIDM_GLOBALFIRST+0x0080)
556 #define FCIDM_MENU_VIEW_SEP_OPTIONS (FCIDM_GLOBALFIRST+0x0081)
557 #define FCIDM_MENU_TOOLS (FCIDM_GLOBALFIRST+0x00c0)
558 #define FCIDM_MENU_TOOLS_SEP_GOTO (FCIDM_GLOBALFIRST+0x00c1)
559 #define FCIDM_MENU_HELP (FCIDM_GLOBALFIRST+0x0100)
560 #define FCIDM_MENU_FIND (FCIDM_GLOBALFIRST+0x0140)
561 #define FCIDM_MENU_EXPLORE (FCIDM_GLOBALFIRST+0x0150)
562 #define FCIDM_MENU_FAVORITES (FCIDM_GLOBALFIRST+0x0170)
564 /* control IDs known to the view */
565 #define FCIDM_TOOLBAR (FCIDM_BROWSERFIRST + 0)
566 #define FCIDM_STATUS (FCIDM_BROWSERFIRST + 1)
568 /* uState values for IShellView::UIActivate */
569 typedef enum
570 { SVUIA_DEACTIVATE = 0,
571 SVUIA_ACTIVATE_NOFOCUS = 1,
572 SVUIA_ACTIVATE_FOCUS = 2,
573 SVUIA_INPLACEACTIVATE = 3 // new flag for IShellView2
574 } SVUIA_STATUS;
578 typedef struct IShellView_VTable
579 { // *** IUnknown methods ***
580 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
581 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
582 STDMETHOD_(ULONG,Release) (THIS) PURE;
584 // *** IOleWindow methods ***
585 STDMETHOD(GetWindow) (THIS_ HWND32 * lphwnd) PURE;
586 STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL32 fEnterMode) PURE;
588 // *** IShellView methods ***
589 STDMETHOD(TranslateAccelerator) (THIS_ LPMSG32 lpmsg) PURE;
590 STDMETHOD(EnableModeless) (THIS_ BOOL32 fEnable) PURE;
591 STDMETHOD(UIActivate) (THIS_ UINT32 uState) PURE;
592 STDMETHOD(Refresh) (THIS) PURE;
593 STDMETHOD(CreateViewWindow)(THIS_ IShellView *lpPrevView,LPCFOLDERSETTINGS lpfs, IShellBrowser * psb,RECT32 * prcView, HWND32 *phWnd) PURE;
594 STDMETHOD(DestroyViewWindow)(THIS) PURE;
595 STDMETHOD(GetCurrentInfo)(THIS_ LPFOLDERSETTINGS lpfs) PURE;
596 STDMETHOD(AddPropertySheetPages)(THIS_ DWORD dwReserved,LPFNADDPROPSHEETPAGE lpfn, LPARAM lparam) PURE;
597 STDMETHOD(SaveViewState)(THIS) PURE;
598 STDMETHOD(SelectItem)(THIS_ LPCITEMIDLIST pidlItem, UINT32 uFlags) PURE;
599 STDMETHOD(GetItemObject)(THIS_ UINT32 uItem, REFIID riid,LPVOID *ppv) PURE;
600 } IShellView_VTable,*LPSHELLVIEW_VTABLE;;
602 struct tagSHELLVIEW
603 { LPSHELLVIEW_VTABLE lpvtbl;
604 DWORD ref;
605 LPITEMIDLIST mpidl;
606 LPSHELLFOLDER pSFParent;
607 LPSHELLBROWSER pShellBrowser;
608 HWND32 hWnd;
609 HWND32 hWndList;
610 FOLDERSETTINGS FolderSettings;
611 HWND32 hWndParent;
612 HMENU32 hMenu;
613 UINT32 uState;
616 typedef GUID SHELLVIEWID;
617 #define SV_CLASS_NAME ("ShellViewClass")
619 #undef THIS
621 /****************************************************************************
622 * IShellLink interface
625 #define THIS LPSHELLLINK this
626 /* IShellLink::Resolve fFlags */
627 typedef enum {
628 SLR_NO_UI = 0x0001,
629 SLR_ANY_MATCH = 0x0002,
630 SLR_UPDATE = 0x0004
631 } SLR_FLAGS;
633 /* IShellLink::GetPath fFlags */
634 typedef enum {
635 SLGP_SHORTPATH = 0x0001,
636 SLGP_UNCPRIORITY = 0x0002
637 } SLGP_FLAGS;
641 typedef struct IShellLink IShellLink,*LPSHELLLINK;
642 typedef struct IShellLink_VTable
644 /* *** IUnknown methods *** */
645 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
646 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
647 STDMETHOD_(ULONG,Release) (THIS) PURE;
649 STDMETHOD(GetPath)(THIS_ LPSTR pszFile, INT32 cchMaxPath, WIN32_FIND_DATA32A *pfd, DWORD fFlags) PURE;
651 STDMETHOD(GetIDList)(THIS_ LPITEMIDLIST * ppidl) PURE;
652 STDMETHOD(SetIDList)(THIS_ LPCITEMIDLIST pidl) PURE;
654 STDMETHOD(GetDescription)(THIS_ LPSTR pszName, int cchMaxName) PURE;
655 STDMETHOD(SetDescription)(THIS_ LPCSTR pszName) PURE;
657 STDMETHOD(GetWorkingDirectory)(THIS_ LPSTR pszDir, int cchMaxPath) PURE;
658 STDMETHOD(SetWorkingDirectory)(THIS_ LPCSTR pszDir) PURE;
660 STDMETHOD(GetArguments)(THIS_ LPSTR pszArgs, int cchMaxPath) PURE;
661 STDMETHOD(SetArguments)(THIS_ LPCSTR pszArgs) PURE;
663 STDMETHOD(GetHotkey)(THIS_ WORD *pwHotkey) PURE;
664 STDMETHOD(SetHotkey)(THIS_ WORD wHotkey) PURE;
666 STDMETHOD(GetShowCmd)(THIS_ INT32 *piShowCmd) PURE;
667 STDMETHOD(SetShowCmd)(THIS_ INT32 iShowCmd) PURE;
669 STDMETHOD(GetIconLocation)(THIS_ LPSTR pszIconPath, INT32 cchIconPath, INT32 *piIcon) PURE;
670 STDMETHOD(SetIconLocation)(THIS_ LPCSTR pszIconPath, INT32 iIcon) PURE;
672 STDMETHOD(SetRelativePath)(THIS_ LPCSTR pszPathRel, DWORD dwReserved) PURE;
674 STDMETHOD(Resolve)(THIS_ HWND32 hwnd, DWORD fFlags) PURE;
676 STDMETHOD(SetPath)(THIS_ LPCSTR pszFile) PURE;
677 } IShellLink_VTable,*LPSHELLLINK_VTABLE;
679 struct IShellLink {
680 LPSHELLLINK_VTABLE lpvtbl;
681 DWORD ref;
684 #undef THIS
686 /****************************************************************************
687 * IExtractIcon interface
689 * FIXME
690 * Is the ExtractIconA interface
692 #define THIS LPEXTRACTICON this
694 /* GetIconLocation() input flags*/
695 #define GIL_OPENICON 0x0001 // allows containers to specify an "open" look
696 #define GIL_FORSHELL 0x0002 // icon is to be displayed in a ShellFolder
697 #define GIL_ASYNC 0x0020 // this is an async extract, return E_ASYNC
699 /* GetIconLocation() return flags */
700 #define GIL_SIMULATEDOC 0x0001 // simulate this document icon for this
701 #define GIL_PERINSTANCE 0x0002 // icons from this class are per instance (each file has its own)
702 #define GIL_PERCLASS 0x0004 // icons from this class per class (shared for all files of this type)
703 #define GIL_NOTFILENAME 0x0008 // location is not a filename, must call ::ExtractIcon
704 #define GIL_DONTCACHE 0x0010 // this icon should not be cached
706 typedef struct IExtractIcon IExtractIcon,*LPEXTRACTICON;
707 typedef struct IExtractIcon_VTable
708 { /*** IUnknown methods ***/
709 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
710 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
711 STDMETHOD_(ULONG,Release) (THIS) PURE;
713 /*** IExtractIcon methods ***/
714 STDMETHOD(GetIconLocation)(THIS_ UINT32 uFlags, LPSTR szIconFile, UINT32 cchMax, int * piIndex, UINT32 * pwFlags) PURE;
715 STDMETHOD(Extract)(THIS_ LPCSTR pszFile, UINT32 nIconIndex, HICON32 *phiconLarge, HICON32 *phiconSmall, UINT32 nIconSize) PURE;
716 }IExtractIccon_VTable,*LPEXTRACTICON_VTABLE;
718 struct IExtractIcon
719 { LPEXTRACTICON_VTABLE lpvtbl;
720 DWORD ref;
721 LPITEMIDLIST pidl;
724 #undef THIS
725 /****************************************************************************
726 * IShellIcon interface
729 #define THIS LPSHELLICON this
730 typedef struct IShellIcon IShellIcon,*LPSHELLICON;
731 typedef struct IShellIcon_VTable
732 { /*** IUnknown methods ***/
733 STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
734 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
735 STDMETHOD_(ULONG,Release) (THIS) PURE;
737 /*** IShellIcon methods ***/
738 STDMETHOD(GetIconOf)(THIS_ LPCITEMIDLIST pidl, UINT32 flags, LPINT32 lpIconIndex) PURE;
739 } IShellIcon_VTable,*LPSHELLICON_VTABLE;
741 struct IShellIcon
742 { LPSHELLICON_VTABLE lpvtbl;
743 DWORD ref;
745 #undef THIS
748 /****************************************************************************
749 * Class constructors
751 #ifdef __WINE__
752 extern LPCLASSFACTORY IClassFactory_Constructor();
753 extern LPCONTEXTMENU IContextMenu_Constructor(LPSHELLFOLDER, LPCITEMIDLIST *, UINT32);
754 extern LPSHELLFOLDER IShellFolder_Constructor(LPSHELLFOLDER,LPITEMIDLIST);
755 extern LPSHELLVIEW IShellView_Constructor();
756 extern LPSHELLLINK IShellLink_Constructor();
757 extern LPENUMIDLIST IEnumIDList_Constructor(LPCSTR,DWORD,HRESULT*);
758 extern LPEXTRACTICON IExtractIcon_Constructor(LPITEMIDLIST);
759 #endif
760 /****************************************************************************
761 * Shell Execute API
763 #define SE_ERR_FNF 2 // file not found
764 #define SE_ERR_PNF 3 // path not found
765 #define SE_ERR_ACCESSDENIED 5 // access denied
766 #define SE_ERR_OOM 8 // out of memory
767 #define SE_ERR_DLLNOTFOUND 32
768 #define SE_ERR_SHARE 26
769 #define SE_ERR_ASSOCINCOMPLETE 27
770 #define SE_ERR_DDETIMEOUT 28
771 #define SE_ERR_DDEFAIL 29
772 #define SE_ERR_DDEBUSY 30
773 #define SE_ERR_NOASSOC 31
775 #define SEE_MASK_CLASSNAME 0x00000001
776 #define SEE_MASK_CLASSKEY 0x00000003
777 #define SEE_MASK_IDLIST 0x00000004
778 #define SEE_MASK_INVOKEIDLIST 0x0000000c
779 #define SEE_MASK_ICON 0x00000010
780 #define SEE_MASK_HOTKEY 0x00000020
781 #define SEE_MASK_NOCLOSEPROCESS 0x00000040
782 #define SEE_MASK_CONNECTNETDRV 0x00000080
783 #define SEE_MASK_FLAG_DDEWAIT 0x00000100
784 #define SEE_MASK_DOENVSUBST 0x00000200
785 #define SEE_MASK_FLAG_NO_UI 0x00000400
786 #define SEE_MASK_UNICODE 0x00004000
787 #define SEE_MASK_NO_CONSOLE 0x00008000
788 #define SEE_MASK_ASYNCOK 0x00100000
789 #define SEE_MASK_HMONITOR 0x00200000
791 typedef struct _SHELLEXECUTEINFOA
792 { DWORD cbSize;
793 ULONG fMask;
794 HWND32 hwnd;
795 LPCSTR lpVerb;
796 LPCSTR lpFile;
797 LPCSTR lpParameters;
798 LPCSTR lpDirectory;
799 int nShow;
800 HINSTANCE32 hInstApp;
801 /* Optional fields */
802 LPVOID lpIDList;
803 LPCSTR lpClass;
804 HKEY hkeyClass;
805 DWORD dwHotKey;
806 union
807 { HANDLE32 hIcon;
808 HANDLE32 hMonitor;
809 } u;
810 HANDLE32 hProcess;
811 } SHELLEXECUTEINFOA, *LPSHELLEXECUTEINFOA;
813 typedef struct _SHELLEXECUTEINFOW
814 { DWORD cbSize;
815 ULONG fMask;
816 HWND32 hwnd;
817 LPCWSTR lpVerb;
818 LPCWSTR lpFile;
819 LPCWSTR lpParameters;
820 LPCWSTR lpDirectory;
821 int nShow;
822 HINSTANCE32 hInstApp;
823 /* Optional fields*/
824 LPVOID lpIDList;
825 LPCWSTR lpClass;
826 HKEY hkeyClass;
827 DWORD dwHotKey;
828 union
829 { HANDLE32 hIcon;
830 HANDLE32 hMonitor;
831 } u;
832 HANDLE32 hProcess;
833 } SHELLEXECUTEINFOW, *LPSHELLEXECUTEINFOW;
835 DECL_WINELIB_TYPE_AW(SHELLEXECUTEINFO)
837 typedef SHELLEXECUTEINFOA SHELLEXECUTEINFO;
838 typedef LPSHELLEXECUTEINFOA LPSHELLEXECUTEINFO;
840 BOOL32 WINAPI ShellExecuteEx32A(LPSHELLEXECUTEINFOA lpExecInfo);
841 BOOL32 WINAPI ShellExecuteEx32W(LPSHELLEXECUTEINFOW lpExecInfo);
842 #define ShellExecuteEx WINELIB_NAME_AW(ShellExecuteEx)
844 void WINAPI WinExecErrorA(HWND32 hwnd, int error, LPCSTR lpstrFileName, LPCSTR lpstrTitle);
845 void WINAPI WinExecErrorW(HWND32 hwnd, int error, LPCWSTR lpstrFileName, LPCWSTR lpstrTitle);
846 #define WinExecError WINELIB_NAME_AW(WinExecError)
850 /****************************************************************************
851 * SHBrowseForFolder API
853 typedef int (CALLBACK* BFFCALLBACK)(HWND32 hwnd, UINT32 uMsg, LPARAM lParam, LPARAM lpData);
855 typedef struct tagBROWSEINFO32A {
856 HWND32 hwndOwner;
857 LPCITEMIDLIST pidlRoot;
858 LPSTR pszDisplayName;
859 LPCSTR lpszTitle;
860 UINT32 ulFlags;
861 BFFCALLBACK lpfn;
862 LPARAM lParam;
863 int iImage;
864 } BROWSEINFO32A, *PBROWSEINFO32A, *LPBROWSEINFO32A;
866 typedef struct tagBROWSEINFO32W {
867 HWND32 hwndOwner;
868 LPCITEMIDLIST pidlRoot;
869 LPWSTR pszDisplayName;
870 LPCWSTR lpszTitle;
871 UINT32 ulFlags;
872 BFFCALLBACK lpfn;
873 LPARAM lParam;
874 int iImage;
875 } BROWSEINFO32W, *PBROWSEINFO32W, *LPBROWSEINFO32W;
877 #define BROWSEINFO WINELIB_NAME_AW(BROWSEINFO)
878 #define PBROWSEINFO WINELIB_NAME_AW(PBROWSEINFO)
879 #define LPBROWSEINFO WINELIB_NAME_AW(LPBROWSEINFO)
881 // Browsing for directory.
882 #define BIF_RETURNONLYFSDIRS 0x0001
883 #define BIF_DONTGOBELOWDOMAIN 0x0002
884 #define BIF_STATUSTEXT 0x0004
885 #define BIF_RETURNFSANCESTORS 0x0008
886 #define BIF_EDITBOX 0x0010
887 #define BIF_VALIDATE 0x0020
889 #define BIF_BROWSEFORCOMPUTER 0x1000
890 #define BIF_BROWSEFORPRINTER 0x2000
891 #define BIF_BROWSEINCLUDEFILES 0x4000
893 // message from browser
894 #define BFFM_INITIALIZED 1
895 #define BFFM_SELCHANGED 2
896 #define BFFM_VALIDATEFAILEDA 3 // lParam:szPath ret:1(cont),0(EndDialog)
897 #define BFFM_VALIDATEFAILEDW 4 // lParam:wzPath ret:1(cont),0(EndDialog)
899 // messages to browser
900 #define BFFM_SETSTATUSTEXTA (WM_USER+100)
901 #define BFFM_ENABLEOK (WM_USER+101)
902 #define BFFM_SETSELECTIONA (WM_USER+102)
903 #define BFFM_SETSELECTIONW (WM_USER+103)
904 #define BFFM_SETSTATUSTEXTW (WM_USER+104)
907 #ifdef UNICODE
908 #define SHBrowseForFolder SHBrowseForFolderW
909 #define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTW
910 #define BFFM_SETSELECTION BFFM_SETSELECTIONW
912 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDW
913 #else
914 #define SHBrowseForFolder SHBrowseForFolderA
915 #define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTA
916 #define BFFM_SETSELECTION BFFM_SETSELECTIONA
918 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDA
919 #endif
922 LPITEMIDLIST WINAPI SHBrowseForFolder32A(LPBROWSEINFO32A lpbi);
923 /*LPITEMIDLIST WINAPI SHBrowseForFolder32W(LPBROWSEINFO32W lpbi);*/
924 #define SHBrowseForFolder WINELIB_NAME_AW(SHBrowseForFolder)
926 /****************************************************************************
927 * shlview structures
931 * IShellFolderViewCallback Callback
932 * This "callback" is called by the shells default IShellView implementation (that
933 * we got using SHCreateShellViewEx()), to notify us of the various things that
934 * are happening to the shellview (and ask for things too).
936 * You don't have to support anything here - anything you don't want to
937 * handle, the shell will do itself if you just return E_NOTIMPL. This parameters
938 * that the shell passes to this function are entirely undocumented.
940 * HOWEVER, as the cabview sample as originally written used this callback, the
941 * writers implemented the callback mechanism on top of their own IShellView.
942 * Look there for some clues on what to do here.
945 typedef HRESULT(CALLBACK *SHELLVIEWPROC)(DWORD dwUserParam,LPSHELLFOLDER psf,
946 HWND32 hwnd,UINT32 uMsg,UINT32 wParam,LPARAM lParam);
948 /* NF valid values for the "viewmode" item of the SHELLTEMPLATE*/
949 #define NF_INHERITVIEW 0x0000
950 #define NF_LOCALVIEW 0x0001
952 typedef struct _SHELLVIEWDATA // idl
953 { DWORD dwSize;
954 LPSHELLFOLDER pShellFolder;
955 DWORD dwUserParam;
956 LPCITEMIDLIST pidl;
957 DWORD v3; // always 0
958 SHELLVIEWPROC pCallBack;
959 DWORD viewmode; // NF_* enum
960 } SHELLVIEWDATA, * LPSHELLVIEWDATA;
963 The shell keeps track of some per-user state to handle display
964 options that is of major interest to ISVs.
965 The key one requested right now is "DoubleClickInWebView".
967 typedef struct
968 { BOOL32 fShowAllObjects : 1;
969 BOOL32 fShowExtensions : 1;
970 BOOL32 fNoConfirmRecycle : 1;
971 BOOL32 fShowSysFiles : 1;
972 BOOL32 fShowCompColor : 1;
973 BOOL32 fDoubleClickInWebView : 1;
974 BOOL32 fDesktopHTML : 1;
975 BOOL32 fWin95Classic : 1;
976 BOOL32 fDontPrettyPath : 1;
977 BOOL32 fShowAttribCol : 1;
978 BOOL32 fMapNetDrvBtn : 1;
979 BOOL32 fShowInfoTip : 1;
980 BOOL32 fHideIcons : 1;
981 UINT32 fRestFlags : 3;
982 } SHELLFLAGSTATE, * LPSHELLFLAGSTATE;
985 #undef PURE
986 #undef FAR
987 #undef THIS
988 #undef THIS_
989 #undef STDMETHOD
990 #undef STDMETHOD_
991 #endif /*_WINE_SHLOBJ_H*/