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
24 #endif /* defined(__cplusplus) */
28 DECLARE_HANDLE(HDROP
);
30 /******************************************
34 typedef struct _DRAGINFOA
40 } DRAGINFOA
, *LPDRAGINFOA
;
42 typedef struct _DRAGINFOW
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 /******************************************
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
89 typedef struct _AppBarData
92 UINT uCallbackMessage
;
96 } APPBARDATA
, *PAPPBARDATA
;
98 UINT WINAPI
SHAppBarMessage(DWORD
,PAPPBARDATA
);
100 /******************************************
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 */
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 */
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 /******************************************
149 /******************************************
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
190 BOOL fAnyOperationsAborted
;
191 LPVOID hNameMappings
;
192 LPCSTR lpszProgressTitle
;
193 } SHFILEOPSTRUCTA
, *LPSHFILEOPSTRUCTA
;
195 typedef struct _SHFILEOPSTRUCTW
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
219 } SHNAMEMAPPINGA
, *LPSHNAMEMAPPINGA
;
221 typedef struct _SHNAMEMAPPINGW
227 } SHNAMEMAPPINGW
, *LPSHNAMEMAPPINGW
;
229 DECL_WINELIB_TYPE_AW(SHNAMEMAPPING
)
230 DECL_WINELIB_TYPE_AW(LPSHNAMEMAPPING
)
232 void WINAPI
SHFreeNameMappings(HANDLE hNameMappings
);
234 /******************************************
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
290 /* Optional fields */
300 } SHELLEXECUTEINFOA
, *LPSHELLEXECUTEINFOA
;
302 typedef struct _SHELLEXECUTEINFOW
308 LPCWSTR lpParameters
;
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 /******************************************
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)
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
388 UINT uCallbackMessage
;
398 CHAR szInfoTitle
[64];
402 } NOTIFYICONDATAA
, *PNOTIFYICONDATAA
;
404 typedef struct _NOTIFYICONDATAW
409 UINT uCallbackMessage
;
419 WCHAR szInfoTitle
[64];
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)
434 #define NOTIFYICONDATAA_V1_SIZE FIELD_OFFSET(NOTIFYICONDATAA, szTip[64])
435 #define NOTIFYICONDATAW_V1_SIZE FIELD_OFFSET(NOTIFYICONDATAW, szTip[64])
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 /******************************************
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 /******************************************
463 typedef struct _SHQUERYRBINFO
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 /******************************************
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)
510 #endif /* defined(__cplusplus) */
514 #endif /* __WINE_SHELLAPI_H */