3 * @copy 2012 MinGW.org project
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice (including the next
13 * paragraph) shall be included in all copies or substantial portions of the
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
26 #pragma GCC system_header
31 #define WINSHELLAPI DECLSPEC_IMPORT
36 #define ABS_AUTOHIDE 1
37 #define ABS_ALWAYSONTOP 2
38 #define SEE_MASK_CLASSNAME 0x1
39 #define SEE_MASK_CLASSKEY 0x3
40 #define SEE_MASK_IDLIST 0x4
41 #define SEE_MASK_INVOKEIDLIST 0xc
42 #define SEE_MASK_ICON 0x10
43 #define SEE_MASK_HOTKEY 0x20
44 #define SEE_MASK_NOCLOSEPROCESS 0x40
45 #define SEE_MASK_CONNECTNETDRV 0x80
46 #define SEE_MASK_FLAG_DDEWAIT 0x100
47 #define SEE_MASK_DOENVSUBST 0x200
48 #define SEE_MASK_FLAG_NO_UI 0x400
49 #define SEE_MASK_NO_CONSOLE 0x8000
50 #define SEE_MASK_UNICODE 0x10000
51 #define SEE_MASK_ASYNCOK 0x100000
52 #define SEE_MASK_HMONITOR 0x200000
53 #if (_WIN32_IE >= 0x0600)
54 #define SEE_MASK_NOZONECHECKS 0x800000
55 #define SEE_MASK_FLAG_LOG_USAGE 0x4000000
59 #define ABM_QUERYPOS 2
61 #define ABM_GETSTATE 4
62 #define ABM_GETTASKBARPOS 5
63 #define ABM_ACTIVATE 6
64 #define ABM_GETAUTOHIDEBAR 7
65 #define ABM_SETAUTOHIDEBAR 8
66 #define ABM_WINDOWPOSCHANGED 9
67 #define ABN_STATECHANGE 0
68 #define ABN_POSCHANGED 1
69 #define ABN_FULLSCREENAPP 2
70 #define ABN_WINDOWARRANGE 3
74 #if (_WIN32_IE >= 0x0500)
75 #define NOTIFYICON_VERSION 3
76 #if (_WIN32_WINNT >= 0x600)
77 #define NOTIFYICON_VERSION_4 4
79 #define NIM_SETFOCUS 3
80 #define NIM_SETVERSION 4
81 #define NIN_POPUPOPEN WM_USER+6
82 #define NIN_POPUPCLOSE WM_USER+7
84 #define NIF_MESSAGE 0x00000001
85 #define NIF_ICON 0x00000002
86 #define NIF_TIP 0x00000004
87 #define NIF_STATE 0x00000008
88 #if (_WIN32_IE >= 0x0500)
89 #define NIF_INFO 0x00000010
91 #if (_WIN32_IE >= 0x0600)
92 #define NIF_GUID 0x00000020
94 #if (_WIN32_IE >= 0x0500)
95 #define NIIF_NONE 0x00000000
96 #define NIIF_INFO 0x00000001
97 #define NIIF_WARNING 0x00000002
98 #define NIIF_ERROR 0x00000003
100 #if (_WIN32_IE >= 0x0600)
101 #define NIIF_ICON_MASK 0x0000000F
102 #define NIIF_NOSOUND 0x00000010
104 #if (_WIN32_IE >= 0x0500)
105 #define NIS_HIDDEN 0x00000001
106 #define NIS_SHAREDICON 0x00000002
110 #define SE_ERR_ACCESSDENIED 5
112 #define SE_ERR_DLLNOTFOUND 32
113 #define SE_ERR_SHARE 26
114 #define SE_ERR_ASSOCINCOMPLETE 27
115 #define SE_ERR_DDETIMEOUT 28
116 #define SE_ERR_DDEFAIL 29
117 #define SE_ERR_DDEBUSY 30
118 #define SE_ERR_NOASSOC 31
123 #define FOF_MULTIDESTFILES 1
124 #define FOF_CONFIRMMOUSE 2
126 #define FOF_RENAMEONCOLLISION 8
127 #define FOF_NOCONFIRMATION 16
128 #define FOF_WANTMAPPINGHANDLE 32
129 #define FOF_ALLOWUNDO 64
130 #define FOF_FILESONLY 128
131 #define FOF_SIMPLEPROGRESS 256
132 #define FOF_NOCONFIRMMKDIR 512
133 #define FOF_NOERRORUI 1024
134 #define FOF_NOCOPYSECURITYATTRIBS 2048
137 #define PO_PORTCHANGE 32
138 #define PO_REN_PORT 52
139 #define SHGFI_ICON 256
140 #define SHGFI_DISPLAYNAME 512
141 #define SHGFI_TYPENAME 1024
142 #define SHGFI_ATTRIBUTES 2048
143 #define SHGFI_ICONLOCATION 4096
144 #define SHGFI_EXETYPE 8192
145 #define SHGFI_SYSICONINDEX 16384
146 #define SHGFI_LINKOVERLAY 32768
147 #define SHGFI_SELECTED 65536
148 #define SHGFI_ATTR_SPECIFIED 131072
149 #define SHGFI_LARGEICON 0
150 #define SHGFI_SMALLICON 1
151 #define SHGFI_OPENICON 2
152 #define SHGFI_SHELLICONSIZE 4
154 #define SHGFI_USEFILEATTRIBUTES 16
155 #define SHERB_NOCONFIRMATION 1
156 #define SHERB_NOPROGRESSUI 2
157 #define SHERB_NOSOUND 4
159 #define NOTIFYICONDATA_V2_SIZE 936
160 #define NOTIFYICONDATA_V1_SIZE 152
162 #define NOTIFYICONDATA_V2_SIZE 488
163 #define NOTIFYICONDATA_V1_SIZE 88
166 typedef WORD FILEOP_FLAGS;
167 typedef WORD PRINTEROP_FLAGS;
168 #include <pshpack2.h>
169 typedef struct _AppBarData {
172 UINT uCallbackMessage;
176 } APPBARDATA,*PAPPBARDATA;
177 DECLARE_HANDLE(HDROP);
179 typedef struct _NOTIFYICONDATAA {
184 UINT uCallbackMessage;
186 #if _WIN32_IE >= 0x0500
191 _ANONYMOUS_UNION union {
195 CHAR szInfoTitle[64];
200 #if _WIN32_IE >= 0x600
203 #if _WIN32_WINNT >= 0x600
206 } NOTIFYICONDATAA,*PNOTIFYICONDATAA;
208 typedef struct _NOTIFYICONDATAW {
213 UINT uCallbackMessage;
215 #if _WIN32_IE >= 0x0500
220 _ANONYMOUS_UNION union {
224 WCHAR szInfoTitle[64];
229 #if _WIN32_IE >= 0x600
232 #if _WIN32_WINNT >= 0x600
235 } NOTIFYICONDATAW,*PNOTIFYICONDATAW;
237 typedef struct _SHELLEXECUTEINFOA {
253 } SHELLEXECUTEINFOA,*LPSHELLEXECUTEINFOA;
254 typedef struct _SHELLEXECUTEINFOW {
260 LPCWSTR lpParameters;
270 } SHELLEXECUTEINFOW,*LPSHELLEXECUTEINFOW;
271 typedef struct _SHFILEOPSTRUCTA {
277 BOOL fAnyOperationsAborted;
279 LPCSTR lpszProgressTitle;
280 } SHFILEOPSTRUCTA,*LPSHFILEOPSTRUCTA;
281 typedef struct _SHFILEOPSTRUCTW {
287 BOOL fAnyOperationsAborted;
289 LPCWSTR lpszProgressTitle;
290 } SHFILEOPSTRUCTW,*LPSHFILEOPSTRUCTW;
291 typedef struct _SHFILEINFOA {
295 CHAR szDisplayName[MAX_PATH];
298 typedef struct _SHFILEINFOW {
302 WCHAR szDisplayName[MAX_PATH];
303 WCHAR szTypeName[80];
305 typedef struct _SHQUERYRBINFO {
309 } SHQUERYRBINFO, *LPSHQUERYRBINFO;
312 LPWSTR * WINAPI CommandLineToArgvW(LPCWSTR,int*);
313 void WINAPI DragAcceptFiles(HWND,BOOL);
314 void WINAPI DragFinish(HDROP);
315 UINT WINAPI DragQueryFileA(HDROP,UINT,LPSTR,UINT);
316 UINT WINAPI DragQueryFileW(HDROP,UINT,LPWSTR,UINT);
317 BOOL WINAPI DragQueryPoint(HDROP,LPPOINT);
318 HICON WINAPI DuplicateIcon(HINSTANCE,HICON);
319 HICON WINAPI ExtractAssociatedIconA(HINSTANCE,LPCSTR,PWORD);
320 HICON WINAPI ExtractAssociatedIconW(HINSTANCE,LPCWSTR,PWORD);
321 HICON WINAPI ExtractIconA(HINSTANCE,LPCSTR,UINT);
322 HICON WINAPI ExtractIconW(HINSTANCE,LPCWSTR,UINT);
323 UINT WINAPI ExtractIconExA(LPCSTR,int,HICON*,HICON*,UINT);
324 UINT WINAPI ExtractIconExW(LPCWSTR,int,HICON*,HICON*,UINT);
325 HINSTANCE WINAPI FindExecutableA(LPCSTR,LPCSTR,LPSTR);
326 HINSTANCE WINAPI FindExecutableW(LPCWSTR,LPCWSTR,LPWSTR);
327 UINT WINAPI SHAppBarMessage(DWORD,PAPPBARDATA);
328 BOOL WINAPI Shell_NotifyIconA(DWORD,PNOTIFYICONDATAA);
329 BOOL WINAPI Shell_NotifyIconW(DWORD,PNOTIFYICONDATAW);
330 int WINAPI ShellAboutA(HWND,LPCSTR,LPCSTR,HICON);
331 int WINAPI ShellAboutW(HWND,LPCWSTR,LPCWSTR,HICON);
332 HINSTANCE WINAPI ShellExecuteA(HWND,LPCSTR,LPCSTR,LPCSTR,LPCSTR,INT);
333 HINSTANCE WINAPI ShellExecuteW(HWND,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR,INT);
334 BOOL WINAPI ShellExecuteExA(LPSHELLEXECUTEINFOA);
335 BOOL WINAPI ShellExecuteExW(LPSHELLEXECUTEINFOW);
336 int WINAPI SHFileOperationA(LPSHFILEOPSTRUCTA);
337 int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW);
338 void WINAPI SHFreeNameMappings(HANDLE);
339 DWORD WINAPI SHGetFileInfoA(LPCSTR,DWORD,SHFILEINFOA*,UINT,UINT);
340 DWORD WINAPI SHGetFileInfoW(LPCWSTR,DWORD,SHFILEINFOW*,UINT,UINT);
341 HRESULT WINAPI SHQueryRecycleBinA(LPCSTR, LPSHQUERYRBINFO);
342 HRESULT WINAPI SHQueryRecycleBinW(LPCWSTR, LPSHQUERYRBINFO);
343 HRESULT WINAPI SHEmptyRecycleBinA(HWND,LPCSTR,DWORD);
344 HRESULT WINAPI SHEmptyRecycleBinW(HWND,LPCWSTR,DWORD);
346 #if (_WIN32_WINNT >= 0x600)
347 #define SHIL_LARGE 0x0
348 #define SHIL_SMALL 0x1
349 #define SHIL_EXTRALARGE 0x2
350 #define SHIL_SYSSMALL 0x3
351 #define SHIL_JUMBO 0x4
352 #define SHIL_LAST SHIL_JUMBO
353 HRESULT WINAPI SHGetImageList(int,REFIID,void**);
357 typedef NOTIFYICONDATAW NOTIFYICONDATA,*PNOTIFYICONDATA;
358 typedef SHELLEXECUTEINFOW SHELLEXECUTEINFO,*LPSHELLEXECUTEINFO;
359 typedef SHFILEOPSTRUCTW SHFILEOPSTRUCT,*LPSHFILEOPSTRUCT;
360 typedef SHFILEINFOW SHFILEINFO;
361 #define DragQueryFile DragQueryFileW
362 #define ExtractAssociatedIcon ExtractAssociatedIconW
363 #define ExtractIcon ExtractIconW
364 #define ExtractIconEx ExtractIconExW
365 #define FindExecutable FindExecutableW
366 #define Shell_NotifyIcon Shell_NotifyIconW
367 #define ShellAbout ShellAboutW
368 #define ShellExecute ShellExecuteW
369 #define ShellExecuteEx ShellExecuteExW
370 #define SHFileOperation SHFileOperationW
371 #define SHGetFileInfo SHGetFileInfoW
372 #define SHQueryRecycleBin SHQueryRecycleBinW
373 #define SHEmptyRecycleBin SHEmptyRecycleBinW
376 typedef NOTIFYICONDATAA NOTIFYICONDATA,*PNOTIFYICONDATA;
377 typedef SHELLEXECUTEINFOA SHELLEXECUTEINFO,*LPSHELLEXECUTEINFO;
378 typedef SHFILEOPSTRUCTA SHFILEOPSTRUCT,*LPSHFILEOPSTRUCT;
379 typedef SHFILEINFOA SHFILEINFO;
380 #define DragQueryFile DragQueryFileA
381 #define ExtractAssociatedIcon ExtractAssociatedIconA
382 #define ExtractIcon ExtractIconA
383 #define ExtractIconEx ExtractIconExA
384 #define FindExecutable FindExecutableA
385 #define Shell_NotifyIcon Shell_NotifyIconA
386 #define ShellAbout ShellAboutA
387 #define ShellExecute ShellExecuteA
388 #define ShellExecuteEx ShellExecuteExA
389 #define SHFileOperation SHFileOperationA
390 #define SHGetFileInfo SHGetFileInfoA
391 #define SHQueryRecycleBin SHQueryRecycleBinA
392 #define SHEmptyRecycleBin SHEmptyRecycleBinA