Stub for SetVolumeLabel().
[wine] / include / shlobj.h
1 #ifndef __WINE_SHLOBJ_H
2 #define __WINE_SHLOBJ_H
3
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"
13
14 #include "windef.h"
15 #include "winbase.h"    /* WIN32_FIND_* */
16 #include "ole2.h"
17 #include "shell.h"
18 #include "commctrl.h"
19 #include "prsht.h"
20
21 /*****************************************************************************
22  * Predeclare interfaces
23  */
24 typedef struct IShellIcon IShellIcon, *LPSHELLICON;
25
26
27 /*****************************************************************************
28  * IContextMenu interface
29  */
30
31
32 /* DATAOBJECT_InitShellIDList*/
33 #define CFSTR_SHELLIDLIST       "Shell IDList Array"      /* CF_IDLIST */
34
35 extern UINT cfShellIDList;
36
37 typedef struct
38 {       UINT cidl;
39         UINT aoffset[1];
40 } CIDA, *LPCIDA;
41
42 #define CFSTR_SHELLIDLISTOFFSET "Shell Object Offsets"    /* CF_OBJECTPOSITIONS */
43 #define CFSTR_NETRESOURCES      "Net Resource"            /* CF_NETRESOURCE */
44
45 /* DATAOBJECT_InitFileGroupDesc */
46 #define CFSTR_FILEDESCRIPTORA   "FileGroupDescriptor"     /* CF_FILEGROUPDESCRIPTORA */
47 extern UINT cfFileGroupDesc;
48
49 #define CFSTR_FILEDESCRIPTORW   "FileGroupDescriptorW"    /* CF_FILEGROUPDESCRIPTORW */
50
51 /* DATAOBJECT_InitFileContents*/
52 #define CFSTR_FILECONTENTS      "FileContents"            /* CF_FILECONTENTS */
53 extern UINT cfFileContents;
54
55 #define CFSTR_FILENAMEA         "FileName"                /* CF_FILENAMEA */
56 #define CFSTR_FILENAMEW         "FileNameW"               /* CF_FILENAMEW */
57 #define CFSTR_PRINTERGROUP      "PrinterFriendlyName"     /* CF_PRINTERS */
58 #define CFSTR_FILENAMEMAPA      "FileNameMap"             /* CF_FILENAMEMAPA */
59 #define CFSTR_FILENAMEMAPW      "FileNameMapW"            /* CF_FILENAMEMAPW */
60 #define CFSTR_SHELLURL          "UniformResourceLocator"
61 #define CFSTR_PREFERREDDROPEFFECT "Preferred DropEffect"
62 #define CFSTR_PERFORMEDDROPEFFECT "Performed DropEffect"
63 #define CFSTR_PASTESUCCEEDED    "Paste Succeeded"
64 #define CFSTR_INDRAGLOOP        "InShellDragLoop"
65
66
67 /************************************************************************
68 * IShellView interface
69 */
70
71
72
73 typedef GUID SHELLVIEWID;
74 #define SV_CLASS_NAME   ("SHELLDLL_DefView")
75
76 UINT WINAPI SHMapPIDLToSystemImageListIndex(LPSHELLFOLDER sh, LPITEMIDLIST pidl, UINT * pIndex);
77
78 /****************************************************************************
79  * IShellIcon interface
80  */
81
82 #define ICOM_INTERFACE IShellIcon
83 #define IShellIcon_METHODS \
84     ICOM_METHOD3(HRESULT, GetIconOf,     LPCITEMIDLIST,pidl, UINT,flags, LPINT,lpIconIndex)
85 #define IShellIcon_IMETHODS \
86     IUnknown_IMETHODS \
87     IShellIcon_METHODS
88 ICOM_DEFINE(IShellIcon, IUnknown)
89 #undef ICOM_INTERFACE
90
91 #ifdef ICOM_CINTERFACE
92 /*** IUnknown methods ***/
93 #define IShellIcon_QueryInterface(p,a,b)      ICOM_CALL2(QueryInterface,p,a,b)
94 #define IShellIcon_AddRef(p)                  ICOM_CALL (AddRef,p)
95 #define IShellIcon_Release(p)                 ICOM_CALL (Release,p)
96 /*** IShellIcon methods ***/
97 #define IShellIcon_GetIconOf(p,a,b,c)         ICOM_CALL3(GetIconOf,p,a,b,c)
98 #endif
99
100 /****************************************************************************
101  * Shell Execute API
102  */
103 #define SE_ERR_FNF              2       /* file not found */
104 #define SE_ERR_PNF              3       /* path not found */
105 #define SE_ERR_ACCESSDENIED     5       /* access denied */
106 #define SE_ERR_OOM              8       /* out of memory */
107 #define SE_ERR_DLLNOTFOUND      32
108 #define SE_ERR_SHARE                    26
109 #define SE_ERR_ASSOCINCOMPLETE          27
110 #define SE_ERR_DDETIMEOUT               28
111 #define SE_ERR_DDEFAIL                  29
112 #define SE_ERR_DDEBUSY                  30
113 #define SE_ERR_NOASSOC                  31
114
115 #define SEE_MASK_CLASSNAME        0x00000001
116 #define SEE_MASK_CLASSKEY         0x00000003
117 #define SEE_MASK_IDLIST           0x00000004
118 #define SEE_MASK_INVOKEIDLIST     0x0000000c
119 #define SEE_MASK_ICON             0x00000010
120 #define SEE_MASK_HOTKEY           0x00000020
121 #define SEE_MASK_NOCLOSEPROCESS   0x00000040
122 #define SEE_MASK_CONNECTNETDRV    0x00000080
123 #define SEE_MASK_FLAG_DDEWAIT     0x00000100
124 #define SEE_MASK_DOENVSUBST       0x00000200
125 #define SEE_MASK_FLAG_NO_UI       0x00000400
126 #define SEE_MASK_UNICODE          0x00004000
127 #define SEE_MASK_NO_CONSOLE       0x00008000
128 #define SEE_MASK_ASYNCOK          0x00100000
129 #define SEE_MASK_HMONITOR         0x00200000
130
131 typedef struct _SHELLEXECUTEINFOA
132 {       DWORD cbSize;
133         ULONG fMask;
134         HWND hwnd;
135         LPCSTR   lpVerb;
136         LPCSTR   lpFile;
137         LPCSTR   lpParameters;
138         LPCSTR   lpDirectory;
139        INT nShow;
140         HINSTANCE hInstApp;
141         /* Optional fields */
142         LPVOID lpIDList;
143         LPCSTR   lpClass;
144         HKEY hkeyClass;
145         DWORD dwHotKey;
146         union 
147         { HANDLE hIcon;
148           HANDLE hMonitor;
149         } u;
150         HANDLE hProcess;
151 } SHELLEXECUTEINFOA, *LPSHELLEXECUTEINFOA;
152
153 typedef struct _SHELLEXECUTEINFOW
154 {       DWORD cbSize;
155         ULONG fMask;
156         HWND hwnd;
157         LPCWSTR  lpVerb;
158         LPCWSTR  lpFile;
159         LPCWSTR  lpParameters;
160         LPCWSTR  lpDirectory;
161        INT nShow;
162         HINSTANCE hInstApp;
163         /* Optional fields*/
164         LPVOID lpIDList;
165         LPCWSTR  lpClass;
166         HKEY hkeyClass;
167         DWORD dwHotKey;
168         union
169         { HANDLE hIcon;
170           HANDLE hMonitor;
171         } u;
172         HANDLE hProcess;
173 } SHELLEXECUTEINFOW, *LPSHELLEXECUTEINFOW;
174
175 #define SHELLEXECUTEINFO   WINELIB_NAME_AW(SHELLEXECUTEINFO)
176 #define LPSHELLEXECUTEINFO WINELIB_NAME_AW(LPSHELLEXECUTEINFO)
177
178 BOOL WINAPI ShellExecuteExA(LPSHELLEXECUTEINFOA lpExecInfo);
179 BOOL WINAPI ShellExecuteExW(LPSHELLEXECUTEINFOW lpExecInfo);
180 #define ShellExecuteEx  WINELIB_NAME_AW(ShellExecuteEx)
181
182 void WINAPI WinExecErrorA(HWND hwnd,INT error, LPCSTR lpstrFileName, LPCSTR lpstrTitle);
183 void WINAPI WinExecErrorW(HWND hwnd,INT error, LPCWSTR lpstrFileName, LPCWSTR lpstrTitle);
184 #define WinExecError  WINELIB_NAME_AW(WinExecError)
185
186
187
188 /****************************************************************************
189  * SHBrowseForFolder API
190  */
191 typedef INT (CALLBACK* BFFCALLBACK)(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData);
192
193 typedef struct tagBROWSEINFOA {
194     HWND        hwndOwner;
195     LPCITEMIDLIST pidlRoot;
196     LPSTR         pszDisplayName;
197     LPCSTR        lpszTitle;
198     UINT        ulFlags;
199     BFFCALLBACK   lpfn;
200     LPARAM        lParam;
201         INT         iImage;
202 } BROWSEINFOA, *PBROWSEINFOA, *LPBROWSEINFOA;
203
204 typedef struct tagBROWSEINFOW {
205     HWND        hwndOwner;
206     LPCITEMIDLIST pidlRoot;
207     LPWSTR        pszDisplayName;
208     LPCWSTR       lpszTitle;
209     UINT        ulFlags;
210     BFFCALLBACK   lpfn;
211     LPARAM        lParam;
212         INT         iImage;
213 } BROWSEINFOW, *PBROWSEINFOW, *LPBROWSEINFOW; 
214
215 #define BROWSEINFO   WINELIB_NAME_AW(BROWSEINFO)
216 #define PBROWSEINFO  WINELIB_NAME_AW(PBROWSEINFO)
217 #define LPBROWSEINFO WINELIB_NAME_AW(LPBROWSEINFO)
218
219 /* Browsing for directory. */
220 #define BIF_RETURNONLYFSDIRS   0x0001
221 #define BIF_DONTGOBELOWDOMAIN  0x0002
222 #define BIF_STATUSTEXT         0x0004
223 #define BIF_RETURNFSANCESTORS  0x0008
224 #define BIF_EDITBOX            0x0010
225 #define BIF_VALIDATE           0x0020
226  
227 #define BIF_BROWSEFORCOMPUTER  0x1000
228 #define BIF_BROWSEFORPRINTER   0x2000
229 #define BIF_BROWSEINCLUDEFILES 0x4000
230
231 /* message from browser */
232 #define BFFM_INITIALIZED        1
233 #define BFFM_SELCHANGED         2
234 #define BFFM_VALIDATEFAILEDA    3   /* lParam:szPath ret:1(cont),0(EndDialog) */
235 #define BFFM_VALIDATEFAILEDW    4   /* lParam:wzPath ret:1(cont),0(EndDialog) */
236
237 /* messages to browser */
238 #define BFFM_SETSTATUSTEXTA     (WM_USER+100)
239 #define BFFM_ENABLEOK           (WM_USER+101)
240 #define BFFM_SETSELECTIONA      (WM_USER+102)
241 #define BFFM_SETSELECTIONW      (WM_USER+103)
242 #define BFFM_SETSTATUSTEXTW     (WM_USER+104)
243
244 /*
245 #ifdef UNICODE
246 #define SHBrowseForFolder   SHBrowseForFolderW
247 #define BFFM_SETSTATUSTEXT  BFFM_SETSTATUSTEXTW
248 #define BFFM_SETSELECTION   BFFM_SETSELECTIONW
249
250 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDW
251 #else
252 #define SHBrowseForFolder   SHBrowseForFolderA
253 #define BFFM_SETSTATUSTEXT  BFFM_SETSTATUSTEXTA
254 #define BFFM_SETSELECTION   BFFM_SETSELECTIONA
255
256 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDA 
257 #endif 
258 */
259
260 LPITEMIDLIST WINAPI SHBrowseForFolderA(LPBROWSEINFOA lpbi);
261 /*LPITEMIDLIST WINAPI SHBrowseForFolder32W(LPBROWSEINFO32W lpbi);*/
262 #define  SHBrowseForFolder WINELIB_NAME_AW(SHBrowseForFolder)
263
264 /****************************************************************************
265 *       SHGetDataFromIDList API
266 */
267 #define SHGDFIL_FINDDATA        1
268 #define SHGDFIL_NETRESOURCE     2
269 #define SHGDFIL_DESCRIPTIONID   3
270
271 #define SHDID_ROOT_REGITEM          1
272 #define SHDID_FS_FILE               2
273 #define SHDID_FS_DIRECTORY          3
274 #define SHDID_FS_OTHER              4
275 #define SHDID_COMPUTER_DRIVE35      5
276 #define SHDID_COMPUTER_DRIVE525     6
277 #define SHDID_COMPUTER_REMOVABLE    7
278 #define SHDID_COMPUTER_FIXED        8
279 #define SHDID_COMPUTER_NETDRIVE     9
280 #define SHDID_COMPUTER_CDROM        10
281 #define SHDID_COMPUTER_RAMDISK      11
282 #define SHDID_COMPUTER_OTHER        12
283 #define SHDID_NET_DOMAIN            13
284 #define SHDID_NET_SERVER            14
285 #define SHDID_NET_SHARE             15
286 #define SHDID_NET_RESTOFNET         16
287 #define SHDID_NET_OTHER             17
288
289 typedef struct _SHDESCRIPTIONID 
290 {   DWORD   dwDescriptionId;
291     CLSID   clsid;
292 } SHDESCRIPTIONID, *LPSHDESCRIPTIONID;
293
294 HRESULT WINAPI SHGetDataFromIDListA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID pv, int cb);
295 HRESULT WINAPI SHGetDataFromIDListW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID pv, int cb);
296 #define  SHGetDataFromIDList WINELIB_NAME_AW(SHGetDataFromIDList)
297
298
299 /****************************************************************************
300 * shlview structures
301 */
302
303 /*
304 * IShellFolderViewCallback Callback
305 *  This "callback" is called by the shells default IShellView implementation (that
306 *  we got using SHCreateShellViewEx()), to notify us of the various things that
307 *  are happening to the shellview (and ask for things too).
308 *
309 *  You don't have to support anything here - anything you don't want to 
310 *  handle, the shell will do itself if you just return E_NOTIMPL. This parameters
311 *  that the shell passes to this function are entirely undocumented.
312 *
313 *  HOWEVER, as the cabview sample as originally written used this callback, the
314 *  writers implemented the callback mechanism on top of their own IShellView.
315 *  Look there for some clues on what to do here.
316 */
317
318 typedef HRESULT(CALLBACK *SHELLVIEWPROC)(DWORD dwUserParam,LPSHELLFOLDER psf,
319                          HWND hwnd,UINT uMsg,UINT wParam,LPARAM lParam);
320
321 /* NF valid values for the "viewmode" item of the SHELLTEMPLATE*/
322 #define NF_INHERITVIEW    0x0000
323 #define NF_LOCALVIEW        0x0001
324
325 typedef struct _SHELLVIEWDATA   /* idl */
326 { DWORD           dwSize;
327   LPSHELLFOLDER   pShellFolder;
328   DWORD           dwUserParam;
329   LPCITEMIDLIST   pidl;
330   DWORD           v3;        /* always 0 */
331   SHELLVIEWPROC   pCallBack;
332   DWORD           viewmode;  /* NF_* enum */
333 } SHELLVIEWDATA, * LPSHELLVIEWDATA;
334
335 DWORD WINAPI SHGetMalloc(LPMALLOC *lpmal) ;
336
337 /****************************************************************************
338  *      Shell File Menu API
339  */
340 /* FileMenu_Create nSelHeight */
341 #define FM_FULL_SELHEIGHT       -1;
342 #define FM_DEFAULT_SELHEIGHT    0
343
344 /* FileMenu_Create uFlags */
345 #define FMF_SMALL_ICONS         0x00
346 #define FMF_LARGE_ICONS         0x08
347 #define FMF_NO_COLUMN_BREAK     0x10
348
349 /* FileMenu_InsertUsingPidl uFlags */
350 #define FMF_NO_EMPTY_ITEM       0x01
351 #define FMF_NO_PROGRAM_GROUPS   0x04
352
353 typedef void (CALLBACK * LPFNFMCALLBACK)(LPCITEMIDLIST pidlFolder, LPCITEMIDLIST pidlFile);
354
355 /* FileMenu_AppendItem lpszText */
356 #define FM_SEPARATOR            (LPCSTR)1
357 #define FM_BLANK_ICON           -1
358 #define FM_DEFAULT_HEIGHT       0
359
360 /**********************************************************************
361  * SHGetSettings ()
362  */
363 typedef struct
364 {       BOOL fShowAllObjects : 1;
365         BOOL fShowExtensions : 1;
366         BOOL fNoConfirmRecycle : 1;
367         BOOL fShowSysFiles : 1;
368
369         BOOL fShowCompColor : 1;
370         BOOL fDoubleClickInWebView : 1;
371         BOOL fDesktopHTML : 1;
372         BOOL fWin95Classic : 1;
373
374         BOOL fDontPrettyPath : 1;
375         BOOL fShowAttribCol : 1;
376         BOOL fMapNetDrvBtn : 1;
377         BOOL fShowInfoTip : 1;
378
379         BOOL fHideIcons : 1;
380         UINT fRestFlags : 3;
381 } SHELLFLAGSTATE, * LPSHELLFLAGSTATE;
382
383 void WINAPI SHGetSettings(LPSHELLFLAGSTATE lpsfs, DWORD dwMask, DWORD dwx);
384
385 #define SSF_SHOWALLOBJECTS              0x0001
386 #define SSF_SHOWEXTENSIONS              0x0002
387 #define SSF_SHOWCOMPCOLOR               0x0008
388 #define SSF_SHOWSYSFILES                0x0020
389 #define SSF_DOUBLECLICKINWEBVIEW        0x0080
390 #define SSF_SHOWATTRIBCOL               0x0100
391 #define SSF_DESKTOPHTML                 0x0200
392 #define SSF_WIN95CLASSIC                0x0400
393 #define SSF_DONTPRETTYPATH              0x0800
394 #define SSF_SHOWINFOTIP                 0x2000
395 #define SSF_MAPNETDRVBUTTON             0x1000
396 #define SSF_NOCONFIRMRECYCLE            0x8000
397 #define SSF_HIDEICONS                   0x4000
398
399 /**********************************************************************/
400
401 #endif /* __WINE_SHLOBJ_H */