More Escapes for the PostScript driver.
[wine.git] / include / shlobj.h
blob5871c90df83960ad97489bc8e1daad56fa20e880
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"
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"
21 #define STDMETHOD(xfn) HRESULT (CALLBACK *fn##xfn)
22 #define STDMETHOD_(type,xfn) type (CALLBACK *fn##xfn)
23 #define PURE
24 #define FAR
25 #define THIS_ THIS,
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;
41 typedef struct
42 { UINT cidl;
43 UINT aoffset[1];
44 } CIDA, *LPCIDA;
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"
73 * NOTES
74 * interal data holder for IDataObject
76 typedef struct tagLPIDLLIST *LPIDLLIST, IDLList;
78 #define THIS LPIDLLIST me
80 typedef enum
81 { State_UnInit=1,
82 State_Init=2,
83 State_OutOfMem=3
84 } IDLListState;
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;
96 struct tagLPIDLLIST
97 { LPIDLLIST_VTABLE lpvtbl;
98 HDPA dpa;
99 UINT uStep;
102 extern LPIDLLIST IDLList_Constructor (UINT uStep);
103 extern void IDLList_Destructor(LPIDLLIST me);
104 #undef THIS
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;
134 struct tagSHELLICON
135 { LPSHELLICON_VTABLE lpvtbl;
136 DWORD ref;
138 #undef THIS
140 /****************************************************************************
141 * Shell Execute API
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
172 { DWORD cbSize;
173 ULONG fMask;
174 HWND hwnd;
175 LPCSTR lpVerb;
176 LPCSTR lpFile;
177 LPCSTR lpParameters;
178 LPCSTR lpDirectory;
179 INT nShow;
180 HINSTANCE hInstApp;
181 /* Optional fields */
182 LPVOID lpIDList;
183 LPCSTR lpClass;
184 HKEY hkeyClass;
185 DWORD dwHotKey;
186 union
187 { HANDLE hIcon;
188 HANDLE hMonitor;
189 } u;
190 HANDLE hProcess;
191 } SHELLEXECUTEINFOA, *LPSHELLEXECUTEINFOA;
193 typedef struct _SHELLEXECUTEINFOW
194 { DWORD cbSize;
195 ULONG fMask;
196 HWND hwnd;
197 LPCWSTR lpVerb;
198 LPCWSTR lpFile;
199 LPCWSTR lpParameters;
200 LPCWSTR lpDirectory;
201 INT nShow;
202 HINSTANCE hInstApp;
203 /* Optional fields*/
204 LPVOID lpIDList;
205 LPCWSTR lpClass;
206 HKEY hkeyClass;
207 DWORD dwHotKey;
208 union
209 { HANDLE hIcon;
210 HANDLE hMonitor;
211 } u;
212 HANDLE hProcess;
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 {
234 HWND hwndOwner;
235 LPCITEMIDLIST pidlRoot;
236 LPSTR pszDisplayName;
237 LPCSTR lpszTitle;
238 UINT ulFlags;
239 BFFCALLBACK lpfn;
240 LPARAM lParam;
241 INT iImage;
242 } BROWSEINFOA, *PBROWSEINFOA, *LPBROWSEINFOA;
244 typedef struct tagBROWSEINFOW {
245 HWND hwndOwner;
246 LPCITEMIDLIST pidlRoot;
247 LPWSTR pszDisplayName;
248 LPCWSTR lpszTitle;
249 UINT ulFlags;
250 BFFCALLBACK lpfn;
251 LPARAM lParam;
252 INT iImage;
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)
285 #ifdef UNICODE
286 #define SHBrowseForFolder SHBrowseForFolderW
287 #define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTW
288 #define BFFM_SETSELECTION BFFM_SETSELECTIONW
290 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDW
291 #else
292 #define SHBrowseForFolder SHBrowseForFolderA
293 #define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTA
294 #define BFFM_SETSELECTION BFFM_SETSELECTIONA
296 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDA
297 #endif
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;
331 CLSID clsid;
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 /****************************************************************************
340 * shlview structures
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 */
366 { DWORD dwSize;
367 LPSHELLFOLDER pShellFolder;
368 DWORD dwUserParam;
369 LPCITEMIDLIST pidl;
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".
380 typedef struct
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;
393 BOOL fHideIcons : 1;
394 UINT fRestFlags : 3;
395 } SHELLFLAGSTATE, * LPSHELLFLAGSTATE;
398 DWORD WINAPI SHGetMalloc(LPMALLOC *lpmal) ;
400 #undef PURE
401 #undef FAR
402 #undef THIS
403 #undef THIS_
404 #undef STDMETHOD
405 #undef STDMETHOD_
407 #endif /* __WINE_SHLOBJ_H */