dinput: OS/X joystick add axes.
[wine/hacks.git] / include / shellapi.h
blob930f261d050fb739b8b8047a843b8f8098808656
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __WINE_SHELLAPI_H
20 #define __WINE_SHELLAPI_H
22 #ifdef __cplusplus
23 extern "C" {
24 #endif /* defined(__cplusplus) */
26 #ifndef _WIN64
27 #include <pshpack1.h>
28 #endif
30 DECLARE_HANDLE(HDROP);
32 /******************************************
33 * DragObject
36 typedef struct _DRAGINFOA
37 { UINT uSize;
38 POINT pt;
39 BOOL fNC;
40 LPSTR lpFileList;
41 DWORD grfKeyState;
42 } DRAGINFOA, *LPDRAGINFOA;
44 typedef struct _DRAGINFOW
45 { UINT uSize;
46 POINT pt;
47 BOOL fNC;
48 LPWSTR lpFileList;
49 DWORD grfKeyState;
50 } DRAGINFOW, *LPDRAGINFOW;
52 DECL_WINELIB_TYPE_AW(DRAGINFO)
53 DECL_WINELIB_TYPE_AW(LPDRAGINFO)
55 void WINAPI DragAcceptFiles(HWND hWnd, BOOL b);
56 UINT WINAPI DragQueryFileA(HDROP hDrop, UINT lFile, LPSTR lpszFile, UINT lLength);
57 UINT WINAPI DragQueryFileW(HDROP hDrop, UINT lFile, LPWSTR lpszFile, UINT lLength);
58 #define DragQueryFile WINELIB_NAME_AW(DragQueryFile)
59 void WINAPI DragFinish(HDROP h);
60 BOOL WINAPI DragQueryPoint(HDROP hDrop, POINT *p);
64 /******************************************
65 * Application Bar
67 #define ABM_NEW 0x00000000
68 #define ABM_REMOVE 0x00000001
69 #define ABM_QUERYPOS 0x00000002
70 #define ABM_SETPOS 0x00000003
71 #define ABM_GETSTATE 0x00000004
72 #define ABM_GETTASKBARPOS 0x00000005
73 #define ABM_ACTIVATE 0x00000006
74 #define ABM_GETAUTOHIDEBAR 0x00000007
75 #define ABM_SETAUTOHIDEBAR 0x00000008
76 #define ABM_WINDOWPOSCHANGED 0x00000009
78 #define ABN_STATECHANGE 0x00000000
79 #define ABN_POSCHANGED 0x00000001
80 #define ABN_FULLSCREENAPP 0x00000002
81 #define ABN_WINDOWARRANGE 0x00000003
83 #define ABS_AUTOHIDE 0x00000001
84 #define ABS_ALWAYSONTOP 0x00000002
86 #define ABE_LEFT 0
87 #define ABE_TOP 1
88 #define ABE_RIGHT 2
89 #define ABE_BOTTOM 3
91 typedef struct _AppBarData
92 { DWORD cbSize;
93 HWND hWnd;
94 UINT uCallbackMessage;
95 UINT uEdge;
96 RECT rc;
97 LPARAM lParam;
98 } APPBARDATA, *PAPPBARDATA;
100 UINT_PTR WINAPI SHAppBarMessage(DWORD,PAPPBARDATA);
102 /******************************************
103 * SHGetFileInfo
106 #define SHGFI_LARGEICON 0x000000000 /* get large icon */
107 #define SHGFI_SMALLICON 0x000000001 /* get small icon */
108 #define SHGFI_OPENICON 0x000000002 /* get open icon */
109 #define SHGFI_SHELLICONSIZE 0x000000004 /* get shell size icon */
110 #define SHGFI_PIDL 0x000000008 /* pszPath is a pidl */
111 #define SHGFI_USEFILEATTRIBUTES 0x000000010 /* use passed dwFileAttribute */
112 #define SHGFI_ADDOVERLAYS 0x000000020
113 #define SHGFI_OVERLAYINDEX 0x000000040
114 #define SHGFI_ICON 0x000000100 /* get icon */
115 #define SHGFI_DISPLAYNAME 0x000000200 /* get display name */
116 #define SHGFI_TYPENAME 0x000000400 /* get type name */
117 #define SHGFI_ATTRIBUTES 0x000000800 /* get attributes */
118 #define SHGFI_ICONLOCATION 0x000001000 /* get icon location */
119 #define SHGFI_EXETYPE 0x000002000 /* return exe type */
120 #define SHGFI_SYSICONINDEX 0x000004000 /* get system icon index */
121 #define SHGFI_LINKOVERLAY 0x000008000 /* put a link overlay on icon */
122 #define SHGFI_SELECTED 0x000010000 /* show icon in selected state */
123 #define SHGFI_ATTR_SPECIFIED 0x000020000 /* get only specified attributes */
125 typedef struct tagSHFILEINFOA
126 { HICON hIcon; /* icon */
127 int iIcon; /* icon index */
128 DWORD dwAttributes; /* SFGAO_ flags */
129 CHAR szDisplayName[MAX_PATH];/* display name (or path) */
130 CHAR szTypeName[80]; /* type name */
131 } SHFILEINFOA;
133 typedef struct tagSHFILEINFOW
134 { HICON hIcon; /* icon */
135 int iIcon; /* icon index */
136 DWORD dwAttributes; /* SFGAO_ flags */
137 WCHAR szDisplayName[MAX_PATH];/* display name (or path) */
138 WCHAR szTypeName[80]; /* type name */
139 } SHFILEINFOW;
141 DECL_WINELIB_TYPE_AW(SHFILEINFO)
143 DWORD_PTR WINAPI SHGetFileInfoA(LPCSTR,DWORD,SHFILEINFOA*,UINT,UINT);
144 DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR,DWORD,SHFILEINFOW*,UINT,UINT);
145 #define SHGetFileInfo WINELIB_NAME_AW(SHGetFileInfo)
147 /******************************************
148 * SHSetFileInfo
151 /******************************************
152 * SHFileOperation
154 #define FO_MOVE 0x0001
155 #define FO_COPY 0x0002
156 #define FO_DELETE 0x0003
157 #define FO_RENAME 0x0004
159 #define FOF_MULTIDESTFILES 0x0001
160 #define FOF_CONFIRMMOUSE 0x0002
161 #define FOF_SILENT 0x0004
162 #define FOF_RENAMEONCOLLISION 0x0008
163 #define FOF_NOCONFIRMATION 0x0010
164 #define FOF_WANTMAPPINGHANDLE 0x0020
165 #define FOF_ALLOWUNDO 0x0040
166 #define FOF_FILESONLY 0x0080
167 #define FOF_SIMPLEPROGRESS 0x0100
168 #define FOF_NOCONFIRMMKDIR 0x0200
169 #define FOF_NOERRORUI 0x0400
170 #define FOF_NOCOPYSECURITYATTRIBS 0x0800
171 #define FOF_NORECURSION 0x1000 /* don't do recursion into directories */
172 #define FOF_NO_CONNECTED_ELEMENTS 0x2000 /* don't do connected files */
173 #define FOF_WANTNUKEWARNING 0x4000 /* during delete operation, warn if delete instead
174 of recycling (even if FOF_NOCONFIRMATION) */
175 #define FOF_NORECURSEREPARSE 0x8000 /* don't do recursion into reparse points */
177 typedef WORD FILEOP_FLAGS;
179 #define PO_DELETE 0x0013
180 #define PO_RENAME 0x0014
181 #define PO_PORTCHANGE 0x0020
182 #define PO_REN_PORT (PO_RENAME | PO_PORTCHANGE)
184 typedef WORD PRINTEROP_FLAGS;
186 typedef struct _SHFILEOPSTRUCTA
187 { HWND hwnd;
188 UINT wFunc;
189 LPCSTR pFrom;
190 LPCSTR pTo;
191 FILEOP_FLAGS fFlags;
192 BOOL fAnyOperationsAborted;
193 LPVOID hNameMappings;
194 LPCSTR lpszProgressTitle;
195 } SHFILEOPSTRUCTA, *LPSHFILEOPSTRUCTA;
197 typedef struct _SHFILEOPSTRUCTW
198 { HWND hwnd;
199 UINT wFunc;
200 LPCWSTR pFrom;
201 LPCWSTR pTo;
202 FILEOP_FLAGS fFlags;
203 BOOL fAnyOperationsAborted;
204 LPVOID hNameMappings;
205 LPCWSTR lpszProgressTitle;
206 } SHFILEOPSTRUCTW, *LPSHFILEOPSTRUCTW;
208 #define SHFILEOPSTRUCT WINELIB_NAME_AW(SHFILEOPSTRUCT)
209 #define LPSHFILEOPSTRUCT WINELIB_NAME_AW(LPSHFILEOPSTRUCT)
211 int WINAPI SHFileOperationA (LPSHFILEOPSTRUCTA lpFileOp);
212 int WINAPI SHFileOperationW (LPSHFILEOPSTRUCTW lpFileOp);
213 #define SHFileOperation WINELIB_NAME_AW(SHFileOperation)
215 typedef struct _SHNAMEMAPPINGA
217 LPSTR pszOldPath;
218 LPSTR pszNewPath;
219 int cchOldPath;
220 int cchNewPath;
221 } SHNAMEMAPPINGA, *LPSHNAMEMAPPINGA;
223 typedef struct _SHNAMEMAPPINGW
225 LPWSTR pszOldPath;
226 LPWSTR pszNewPath;
227 int cchOldPath;
228 int cchNewPath;
229 } SHNAMEMAPPINGW, *LPSHNAMEMAPPINGW;
231 DECL_WINELIB_TYPE_AW(SHNAMEMAPPING)
232 DECL_WINELIB_TYPE_AW(LPSHNAMEMAPPING)
234 void WINAPI SHFreeNameMappings(HANDLE hNameMappings);
236 /******************************************
237 * ShellExecute
239 #define SE_ERR_SHARE 26
240 #define SE_ERR_ASSOCINCOMPLETE 27
241 #define SE_ERR_DDETIMEOUT 28
242 #define SE_ERR_DDEFAIL 29
243 #define SE_ERR_DDEBUSY 30
244 #define SE_ERR_NOASSOC 31
246 HINSTANCE WINAPI ShellExecuteA(HWND,LPCSTR,LPCSTR,LPCSTR,LPCSTR,INT);
247 HINSTANCE WINAPI ShellExecuteW(HWND,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR,INT);
248 #define ShellExecute WINELIB_NAME_AW(ShellExecute)
250 #define SE_ERR_FNF 2 /* file not found */
251 #define SE_ERR_PNF 3 /* path not found */
252 #define SE_ERR_ACCESSDENIED 5 /* access denied */
253 #define SE_ERR_OOM 8 /* out of memory */
254 #define SE_ERR_DLLNOTFOUND 32
255 #define SE_ERR_SHARE 26
256 #define SE_ERR_ASSOCINCOMPLETE 27
257 #define SE_ERR_DDETIMEOUT 28
258 #define SE_ERR_DDEFAIL 29
259 #define SE_ERR_DDEBUSY 30
260 #define SE_ERR_NOASSOC 31
262 #define SEE_MASK_CLASSNAME 0x00000001
263 #define SEE_MASK_CLASSKEY 0x00000003
264 #define SEE_MASK_IDLIST 0x00000004
265 #define SEE_MASK_INVOKEIDLIST 0x0000000c
266 #define SEE_MASK_ICON 0x00000010
267 #define SEE_MASK_HOTKEY 0x00000020
268 #define SEE_MASK_NOCLOSEPROCESS 0x00000040
269 #define SEE_MASK_CONNECTNETDRV 0x00000080
270 #define SEE_MASK_NOASYNC 0x00000100
271 #define SEE_MASK_FLAG_DDEWAIT SEE_MASK_NOASYNC
272 #define SEE_MASK_DOENVSUBST 0x00000200
273 #define SEE_MASK_FLAG_NO_UI 0x00000400
274 #define SEE_MASK_UNICODE 0x00004000
275 #define SEE_MASK_NO_CONSOLE 0x00008000
276 #define SEE_MASK_ASYNCOK 0x00100000
277 #define SEE_MASK_HMONITOR 0x00200000
278 #define SEE_MASK_NOZONECHECKS 0x00800000
279 #define SEE_MASK_NOQUERYCLASSSTORE 0x01000000
280 #define SEE_MASK_WAITFORINPUTIDLE 0x02000000
281 #define SEE_MASK_FLAG_LOG_USAGE 0x04000000
283 typedef struct _SHELLEXECUTEINFOA
284 { DWORD cbSize;
285 ULONG fMask;
286 HWND hwnd;
287 LPCSTR lpVerb;
288 LPCSTR lpFile;
289 LPCSTR lpParameters;
290 LPCSTR lpDirectory;
291 INT nShow;
292 HINSTANCE hInstApp;
293 /* Optional fields */
294 LPVOID lpIDList;
295 LPCSTR lpClass;
296 HKEY hkeyClass;
297 DWORD dwHotKey;
298 union
299 { HANDLE hIcon;
300 HANDLE hMonitor;
301 } DUMMYUNIONNAME;
302 HANDLE hProcess;
303 } SHELLEXECUTEINFOA, *LPSHELLEXECUTEINFOA;
305 typedef struct _SHELLEXECUTEINFOW
306 { DWORD cbSize;
307 ULONG fMask;
308 HWND hwnd;
309 LPCWSTR lpVerb;
310 LPCWSTR lpFile;
311 LPCWSTR lpParameters;
312 LPCWSTR lpDirectory;
313 INT nShow;
314 HINSTANCE hInstApp;
315 /* Optional fields*/
316 LPVOID lpIDList;
317 LPCWSTR lpClass;
318 HKEY hkeyClass;
319 DWORD dwHotKey;
320 union
321 { HANDLE hIcon;
322 HANDLE hMonitor;
323 } DUMMYUNIONNAME;
324 HANDLE hProcess;
325 } SHELLEXECUTEINFOW, *LPSHELLEXECUTEINFOW;
327 #define SHELLEXECUTEINFO WINELIB_NAME_AW(SHELLEXECUTEINFO)
328 #define LPSHELLEXECUTEINFO WINELIB_NAME_AW(LPSHELLEXECUTEINFO)
330 BOOL WINAPI ShellExecuteExA(LPSHELLEXECUTEINFOA lpExecInfo);
331 BOOL WINAPI ShellExecuteExW(LPSHELLEXECUTEINFOW lpExecInfo);
332 #define ShellExecuteEx WINELIB_NAME_AW(ShellExecuteEx)
334 void WINAPI WinExecErrorA(HWND hwnd,INT error, LPCSTR lpstrFileName, LPCSTR lpstrTitle);
335 void WINAPI WinExecErrorW(HWND hwnd,INT error, LPCWSTR lpstrFileName, LPCWSTR lpstrTitle);
336 #define WinExecError WINELIB_NAME_AW(WinExecError)
338 /******************************************
339 * Tray Notification
341 /* notifyicondata.uFlags values*/
342 #define NIF_MESSAGE 0x00000001
343 #define NIF_ICON 0x00000002
344 #define NIF_TIP 0x00000004
345 #define NIF_STATE 0x00000008
346 #define NIF_INFO 0x00000010
347 #define NIF_GUID 0x00000020
348 #define NIF_REALTIME 0x00000040
349 #define NIF_SHOWTIP 0x00000080
351 /* notifyicondata.dwState values */
352 #define NIS_HIDDEN 0x00000001
353 #define NIS_SHAREDICON 0x00000002
355 /* notifyicondata.dwInfoFlags values */
356 #define NIIF_NONE 0x00000000
357 #define NIIF_INFO 0x00000001
358 #define NIIF_WARNING 0x00000002
359 #define NIIF_ERROR 0x00000003
360 #define NIIF_USER 0x00000004
361 #define NIIF_ICONMASK 0x0000000f
362 #define NIIF_NOSOUND 0x00000010
363 #define NIIF_LARGEICON 0x00000020
365 /* dwMessage values */
366 #define NIM_ADD 0x00000000
367 #define NIM_MODIFY 0x00000001
368 #define NIM_DELETE 0x00000002
369 #define NIM_SETFOCUS 0x00000003
370 #define NIM_SETVERSION 0x00000004
372 #define NOTIFY_VERSION 3 /* supported by Windows 2000 and later */
373 #define NOTIFY_VERSION_4 4 /* supported by Windows Vista */
375 /* callback message lParam values */
376 #define NIN_SELECT (WM_USER+0)
377 #define NINF_KEY 1
378 #define NIN_KEYSELECT (NIN_SELECT|NINF_KEY) /* WM_USER+1 */
379 #define NIN_BALOONSHOW (WM_USER+2)
380 #define NIN_BALOONHIDE (WM_USER+3)
381 #define NIN_BALOONTIMEOUT (WM_USER+4)
382 #define NIN_BALOONCLICK (WM_USER+5)
383 #define NIN_POPUPOPEN (WM_USER+6)
384 #define NIN_POPUPCLOSE (WM_USER+7)
386 typedef struct _NOTIFYICONDATAA
387 { DWORD cbSize;
388 HWND hWnd;
389 UINT uID;
390 UINT uFlags;
391 UINT uCallbackMessage;
392 HICON hIcon;
393 CHAR szTip[128];
394 DWORD dwState;
395 DWORD dwStateMask;
396 CHAR szInfo[256];
397 union {
398 UINT uTimeout;
399 UINT uVersion;
400 } DUMMYUNIONNAME;
401 CHAR szInfoTitle[64];
402 DWORD dwInfoFlags;
403 GUID guidItem;
404 HICON hBalloonIcon;
405 } NOTIFYICONDATAA, *PNOTIFYICONDATAA;
407 typedef struct _NOTIFYICONDATAW
408 { DWORD cbSize;
409 HWND hWnd;
410 UINT uID;
411 UINT uFlags;
412 UINT uCallbackMessage;
413 HICON hIcon;
414 WCHAR szTip[128];
415 DWORD dwState;
416 DWORD dwStateMask;
417 WCHAR szInfo[256];
418 union {
419 UINT uTimeout;
420 UINT uVersion;
421 } DUMMYUNIONNAME;
422 WCHAR szInfoTitle[64];
423 DWORD dwInfoFlags;
424 GUID guidItem;
425 HICON hBalloonIcon;
426 } NOTIFYICONDATAW, *PNOTIFYICONDATAW;
428 DECL_WINELIB_TYPE_AW(NOTIFYICONDATA)
429 DECL_WINELIB_TYPE_AW(PNOTIFYICONDATA)
431 BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA lpData);
432 BOOL WINAPI Shell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW lpData);
434 #define Shell_NotifyIcon WINELIB_NAME_AW(Shell_NotifyIcon)
436 /* pre IE 5.0 */
437 #define NOTIFYICONDATAA_V1_SIZE FIELD_OFFSET(NOTIFYICONDATAA, szTip[64])
438 #define NOTIFYICONDATAW_V1_SIZE FIELD_OFFSET(NOTIFYICONDATAW, szTip[64])
440 /* pre Window XP */
441 #define NOTIFYICONDATAA_V2_SIZE FIELD_OFFSET(NOTIFYICONDATAA, guidItem)
442 #define NOTIFYICONDATAW_V2_SIZE FIELD_OFFSET(NOTIFYICONDATAW, guidItem)
444 /* pre Window Vista */
445 #define NOTIFYICONDATAA_V3_SIZE FIELD_OFFSET(NOTIFYICONDATAA, hBalloonIcon)
446 #define NOTIFYICONDATAW_V3_SIZE FIELD_OFFSET(NOTIFYICONDATAW, hBalloonIcon)
449 /******************************************
450 * Links
453 #define SHGNLI_PIDL 0x01
454 #define SHGNLI_PREFIXNAME 0x02
455 #define SHGNLI_NOUNIQUE 0x04
456 #define SHGNLI_NOLNK 0x08
458 BOOL WINAPI SHGetNewLinkInfoA(LPCSTR,LPCSTR,LPSTR,BOOL*,UINT);
459 BOOL WINAPI SHGetNewLinkInfoW(LPCWSTR,LPCWSTR,LPWSTR,BOOL*,UINT);
460 #define SHGetNewLinkInfo WINELIB_NAME_AW(SHGetNewLinkInfo)
462 /******************************************
463 * Recycle bin
466 typedef struct _SHQUERYRBINFO
468 DWORD cbSize;
469 DWORDLONG i64Size;
470 DWORDLONG i64NumItems;
471 } SHQUERYRBINFO, *LPSHQUERYRBINFO;
473 HRESULT WINAPI SHEmptyRecycleBinA(HWND,LPCSTR,DWORD);
474 HRESULT WINAPI SHEmptyRecycleBinW(HWND,LPCWSTR,DWORD);
475 #define SHEmptyRecycleBin WINELIB_NAME_AW(SHEmptyRecycleBin)
476 HRESULT WINAPI SHQueryRecycleBinA(LPCSTR,LPSHQUERYRBINFO);
477 HRESULT WINAPI SHQueryRecycleBinW(LPCWSTR,LPSHQUERYRBINFO);
478 #define SHQueryRecycleBin WINELIB_NAME_AW(SHQueryRecycleBin)
480 /******************************************
481 * Misc
484 LPWSTR* WINAPI CommandLineToArgvW(LPCWSTR,int*);
485 HICON WINAPI ExtractIconA(HINSTANCE,LPCSTR,UINT);
486 HICON WINAPI ExtractIconW(HINSTANCE,LPCWSTR,UINT);
487 #define ExtractIcon WINELIB_NAME_AW(ExtractIcon)
488 HICON WINAPI ExtractAssociatedIconA(HINSTANCE,LPSTR,LPWORD);
489 HICON WINAPI ExtractAssociatedIconW(HINSTANCE,LPWSTR,LPWORD);
490 #define ExtractAssociatedIcon WINELIB_NAME_AW(ExtractAssociatedIcon)
491 HICON WINAPI ExtractAssociatedIconExA(HINSTANCE,LPSTR,LPWORD,LPWORD);
492 HICON WINAPI ExtractAssociatedIconExW(HINSTANCE,LPWSTR,LPWORD,LPWORD);
493 #define ExtractAssociatedIconEx WINELIB_NAME_AW(ExtractAssociatedIconEx)
494 UINT WINAPI ExtractIconExA(LPCSTR,INT,HICON*,HICON*,UINT);
495 UINT WINAPI ExtractIconExW(LPCWSTR,INT,HICON*,HICON*,UINT);
496 #define ExtractIconEx WINELIB_NAME_AW(ExtractIconEx)
497 HINSTANCE WINAPI FindExecutableA(LPCSTR,LPCSTR,LPSTR);
498 HINSTANCE WINAPI FindExecutableW(LPCWSTR,LPCWSTR,LPWSTR);
499 #define FindExecutable WINELIB_NAME_AW(FindExecutable)
500 BOOL WINAPI ShellAboutA(HWND,LPCSTR,LPCSTR,HICON);
501 BOOL WINAPI ShellAboutW(HWND,LPCWSTR,LPCWSTR,HICON);
502 #define ShellAbout WINELIB_NAME_AW(ShellAbout)
503 int WINAPIV ShellMessageBoxA(HINSTANCE,HWND,LPCSTR,LPCSTR,UINT,...);
504 int WINAPIV ShellMessageBoxW(HINSTANCE,HWND,LPCWSTR,LPCWSTR,UINT,...);
505 #define ShellMessageBox WINELIB_NAME_AW(ShellMessageBox)
506 DWORD WINAPI DoEnvironmentSubstA(LPSTR, UINT);
507 DWORD WINAPI DoEnvironmentSubstW(LPWSTR, UINT);
508 #define DoEnvironmentSubst WINELIB_NAME_AW(DoEnvironmentSubst)
511 #ifdef __cplusplus
512 } /* extern "C" */
513 #endif /* defined(__cplusplus) */
515 #ifndef _WIN64
516 #include <poppack.h>
517 #endif
519 #endif /* __WINE_SHELLAPI_H */