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