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

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

YD: header changes/fixes

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