include: Use force_align_arg_pointer on MacOS to fix the stack on entry to Wine.
[wine/multimedia.git] / include / shellapi.h
blobea7ec4bd814b2010177d1172848f992d13c36a6c
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 #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
63 #define NIF_STATE 0x00000008
64 #define NIF_INFO 0x00000010
65 #define NIF_GUID 0x00000020
67 #define NIM_ADD 0x00000000
68 #define NIM_MODIFY 0x00000001
69 #define NIM_DELETE 0x00000002
73 /******************************************
74 * Application Bar
76 #define ABM_NEW 0x00000000
77 #define ABM_REMOVE 0x00000001
78 #define ABM_QUERYPOS 0x00000002
79 #define ABM_SETPOS 0x00000003
80 #define ABM_GETSTATE 0x00000004
81 #define ABM_GETTASKBARPOS 0x00000005
82 #define ABM_ACTIVATE 0x00000006
83 #define ABM_GETAUTOHIDEBAR 0x00000007
84 #define ABM_SETAUTOHIDEBAR 0x00000008
85 #define ABM_WINDOWPOSCHANGED 0x00000009
87 #define ABN_STATECHANGE 0x00000000
88 #define ABN_POSCHANGED 0x00000001
89 #define ABN_FULLSCREENAPP 0x00000002
90 #define ABN_WINDOWARRANGE 0x00000003
92 #define ABS_AUTOHIDE 0x00000001
93 #define ABS_ALWAYSONTOP 0x00000002
95 #define ABE_LEFT 0
96 #define ABE_TOP 1
97 #define ABE_RIGHT 2
98 #define ABE_BOTTOM 3
100 typedef struct _AppBarData
101 { DWORD cbSize;
102 HWND hWnd;
103 UINT uCallbackMessage;
104 UINT uEdge;
105 RECT rc;
106 LPARAM lParam;
107 } APPBARDATA, *PAPPBARDATA;
109 UINT WINAPI SHAppBarMessage(DWORD,PAPPBARDATA);
111 /******************************************
112 * SHGetFileInfo
115 #define SHGFI_LARGEICON 0x000000000 /* get large icon */
116 #define SHGFI_SMALLICON 0x000000001 /* get small icon */
117 #define SHGFI_OPENICON 0x000000002 /* get open icon */
118 #define SHGFI_SHELLICONSIZE 0x000000004 /* get shell size icon */
119 #define SHGFI_PIDL 0x000000008 /* pszPath is a pidl */
120 #define SHGFI_USEFILEATTRIBUTES 0x000000010 /* use passed dwFileAttribute */
121 #define SHGFI_ADDOVERLAYS 0x000000020
122 #define SHGFI_OVERLAYINDEX 0x000000040
123 #define SHGFI_ICON 0x000000100 /* get icon */
124 #define SHGFI_DISPLAYNAME 0x000000200 /* get display name */
125 #define SHGFI_TYPENAME 0x000000400 /* get type name */
126 #define SHGFI_ATTRIBUTES 0x000000800 /* get attributes */
127 #define SHGFI_ICONLOCATION 0x000001000 /* get icon location */
128 #define SHGFI_EXETYPE 0x000002000 /* return exe type */
129 #define SHGFI_SYSICONINDEX 0x000004000 /* get system icon index */
130 #define SHGFI_LINKOVERLAY 0x000008000 /* put a link overlay on icon */
131 #define SHGFI_SELECTED 0x000010000 /* show icon in selected state */
132 #define SHGFI_ATTR_SPECIFIED 0x000020000 /* get only specified attributes */
134 typedef struct tagSHFILEINFOA
135 { HICON hIcon; /* icon */
136 int iIcon; /* icon index */
137 DWORD dwAttributes; /* SFGAO_ flags */
138 CHAR szDisplayName[MAX_PATH];/* display name (or path) */
139 CHAR szTypeName[80]; /* type name */
140 } SHFILEINFOA;
142 typedef struct tagSHFILEINFOW
143 { HICON hIcon; /* icon */
144 int iIcon; /* icon index */
145 DWORD dwAttributes; /* SFGAO_ flags */
146 WCHAR szDisplayName[MAX_PATH];/* display name (or path) */
147 WCHAR szTypeName[80]; /* type name */
148 } SHFILEINFOW;
150 DECL_WINELIB_TYPE_AW(SHFILEINFO)
152 DWORD_PTR WINAPI SHGetFileInfoA(LPCSTR,DWORD,SHFILEINFOA*,UINT,UINT);
153 DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR,DWORD,SHFILEINFOW*,UINT,UINT);
154 #define SHGetFileInfo WINELIB_NAME_AW(SHGetFileInfo)
156 /******************************************
157 * SHSetFileInfo
160 /******************************************
161 * SHFileOperation
163 #define FO_MOVE 0x0001
164 #define FO_COPY 0x0002
165 #define FO_DELETE 0x0003
166 #define FO_RENAME 0x0004
168 #define FOF_MULTIDESTFILES 0x0001
169 #define FOF_CONFIRMMOUSE 0x0002
170 #define FOF_SILENT 0x0004
171 #define FOF_RENAMEONCOLLISION 0x0008
172 #define FOF_NOCONFIRMATION 0x0010
173 #define FOF_WANTMAPPINGHANDLE 0x0020
174 #define FOF_ALLOWUNDO 0x0040
175 #define FOF_FILESONLY 0x0080
176 #define FOF_SIMPLEPROGRESS 0x0100
177 #define FOF_NOCONFIRMMKDIR 0x0200
178 #define FOF_NOERRORUI 0x0400
179 #define FOF_NOCOPYSECURITYATTRIBS 0x0800
180 #define FOF_NORECURSION 0x1000 /* don't do recursion into directories */
181 #define FOF_NO_CONNECTED_ELEMENTS 0x2000 /* don't do connected files */
182 #define FOF_WANTNUKEWARNING 0x4000 /* during delete operation, warn if delete instead
183 of recycling (even if FOF_NOCONFIRMATION) */
184 #define FOF_NORECURSEREPARSE 0x8000 /* don't do recursion into reparse points */
186 typedef WORD FILEOP_FLAGS;
188 #define PO_DELETE 0x0013
189 #define PO_RENAME 0x0014
190 #define PO_PORTCHANGE 0x0020
191 #define PO_REN_PORT (PO_RENAME | PO_PORTCHANGE)
193 typedef WORD PRINTEROP_FLAGS;
195 typedef struct _SHFILEOPSTRUCTA
196 { HWND hwnd;
197 UINT wFunc;
198 LPCSTR pFrom;
199 LPCSTR pTo;
200 FILEOP_FLAGS fFlags;
201 BOOL fAnyOperationsAborted;
202 LPVOID hNameMappings;
203 LPCSTR lpszProgressTitle;
204 } SHFILEOPSTRUCTA, *LPSHFILEOPSTRUCTA;
206 typedef struct _SHFILEOPSTRUCTW
207 { HWND hwnd;
208 UINT wFunc;
209 LPCWSTR pFrom;
210 LPCWSTR pTo;
211 FILEOP_FLAGS fFlags;
212 BOOL fAnyOperationsAborted;
213 LPVOID hNameMappings;
214 LPCWSTR lpszProgressTitle;
215 } SHFILEOPSTRUCTW, *LPSHFILEOPSTRUCTW;
217 #define SHFILEOPSTRUCT WINELIB_NAME_AW(SHFILEOPSTRUCT)
218 #define LPSHFILEOPSTRUCT WINELIB_NAME_AW(LPSHFILEOPSTRUCT)
220 int WINAPI SHFileOperationA (LPSHFILEOPSTRUCTA lpFileOp);
221 int WINAPI SHFileOperationW (LPSHFILEOPSTRUCTW lpFileOp);
222 #define SHFileOperation WINELIB_NAME_AW(SHFileOperation)
224 typedef struct _SHNAMEMAPPINGA
226 LPSTR pszOldPath;
227 LPSTR pszNewPath;
228 int cchOldPath;
229 int cchNewPath;
230 } SHNAMEMAPPINGA, *LPSHNAMEMAPPINGA;
232 typedef struct _SHNAMEMAPPINGW
234 LPWSTR pszOldPath;
235 LPWSTR pszNewPath;
236 int cchOldPath;
237 int cchNewPath;
238 } SHNAMEMAPPINGW, *LPSHNAMEMAPPINGW;
240 DECL_WINELIB_TYPE_AW(SHNAMEMAPPING)
241 DECL_WINELIB_TYPE_AW(LPSHNAMEMAPPING)
243 void WINAPI SHFreeNameMappings(HANDLE hNameMappings);
245 /******************************************
246 * ShellExecute
248 #define SE_ERR_SHARE 26
249 #define SE_ERR_ASSOCINCOMPLETE 27
250 #define SE_ERR_DDETIMEOUT 28
251 #define SE_ERR_DDEFAIL 29
252 #define SE_ERR_DDEBUSY 30
253 #define SE_ERR_NOASSOC 31
255 HINSTANCE WINAPI ShellExecuteA(HWND,LPCSTR,LPCSTR,LPCSTR,LPCSTR,INT);
256 HINSTANCE WINAPI ShellExecuteW(HWND,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR,INT);
257 #define ShellExecute WINELIB_NAME_AW(ShellExecute)
259 #define SE_ERR_FNF 2 /* file not found */
260 #define SE_ERR_PNF 3 /* path not found */
261 #define SE_ERR_ACCESSDENIED 5 /* access denied */
262 #define SE_ERR_OOM 8 /* out of memory */
263 #define SE_ERR_DLLNOTFOUND 32
264 #define SE_ERR_SHARE 26
265 #define SE_ERR_ASSOCINCOMPLETE 27
266 #define SE_ERR_DDETIMEOUT 28
267 #define SE_ERR_DDEFAIL 29
268 #define SE_ERR_DDEBUSY 30
269 #define SE_ERR_NOASSOC 31
271 #define SEE_MASK_CLASSNAME 0x00000001
272 #define SEE_MASK_CLASSKEY 0x00000003
273 #define SEE_MASK_IDLIST 0x00000004
274 #define SEE_MASK_INVOKEIDLIST 0x0000000c
275 #define SEE_MASK_ICON 0x00000010
276 #define SEE_MASK_HOTKEY 0x00000020
277 #define SEE_MASK_NOCLOSEPROCESS 0x00000040
278 #define SEE_MASK_CONNECTNETDRV 0x00000080
279 #define SEE_MASK_FLAG_DDEWAIT 0x00000100
280 #define SEE_MASK_DOENVSUBST 0x00000200
281 #define SEE_MASK_FLAG_NO_UI 0x00000400
282 #define SEE_MASK_UNICODE 0x00004000
283 #define SEE_MASK_NO_CONSOLE 0x00008000
284 #define SEE_MASK_ASYNCOK 0x00100000
285 #define SEE_MASK_HMONITOR 0x00200000
286 #define SEE_MASK_NOZONECHECKS 0x00800000
287 #define SEE_MASK_NOQUERYCLASSSTORE 0x01000000
288 #define SEE_MASK_WAITFORINPUTIDLE 0x02000000
289 #define SEE_MASK_FLAG_LOG_USAGE 0x04000000
291 typedef struct _SHELLEXECUTEINFOA
292 { DWORD cbSize;
293 ULONG fMask;
294 HWND hwnd;
295 LPCSTR lpVerb;
296 LPCSTR lpFile;
297 LPCSTR lpParameters;
298 LPCSTR lpDirectory;
299 INT nShow;
300 HINSTANCE hInstApp;
301 /* Optional fields */
302 LPVOID lpIDList;
303 LPCSTR lpClass;
304 HKEY hkeyClass;
305 DWORD dwHotKey;
306 union
307 { HANDLE hIcon;
308 HANDLE hMonitor;
309 } DUMMYUNIONNAME;
310 HANDLE hProcess;
311 } SHELLEXECUTEINFOA, *LPSHELLEXECUTEINFOA;
313 typedef struct _SHELLEXECUTEINFOW
314 { DWORD cbSize;
315 ULONG fMask;
316 HWND hwnd;
317 LPCWSTR lpVerb;
318 LPCWSTR lpFile;
319 LPCWSTR lpParameters;
320 LPCWSTR lpDirectory;
321 INT nShow;
322 HINSTANCE hInstApp;
323 /* Optional fields*/
324 LPVOID lpIDList;
325 LPCWSTR lpClass;
326 HKEY hkeyClass;
327 DWORD dwHotKey;
328 union
329 { HANDLE hIcon;
330 HANDLE hMonitor;
331 } DUMMYUNIONNAME;
332 HANDLE hProcess;
333 } SHELLEXECUTEINFOW, *LPSHELLEXECUTEINFOW;
335 #define SHELLEXECUTEINFO WINELIB_NAME_AW(SHELLEXECUTEINFO)
336 #define LPSHELLEXECUTEINFO WINELIB_NAME_AW(LPSHELLEXECUTEINFO)
338 BOOL WINAPI ShellExecuteExA(LPSHELLEXECUTEINFOA lpExecInfo);
339 BOOL WINAPI ShellExecuteExW(LPSHELLEXECUTEINFOW lpExecInfo);
340 #define ShellExecuteEx WINELIB_NAME_AW(ShellExecuteEx)
342 void WINAPI WinExecErrorA(HWND hwnd,INT error, LPCSTR lpstrFileName, LPCSTR lpstrTitle);
343 void WINAPI WinExecErrorW(HWND hwnd,INT error, LPCWSTR lpstrFileName, LPCWSTR lpstrTitle);
344 #define WinExecError WINELIB_NAME_AW(WinExecError)
346 /******************************************
347 * Tray Notification
349 typedef struct _NOTIFYICONDATAA
350 { DWORD cbSize;
351 HWND hWnd;
352 UINT uID;
353 UINT uFlags;
354 UINT uCallbackMessage;
355 HICON hIcon;
356 CHAR szTip[128];
357 DWORD dwState;
358 DWORD dwStateMask;
359 CHAR szInfo[256];
360 union {
361 UINT uTimeout;
362 UINT uVersion;
363 } DUMMYUNIONNAME;
364 CHAR szInfoTitle[64];
365 DWORD dwInfoFlags;
366 } NOTIFYICONDATAA, *PNOTIFYICONDATAA;
368 typedef struct _NOTIFYICONDATAW
369 { DWORD cbSize;
370 HWND hWnd;
371 UINT uID;
372 UINT uFlags;
373 UINT uCallbackMessage;
374 HICON hIcon;
375 WCHAR szTip[128];
376 DWORD dwState;
377 DWORD dwStateMask;
378 WCHAR szInfo[256];
379 union {
380 UINT uTimeout;
381 UINT uVersion;
382 } DUMMYUNIONNAME;
383 WCHAR szInfoTitle[64];
384 DWORD dwInfoFlags;
385 } NOTIFYICONDATAW, *PNOTIFYICONDATAW;
387 DECL_WINELIB_TYPE_AW(NOTIFYICONDATA)
388 DECL_WINELIB_TYPE_AW(PNOTIFYICONDATA)
390 BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA lpData);
391 BOOL WINAPI Shell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW lpData);
393 #define Shell_NotifyIcon WINELIB_NAME_AW(Shell_NotifyIcon)
395 /******************************************
396 * Links
399 #define SHGNLI_PIDL 0x01
400 #define SHGNLI_PREFIXNAME 0x02
401 #define SHGNLI_NOUNIQUE 0x04
402 #define SHGNLI_NOLNK 0x08
404 BOOL WINAPI SHGetNewLinkInfoA(LPCSTR,LPCSTR,LPSTR,BOOL*,UINT);
405 BOOL WINAPI SHGetNewLinkInfoW(LPCWSTR,LPCWSTR,LPWSTR,BOOL*,UINT);
406 #define SHGetNewLinkInfo WINELIB_NAME_AW(SHGetNewLinkInfo)
408 /******************************************
409 * Recycle bin
412 typedef struct _SHQUERYRBINFO
414 DWORD cbSize;
415 DWORDLONG i64Size;
416 DWORDLONG i64NumItems;
417 } SHQUERYRBINFO, *LPSHQUERYRBINFO;
419 HRESULT WINAPI SHEmptyRecycleBinA(HWND,LPCSTR,DWORD);
420 HRESULT WINAPI SHEmptyRecycleBinW(HWND,LPCWSTR,DWORD);
421 #define SHEmptyRecycleBin WINELIB_NAME_AW(SHEmptyRecycleBin)
422 HRESULT WINAPI SHQueryRecycleBinA(LPCSTR,LPSHQUERYRBINFO);
423 HRESULT WINAPI SHQueryRecycleBinW(LPCWSTR,LPSHQUERYRBINFO);
424 #define SHQueryRecycleBin WINELIB_NAME_AW(SHQueryRecycleBin)
426 /******************************************
427 * Misc
430 LPWSTR* WINAPI CommandLineToArgvW(LPCWSTR,int*);
431 HICON WINAPI ExtractIconA(HINSTANCE,LPCSTR,UINT);
432 HICON WINAPI ExtractIconW(HINSTANCE,LPCWSTR,UINT);
433 #define ExtractIcon WINELIB_NAME_AW(ExtractIcon)
434 HICON WINAPI ExtractAssociatedIconA(HINSTANCE,LPSTR,LPWORD);
435 HICON WINAPI ExtractAssociatedIconW(HINSTANCE,LPWSTR,LPWORD);
436 #define ExtractAssociatedIcon WINELIB_NAME_AW(ExtractAssociatedIcon)
437 HICON WINAPI ExtractAssociatedIconExA(HINSTANCE,LPSTR,LPWORD,LPWORD);
438 HICON WINAPI ExtractAssociatedIconExW(HINSTANCE,LPWSTR,LPWORD,LPWORD);
439 #define ExtractAssociatedIconEx WINELIB_NAME_AW(ExtractAssociatedIconEx)
440 UINT WINAPI ExtractIconExA(LPCSTR,INT,HICON*,HICON*,UINT);
441 UINT WINAPI ExtractIconExW(LPCWSTR,INT,HICON*,HICON*,UINT);
442 #define ExtractIconEx WINELIB_NAME_AW(ExtractIconEx)
443 HINSTANCE WINAPI FindExecutableA(LPCSTR,LPCSTR,LPSTR);
444 HINSTANCE WINAPI FindExecutableW(LPCWSTR,LPCWSTR,LPWSTR);
445 #define FindExecutable WINELIB_NAME_AW(FindExecutable)
446 BOOL WINAPI ShellAboutA(HWND,LPCSTR,LPCSTR,HICON);
447 BOOL WINAPI ShellAboutW(HWND,LPCWSTR,LPCWSTR,HICON);
448 #define ShellAbout WINELIB_NAME_AW(ShellAbout)
449 int WINAPIV ShellMessageBoxA(HINSTANCE,HWND,LPCSTR,LPCSTR,UINT,...);
450 int WINAPIV ShellMessageBoxW(HINSTANCE,HWND,LPCWSTR,LPCWSTR,UINT,...);
451 #define ShellMessageBox WINELIB_NAME_AW(ShellMessageBox)
452 DWORD WINAPI DoEnvironmentSubstA(LPSTR, UINT);
453 DWORD WINAPI DoEnvironmentSubstW(LPWSTR, UINT);
454 #define DoEnvironmentSubst WINELIB_NAME_AW(DoEnvironmentSubst)
457 #ifdef __cplusplus
458 } /* extern "C" */
459 #endif /* defined(__cplusplus) */
461 #include <poppack.h>
463 #endif /* __WINE_SHELLAPI_H */