Stub implementations for SHUpdateImageA, SHHandleUpdateImage,
[wine] / include / shellapi.h
1 /*
2  * Copyright (C) the Wine project
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  */
18
19 #ifndef __WINE_SHELLAPI_H
20 #define __WINE_SHELLAPI_H
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif /* defined(__cplusplus) */
25
26 #include <pshpack1.h>
27
28 DECLARE_HANDLE(HDROP);
29
30 /******************************************
31  * DragObject
32  */
33
34 typedef struct _DRAGINFOA
35 {       UINT uSize;
36         POINT pt;
37         BOOL fNC;
38         LPSTR   lpFileList;
39         DWORD grfKeyState;
40 } DRAGINFOA, *LPDRAGINFOA;
41
42 typedef struct _DRAGINFOW
43 {       UINT uSize;
44         POINT pt;
45         BOOL fNC;
46         LPWSTR  lpFileList;
47         DWORD grfKeyState;
48 } DRAGINFOW, *LPDRAGINFOW;
49
50 DECL_WINELIB_TYPE_AW(DRAGINFO)
51 DECL_WINELIB_TYPE_AW(LPDRAGINFO)
52
53 void    WINAPI DragAcceptFiles(HWND hWnd, BOOL b);
54 UINT    WINAPI DragQueryFileA(HDROP hDrop, UINT lFile, LPSTR lpszFile, UINT lLength);
55 UINT    WINAPI DragQueryFileW(HDROP hDrop, UINT lFile, LPWSTR lpszFile, UINT lLength);
56 #define        DragQueryFile WINELIB_NAME_AW(DragQueryFile)
57 void    WINAPI DragFinish(HDROP h);
58 BOOL    WINAPI DragQueryPoint(HDROP hDrop, POINT *p);
59
60 #define NIF_MESSAGE             0x00000001
61 #define NIF_ICON                0x00000002
62 #define NIF_TIP                 0x00000004
63
64 #define NIM_ADD                 0x00000000
65 #define NIM_MODIFY              0x00000001
66 #define NIM_DELETE              0x00000002
67
68
69
70 /******************************************
71  * Application Bar
72  */
73 #define ABM_NEW                 0x00000000
74 #define ABM_REMOVE              0x00000001
75 #define ABM_QUERYPOS            0x00000002
76 #define ABM_SETPOS              0x00000003
77 #define ABM_GETSTATE            0x00000004
78 #define ABM_GETTASKBARPOS       0x00000005
79 #define ABM_ACTIVATE            0x00000006
80 #define ABM_GETAUTOHIDEBAR      0x00000007
81 #define ABM_SETAUTOHIDEBAR      0x00000008
82 #define ABM_WINDOWPOSCHANGED    0x00000009
83
84 #define ABN_STATECHANGE         0x00000000
85 #define ABN_POSCHANGED          0x00000001
86 #define ABN_FULLSCREENAPP       0x00000002
87 #define ABN_WINDOWARRANGE       0x00000003
88
89 #define ABS_AUTOHIDE            0x00000001
90 #define ABS_ALWAYSONTOP         0x00000002
91
92 #define ABE_LEFT                0
93 #define ABE_TOP                 1
94 #define ABE_RIGHT               2
95 #define ABE_BOTTOM              3
96
97 typedef struct _AppBarData
98 {       DWORD   cbSize;
99         HWND    hWnd;
100         UINT    uCallbackMessage;
101         UINT    uEdge;
102         RECT    rc;
103         LPARAM  lParam;
104 } APPBARDATA, *PAPPBARDATA;
105
106 UINT    WINAPI SHAppBarMessage(DWORD,PAPPBARDATA);
107
108 /******************************************
109  * SHGetFileInfo
110  */
111
112 #define SHGFI_LARGEICON         0x000000000     /* get large icon */
113 #define SHGFI_SMALLICON         0x000000001     /* get small icon */
114 #define SHGFI_OPENICON          0x000000002     /* get open icon */
115 #define SHGFI_SHELLICONSIZE     0x000000004     /* get shell size icon */
116 #define SHGFI_PIDL              0x000000008     /* pszPath is a pidl */
117 #define SHGFI_USEFILEATTRIBUTES 0x000000010     /* use passed dwFileAttribute */
118 #define SHGFI_UNKNOWN1          0x000000020
119 #define SHGFI_UNKNOWN2          0x000000040
120 #define SHGFI_UNKNOWN3          0x000000080
121 #define SHGFI_ICON              0x000000100     /* get icon */
122 #define SHGFI_DISPLAYNAME       0x000000200     /* get display name */
123 #define SHGFI_TYPENAME          0x000000400     /* get type name */
124 #define SHGFI_ATTRIBUTES        0x000000800     /* get attributes */
125 #define SHGFI_ICONLOCATION      0x000001000     /* get icon location */
126 #define SHGFI_EXETYPE           0x000002000     /* return exe type */
127 #define SHGFI_SYSICONINDEX      0x000004000     /* get system icon index */
128 #define SHGFI_LINKOVERLAY       0x000008000     /* put a link overlay on icon */
129 #define SHGFI_SELECTED          0x000010000     /* show icon in selected state */
130 #define SHGFI_ATTR_SPECIFIED    0x000020000     /* get only specified attributes */
131
132 typedef struct tagSHFILEINFOA
133 {       HICON   hIcon;                  /* icon */
134         int     iIcon;                  /* icon index */
135         DWORD   dwAttributes;           /* SFGAO_ flags */
136         CHAR    szDisplayName[MAX_PATH];/* display name (or path) */
137         CHAR    szTypeName[80];         /* type name */
138 } SHFILEINFOA;
139
140 typedef struct tagSHFILEINFOW
141 {       HICON   hIcon;                  /* icon */
142         int     iIcon;                  /* icon index */
143         DWORD   dwAttributes;           /* SFGAO_ flags */
144         WCHAR   szDisplayName[MAX_PATH];/* display name (or path) */
145         WCHAR   szTypeName[80];         /* type name */
146 } SHFILEINFOW;
147
148 DECL_WINELIB_TYPE_AW(SHFILEINFO)
149
150 DWORD   WINAPI SHGetFileInfoA(LPCSTR,DWORD,SHFILEINFOA*,UINT,UINT);
151 DWORD   WINAPI SHGetFileInfoW(LPCWSTR,DWORD,SHFILEINFOW*,UINT,UINT);
152 #define  SHGetFileInfo WINELIB_NAME_AW(SHGetFileInfo)
153
154 /******************************************
155  * SHSetFileInfo
156  */
157
158 /******************************************
159 * SHFileOperation
160 */
161 #define FO_MOVE           0x0001
162 #define FO_COPY           0x0002
163 #define FO_DELETE         0x0003
164 #define FO_RENAME         0x0004
165
166 #define FOF_MULTIDESTFILES         0x0001
167 #define FOF_CONFIRMMOUSE           0x0002
168 #define FOF_SILENT                 0x0004
169 #define FOF_RENAMEONCOLLISION      0x0008
170 #define FOF_NOCONFIRMATION         0x0010
171 #define FOF_WANTMAPPINGHANDLE      0x0020
172 #define FOF_ALLOWUNDO              0x0040
173 #define FOF_FILESONLY              0x0080
174 #define FOF_SIMPLEPROGRESS         0x0100
175 #define FOF_NOCONFIRMMKDIR         0x0200
176 #define FOF_NOERRORUI              0x0400
177 #define FOF_NOCOPYSECURITYATTRIBS  0x0800
178 #define FOF_NORECURSION            0x1000  /* don't do recursion into directories */
179 #define FOF_NO_CONNECTED_ELEMENTS  0x2000  /* don't do connected files */
180 #define FOF_WANTNUKEWARNING        0x4000  /* during delete operation, warn if delete instead
181                                               of recycling (even if FOF_NOCONFIRMATION) */
182 #define FOF_NORECURSEREPARSE       0x8000  /* don't do recursion into reparse points */
183
184 typedef WORD FILEOP_FLAGS;
185
186 #define PO_DELETE       0x0013
187 #define PO_RENAME       0x0014
188 #define PO_PORTCHANGE   0x0020
189 #define PO_REN_PORT     (PO_RENAME | PO_PORTCHANGE)
190
191 typedef WORD PRINTEROP_FLAGS;
192
193 typedef struct _SHFILEOPSTRUCTA
194 { HWND          hwnd;
195   UINT          wFunc;
196   LPCSTR          pFrom;
197   LPCSTR          pTo;
198   FILEOP_FLAGS    fFlags;
199   BOOL          fAnyOperationsAborted;
200   LPVOID          hNameMappings;
201   LPCSTR          lpszProgressTitle;
202 } SHFILEOPSTRUCTA, *LPSHFILEOPSTRUCTA;
203
204 typedef struct _SHFILEOPSTRUCTW
205 { HWND          hwnd;
206   UINT          wFunc;
207   LPCWSTR         pFrom;
208   LPCWSTR         pTo;
209   FILEOP_FLAGS    fFlags;
210   BOOL          fAnyOperationsAborted;
211   LPVOID          hNameMappings;
212   LPCWSTR         lpszProgressTitle;
213 } SHFILEOPSTRUCTW, *LPSHFILEOPSTRUCTW;
214
215 #define  SHFILEOPSTRUCT WINELIB_NAME_AW(SHFILEOPSTRUCT)
216 #define  LPSHFILEOPSTRUCT WINELIB_NAME_AW(LPSHFILEOPSTRUCT)
217
218 int     WINAPI SHFileOperationA (LPSHFILEOPSTRUCTA lpFileOp);
219 int     WINAPI SHFileOperationW (LPSHFILEOPSTRUCTW lpFileOp);
220 #define  SHFileOperation WINELIB_NAME_AW(SHFileOperation)
221
222 typedef struct _SHNAMEMAPPINGA
223 {
224   LPSTR    pszOldPath;
225   LPSTR    pszNewPath;
226   int      cchOldPath;
227   int      cchNewPath;
228 } SHNAMEMAPPINGA, *LPSHNAMEMAPPINGA;
229
230 typedef struct _SHNAMEMAPPINGW
231 {
232   LPWSTR   pszOldPath;
233   LPWSTR   pszNewPath;
234   int      cchOldPath;
235   int      cchNewPath;
236 } SHNAMEMAPPINGW, *LPSHNAMEMAPPINGW;
237
238 DECL_WINELIB_TYPE_AW(SHNAMEMAPPING)
239 DECL_WINELIB_TYPE_AW(LPSHNAMEMAPPING)
240
241 void WINAPI SHFreeNameMappings(HANDLE hNameMappings);
242
243 /******************************************
244  * ShellExecute
245  */
246 #define SE_ERR_SHARE            26
247 #define SE_ERR_ASSOCINCOMPLETE  27
248 #define SE_ERR_DDETIMEOUT       28
249 #define SE_ERR_DDEFAIL          29
250 #define SE_ERR_DDEBUSY          30
251 #define SE_ERR_NOASSOC          31
252
253 HINSTANCE       WINAPI ShellExecuteA(HWND,LPCSTR,LPCSTR,LPCSTR,LPCSTR,INT);
254 HINSTANCE       WINAPI ShellExecuteW(HWND,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR,INT);
255 #define     ShellExecute WINELIB_NAME_AW(ShellExecute)
256
257 #define SE_ERR_FNF              2       /* file not found */
258 #define SE_ERR_PNF              3       /* path not found */
259 #define SE_ERR_ACCESSDENIED     5       /* access denied */
260 #define SE_ERR_OOM              8       /* out of memory */
261 #define SE_ERR_DLLNOTFOUND      32
262 #define SE_ERR_SHARE                    26
263 #define SE_ERR_ASSOCINCOMPLETE          27
264 #define SE_ERR_DDETIMEOUT               28
265 #define SE_ERR_DDEFAIL                  29
266 #define SE_ERR_DDEBUSY                  30
267 #define SE_ERR_NOASSOC                  31
268
269 #define SEE_MASK_CLASSNAME        0x00000001
270 #define SEE_MASK_CLASSKEY         0x00000003
271 #define SEE_MASK_IDLIST           0x00000004
272 #define SEE_MASK_INVOKEIDLIST     0x0000000c
273 #define SEE_MASK_ICON             0x00000010
274 #define SEE_MASK_HOTKEY           0x00000020
275 #define SEE_MASK_NOCLOSEPROCESS   0x00000040
276 #define SEE_MASK_CONNECTNETDRV    0x00000080
277 #define SEE_MASK_FLAG_DDEWAIT     0x00000100
278 #define SEE_MASK_DOENVSUBST       0x00000200
279 #define SEE_MASK_FLAG_NO_UI       0x00000400
280 #define SEE_MASK_UNICODE          0x00004000
281 #define SEE_MASK_NO_CONSOLE       0x00008000
282 #define SEE_MASK_ASYNCOK          0x00100000
283 #define SEE_MASK_HMONITOR         0x00200000
284
285 typedef struct _SHELLEXECUTEINFOA
286 {       DWORD cbSize;
287         ULONG fMask;
288         HWND hwnd;
289         LPCSTR   lpVerb;
290         LPCSTR   lpFile;
291         LPCSTR   lpParameters;
292         LPCSTR   lpDirectory;
293        INT nShow;
294         HINSTANCE hInstApp;
295         /* Optional fields */
296         LPVOID lpIDList;
297         LPCSTR   lpClass;
298         HKEY hkeyClass;
299         DWORD dwHotKey;
300         union
301         { HANDLE hIcon;
302           HANDLE hMonitor;
303         } DUMMYUNIONNAME;
304         HANDLE hProcess;
305 } SHELLEXECUTEINFOA, *LPSHELLEXECUTEINFOA;
306
307 typedef struct _SHELLEXECUTEINFOW
308 {       DWORD cbSize;
309         ULONG fMask;
310         HWND hwnd;
311         LPCWSTR  lpVerb;
312         LPCWSTR  lpFile;
313         LPCWSTR  lpParameters;
314         LPCWSTR  lpDirectory;
315        INT nShow;
316         HINSTANCE hInstApp;
317         /* Optional fields*/
318         LPVOID lpIDList;
319         LPCWSTR  lpClass;
320         HKEY hkeyClass;
321         DWORD dwHotKey;
322         union
323         { HANDLE hIcon;
324           HANDLE hMonitor;
325         } DUMMYUNIONNAME;
326         HANDLE hProcess;
327 } SHELLEXECUTEINFOW, *LPSHELLEXECUTEINFOW;
328
329 #define SHELLEXECUTEINFO   WINELIB_NAME_AW(SHELLEXECUTEINFO)
330 #define LPSHELLEXECUTEINFO WINELIB_NAME_AW(LPSHELLEXECUTEINFO)
331
332 BOOL WINAPI ShellExecuteExA(LPSHELLEXECUTEINFOA lpExecInfo);
333 BOOL WINAPI ShellExecuteExW(LPSHELLEXECUTEINFOW lpExecInfo);
334 #define ShellExecuteEx  WINELIB_NAME_AW(ShellExecuteEx)
335
336 void WINAPI WinExecErrorA(HWND hwnd,INT error, LPCSTR lpstrFileName, LPCSTR lpstrTitle);
337 void WINAPI WinExecErrorW(HWND hwnd,INT error, LPCWSTR lpstrFileName, LPCWSTR lpstrTitle);
338 #define WinExecError  WINELIB_NAME_AW(WinExecError)
339
340 /******************************************
341  * Tray Notification
342  */
343 typedef struct _NOTIFYICONDATAA
344 {       DWORD cbSize;
345         HWND hWnd;
346         UINT uID;
347         UINT uFlags;
348         UINT uCallbackMessage;
349         HICON hIcon;
350         CHAR szTip[128];
351         DWORD dwState;
352         DWORD dwStateMask;
353         CHAR szInfo[256];
354         union {
355             UINT uTimeout;
356             UINT uVersion;
357         } DUMMYUNIONNAME;
358         CHAR szInfoTitle[64];
359         DWORD dwInfoFlags;
360 } NOTIFYICONDATAA, *PNOTIFYICONDATAA;
361
362 typedef struct _NOTIFYICONDATAW
363 {       DWORD cbSize;
364         HWND hWnd;
365         UINT uID;
366         UINT uFlags;
367         UINT uCallbackMessage;
368         HICON hIcon;
369         WCHAR szTip[128];
370         DWORD dwState;
371         DWORD dwStateMask;
372         WCHAR szInfo[256];
373         union {
374             UINT uTimeout;
375             UINT uVersion;
376         } DUMMYUNIONNAME;
377         WCHAR szInfoTitle[64];
378         DWORD dwInfoFlags;
379 } NOTIFYICONDATAW, *PNOTIFYICONDATAW;
380
381 DECL_WINELIB_TYPE_AW(NOTIFYICONDATA)
382 DECL_WINELIB_TYPE_AW(PNOTIFYICONDATA)
383
384 BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA lpData);
385 BOOL WINAPI Shell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW lpData);
386
387 #define Shell_NotifyIcon WINELIB_NAME_AW(Shell_NotifyIcon)
388
389 /******************************************
390  * Links
391  */
392
393 #define SHGNLI_PIDL        0x01
394 #define SHGNLI_PREFIXNAME  0x02
395 #define SHGNLI_NOUNIQUE    0x04
396 #define SHGNLI_NOLNK       0x08
397
398 BOOL WINAPI SHGetNewLinkInfoA(LPCSTR,LPCSTR,LPSTR,BOOL*,UINT);
399 BOOL WINAPI SHGetNewLinkInfoW(LPCWSTR,LPCWSTR,LPWSTR,BOOL*,UINT);
400 #define     SHGetNewLinkInfo WINELIB_NAME_AW(SHGetNewLinkInfo)
401
402 /******************************************
403  * Recycle bin
404  */
405
406 typedef struct _SHQUERYRBINFO
407 {
408     DWORD cbSize;
409     DWORDLONG i64Size;
410     DWORDLONG i64NumItems;
411 } SHQUERYRBINFO, *LPSHQUERYRBINFO;
412
413 HRESULT     WINAPI SHEmptyRecycleBinA(HWND,LPCSTR,DWORD);
414 HRESULT     WINAPI SHEmptyRecycleBinW(HWND,LPCWSTR,DWORD);
415 #define     SHEmptyRecycleBin WINELIB_NAME_AW(SHEmptyRecycleBin)
416 HRESULT     WINAPI SHQueryRecycleBinA(LPCSTR,LPSHQUERYRBINFO);
417 HRESULT     WINAPI SHQueryRecycleBinW(LPCWSTR,LPSHQUERYRBINFO);
418 #define     SHQueryRecycleBin WINELIB_NAME_AW(SHQueryRecycleBin)
419
420 /******************************************
421  * Misc
422  */
423
424 LPWSTR*     WINAPI CommandLineToArgvW(LPCWSTR,int*);
425 HICON       WINAPI ExtractIconA(HINSTANCE,LPCSTR,UINT);
426 HICON       WINAPI ExtractIconW(HINSTANCE,LPCWSTR,UINT);
427 #define     ExtractIcon WINELIB_NAME_AW(ExtractIcon)
428 HICON       WINAPI ExtractAssociatedIconA(HINSTANCE,LPSTR,LPWORD);
429 HICON       WINAPI ExtractAssociatedIconW(HINSTANCE,LPWSTR,LPWORD);
430 #define     ExtractAssociatedIcon WINELIB_NAME_AW(ExtractAssociatedIcon)
431 HICON       WINAPI ExtractAssociatedIconExA(HINSTANCE,LPSTR,LPWORD,LPWORD);
432 HICON       WINAPI ExtractAssociatedIconExW(HINSTANCE,LPWSTR,LPWORD,LPWORD);
433 #define     ExtractAssociatedIconEx WINELIB_NAME_AW(ExtractAssociatedIconEx)
434 UINT        WINAPI ExtractIconExA(LPCSTR,INT,HICON*,HICON*,UINT);
435 UINT        WINAPI ExtractIconExW(LPCWSTR,INT,HICON*,HICON*,UINT);
436 #define     ExtractIconEx WINELIB_NAME_AW(ExtractIconEx)
437 HINSTANCE   WINAPI FindExecutableA(LPCSTR,LPCSTR,LPSTR);
438 HINSTANCE   WINAPI FindExecutableW(LPCWSTR,LPCWSTR,LPWSTR);
439 #define     FindExecutable WINELIB_NAME_AW(FindExecutable)
440 BOOL        WINAPI ShellAboutA(HWND,LPCSTR,LPCSTR,HICON);
441 BOOL        WINAPI ShellAboutW(HWND,LPCWSTR,LPCWSTR,HICON);
442 #define     ShellAbout WINELIB_NAME_AW(ShellAbout)
443 int         WINAPIV ShellMessageBoxA(HINSTANCE,HWND,LPCSTR,LPCSTR,UINT,...);
444 int         WINAPIV ShellMessageBoxW(HINSTANCE,HWND,LPCWSTR,LPCWSTR,UINT,...);
445 #define     ShellMessageBox WINELIB_NAME_AW(ShellMessageBox)
446
447 #ifdef __cplusplus
448 } /* extern "C" */
449 #endif /* defined(__cplusplus) */
450
451 #include <poppack.h>
452
453 #endif /* __WINE_SHELLAPI_H */