Test for argv handling.
[wine/multimedia.git] / include / shellapi.h
blob950eab9bbac338b8f92db8acac317eb3ab4618c8
1 /*
2 * Copyright (C) the Wine project
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.
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.
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
19 #ifndef __WINE_SHELLAPI_H
20 #define __WINE_SHELLAPI_H
22 #ifdef __cplusplus
23 extern "C" {
24 #endif /* defined(__cplusplus) */
26 #include <pshpack1.h>
28 DECLARE_HANDLE(HDROP);
30 /******************************************
31 * DragObject
34 typedef struct _DRAGINFOA
35 { UINT uSize;
36 POINT pt;
37 BOOL fNC;
38 LPSTR lpFileList;
39 DWORD grfKeyState;
40 } DRAGINFOA, *LPDRAGINFOA;
42 typedef struct _DRAGINFOW
43 { UINT uSize;
44 POINT pt;
45 BOOL fNC;
46 LPWSTR lpFileList;
47 DWORD grfKeyState;
48 } DRAGINFOW, *LPDRAGINFOW;
50 DECL_WINELIB_TYPE_AW(DRAGINFO)
51 DECL_WINELIB_TYPE_AW(LPDRAGINFO)
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);
60 #define NIF_MESSAGE 0x00000001
61 #define NIF_ICON 0x00000002
62 #define NIF_TIP 0x00000004
64 #define NIM_ADD 0x00000000
65 #define NIM_MODIFY 0x00000001
66 #define NIM_DELETE 0x00000002
70 /******************************************
71 * Application Bar
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
84 #define ABN_STATECHANGE 0x00000000
85 #define ABN_POSCHANGED 0x00000001
86 #define ABN_FULLSCREENAPP 0x00000002
87 #define ABN_WINDOWARRANGE 0x00000003
89 #define ABS_AUTOHIDE 0x00000001
90 #define ABS_ALWAYSONTOP 0x00000002
92 #define ABE_LEFT 0
93 #define ABE_TOP 1
94 #define ABE_RIGHT 2
95 #define ABE_BOTTOM 3
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;
106 UINT WINAPI SHAppBarMessage(DWORD,PAPPBARDATA);
108 /******************************************
109 * SHGetFileInfo
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_ADDOVERLAYS 0x000000020
119 #define SHGFI_OVERLAYINDEX 0x000000040
120 #define SHGFI_ICON 0x000000100 /* get icon */
121 #define SHGFI_DISPLAYNAME 0x000000200 /* get display name */
122 #define SHGFI_TYPENAME 0x000000400 /* get type name */
123 #define SHGFI_ATTRIBUTES 0x000000800 /* get attributes */
124 #define SHGFI_ICONLOCATION 0x000001000 /* get icon location */
125 #define SHGFI_EXETYPE 0x000002000 /* return exe type */
126 #define SHGFI_SYSICONINDEX 0x000004000 /* get system icon index */
127 #define SHGFI_LINKOVERLAY 0x000008000 /* put a link overlay on icon */
128 #define SHGFI_SELECTED 0x000010000 /* show icon in selected state */
129 #define SHGFI_ATTR_SPECIFIED 0x000020000 /* get only specified attributes */
131 typedef struct tagSHFILEINFOA
132 { HICON hIcon; /* icon */
133 int iIcon; /* icon index */
134 DWORD dwAttributes; /* SFGAO_ flags */
135 CHAR szDisplayName[MAX_PATH];/* display name (or path) */
136 CHAR szTypeName[80]; /* type name */
137 } SHFILEINFOA;
139 typedef struct tagSHFILEINFOW
140 { HICON hIcon; /* icon */
141 int iIcon; /* icon index */
142 DWORD dwAttributes; /* SFGAO_ flags */
143 WCHAR szDisplayName[MAX_PATH];/* display name (or path) */
144 WCHAR szTypeName[80]; /* type name */
145 } SHFILEINFOW;
147 DECL_WINELIB_TYPE_AW(SHFILEINFO)
149 DWORD_PTR WINAPI SHGetFileInfoA(LPCSTR,DWORD,SHFILEINFOA*,UINT,UINT);
150 DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR,DWORD,SHFILEINFOW*,UINT,UINT);
151 #define SHGetFileInfo WINELIB_NAME_AW(SHGetFileInfo)
153 /******************************************
154 * SHSetFileInfo
157 /******************************************
158 * SHFileOperation
160 #define FO_MOVE 0x0001
161 #define FO_COPY 0x0002
162 #define FO_DELETE 0x0003
163 #define FO_RENAME 0x0004
165 #define FOF_MULTIDESTFILES 0x0001
166 #define FOF_CONFIRMMOUSE 0x0002
167 #define FOF_SILENT 0x0004
168 #define FOF_RENAMEONCOLLISION 0x0008
169 #define FOF_NOCONFIRMATION 0x0010
170 #define FOF_WANTMAPPINGHANDLE 0x0020
171 #define FOF_ALLOWUNDO 0x0040
172 #define FOF_FILESONLY 0x0080
173 #define FOF_SIMPLEPROGRESS 0x0100
174 #define FOF_NOCONFIRMMKDIR 0x0200
175 #define FOF_NOERRORUI 0x0400
176 #define FOF_NOCOPYSECURITYATTRIBS 0x0800
177 #define FOF_NORECURSION 0x1000 /* don't do recursion into directories */
178 #define FOF_NO_CONNECTED_ELEMENTS 0x2000 /* don't do connected files */
179 #define FOF_WANTNUKEWARNING 0x4000 /* during delete operation, warn if delete instead
180 of recycling (even if FOF_NOCONFIRMATION) */
181 #define FOF_NORECURSEREPARSE 0x8000 /* don't do recursion into reparse points */
183 typedef WORD FILEOP_FLAGS;
185 #define PO_DELETE 0x0013
186 #define PO_RENAME 0x0014
187 #define PO_PORTCHANGE 0x0020
188 #define PO_REN_PORT (PO_RENAME | PO_PORTCHANGE)
190 typedef WORD PRINTEROP_FLAGS;
192 typedef struct _SHFILEOPSTRUCTA
193 { HWND hwnd;
194 UINT wFunc;
195 LPCSTR pFrom;
196 LPCSTR pTo;
197 FILEOP_FLAGS fFlags;
198 BOOL fAnyOperationsAborted;
199 LPVOID hNameMappings;
200 LPCSTR lpszProgressTitle;
201 } SHFILEOPSTRUCTA, *LPSHFILEOPSTRUCTA;
203 typedef struct _SHFILEOPSTRUCTW
204 { HWND hwnd;
205 UINT wFunc;
206 LPCWSTR pFrom;
207 LPCWSTR pTo;
208 FILEOP_FLAGS fFlags;
209 BOOL fAnyOperationsAborted;
210 LPVOID hNameMappings;
211 LPCWSTR lpszProgressTitle;
212 } SHFILEOPSTRUCTW, *LPSHFILEOPSTRUCTW;
214 #define SHFILEOPSTRUCT WINELIB_NAME_AW(SHFILEOPSTRUCT)
215 #define LPSHFILEOPSTRUCT WINELIB_NAME_AW(LPSHFILEOPSTRUCT)
217 int WINAPI SHFileOperationA (LPSHFILEOPSTRUCTA lpFileOp);
218 int WINAPI SHFileOperationW (LPSHFILEOPSTRUCTW lpFileOp);
219 #define SHFileOperation WINELIB_NAME_AW(SHFileOperation)
221 typedef struct _SHNAMEMAPPINGA
223 LPSTR pszOldPath;
224 LPSTR pszNewPath;
225 int cchOldPath;
226 int cchNewPath;
227 } SHNAMEMAPPINGA, *LPSHNAMEMAPPINGA;
229 typedef struct _SHNAMEMAPPINGW
231 LPWSTR pszOldPath;
232 LPWSTR pszNewPath;
233 int cchOldPath;
234 int cchNewPath;
235 } SHNAMEMAPPINGW, *LPSHNAMEMAPPINGW;
237 DECL_WINELIB_TYPE_AW(SHNAMEMAPPING)
238 DECL_WINELIB_TYPE_AW(LPSHNAMEMAPPING)
240 void WINAPI SHFreeNameMappings(HANDLE hNameMappings);
242 /******************************************
243 * ShellExecute
245 #define SE_ERR_SHARE 26
246 #define SE_ERR_ASSOCINCOMPLETE 27
247 #define SE_ERR_DDETIMEOUT 28
248 #define SE_ERR_DDEFAIL 29
249 #define SE_ERR_DDEBUSY 30
250 #define SE_ERR_NOASSOC 31
252 HINSTANCE WINAPI ShellExecuteA(HWND,LPCSTR,LPCSTR,LPCSTR,LPCSTR,INT);
253 HINSTANCE WINAPI ShellExecuteW(HWND,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR,INT);
254 #define ShellExecute WINELIB_NAME_AW(ShellExecute)
256 #define SE_ERR_FNF 2 /* file not found */
257 #define SE_ERR_PNF 3 /* path not found */
258 #define SE_ERR_ACCESSDENIED 5 /* access denied */
259 #define SE_ERR_OOM 8 /* out of memory */
260 #define SE_ERR_DLLNOTFOUND 32
261 #define SE_ERR_SHARE 26
262 #define SE_ERR_ASSOCINCOMPLETE 27
263 #define SE_ERR_DDETIMEOUT 28
264 #define SE_ERR_DDEFAIL 29
265 #define SE_ERR_DDEBUSY 30
266 #define SE_ERR_NOASSOC 31
268 #define SEE_MASK_CLASSNAME 0x00000001
269 #define SEE_MASK_CLASSKEY 0x00000003
270 #define SEE_MASK_IDLIST 0x00000004
271 #define SEE_MASK_INVOKEIDLIST 0x0000000c
272 #define SEE_MASK_ICON 0x00000010
273 #define SEE_MASK_HOTKEY 0x00000020
274 #define SEE_MASK_NOCLOSEPROCESS 0x00000040
275 #define SEE_MASK_CONNECTNETDRV 0x00000080
276 #define SEE_MASK_FLAG_DDEWAIT 0x00000100
277 #define SEE_MASK_DOENVSUBST 0x00000200
278 #define SEE_MASK_FLAG_NO_UI 0x00000400
279 #define SEE_MASK_UNICODE 0x00004000
280 #define SEE_MASK_NO_CONSOLE 0x00008000
281 #define SEE_MASK_ASYNCOK 0x00100000
282 #define SEE_MASK_HMONITOR 0x00200000
283 #define SEE_MASK_NOZONECHECKS 0x00800000
284 #define SEE_MASK_NOQUERYCLASSSTORE 0x01000000
285 #define SEE_MASK_WAITFORINPUTIDLE 0x02000000
286 #define SEE_MASK_FLAG_LOG_USAGE 0x04000000
288 typedef struct _SHELLEXECUTEINFOA
289 { DWORD cbSize;
290 ULONG fMask;
291 HWND hwnd;
292 LPCSTR lpVerb;
293 LPCSTR lpFile;
294 LPCSTR lpParameters;
295 LPCSTR lpDirectory;
296 INT nShow;
297 HINSTANCE hInstApp;
298 /* Optional fields */
299 LPVOID lpIDList;
300 LPCSTR lpClass;
301 HKEY hkeyClass;
302 DWORD dwHotKey;
303 union
304 { HANDLE hIcon;
305 HANDLE hMonitor;
306 } DUMMYUNIONNAME;
307 HANDLE hProcess;
308 } SHELLEXECUTEINFOA, *LPSHELLEXECUTEINFOA;
310 typedef struct _SHELLEXECUTEINFOW
311 { DWORD cbSize;
312 ULONG fMask;
313 HWND hwnd;
314 LPCWSTR lpVerb;
315 LPCWSTR lpFile;
316 LPCWSTR lpParameters;
317 LPCWSTR lpDirectory;
318 INT nShow;
319 HINSTANCE hInstApp;
320 /* Optional fields*/
321 LPVOID lpIDList;
322 LPCWSTR lpClass;
323 HKEY hkeyClass;
324 DWORD dwHotKey;
325 union
326 { HANDLE hIcon;
327 HANDLE hMonitor;
328 } DUMMYUNIONNAME;
329 HANDLE hProcess;
330 } SHELLEXECUTEINFOW, *LPSHELLEXECUTEINFOW;
332 #define SHELLEXECUTEINFO WINELIB_NAME_AW(SHELLEXECUTEINFO)
333 #define LPSHELLEXECUTEINFO WINELIB_NAME_AW(LPSHELLEXECUTEINFO)
335 BOOL WINAPI ShellExecuteExA(LPSHELLEXECUTEINFOA lpExecInfo);
336 BOOL WINAPI ShellExecuteExW(LPSHELLEXECUTEINFOW lpExecInfo);
337 #define ShellExecuteEx WINELIB_NAME_AW(ShellExecuteEx)
339 void WINAPI WinExecErrorA(HWND hwnd,INT error, LPCSTR lpstrFileName, LPCSTR lpstrTitle);
340 void WINAPI WinExecErrorW(HWND hwnd,INT error, LPCWSTR lpstrFileName, LPCWSTR lpstrTitle);
341 #define WinExecError WINELIB_NAME_AW(WinExecError)
343 /******************************************
344 * Tray Notification
346 typedef struct _NOTIFYICONDATAA
347 { DWORD cbSize;
348 HWND hWnd;
349 UINT uID;
350 UINT uFlags;
351 UINT uCallbackMessage;
352 HICON hIcon;
353 CHAR szTip[128];
354 DWORD dwState;
355 DWORD dwStateMask;
356 CHAR szInfo[256];
357 union {
358 UINT uTimeout;
359 UINT uVersion;
360 } DUMMYUNIONNAME;
361 CHAR szInfoTitle[64];
362 DWORD dwInfoFlags;
363 } NOTIFYICONDATAA, *PNOTIFYICONDATAA;
365 typedef struct _NOTIFYICONDATAW
366 { DWORD cbSize;
367 HWND hWnd;
368 UINT uID;
369 UINT uFlags;
370 UINT uCallbackMessage;
371 HICON hIcon;
372 WCHAR szTip[128];
373 DWORD dwState;
374 DWORD dwStateMask;
375 WCHAR szInfo[256];
376 union {
377 UINT uTimeout;
378 UINT uVersion;
379 } DUMMYUNIONNAME;
380 WCHAR szInfoTitle[64];
381 DWORD dwInfoFlags;
382 } NOTIFYICONDATAW, *PNOTIFYICONDATAW;
384 DECL_WINELIB_TYPE_AW(NOTIFYICONDATA)
385 DECL_WINELIB_TYPE_AW(PNOTIFYICONDATA)
387 BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA lpData);
388 BOOL WINAPI Shell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW lpData);
390 #define Shell_NotifyIcon WINELIB_NAME_AW(Shell_NotifyIcon)
392 /******************************************
393 * Links
396 #define SHGNLI_PIDL 0x01
397 #define SHGNLI_PREFIXNAME 0x02
398 #define SHGNLI_NOUNIQUE 0x04
399 #define SHGNLI_NOLNK 0x08
401 BOOL WINAPI SHGetNewLinkInfoA(LPCSTR,LPCSTR,LPSTR,BOOL*,UINT);
402 BOOL WINAPI SHGetNewLinkInfoW(LPCWSTR,LPCWSTR,LPWSTR,BOOL*,UINT);
403 #define SHGetNewLinkInfo WINELIB_NAME_AW(SHGetNewLinkInfo)
405 /******************************************
406 * Recycle bin
409 typedef struct _SHQUERYRBINFO
411 DWORD cbSize;
412 DWORDLONG i64Size;
413 DWORDLONG i64NumItems;
414 } SHQUERYRBINFO, *LPSHQUERYRBINFO;
416 HRESULT WINAPI SHEmptyRecycleBinA(HWND,LPCSTR,DWORD);
417 HRESULT WINAPI SHEmptyRecycleBinW(HWND,LPCWSTR,DWORD);
418 #define SHEmptyRecycleBin WINELIB_NAME_AW(SHEmptyRecycleBin)
419 HRESULT WINAPI SHQueryRecycleBinA(LPCSTR,LPSHQUERYRBINFO);
420 HRESULT WINAPI SHQueryRecycleBinW(LPCWSTR,LPSHQUERYRBINFO);
421 #define SHQueryRecycleBin WINELIB_NAME_AW(SHQueryRecycleBin)
423 /******************************************
424 * Misc
427 LPWSTR* WINAPI CommandLineToArgvW(LPCWSTR,int*);
428 HICON WINAPI ExtractIconA(HINSTANCE,LPCSTR,UINT);
429 HICON WINAPI ExtractIconW(HINSTANCE,LPCWSTR,UINT);
430 #define ExtractIcon WINELIB_NAME_AW(ExtractIcon)
431 HICON WINAPI ExtractAssociatedIconA(HINSTANCE,LPSTR,LPWORD);
432 HICON WINAPI ExtractAssociatedIconW(HINSTANCE,LPWSTR,LPWORD);
433 #define ExtractAssociatedIcon WINELIB_NAME_AW(ExtractAssociatedIcon)
434 HICON WINAPI ExtractAssociatedIconExA(HINSTANCE,LPSTR,LPWORD,LPWORD);
435 HICON WINAPI ExtractAssociatedIconExW(HINSTANCE,LPWSTR,LPWORD,LPWORD);
436 #define ExtractAssociatedIconEx WINELIB_NAME_AW(ExtractAssociatedIconEx)
437 UINT WINAPI ExtractIconExA(LPCSTR,INT,HICON*,HICON*,UINT);
438 UINT WINAPI ExtractIconExW(LPCWSTR,INT,HICON*,HICON*,UINT);
439 #define ExtractIconEx WINELIB_NAME_AW(ExtractIconEx)
440 HINSTANCE WINAPI FindExecutableA(LPCSTR,LPCSTR,LPSTR);
441 HINSTANCE WINAPI FindExecutableW(LPCWSTR,LPCWSTR,LPWSTR);
442 #define FindExecutable WINELIB_NAME_AW(FindExecutable)
443 BOOL WINAPI ShellAboutA(HWND,LPCSTR,LPCSTR,HICON);
444 BOOL WINAPI ShellAboutW(HWND,LPCWSTR,LPCWSTR,HICON);
445 #define ShellAbout WINELIB_NAME_AW(ShellAbout)
446 int WINAPIV ShellMessageBoxA(HINSTANCE,HWND,LPCSTR,LPCSTR,UINT,...);
447 int WINAPIV ShellMessageBoxW(HINSTANCE,HWND,LPCWSTR,LPCWSTR,UINT,...);
448 #define ShellMessageBox WINELIB_NAME_AW(ShellMessageBox)
449 DWORD WINAPI DoEnvironmentSubstA(LPSTR, UINT);
450 DWORD WINAPI DoEnvironmentSubstW(LPWSTR, UINT);
451 #define DoEnvironmentSubst WINELIB_NAME_AW(DoEnvironmentSubst)
454 #ifdef __cplusplus
455 } /* extern "C" */
456 #endif /* defined(__cplusplus) */
458 #include <poppack.h>
460 #endif /* __WINE_SHELLAPI_H */