1 #ifndef __WINE_SHLOBJ_H
2 #define __WINE_SHLOBJ_H
5 #include "winbase.h" /* WIN32_FIND_* */
12 #endif /* defined(__cplusplus) */
14 /****************************************************************************
15 * SHITEMID, ITEMIDLIST, PIDL API
20 WORD cb
; /* nr of bytes in this item */
21 BYTE abID
[1]; /* first byte in this item */
22 } SHITEMID
, *LPSHITEMID
;
23 typedef LPSHITEMID
const LPCSHITEMID
;
25 typedef struct _ITEMIDLIST
27 SHITEMID mkid
; /* first itemid in list */
28 } ITEMIDLIST
,*LPITEMIDLIST
,*LPCITEMIDLIST
;
31 BOOL WINAPI
SHGetPathFromIDListA (LPCITEMIDLIST pidl
,LPSTR pszPath
);
32 BOOL WINAPI
SHGetPathFromIDListW (LPCITEMIDLIST pidl
,LPWSTR pszPath
);
33 #define SHGetPathFromIDList WINELIB_NAME_AW(SHGetPathFromIDList)
36 #include "wine/obj_base.h"
37 #include "wine/obj_enumidlist.h"
38 #include "wine/obj_inplace.h"
39 #include "wine/obj_oleaut.h"
40 #include "wine/obj_shellfolder.h"
41 #include "wine/obj_shellview.h"
42 #include "wine/obj_shelllink.h"
43 #include "wine/obj_shellbrowser.h"
44 #include "wine/obj_contextmenu.h"
45 #include "wine/obj_shellextinit.h"
46 #include "wine/obj_extracticon.h"
47 #include "wine/obj_commdlgbrowser.h"
48 #include "wine/obj_dockingwindowframe.h"
50 /*****************************************************************************
51 * Predeclare interfaces
53 typedef struct IShellIcon IShellIcon
, *LPSHELLICON
;
56 /*****************************************************************************
57 * IContextMenu interface
61 /* DATAOBJECT_InitShellIDList*/
62 #define CFSTR_SHELLIDLIST "Shell IDList Array" /* CF_IDLIST */
64 extern UINT cfShellIDList
;
69 } CIDA
, *LPCIDA
,*LPIDA
;
71 #define CFSTR_SHELLIDLISTOFFSET "Shell Object Offsets" /* CF_OBJECTPOSITIONS */
72 #define CFSTR_NETRESOURCES "Net Resource" /* CF_NETRESOURCE */
74 /* DATAOBJECT_InitFileGroupDesc */
75 #define CFSTR_FILEDESCRIPTORA "FileGroupDescriptor" /* CF_FILEGROUPDESCRIPTORA */
76 extern UINT cfFileGroupDesc
;
78 #define CFSTR_FILEDESCRIPTORW "FileGroupDescriptorW" /* CF_FILEGROUPDESCRIPTORW */
80 /* DATAOBJECT_InitFileContents*/
81 #define CFSTR_FILECONTENTS "FileContents" /* CF_FILECONTENTS */
82 extern UINT cfFileContents
;
84 #define CFSTR_FILENAMEA "FileName" /* CF_FILENAMEA */
85 #define CFSTR_FILENAMEW "FileNameW" /* CF_FILENAMEW */
86 #define CFSTR_PRINTERGROUP "PrinterFriendlyName" /* CF_PRINTERS */
87 #define CFSTR_FILENAMEMAPA "FileNameMap" /* CF_FILENAMEMAPA */
88 #define CFSTR_FILENAMEMAPW "FileNameMapW" /* CF_FILENAMEMAPW */
89 #define CFSTR_SHELLURL "UniformResourceLocator"
90 #define CFSTR_PREFERREDDROPEFFECT "Preferred DropEffect"
91 #define CFSTR_PERFORMEDDROPEFFECT "Performed DropEffect"
92 #define CFSTR_PASTESUCCEEDED "Paste Succeeded"
93 #define CFSTR_INDRAGLOOP "InShellDragLoop"
96 /************************************************************************
97 * IShellView interface
100 typedef GUID SHELLVIEWID
;
101 #define SV_CLASS_NAME ("SHELLDLL_DefView")
103 /****************************************************************************
104 * IShellIcon interface
107 #define ICOM_INTERFACE IShellIcon
108 #define IShellIcon_METHODS \
109 ICOM_METHOD3(HRESULT, GetIconOf, LPCITEMIDLIST,pidl, UINT,flags, LPINT,lpIconIndex)
110 #define IShellIcon_IMETHODS \
113 ICOM_DEFINE(IShellIcon
, IUnknown
)
114 #undef ICOM_INTERFACE
116 /*** IUnknown methods ***/
117 #define IShellIcon_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
118 #define IShellIcon_AddRef(p) ICOM_CALL (AddRef,p)
119 #define IShellIcon_Release(p) ICOM_CALL (Release,p)
120 /*** IShellIcon methods ***/
121 #define IShellIcon_GetIconOf(p,a,b,c) ICOM_CALL3(GetIconOf,p,a,b,c)
123 /****************************************************************************
124 * SHAddToRecentDocs API
126 #define SHARD_PIDL 0x00000001L
127 #define SHARD_PATHA 0x00000002L
128 #define SHARD_PATHW 0x00000003L
129 #define SHARD_PATH WINELIB_NAME_AW(SHARD_PATH)
131 DWORD WINAPI
SHAddToRecentDocs(UINT uFlags
, LPCVOID pv
);
133 /****************************************************************************
136 #define SE_ERR_FNF 2 /* file not found */
137 #define SE_ERR_PNF 3 /* path not found */
138 #define SE_ERR_ACCESSDENIED 5 /* access denied */
139 #define SE_ERR_OOM 8 /* out of memory */
140 #define SE_ERR_DLLNOTFOUND 32
141 #define SE_ERR_SHARE 26
142 #define SE_ERR_ASSOCINCOMPLETE 27
143 #define SE_ERR_DDETIMEOUT 28
144 #define SE_ERR_DDEFAIL 29
145 #define SE_ERR_DDEBUSY 30
146 #define SE_ERR_NOASSOC 31
148 #define SEE_MASK_CLASSNAME 0x00000001
149 #define SEE_MASK_CLASSKEY 0x00000003
150 #define SEE_MASK_IDLIST 0x00000004
151 #define SEE_MASK_INVOKEIDLIST 0x0000000c
152 #define SEE_MASK_ICON 0x00000010
153 #define SEE_MASK_HOTKEY 0x00000020
154 #define SEE_MASK_NOCLOSEPROCESS 0x00000040
155 #define SEE_MASK_CONNECTNETDRV 0x00000080
156 #define SEE_MASK_FLAG_DDEWAIT 0x00000100
157 #define SEE_MASK_DOENVSUBST 0x00000200
158 #define SEE_MASK_FLAG_NO_UI 0x00000400
159 #define SEE_MASK_UNICODE 0x00004000
160 #define SEE_MASK_NO_CONSOLE 0x00008000
161 #define SEE_MASK_ASYNCOK 0x00100000
162 #define SEE_MASK_HMONITOR 0x00200000
164 typedef struct _SHELLEXECUTEINFOA
174 /* Optional fields */
184 } SHELLEXECUTEINFOA
, *LPSHELLEXECUTEINFOA
;
186 typedef struct _SHELLEXECUTEINFOW
192 LPCWSTR lpParameters
;
206 } SHELLEXECUTEINFOW
, *LPSHELLEXECUTEINFOW
;
208 #define SHELLEXECUTEINFO WINELIB_NAME_AW(SHELLEXECUTEINFO)
209 #define LPSHELLEXECUTEINFO WINELIB_NAME_AW(LPSHELLEXECUTEINFO)
211 BOOL WINAPI
ShellExecuteExA(LPSHELLEXECUTEINFOA lpExecInfo
);
212 BOOL WINAPI
ShellExecuteExW(LPSHELLEXECUTEINFOW lpExecInfo
);
213 #define ShellExecuteEx WINELIB_NAME_AW(ShellExecuteEx)
215 void WINAPI
WinExecErrorA(HWND hwnd
,INT error
, LPCSTR lpstrFileName
, LPCSTR lpstrTitle
);
216 void WINAPI
WinExecErrorW(HWND hwnd
,INT error
, LPCWSTR lpstrFileName
, LPCWSTR lpstrTitle
);
217 #define WinExecError WINELIB_NAME_AW(WinExecError)
221 /****************************************************************************
222 * SHBrowseForFolder API
224 typedef INT
CALLBACK (*BFFCALLBACK
)(HWND hwnd
, UINT uMsg
, LPARAM lParam
, LPARAM lpData
);
226 typedef struct tagBROWSEINFOA
{
228 LPCITEMIDLIST pidlRoot
;
229 LPSTR pszDisplayName
;
235 } BROWSEINFOA
, *PBROWSEINFOA
, *LPBROWSEINFOA
;
237 typedef struct tagBROWSEINFOW
{
239 LPCITEMIDLIST pidlRoot
;
240 LPWSTR pszDisplayName
;
246 } BROWSEINFOW
, *PBROWSEINFOW
, *LPBROWSEINFOW
;
248 #define BROWSEINFO WINELIB_NAME_AW(BROWSEINFO)
249 #define PBROWSEINFO WINELIB_NAME_AW(PBROWSEINFO)
250 #define LPBROWSEINFO WINELIB_NAME_AW(LPBROWSEINFO)
252 /* Browsing for directory. */
253 #define BIF_RETURNONLYFSDIRS 0x0001
254 #define BIF_DONTGOBELOWDOMAIN 0x0002
255 #define BIF_STATUSTEXT 0x0004
256 #define BIF_RETURNFSANCESTORS 0x0008
257 #define BIF_EDITBOX 0x0010
258 #define BIF_VALIDATE 0x0020
260 #define BIF_BROWSEFORCOMPUTER 0x1000
261 #define BIF_BROWSEFORPRINTER 0x2000
262 #define BIF_BROWSEINCLUDEFILES 0x4000
264 /* message from browser */
265 #define BFFM_INITIALIZED 1
266 #define BFFM_SELCHANGED 2
267 #define BFFM_VALIDATEFAILEDA 3 /* lParam:szPath ret:1(cont),0(EndDialog) */
268 #define BFFM_VALIDATEFAILEDW 4 /* lParam:wzPath ret:1(cont),0(EndDialog) */
270 /* messages to browser */
271 #define BFFM_SETSTATUSTEXTA (WM_USER+100)
272 #define BFFM_ENABLEOK (WM_USER+101)
273 #define BFFM_SETSELECTIONA (WM_USER+102)
274 #define BFFM_SETSELECTIONW (WM_USER+103)
275 #define BFFM_SETSTATUSTEXTW (WM_USER+104)
277 LPITEMIDLIST WINAPI
SHBrowseForFolderA(LPBROWSEINFOA lpbi
);
278 LPITEMIDLIST WINAPI
SHBrowseForFolderW(LPBROWSEINFOW lpbi
);
279 #define SHBrowseForFolder WINELIB_NAME_AW(SHBrowseForFolder)
280 #define BFFM_SETSTATUSTEXT WINELIB_NAME_AW(BFFM_SETSTATUSTEXT)
281 #define BFFM_SETSELECTION WINELIB_NAME_AW(BFFM_SETSELECTION)
282 #define BFFM_VALIDATEFAILED WINELIB_NAME_AW(BFFM_VALIDATEFAILED)
284 /****************************************************************************
285 * SHGetDataFromIDList API
287 #define SHGDFIL_FINDDATA 1
288 #define SHGDFIL_NETRESOURCE 2
289 #define SHGDFIL_DESCRIPTIONID 3
291 #define SHDID_ROOT_REGITEM 1
292 #define SHDID_FS_FILE 2
293 #define SHDID_FS_DIRECTORY 3
294 #define SHDID_FS_OTHER 4
295 #define SHDID_COMPUTER_DRIVE35 5
296 #define SHDID_COMPUTER_DRIVE525 6
297 #define SHDID_COMPUTER_REMOVABLE 7
298 #define SHDID_COMPUTER_FIXED 8
299 #define SHDID_COMPUTER_NETDRIVE 9
300 #define SHDID_COMPUTER_CDROM 10
301 #define SHDID_COMPUTER_RAMDISK 11
302 #define SHDID_COMPUTER_OTHER 12
303 #define SHDID_NET_DOMAIN 13
304 #define SHDID_NET_SERVER 14
305 #define SHDID_NET_SHARE 15
306 #define SHDID_NET_RESTOFNET 16
307 #define SHDID_NET_OTHER 17
309 typedef struct _SHDESCRIPTIONID
310 { DWORD dwDescriptionId
;
312 } SHDESCRIPTIONID
, *LPSHDESCRIPTIONID
;
314 HRESULT WINAPI
SHGetDataFromIDListA(LPSHELLFOLDER psf
, LPCITEMIDLIST pidl
, int nFormat
, LPVOID pv
, int cb
);
315 HRESULT WINAPI
SHGetDataFromIDListW(LPSHELLFOLDER psf
, LPCITEMIDLIST pidl
, int nFormat
, LPVOID pv
, int cb
);
316 #define SHGetDataFromIDList WINELIB_NAME_AW(SHGetDataFromIDList)
318 BOOL WINAPI
SHGetSpecialFolderPathA (HWND hwndOwner
,LPSTR szPath
,DWORD csidl
,BOOL bCreate
);
319 BOOL WINAPI
SHGetSpecialFolderPathW (HWND hwndOwner
,LPWSTR szPath
,DWORD csidl
,BOOL bCreate
);
320 #define SHGetSpecialFolderPath WINELIB_NAME_AW(SHGetSpecialFolderPath)
322 HRESULT WINAPI
SHGetSpecialFolderLocation(HWND hwndOwner
, INT nFolder
, LPITEMIDLIST
* ppidl
);
324 /****************************************************************************
329 * IShellFolderViewCallback Callback
330 * This "callback" is called by the shells default IShellView implementation (that
331 * we got using SHCreateShellViewEx()), to notify us of the various things that
332 * are happening to the shellview (and ask for things too).
334 * You don't have to support anything here - anything you don't want to
335 * handle, the shell will do itself if you just return E_NOTIMPL. This parameters
336 * that the shell passes to this function are entirely undocumented.
338 * HOWEVER, as the cabview sample as originally written used this callback, the
339 * writers implemented the callback mechanism on top of their own IShellView.
340 * Look there for some clues on what to do here.
343 typedef HRESULT
CALLBACK (*SHELLVIEWPROC
)(DWORD dwUserParam
,LPSHELLFOLDER psf
,
344 HWND hwnd
,UINT uMsg
,UINT wParam
,LPARAM lParam
);
346 /* NF valid values for the "viewmode" item of the SHELLTEMPLATE*/
347 #define NF_INHERITVIEW 0x0000
348 #define NF_LOCALVIEW 0x0001
350 typedef struct _SHELLVIEWDATA
/* idl */
352 LPSHELLFOLDER pShellFolder
;
355 DWORD v3
; /* always 0 */
356 SHELLVIEWPROC pCallBack
;
357 DWORD viewmode
; /* NF_* enum */
358 } SHELLVIEWDATA
, * LPSHELLVIEWDATA
;
360 DWORD WINAPI
SHGetMalloc(LPMALLOC
*lpmal
) ;
362 /**********************************************************************
366 { BOOL fShowAllObjects
: 1;
367 BOOL fShowExtensions
: 1;
368 BOOL fNoConfirmRecycle
: 1;
369 BOOL fShowSysFiles
: 1;
371 BOOL fShowCompColor
: 1;
372 BOOL fDoubleClickInWebView
: 1;
373 BOOL fDesktopHTML
: 1;
374 BOOL fWin95Classic
: 1;
376 BOOL fDontPrettyPath
: 1;
377 BOOL fShowAttribCol
: 1;
378 BOOL fMapNetDrvBtn
: 1;
379 BOOL fShowInfoTip
: 1;
383 } SHELLFLAGSTATE
, * LPSHELLFLAGSTATE
;
385 VOID WINAPI
SHGetSettings(LPSHELLFLAGSTATE lpsfs
, DWORD dwMask
);
387 #define SSF_SHOWALLOBJECTS 0x0001
388 #define SSF_SHOWEXTENSIONS 0x0002
389 #define SSF_SHOWCOMPCOLOR 0x0008
390 #define SSF_SHOWSYSFILES 0x0020
391 #define SSF_DOUBLECLICKINWEBVIEW 0x0080
392 #define SSF_SHOWATTRIBCOL 0x0100
393 #define SSF_DESKTOPHTML 0x0200
394 #define SSF_WIN95CLASSIC 0x0400
395 #define SSF_DONTPRETTYPATH 0x0800
396 #define SSF_SHOWINFOTIP 0x2000
397 #define SSF_MAPNETDRVBUTTON 0x1000
398 #define SSF_NOCONFIRMRECYCLE 0x8000
399 #define SSF_HIDEICONS 0x4000
401 /**********************************************************************
404 #define SHCNE_RENAMEITEM 0x00000001
405 #define SHCNE_CREATE 0x00000002
406 #define SHCNE_DELETE 0x00000004
407 #define SHCNE_MKDIR 0x00000008
408 #define SHCNE_RMDIR 0x00000010
409 #define SHCNE_MEDIAINSERTED 0x00000020
410 #define SHCNE_MEDIAREMOVED 0x00000040
411 #define SHCNE_DRIVEREMOVED 0x00000080
412 #define SHCNE_DRIVEADD 0x00000100
413 #define SHCNE_NETSHARE 0x00000200
414 #define SHCNE_NETUNSHARE 0x00000400
415 #define SHCNE_ATTRIBUTES 0x00000800
416 #define SHCNE_UPDATEDIR 0x00001000
417 #define SHCNE_UPDATEITEM 0x00002000
418 #define SHCNE_SERVERDISCONNECT 0x00004000
419 #define SHCNE_UPDATEIMAGE 0x00008000
420 #define SHCNE_DRIVEADDGUI 0x00010000
421 #define SHCNE_RENAMEFOLDER 0x00020000
422 #define SHCNE_FREESPACE 0x00040000
424 #define SHCNE_EXTENDED_EVENT 0x04000000
425 #define SHCNE_ASSOCCHANGED 0x08000000
426 #define SHCNE_DISKEVENTS 0x0002381F
427 #define SHCNE_GLOBALEVENTS 0x0C0581E0
428 #define SHCNE_ALLEVENTS 0x7FFFFFFF
429 #define SHCNE_INTERRUPT 0x80000000
431 #define SHCNEE_ORDERCHANGED 0x00000002
433 #define SHCNF_IDLIST 0x0000
434 #define SHCNF_PATHA 0x0001
435 #define SHCNF_PRINTERA 0x0002
436 #define SHCNF_DWORD 0x0003
437 #define SHCNF_PATHW 0x0005
438 #define SHCNF_PRINTERW 0x0006
439 #define SHCNF_TYPE 0x00FF
440 #define SHCNF_FLUSH 0x1000
441 #define SHCNF_FLUSHNOWAIT 0x2000
443 void WINAPI
SHChangeNotifyA(LONG wEventId
, UINT uFlags
, LPCVOID dwItem1
, LPCVOID dwItem2
);
444 void WINAPI
SHChangeNotifyW(LONG wEventId
, UINT uFlags
, LPCVOID dwItem1
, LPCVOID dwItem2
);
445 #define SHChangeNotify WINELIB_NAME_AW(SHChangeNotify)
447 /****************************************************************************
448 * SHGetSpecialFolderLocation API
450 HRESULT WINAPI
SHGetSpecialFolderLocation(HWND
, INT
, LPITEMIDLIST
*);
452 #define CSIDL_DESKTOP 0x0000
453 #define CSIDL_INTERNET 0x0001
454 #define CSIDL_PROGRAMS 0x0002
455 #define CSIDL_CONTROLS 0x0003
456 #define CSIDL_PRINTERS 0x0004
457 #define CSIDL_PERSONAL 0x0005
458 #define CSIDL_FAVORITES 0x0006
459 #define CSIDL_STARTUP 0x0007
460 #define CSIDL_RECENT 0x0008
461 #define CSIDL_SENDTO 0x0009
462 #define CSIDL_BITBUCKET 0x000a
463 #define CSIDL_STARTMENU 0x000b
464 #define CSIDL_MYDOCUMENTS 0x000c
465 #define CSIDL_MYMUSIC 0x000d
466 #define CSIDL_MYVIDEO 0x000e
467 #define CSIDL_DESKTOPDIRECTORY 0x0010
468 #define CSIDL_DRIVES 0x0011
469 #define CSIDL_NETWORK 0x0012
470 #define CSIDL_NETHOOD 0x0013
471 #define CSIDL_FONTS 0x0014
472 #define CSIDL_TEMPLATES 0x0015
473 #define CSIDL_COMMON_STARTMENU 0x0016
474 #define CSIDL_COMMON_PROGRAMS 0X0017
475 #define CSIDL_COMMON_STARTUP 0x0018
476 #define CSIDL_COMMON_DESKTOPDIRECTORY 0x0019
477 #define CSIDL_APPDATA 0x001a
478 #define CSIDL_PRINTHOOD 0x001b
479 #define CSIDL_LOCAL_APPDATA 0x001c
480 #define CSIDL_ALTSTARTUP 0x001d
481 #define CSIDL_COMMON_ALTSTARTUP 0x001e
482 #define CSIDL_COMMON_FAVORITES 0x001f
483 #define CSIDL_INTERNET_CACHE 0x0020
484 #define CSIDL_COOKIES 0x0021
485 #define CSIDL_HISTORY 0x0022
486 #define CSIDL_COMMON_APPDATA 0x0023
487 #define CSIDL_WINDOWS 0x0024
488 #define CSIDL_SYSTEM 0x0025
489 #define CSIDL_PROGRAM_FILES 0x0026
490 #define CSIDL_MYPICTURES 0x0027
491 #define CSIDL_PROFILE 0x0028
492 #define CSIDL_SYSTEMX86 0x0029
493 #define CSIDL_PROGRAM_FILESX86 0x002a
494 #define CSIDL_PROGRAM_FILES_COMMON 0x002b
495 #define CSIDL_PROGRAM_FILES_COMMONX86 0x002c
496 #define CSIDL_COMMON_TEMPLATES 0x002d
497 #define CSIDL_COMMON_DOCUMENTS 0x002e
498 #define CSIDL_COMMON_ADMINTOOLS 0x002f
499 #define CSIDL_ADMINTOOLS 0x0030
500 #define CSIDL_CONNECTIONS 0x0031
501 #define CSIDL_COMMON_MUSIC 0x0035
502 #define CSIDL_COMMON_PICTURES 0x0036
503 #define CSIDL_COMMON_VIDEO 0x0037
504 #define CSIDL_RESOURCES 0x0038
505 #define CSIDL_RESOURCES_LOCALIZED 0x0039
506 #define CSIDL_COMMON_OEM_LINKS 0x003a
507 #define CSIDL_CDBURN_AREA 0x003b
508 #define CSIDL_COMPUTERSNEARME 0x003d
509 #define CSIDL_FOLDER_MASK 0x00ff
510 #define CSIDL_FLAG_PER_USER_INIT 0x0800
511 #define CSIDL_FLAG_NO_ALIAS 0x1000
512 #define CSIDL_FLAG_DONT_VERIFY 0x4000
513 #define CSIDL_FLAG_CREATE 0x8000
515 #define CSIDL_FLAG_MASK 0xff00
518 * DROPFILES for CF_HDROP and CF_PRINTERS
520 typedef struct _DROPFILES
530 #endif /* defined(__cplusplus) */
532 #endif /* __WINE_SHLOBJ_H */