1 #ifndef __WINE_SHLOBJ_H
2 #define __WINE_SHLOBJ_H
4 #include "wine/obj_base.h"
5 #include "wine/obj_shelllink.h"
6 #include "wine/obj_shellfolder.h"
7 #include "wine/obj_shellbrowser.h"
8 #include "wine/obj_contextmenu.h"
9 #include "wine/obj_shellextinit.h"
10 #include "wine/obj_extracticon.h"
11 #include "wine/obj_commdlgbrowser.h"
12 #include "wine/obj_dockingwindowframe.h"
15 #include "winbase.h" /* WIN32_FIND_* */
21 #define STDMETHOD(xfn) HRESULT (CALLBACK *fn##xfn)
22 #define STDMETHOD_(type,xfn) type (CALLBACK *fn##xfn)
27 /* foreward declaration of the objects*/
28 typedef struct tagSHELLICON
*LPSHELLICON
, IShellIcon
;
31 /*****************************************************************************
32 * IContextMenu interface
36 /* DATAOBJECT_InitShellIDList*/
37 #define CFSTR_SHELLIDLIST "Shell IDList Array" /* CF_IDLIST */
39 extern UINT cfShellIDList
;
46 #define CFSTR_SHELLIDLISTOFFSET "Shell Object Offsets" /* CF_OBJECTPOSITIONS */
47 #define CFSTR_NETRESOURCES "Net Resource" /* CF_NETRESOURCE */
49 /* DATAOBJECT_InitFileGroupDesc */
50 #define CFSTR_FILEDESCRIPTORA "FileGroupDescriptor" /* CF_FILEGROUPDESCRIPTORA */
51 extern UINT cfFileGroupDesc
;
53 #define CFSTR_FILEDESCRIPTORW "FileGroupDescriptorW" /* CF_FILEGROUPDESCRIPTORW */
55 /* DATAOBJECT_InitFileContents*/
56 #define CFSTR_FILECONTENTS "FileContents" /* CF_FILECONTENTS */
57 extern UINT cfFileContents
;
59 #define CFSTR_FILENAMEA "FileName" /* CF_FILENAMEA */
60 #define CFSTR_FILENAMEW "FileNameW" /* CF_FILENAMEW */
61 #define CFSTR_PRINTERGROUP "PrinterFriendlyName" /* CF_PRINTERS */
62 #define CFSTR_FILENAMEMAPA "FileNameMap" /* CF_FILENAMEMAPA */
63 #define CFSTR_FILENAMEMAPW "FileNameMapW" /* CF_FILENAMEMAPW */
64 #define CFSTR_SHELLURL "UniformResourceLocator"
65 #define CFSTR_PREFERREDDROPEFFECT "Preferred DropEffect"
66 #define CFSTR_PERFORMEDDROPEFFECT "Performed DropEffect"
67 #define CFSTR_PASTESUCCEEDED "Paste Succeeded"
68 #define CFSTR_INDRAGLOOP "InShellDragLoop"
70 /**************************************************************************
71 * IDLList "Item ID List List"
74 * interal data holder for IDataObject
76 typedef struct tagLPIDLLIST
*LPIDLLIST
, IDLList
;
78 #define THIS LPIDLLIST me
86 typedef struct IDLList_VTable
87 { STDMETHOD_(UINT
, GetState
)(THIS
);
88 STDMETHOD_(LPITEMIDLIST
, GetElement
)(THIS_ UINT nIndex
);
89 STDMETHOD_(UINT
, GetCount
)(THIS
);
90 STDMETHOD_(BOOL
, StoreItem
)(THIS_ LPITEMIDLIST pidl
);
91 STDMETHOD_(BOOL
, AddItems
)(THIS_ LPITEMIDLIST
*apidl
, UINT cidl
);
92 STDMETHOD_(BOOL
, InitList
)(THIS
);
93 STDMETHOD_(void, CleanList
)(THIS
);
94 } IDLList_VTable
,*LPIDLLIST_VTABLE
;
97 { LPIDLLIST_VTABLE lpvtbl
;
102 extern LPIDLLIST
IDLList_Constructor (UINT uStep
);
103 extern void IDLList_Destructor(LPIDLLIST me
);
107 /************************************************************************
108 * IShellView interface
113 typedef GUID SHELLVIEWID
;
114 #define SV_CLASS_NAME ("SHELLDLL_DefView")
116 DWORD WINAPI
SHMapPIDLToSystemImageListIndex(LPSHELLFOLDER sh
,LPITEMIDLIST pidl
,DWORD z
);
118 /****************************************************************************
119 * IShellIcon interface
122 #define THIS LPSHELLICON me
124 typedef struct IShellIcon_VTable
125 { /*** IUnknown methods ***/
126 STDMETHOD(QueryInterface
) (THIS_ REFIID riid
, LPVOID
* ppvObj
) PURE
;
127 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
128 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
130 /*** IShellIcon methods ***/
131 STDMETHOD(GetIconOf
)(THIS_ LPCITEMIDLIST pidl
, UINT flags
, LPINT lpIconIndex
) PURE
;
132 } IShellIcon_VTable
,*LPSHELLICON_VTABLE
;
135 { LPSHELLICON_VTABLE lpvtbl
;
140 /****************************************************************************
143 #define SE_ERR_FNF 2 /* file not found */
144 #define SE_ERR_PNF 3 /* path not found */
145 #define SE_ERR_ACCESSDENIED 5 /* access denied */
146 #define SE_ERR_OOM 8 /* out of memory */
147 #define SE_ERR_DLLNOTFOUND 32
148 #define SE_ERR_SHARE 26
149 #define SE_ERR_ASSOCINCOMPLETE 27
150 #define SE_ERR_DDETIMEOUT 28
151 #define SE_ERR_DDEFAIL 29
152 #define SE_ERR_DDEBUSY 30
153 #define SE_ERR_NOASSOC 31
155 #define SEE_MASK_CLASSNAME 0x00000001
156 #define SEE_MASK_CLASSKEY 0x00000003
157 #define SEE_MASK_IDLIST 0x00000004
158 #define SEE_MASK_INVOKEIDLIST 0x0000000c
159 #define SEE_MASK_ICON 0x00000010
160 #define SEE_MASK_HOTKEY 0x00000020
161 #define SEE_MASK_NOCLOSEPROCESS 0x00000040
162 #define SEE_MASK_CONNECTNETDRV 0x00000080
163 #define SEE_MASK_FLAG_DDEWAIT 0x00000100
164 #define SEE_MASK_DOENVSUBST 0x00000200
165 #define SEE_MASK_FLAG_NO_UI 0x00000400
166 #define SEE_MASK_UNICODE 0x00004000
167 #define SEE_MASK_NO_CONSOLE 0x00008000
168 #define SEE_MASK_ASYNCOK 0x00100000
169 #define SEE_MASK_HMONITOR 0x00200000
171 typedef struct _SHELLEXECUTEINFOA
181 /* Optional fields */
191 } SHELLEXECUTEINFOA
, *LPSHELLEXECUTEINFOA
;
193 typedef struct _SHELLEXECUTEINFOW
199 LPCWSTR lpParameters
;
213 } SHELLEXECUTEINFOW
, *LPSHELLEXECUTEINFOW
;
215 #define SHELLEXECUTEINFO WINELIB_NAME_AW(SHELLEXECUTEINFO)
216 #define LPSHELLEXECUTEINFO WINELIB_NAME_AW(LPSHELLEXECUTEINFO)
218 BOOL WINAPI
ShellExecuteExA(LPSHELLEXECUTEINFOA lpExecInfo
);
219 BOOL WINAPI
ShellExecuteExW(LPSHELLEXECUTEINFOW lpExecInfo
);
220 #define ShellExecuteEx WINELIB_NAME_AW(ShellExecuteEx)
222 void WINAPI
WinExecErrorA(HWND hwnd
,INT error
, LPCSTR lpstrFileName
, LPCSTR lpstrTitle
);
223 void WINAPI
WinExecErrorW(HWND hwnd
,INT error
, LPCWSTR lpstrFileName
, LPCWSTR lpstrTitle
);
224 #define WinExecError WINELIB_NAME_AW(WinExecError)
228 /****************************************************************************
229 * SHBrowseForFolder API
231 typedef INT (CALLBACK
* BFFCALLBACK
)(HWND hwnd
, UINT uMsg
, LPARAM lParam
, LPARAM lpData
);
233 typedef struct tagBROWSEINFOA
{
235 LPCITEMIDLIST pidlRoot
;
236 LPSTR pszDisplayName
;
242 } BROWSEINFOA
, *PBROWSEINFOA
, *LPBROWSEINFOA
;
244 typedef struct tagBROWSEINFOW
{
246 LPCITEMIDLIST pidlRoot
;
247 LPWSTR pszDisplayName
;
253 } BROWSEINFOW
, *PBROWSEINFOW
, *LPBROWSEINFOW
;
255 #define BROWSEINFO WINELIB_NAME_AW(BROWSEINFO)
256 #define PBROWSEINFO WINELIB_NAME_AW(PBROWSEINFO)
257 #define LPBROWSEINFO WINELIB_NAME_AW(LPBROWSEINFO)
259 /* Browsing for directory. */
260 #define BIF_RETURNONLYFSDIRS 0x0001
261 #define BIF_DONTGOBELOWDOMAIN 0x0002
262 #define BIF_STATUSTEXT 0x0004
263 #define BIF_RETURNFSANCESTORS 0x0008
264 #define BIF_EDITBOX 0x0010
265 #define BIF_VALIDATE 0x0020
267 #define BIF_BROWSEFORCOMPUTER 0x1000
268 #define BIF_BROWSEFORPRINTER 0x2000
269 #define BIF_BROWSEINCLUDEFILES 0x4000
271 /* message from browser */
272 #define BFFM_INITIALIZED 1
273 #define BFFM_SELCHANGED 2
274 #define BFFM_VALIDATEFAILEDA 3 /* lParam:szPath ret:1(cont),0(EndDialog) */
275 #define BFFM_VALIDATEFAILEDW 4 /* lParam:wzPath ret:1(cont),0(EndDialog) */
277 /* messages to browser */
278 #define BFFM_SETSTATUSTEXTA (WM_USER+100)
279 #define BFFM_ENABLEOK (WM_USER+101)
280 #define BFFM_SETSELECTIONA (WM_USER+102)
281 #define BFFM_SETSELECTIONW (WM_USER+103)
282 #define BFFM_SETSTATUSTEXTW (WM_USER+104)
286 #define SHBrowseForFolder SHBrowseForFolderW
287 #define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTW
288 #define BFFM_SETSELECTION BFFM_SETSELECTIONW
290 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDW
292 #define SHBrowseForFolder SHBrowseForFolderA
293 #define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTA
294 #define BFFM_SETSELECTION BFFM_SETSELECTIONA
296 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDA
300 LPITEMIDLIST WINAPI
SHBrowseForFolderA(LPBROWSEINFOA lpbi
);
301 /*LPITEMIDLIST WINAPI SHBrowseForFolder32W(LPBROWSEINFO32W lpbi);*/
302 #define SHBrowseForFolder WINELIB_NAME_AW(SHBrowseForFolder)
304 /****************************************************************************
305 * SHGetDataFromIDList API
307 #define SHGDFIL_FINDDATA 1
308 #define SHGDFIL_NETRESOURCE 2
309 #define SHGDFIL_DESCRIPTIONID 3
311 #define SHDID_ROOT_REGITEM 1
312 #define SHDID_FS_FILE 2
313 #define SHDID_FS_DIRECTORY 3
314 #define SHDID_FS_OTHER 4
315 #define SHDID_COMPUTER_DRIVE35 5
316 #define SHDID_COMPUTER_DRIVE525 6
317 #define SHDID_COMPUTER_REMOVABLE 7
318 #define SHDID_COMPUTER_FIXED 8
319 #define SHDID_COMPUTER_NETDRIVE 9
320 #define SHDID_COMPUTER_CDROM 10
321 #define SHDID_COMPUTER_RAMDISK 11
322 #define SHDID_COMPUTER_OTHER 12
323 #define SHDID_NET_DOMAIN 13
324 #define SHDID_NET_SERVER 14
325 #define SHDID_NET_SHARE 15
326 #define SHDID_NET_RESTOFNET 16
327 #define SHDID_NET_OTHER 17
329 typedef struct _SHDESCRIPTIONID
330 { DWORD dwDescriptionId
;
332 } SHDESCRIPTIONID
, *LPSHDESCRIPTIONID
;
334 HRESULT WINAPI
SHGetDataFromIDListA(LPSHELLFOLDER psf
, LPCITEMIDLIST pidl
, int nFormat
, LPVOID pv
, int cb
);
335 HRESULT WINAPI
SHGetDataFromIDListW(LPSHELLFOLDER psf
, LPCITEMIDLIST pidl
, int nFormat
, LPVOID pv
, int cb
);
336 #define SHGetDataFromIDList WINELIB_NAME_AW(SHGetDataFromIDList)
339 /****************************************************************************
344 * IShellFolderViewCallback Callback
345 * This "callback" is called by the shells default IShellView implementation (that
346 * we got using SHCreateShellViewEx()), to notify us of the various things that
347 * are happening to the shellview (and ask for things too).
349 * You don't have to support anything here - anything you don't want to
350 * handle, the shell will do itself if you just return E_NOTIMPL. This parameters
351 * that the shell passes to this function are entirely undocumented.
353 * HOWEVER, as the cabview sample as originally written used this callback, the
354 * writers implemented the callback mechanism on top of their own IShellView.
355 * Look there for some clues on what to do here.
358 typedef HRESULT(CALLBACK
*SHELLVIEWPROC
)(DWORD dwUserParam
,LPSHELLFOLDER psf
,
359 HWND hwnd
,UINT uMsg
,UINT wParam
,LPARAM lParam
);
361 /* NF valid values for the "viewmode" item of the SHELLTEMPLATE*/
362 #define NF_INHERITVIEW 0x0000
363 #define NF_LOCALVIEW 0x0001
365 typedef struct _SHELLVIEWDATA
/* idl */
367 LPSHELLFOLDER pShellFolder
;
370 DWORD v3
; /* always 0 */
371 SHELLVIEWPROC pCallBack
;
372 DWORD viewmode
; /* NF_* enum */
373 } SHELLVIEWDATA
, * LPSHELLVIEWDATA
;
376 The shell keeps track of some per-user state to handle display
377 options that is of majorinterest to ISVs.
378 The key one requested right now is "DoubleClickInWebView".
381 { BOOL fShowAllObjects
: 1;
382 BOOL fShowExtensions
: 1;
383 BOOL fNoConfirmRecycle
: 1;
384 BOOL fShowSysFiles
: 1;
385 BOOL fShowCompColor
: 1;
386 BOOL fDoubleClickInWebView
: 1;
387 BOOL fDesktopHTML
: 1;
388 BOOL fWin95Classic
: 1;
389 BOOL fDontPrettyPath
: 1;
390 BOOL fShowAttribCol
: 1;
391 BOOL fMapNetDrvBtn
: 1;
392 BOOL fShowInfoTip
: 1;
395 } SHELLFLAGSTATE
, * LPSHELLFLAGSTATE
;
398 DWORD WINAPI
SHGetMalloc(LPMALLOC
*lpmal
) ;
407 #endif /* __WINE_SHLOBJ_H */