source: trunk/include/win/shlobj.h@ 5200

Last change on this file since 5200 was 4054, checked in by sandervl, 25 years ago

compile fixes

File size: 16.5 KB
Line 
1/* $Id: shlobj.h,v 1.8 2000-08-20 09:46:15 sandervl Exp $ */
2#ifndef __WINE_SHLOBJ_H
3#define __WINE_SHLOBJ_H
4
5#ifndef DECLSPEC_IMPORT
6#define DECLSPEC_IMPORT
7#endif
8
9#include "wine/obj_base.h"
10#include "wine/obj_shelllink.h"
11#include "wine/obj_shellfolder.h"
12#include "wine/obj_shellbrowser.h"
13#include "wine/obj_contextmenu.h"
14#include "wine/obj_shellextinit.h"
15#include "wine/obj_extracticon.h"
16#include "wine/obj_commdlgbrowser.h"
17#include "wine/obj_dockingwindowframe.h"
18
19#include "windef.h"
20#include "winbase.h" /* WIN32_FIND_* */
21#include "ole2.h"
22#include "shell.h"
23#include "commctrl.h"
24#include "prsht.h"
25#include "shlguid.h"
26
27#ifdef __cplusplus
28extern "C" {
29#endif /* defined(__cplusplus) */
30
31/*****************************************************************************
32 * Predeclare interfaces
33 */
34typedef struct IShellIcon IShellIcon, *LPSHELLICON;
35
36
37/*****************************************************************************
38 * IContextMenu interface
39 */
40
41
42/* DATAOBJECT_InitShellIDList*/
43#define CFSTR_SHELLIDLIST "Shell IDList Array" /* CF_IDLIST */
44
45extern UINT cfShellIDList;
46
47typedef struct
48{ UINT cidl;
49 UINT aoffset[1];
50} CIDA, *LPCIDA,*LPIDA;
51
52#define CFSTR_SHELLIDLISTOFFSET "Shell Object Offsets" /* CF_OBJECTPOSITIONS */
53#define CFSTR_NETRESOURCES "Net Resource" /* CF_NETRESOURCE */
54
55/* DATAOBJECT_InitFileGroupDesc */
56#define CFSTR_FILEDESCRIPTORA "FileGroupDescriptor" /* CF_FILEGROUPDESCRIPTORA */
57extern UINT cfFileGroupDesc;
58
59#define CFSTR_FILEDESCRIPTORW "FileGroupDescriptorW" /* CF_FILEGROUPDESCRIPTORW */
60
61/* DATAOBJECT_InitFileContents*/
62#define CFSTR_FILECONTENTS "FileContents" /* CF_FILECONTENTS */
63extern UINT cfFileContents;
64
65#define CFSTR_FILENAMEA "FileName" /* CF_FILENAMEA */
66#define CFSTR_FILENAMEW "FileNameW" /* CF_FILENAMEW */
67#define CFSTR_PRINTERGROUP "PrinterFriendlyName" /* CF_PRINTERS */
68#define CFSTR_FILENAMEMAPA "FileNameMap" /* CF_FILENAMEMAPA */
69#define CFSTR_FILENAMEMAPW "FileNameMapW" /* CF_FILENAMEMAPW */
70#define CFSTR_SHELLURL "UniformResourceLocator"
71#define CFSTR_PREFERREDDROPEFFECT "Preferred DropEffect"
72#define CFSTR_PERFORMEDDROPEFFECT "Performed DropEffect"
73#define CFSTR_PASTESUCCEEDED "Paste Succeeded"
74#define CFSTR_INDRAGLOOP "InShellDragLoop"
75
76
77/************************************************************************
78* IShellView interface
79*/
80
81
82
83typedef GUID SHELLVIEWID;
84#define SV_CLASS_NAME ("SHELLDLL_DefView")
85
86/****************************************************************************
87 * IShellIcon interface
88 */
89
90#define ICOM_INTERFACE IShellIcon
91#define IShellIcon_METHODS \
92 ICOM_METHOD3(HRESULT, GetIconOf, LPCITEMIDLIST,pidl, UINT,flags, LPINT,lpIconIndex)
93#define IShellIcon_IMETHODS \
94 IUnknown_IMETHODS \
95 IShellIcon_METHODS
96ICOM_DEFINE(IShellIcon, IUnknown)
97#undef ICOM_INTERFACE
98
99#ifdef ICOM_CINTERFACE
100/*** IUnknown methods ***/
101#define IShellIcon_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
102#define IShellIcon_AddRef(p) ICOM_CALL (AddRef,p)
103#define IShellIcon_Release(p) ICOM_CALL (Release,p)
104/*** IShellIcon methods ***/
105#define IShellIcon_GetIconOf(p,a,b,c) ICOM_CALL3(GetIconOf,p,a,b,c)
106#endif
107
108/****************************************************************************
109 * Shell Execute API
110 */
111#define SE_ERR_FNF 2 /* file not found */
112#define SE_ERR_PNF 3 /* path not found */
113#define SE_ERR_ACCESSDENIED 5 /* access denied */
114#define SE_ERR_OOM 8 /* out of memory */
115#define SE_ERR_DLLNOTFOUND 32
116#define SE_ERR_SHARE 26
117#define SE_ERR_ASSOCINCOMPLETE 27
118#define SE_ERR_DDETIMEOUT 28
119#define SE_ERR_DDEFAIL 29
120#define SE_ERR_DDEBUSY 30
121#define SE_ERR_NOASSOC 31
122
123#define SEE_MASK_CLASSNAME 0x00000001
124#define SEE_MASK_CLASSKEY 0x00000003
125#define SEE_MASK_IDLIST 0x00000004
126#define SEE_MASK_INVOKEIDLIST 0x0000000c
127#define SEE_MASK_ICON 0x00000010
128#define SEE_MASK_HOTKEY 0x00000020
129#define SEE_MASK_NOCLOSEPROCESS 0x00000040
130#define SEE_MASK_CONNECTNETDRV 0x00000080
131#define SEE_MASK_FLAG_DDEWAIT 0x00000100
132#define SEE_MASK_DOENVSUBST 0x00000200
133#define SEE_MASK_FLAG_NO_UI 0x00000400
134#define SEE_MASK_UNICODE 0x00004000
135#define SEE_MASK_NO_CONSOLE 0x00008000
136#define SEE_MASK_ASYNCOK 0x00100000
137#define SEE_MASK_HMONITOR 0x00200000
138
139#ifndef _WINE_SHELLAPI_H
140typedef struct _SHELLEXECUTEINFOA
141{ DWORD cbSize;
142 ULONG fMask;
143 HWND hwnd;
144 LPCSTR lpVerb;
145 LPCSTR lpFile;
146 LPCSTR lpParameters;
147 LPCSTR lpDirectory;
148 INT nShow;
149 HINSTANCE hInstApp;
150 /* Optional fields */
151 LPVOID lpIDList;
152 LPCSTR lpClass;
153 HKEY hkeyClass;
154 DWORD dwHotKey;
155 union
156 { HANDLE hIcon;
157 HANDLE hMonitor;
158 } u;
159 HANDLE hProcess;
160} SHELLEXECUTEINFOA, *LPSHELLEXECUTEINFOA;
161
162typedef struct _SHELLEXECUTEINFOW
163{ DWORD cbSize;
164 ULONG fMask;
165 HWND hwnd;
166 LPCWSTR lpVerb;
167 LPCWSTR lpFile;
168 LPCWSTR lpParameters;
169 LPCWSTR lpDirectory;
170 INT nShow;
171 HINSTANCE hInstApp;
172 /* Optional fields*/
173 LPVOID lpIDList;
174 LPCWSTR lpClass;
175 HKEY hkeyClass;
176 DWORD dwHotKey;
177 union
178 { HANDLE hIcon;
179 HANDLE hMonitor;
180 } u;
181 HANDLE hProcess;
182} SHELLEXECUTEINFOW, *LPSHELLEXECUTEINFOW;
183#endif
184
185#define SHELLEXECUTEINFO WINELIB_NAME_AW(SHELLEXECUTEINFO)
186#define LPSHELLEXECUTEINFO WINELIB_NAME_AW(LPSHELLEXECUTEINFO)
187
188BOOL WINAPI ShellExecuteExA(LPSHELLEXECUTEINFOA lpExecInfo);
189BOOL WINAPI ShellExecuteExW(LPSHELLEXECUTEINFOW lpExecInfo);
190#define ShellExecuteEx WINELIB_NAME_AW(ShellExecuteEx)
191
192void WINAPI WinExecErrorA(HWND hwnd,INT error, LPCSTR lpstrFileName, LPCSTR lpstrTitle);
193void WINAPI WinExecErrorW(HWND hwnd,INT error, LPCWSTR lpstrFileName, LPCWSTR lpstrTitle);
194#define WinExecError WINELIB_NAME_AW(WinExecError)
195
196
197
198/****************************************************************************
199 * SHBrowseForFolder API
200 */
201typedef INT (* CALLBACK BFFCALLBACK)(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData);
202
203typedef struct tagBROWSEINFOA {
204 HWND hwndOwner;
205 LPCITEMIDLIST pidlRoot;
206 LPSTR pszDisplayName;
207 LPCSTR lpszTitle;
208 UINT ulFlags;
209 BFFCALLBACK lpfn;
210 LPARAM lParam;
211 INT iImage;
212} BROWSEINFOA, *PBROWSEINFOA, *LPBROWSEINFOA;
213
214typedef struct tagBROWSEINFOW {
215 HWND hwndOwner;
216 LPCITEMIDLIST pidlRoot;
217 LPWSTR pszDisplayName;
218 LPCWSTR lpszTitle;
219 UINT ulFlags;
220 BFFCALLBACK lpfn;
221 LPARAM lParam;
222 INT iImage;
223} BROWSEINFOW, *PBROWSEINFOW, *LPBROWSEINFOW;
224
225#define BROWSEINFO WINELIB_NAME_AW(BROWSEINFO)
226#define PBROWSEINFO WINELIB_NAME_AW(PBROWSEINFO)
227#define LPBROWSEINFO WINELIB_NAME_AW(LPBROWSEINFO)
228
229/* Browsing for directory. */
230#define BIF_RETURNONLYFSDIRS 0x0001
231#define BIF_DONTGOBELOWDOMAIN 0x0002
232#define BIF_STATUSTEXT 0x0004
233#define BIF_RETURNFSANCESTORS 0x0008
234#define BIF_EDITBOX 0x0010
235#define BIF_VALIDATE 0x0020
236
237#define BIF_BROWSEFORCOMPUTER 0x1000
238#define BIF_BROWSEFORPRINTER 0x2000
239#define BIF_BROWSEINCLUDEFILES 0x4000
240
241/* message from browser */
242#define BFFM_INITIALIZED 1
243#define BFFM_SELCHANGED 2
244#define BFFM_VALIDATEFAILEDA 3 /* lParam:szPath ret:1(cont),0(EndDialog) */
245#define BFFM_VALIDATEFAILEDW 4 /* lParam:wzPath ret:1(cont),0(EndDialog) */
246
247/* messages to browser */
248#define BFFM_SETSTATUSTEXTA (WM_USER+100)
249#define BFFM_ENABLEOK (WM_USER+101)
250#define BFFM_SETSELECTIONA (WM_USER+102)
251#define BFFM_SETSELECTIONW (WM_USER+103)
252#define BFFM_SETSTATUSTEXTW (WM_USER+104)
253
254/*
255#ifdef UNICODE
256#define SHBrowseForFolder SHBrowseForFolderW
257#define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTW
258#define BFFM_SETSELECTION BFFM_SETSELECTIONW
259
260#define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDW
261#else
262#define SHBrowseForFolder SHBrowseForFolderA
263#define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTA
264#define BFFM_SETSELECTION BFFM_SETSELECTIONA
265
266#define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDA
267#endif
268*/
269
270LPITEMIDLIST WINAPI SHBrowseForFolderA(LPBROWSEINFOA lpbi);
271LPITEMIDLIST WINAPI SHBrowseForFolder32W(LPBROWSEINFOW lpbi);
272#define SHBrowseForFolder WINELIB_NAME_AW(SHBrowseForFolder)
273
274/****************************************************************************
275* SHGetDataFromIDList API
276*/
277#define SHGDFIL_FINDDATA 1
278#define SHGDFIL_NETRESOURCE 2
279#define SHGDFIL_DESCRIPTIONID 3
280
281#define SHDID_ROOT_REGITEM 1
282#define SHDID_FS_FILE 2
283#define SHDID_FS_DIRECTORY 3
284#define SHDID_FS_OTHER 4
285#define SHDID_COMPUTER_DRIVE35 5
286#define SHDID_COMPUTER_DRIVE525 6
287#define SHDID_COMPUTER_REMOVABLE 7
288#define SHDID_COMPUTER_FIXED 8
289#define SHDID_COMPUTER_NETDRIVE 9
290#define SHDID_COMPUTER_CDROM 10
291#define SHDID_COMPUTER_RAMDISK 11
292#define SHDID_COMPUTER_OTHER 12
293#define SHDID_NET_DOMAIN 13
294#define SHDID_NET_SERVER 14
295#define SHDID_NET_SHARE 15
296#define SHDID_NET_RESTOFNET 16
297#define SHDID_NET_OTHER 17
298
299typedef struct _SHDESCRIPTIONID
300{ DWORD dwDescriptionId;
301 CLSID clsid;
302} SHDESCRIPTIONID, *LPSHDESCRIPTIONID;
303
304HRESULT WINAPI SHGetDataFromIDListA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID pv, int cb);
305HRESULT WINAPI SHGetDataFromIDListW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID pv, int cb);
306#define SHGetDataFromIDList WINELIB_NAME_AW(SHGetDataFromIDList)
307
308BOOL WINAPI SHGetSpecialFolderPathA (HWND hwndOwner,LPSTR szPath,DWORD csidl,BOOL bCreate);
309BOOL WINAPI SHGetSpecialFolderPathW (HWND hwndOwner,LPWSTR szPath,DWORD csidl,BOOL bCreate);
310#define SHGetSpecialFolderPath WINELIB_NAME_AW(SHGetSpecialFolderPath)
311
312HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDLIST * ppidl);
313
314/****************************************************************************
315* shlview structures
316*/
317
318/*
319* IShellFolderViewCallback Callback
320* This "callback" is called by the shells default IShellView implementation (that
321* we got using SHCreateShellViewEx()), to notify us of the various things that
322* are happening to the shellview (and ask for things too).
323*
324* You don't have to support anything here - anything you don't want to
325* handle, the shell will do itself if you just return E_NOTIMPL. This parameters
326* that the shell passes to this function are entirely undocumented.
327*
328* HOWEVER, as the cabview sample as originally written used this callback, the
329* writers implemented the callback mechanism on top of their own IShellView.
330* Look there for some clues on what to do here.
331*/
332
333typedef HRESULT(* CALLBACK SHELLVIEWPROC)(DWORD dwUserParam,LPSHELLFOLDER psf,
334 HWND hwnd,UINT uMsg,UINT wParam,LPARAM lParam);
335
336/* NF valid values for the "viewmode" item of the SHELLTEMPLATE*/
337#define NF_INHERITVIEW 0x0000
338#define NF_LOCALVIEW 0x0001
339
340typedef struct _SHELLVIEWDATA /* idl */
341{ DWORD dwSize;
342 LPSHELLFOLDER pShellFolder;
343 DWORD dwUserParam;
344 LPCITEMIDLIST pidl;
345 DWORD v3; /* always 0 */
346 SHELLVIEWPROC pCallBack;
347 DWORD viewmode; /* NF_* enum */
348} SHELLVIEWDATA, * LPSHELLVIEWDATA;
349
350DWORD WINAPI SHGetMalloc(LPMALLOC *lpmal) ;
351
352/**********************************************************************
353 * SHGetSettings ()
354 */
355typedef struct
356{
357#ifdef __WIN32OS2__
358 UINT fShowAllObjects : 1;
359 UINT fShowExtensions : 1;
360 UINT fNoConfirmRecycle : 1;
361 UINT fShowSysFiles : 1;
362
363 UINT fShowCompColor : 1;
364 UINT fDoubleClickInWebView : 1;
365 UINT fDesktopHTML : 1;
366 UINT fWin95Classic : 1;
367
368 UINT fDontPrettyPath : 1;
369 UINT fShowAttribCol : 1;
370 UINT fMapNetDrvBtn : 1;
371 UINT fShowInfoTip : 1;
372
373 UINT fHideIcons : 1;
374 UINT fRestFlags : 3;
375#else
376 BOOL fShowAllObjects : 1;
377 BOOL fShowExtensions : 1;
378 BOOL fNoConfirmRecycle : 1;
379 BOOL fShowSysFiles : 1;
380
381 BOOL fShowCompColor : 1;
382 BOOL fDoubleClickInWebView : 1;
383 BOOL fDesktopHTML : 1;
384 BOOL fWin95Classic : 1;
385
386 BOOL fDontPrettyPath : 1;
387 BOOL fShowAttribCol : 1;
388 BOOL fMapNetDrvBtn : 1;
389 BOOL fShowInfoTip : 1;
390
391 BOOL fHideIcons : 1;
392 UINT fRestFlags : 3;
393#endif
394} SHELLFLAGSTATE, * LPSHELLFLAGSTATE;
395
396void WINAPI SHGetSettings(LPSHELLFLAGSTATE lpsfs, DWORD dwMask, DWORD dwx);
397
398#define SSF_SHOWALLOBJECTS 0x0001
399#define SSF_SHOWEXTENSIONS 0x0002
400#define SSF_SHOWCOMPCOLOR 0x0008
401#define SSF_SHOWSYSFILES 0x0020
402#define SSF_DOUBLECLICKINWEBVIEW 0x0080
403#define SSF_SHOWATTRIBCOL 0x0100
404#define SSF_DESKTOPHTML 0x0200
405#define SSF_WIN95CLASSIC 0x0400
406#define SSF_DONTPRETTYPATH 0x0800
407#define SSF_SHOWINFOTIP 0x2000
408#define SSF_MAPNETDRVBUTTON 0x1000
409#define SSF_NOCONFIRMRECYCLE 0x8000
410#define SSF_HIDEICONS 0x4000
411
412/**********************************************************************
413 * SHChangeNotify
414 */
415#define SHCNE_RENAMEITEM 0x00000001
416#define SHCNE_CREATE 0x00000002
417#define SHCNE_DELETE 0x00000004
418#define SHCNE_MKDIR 0x00000008
419#define SHCNE_RMDIR 0x00000010
420#define SHCNE_MEDIAINSERTED 0x00000020
421#define SHCNE_MEDIAREMOVED 0x00000040
422#define SHCNE_DRIVEREMOVED 0x00000080
423#define SHCNE_DRIVEADD 0x00000100
424#define SHCNE_NETSHARE 0x00000200
425#define SHCNE_NETUNSHARE 0x00000400
426#define SHCNE_ATTRIBUTES 0x00000800
427#define SHCNE_UPDATEDIR 0x00001000
428#define SHCNE_UPDATEITEM 0x00002000
429#define SHCNE_SERVERDISCONNECT 0x00004000
430#define SHCNE_UPDATEIMAGE 0x00008000
431#define SHCNE_DRIVEADDGUI 0x00010000
432#define SHCNE_RENAMEFOLDER 0x00020000
433#define SHCNE_FREESPACE 0x00040000
434
435#define SHCNE_EXTENDED_EVENT 0x04000000
436#define SHCNE_ASSOCCHANGED 0x08000000
437#define SHCNE_DISKEVENTS 0x0002381F
438#define SHCNE_GLOBALEVENTS 0x0C0581E0
439#define SHCNE_ALLEVENTS 0x7FFFFFFF
440#define SHCNE_INTERRUPT 0x80000000
441
442#define SHCNEE_ORDERCHANGED 0x00000002
443
444#define SHCNF_IDLIST 0x0000
445#define SHCNF_PATHA 0x0001
446#define SHCNF_PRINTERA 0x0002
447#define SHCNF_DWORD 0x0003
448#define SHCNF_PATHW 0x0005
449#define SHCNF_PRINTERW 0x0006
450#define SHCNF_TYPE 0x00FF
451#define SHCNF_FLUSH 0x1000
452#define SHCNF_FLUSHNOWAIT 0x2000
453
454void WINAPI SHChangeNotifyA(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2);
455void WINAPI SHChangeNotifyW(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2);
456#define SHChangeNotify WINELIB_NAME_AW(SHChangeNotify)
457
458/****************************************************************************
459* SHGetSpecialFolderLocation API
460*/
461HRESULT WINAPI SHGetSpecialFolderLocation(HWND, INT, LPITEMIDLIST *);
462
463#define CSIDL_DESKTOP 0x0000
464#define CSIDL_INTERNET 0x0001
465#define CSIDL_PROGRAMS 0x0002
466#define CSIDL_CONTROLS 0x0003
467#define CSIDL_PRINTERS 0x0004
468#define CSIDL_PERSONAL 0x0005
469#define CSIDL_FAVORITES 0x0006
470#define CSIDL_STARTUP 0x0007
471#define CSIDL_RECENT 0x0008
472#define CSIDL_SENDTO 0x0009
473#define CSIDL_BITBUCKET 0x000a
474#define CSIDL_STARTMENU 0x000b
475#define CSIDL_DESKTOPDIRECTORY 0x0010
476#define CSIDL_DRIVES 0x0011
477#define CSIDL_NETWORK 0x0012
478#define CSIDL_NETHOOD 0x0013
479#define CSIDL_FONTS 0x0014
480#define CSIDL_TEMPLATES 0x0015
481#define CSIDL_COMMON_STARTMENU 0x0016
482#define CSIDL_COMMON_PROGRAMS 0X0017
483#define CSIDL_COMMON_STARTUP 0x0018
484#define CSIDL_COMMON_DESKTOPDIRECTORY 0x0019
485#define CSIDL_APPDATA 0x001a
486#define CSIDL_PRINTHOOD 0x001b
487#define CSIDL_ALTSTARTUP 0x001d
488#define CSIDL_COMMON_ALTSTARTUP 0x001e
489#define CSIDL_COMMON_FAVORITES 0x001f
490#define CSIDL_INTERNET_CACHE 0x0020
491#define CSIDL_COOKIES 0x0021
492#define CSIDL_HISTORY 0x0022
493#define CSIDL_COMMON_APPDATA 0x0023
494#define CSIDL_WINDOWS 0x0024
495#define CSIDL_SYSTEM 0x0025
496#define CSIDL_PROGRAM_FILES 0x0026
497#define CSIDL_MYPICTURES 0x0027
498#define CSIDL_PROFILE 0x0028
499#define CSIDL_SYSTEMX86 0x0029
500#define CSIDL_PROGRAM_FILESX86 0x002a
501#define CSIDL_PROGRAM_FILES_COMMON 0x002b
502#define CSIDL_PROGRAM_FILES_COMMONX86 0x002c
503#define CSIDL_COMMON_TEMPLATES 0x002d
504#define CSIDL_COMMON_DOCUMENTS 0x002e
505#define CSIDL_COMMON_ADMINTOOLS 0x002f
506#define CSIDL_ADMINTOOLS 0x0030
507#define CSIDL_CONNECTIONS 0x0031
508#define CSIDL_FOLDER_MASK 0x00ff
509
510#define CSIDL_FLAG_DONT_VERIFY 0x4000
511#define CSIDL_FLAG_CREATE 0x8000
512
513#define CSIDL_FLAG_MASK 0xff00
514
515/*
516 * DROPFILES for CF_HDROP and CF_PRINTERS
517 */
518typedef struct _DROPFILES
519{
520 DWORD pFiles;
521 POINT pt;
522 BOOL fNC;
523 BOOL fWide;
524} DROPFILES;
525
526#ifdef __cplusplus
527} /* extern "C" */
528#endif /* defined(__cplusplus) */
529
530#endif /* __WINE_SHLOBJ_H */
Note: See TracBrowser for help on using the repository browser.