OSDN Git Service

Redo the filters based on assumptions discussed in mingw-dvlpr list.
[mingw/mingw-org-wsl.git] / include / shellapi.h
1 /**
2  * @file shellapi.h
3  * @copy 2012 MinGW.org project
4  *
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:
11  * 
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
14  * Software.
15  * 
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.
23  */
24 #ifndef _SHELLAPI_H
25 #define _SHELLAPI_H
26 #pragma GCC system_header
27 #include <_mingw.h>
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33 #define WINSHELLAPI DECLSPEC_IMPORT
34 #define ABE_LEFT        0
35 #define ABE_TOP 1
36 #define ABE_RIGHT       2
37 #define ABE_BOTTOM      3
38 #define ABS_AUTOHIDE    1
39 #define ABS_ALWAYSONTOP 2
40 #define SEE_MASK_CLASSNAME         0x1
41 #define SEE_MASK_CLASSKEY          0x3
42 #define SEE_MASK_IDLIST            0x4
43 #define SEE_MASK_INVOKEIDLIST      0xc
44 #define SEE_MASK_ICON              0x10
45 #define SEE_MASK_HOTKEY            0x20
46 #define SEE_MASK_NOCLOSEPROCESS    0x40
47 #define SEE_MASK_CONNECTNETDRV     0x80
48 #define SEE_MASK_FLAG_DDEWAIT      0x100
49 #define SEE_MASK_DOENVSUBST        0x200
50 #define SEE_MASK_FLAG_NO_UI        0x400
51 #define SEE_MASK_NO_CONSOLE        0x8000
52 #define SEE_MASK_UNICODE           0x10000
53 #define SEE_MASK_ASYNCOK           0x100000
54 #define SEE_MASK_HMONITOR          0x200000
55
56 #if (_WIN32_IE >= 0x0600)
57 #define SEE_MASK_NOZONECHECKS      0x800000
58 #define SEE_MASK_FLAG_LOG_USAGE    0x4000000
59 #endif
60
61 #define ABM_NEW 0
62 #define ABM_REMOVE      1
63 #define ABM_QUERYPOS    2
64 #define ABM_SETPOS      3
65 #define ABM_GETSTATE    4
66 #define ABM_GETTASKBARPOS       5
67 #define ABM_ACTIVATE    6
68 #define ABM_GETAUTOHIDEBAR      7
69 #define ABM_SETAUTOHIDEBAR      8
70 #define ABM_WINDOWPOSCHANGED    9
71 #define ABN_STATECHANGE         0
72 #define ABN_POSCHANGED          1
73 #define ABN_FULLSCREENAPP       2
74 #define ABN_WINDOWARRANGE       3
75 #define NIM_ADD 0
76 #define NIM_MODIFY      1
77 #define NIM_DELETE      2
78
79 #if (_WIN32_IE >= 0x0500)
80 #define NOTIFYICON_VERSION 3
81
82 #if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
83 #define NOTIFYICON_VERSION_4  4
84 #endif
85
86 #define NIM_SETFOCUS    3
87 #define NIM_SETVERSION  4
88 #define NIN_POPUPOPEN WM_USER+6
89 #define NIN_POPUPCLOSE WM_USER+7
90 #endif
91
92 #define NIF_MESSAGE     0x00000001
93 #define NIF_ICON        0x00000002
94 #define NIF_TIP         0x00000004
95 #define NIF_STATE       0x00000008
96
97 #if (_WIN32_IE >= 0x0500)
98 #define NIF_INFO        0x00000010
99 #endif
100
101 #if (_WIN32_IE >= 0x0600)
102 #define NIF_GUID        0x00000020
103 #endif
104
105 #if (_WIN32_IE >= 0x0500)
106 #define NIIF_NONE       0x00000000
107 #define NIIF_INFO       0x00000001
108 #define NIIF_WARNING    0x00000002
109 #define NIIF_ERROR      0x00000003
110 #endif
111
112 #if (_WIN32_IE >= 0x0600)
113 #define NIIF_ICON_MASK  0x0000000F
114 #define NIIF_NOSOUND    0x00000010
115 #endif
116
117 #if (_WIN32_IE >= 0x0500)
118 #define NIS_HIDDEN      0x00000001
119 #define NIS_SHAREDICON  0x00000002
120 #endif
121
122 #define SE_ERR_FNF      2
123 #define SE_ERR_PNF      3
124 #define SE_ERR_ACCESSDENIED     5
125 #define SE_ERR_OOM      8
126 #define SE_ERR_DLLNOTFOUND      32
127 #define SE_ERR_SHARE    26
128 #define SE_ERR_ASSOCINCOMPLETE  27
129 #define SE_ERR_DDETIMEOUT       28
130 #define SE_ERR_DDEFAIL  29
131 #define SE_ERR_DDEBUSY  30
132 #define SE_ERR_NOASSOC  31
133 #define FO_MOVE 1
134 #define FO_COPY 2
135 #define FO_DELETE       3
136 #define FO_RENAME       4
137 #define FOF_MULTIDESTFILES      1
138 #define FOF_CONFIRMMOUSE        2
139 #define FOF_SILENT      4
140 #define FOF_RENAMEONCOLLISION   8
141 #define FOF_NOCONFIRMATION      16
142 #define FOF_WANTMAPPINGHANDLE   32
143 #define FOF_ALLOWUNDO   64
144 #define FOF_FILESONLY   128
145 #define FOF_SIMPLEPROGRESS      256
146 #define FOF_NOCONFIRMMKDIR      512
147 #define FOF_NOERRORUI   1024
148 #define FOF_NOCOPYSECURITYATTRIBS       2048
149 #define PO_DELETE 19
150 #define PO_RENAME 20
151 #define PO_PORTCHANGE 32
152 #define PO_REN_PORT 52
153 #define SHGFI_ICON      256
154 #define SHGFI_DISPLAYNAME       512
155 #define SHGFI_TYPENAME  1024
156 #define SHGFI_ATTRIBUTES        2048
157 #define SHGFI_ICONLOCATION      4096
158 #define SHGFI_EXETYPE 8192
159 #define SHGFI_SYSICONINDEX 16384
160 #define SHGFI_LINKOVERLAY 32768
161 #define SHGFI_SELECTED 65536
162 #define SHGFI_ATTR_SPECIFIED 131072
163 #define SHGFI_LARGEICON 0
164 #define SHGFI_SMALLICON 1
165 #define SHGFI_OPENICON  2
166 #define SHGFI_SHELLICONSIZE     4
167 #define SHGFI_PIDL      8
168 #define SHGFI_USEFILEATTRIBUTES 16
169 #define SHERB_NOCONFIRMATION 1
170 #define SHERB_NOPROGRESSUI 2
171 #define SHERB_NOSOUND 4
172
173 #ifdef UNICODE
174 #define NOTIFYICONDATA_V2_SIZE 936
175 #define NOTIFYICONDATA_V1_SIZE 152
176 #else
177 #define NOTIFYICONDATA_V2_SIZE 488
178 #define NOTIFYICONDATA_V1_SIZE 88
179 #endif
180
181 typedef WORD FILEOP_FLAGS;
182 typedef WORD PRINTEROP_FLAGS;
183 #include <pshpack2.h>
184 typedef struct _AppBarData {
185         DWORD   cbSize;
186         HWND    hWnd;
187         UINT    uCallbackMessage;
188         UINT    uEdge;
189         RECT    rc;
190         LPARAM lParam;
191 } APPBARDATA,*PAPPBARDATA;
192 DECLARE_HANDLE(HDROP);
193
194 typedef struct _NOTIFYICONDATAA {
195   DWORD cbSize;
196   HWND hWnd;
197   UINT uID;
198   UINT uFlags;
199   UINT uCallbackMessage;
200   HICON hIcon;
201
202 #if _WIN32_IE >= 0x0500
203   CHAR szTip[128];
204   DWORD dwState;
205   DWORD dwStateMask;
206   CHAR szInfo[256];
207   _ANONYMOUS_UNION union {
208     UINT uTimeout;
209     UINT uVersion;
210   } DUMMYUNIONNAME;
211   CHAR szInfoTitle[64];
212   DWORD dwInfoFlags;
213 #else
214   CHAR szTip[64];
215 #endif
216
217 #if _WIN32_IE >= 0x600
218   GUID guidItem;
219 #endif
220
221 #if _WIN32_WINNT >= _WIN32_WINNT_VISTA
222   HICON hBalloonIcon;
223 #endif
224 } NOTIFYICONDATAA,*PNOTIFYICONDATAA;
225
226 typedef struct _NOTIFYICONDATAW {
227   DWORD cbSize;
228   HWND hWnd;
229   UINT uID;
230   UINT uFlags;
231   UINT uCallbackMessage;
232   HICON hIcon;
233
234 #if _WIN32_IE >= 0x0500
235   WCHAR szTip[128];
236   DWORD dwState;
237   DWORD dwStateMask;
238   WCHAR szInfo[256];
239   _ANONYMOUS_UNION union {
240     UINT uTimeout;
241     UINT uVersion;
242   } DUMMYUNIONNAME;
243   WCHAR szInfoTitle[64];
244   DWORD dwInfoFlags;
245 #else
246   WCHAR szTip[64];
247 #endif
248
249 #if _WIN32_IE >= 0x600
250   GUID guidItem;
251 #endif
252
253 #if _WIN32_WINNT >= _WIN32_WINNT_VISTA
254   HICON hBalloonIcon;
255 #endif
256 } NOTIFYICONDATAW,*PNOTIFYICONDATAW;
257
258 typedef struct _SHELLEXECUTEINFOA {
259         DWORD cbSize;
260         ULONG fMask;
261         HWND hwnd;
262         LPCSTR lpVerb;
263         LPCSTR lpFile;
264         LPCSTR lpParameters;
265         LPCSTR lpDirectory;
266         int nShow;
267         HINSTANCE hInstApp;
268         PVOID lpIDList;
269         LPCSTR lpClass;
270         HKEY hkeyClass;
271         DWORD dwHotKey;
272         HANDLE hIcon;
273         HANDLE hProcess;
274 } SHELLEXECUTEINFOA,*LPSHELLEXECUTEINFOA;
275 typedef struct _SHELLEXECUTEINFOW {
276         DWORD cbSize;
277         ULONG fMask;
278         HWND hwnd;
279         LPCWSTR lpVerb;
280         LPCWSTR lpFile;
281         LPCWSTR lpParameters;
282         LPCWSTR lpDirectory;
283         int nShow;
284         HINSTANCE hInstApp;
285         PVOID lpIDList;
286         LPCWSTR lpClass;
287         HKEY hkeyClass;
288         DWORD dwHotKey;
289         HANDLE hIcon;
290         HANDLE hProcess;
291 } SHELLEXECUTEINFOW,*LPSHELLEXECUTEINFOW;
292 typedef struct _SHFILEOPSTRUCTA {
293         HWND hwnd;
294         UINT wFunc;
295         LPCSTR pFrom;
296         LPCSTR pTo;
297         FILEOP_FLAGS fFlags;
298         BOOL fAnyOperationsAborted;
299         PVOID hNameMappings;
300         LPCSTR lpszProgressTitle;
301 } SHFILEOPSTRUCTA,*LPSHFILEOPSTRUCTA;
302 typedef struct _SHFILEOPSTRUCTW {
303         HWND hwnd;
304         UINT wFunc;
305         LPCWSTR pFrom;
306         LPCWSTR pTo;
307         FILEOP_FLAGS fFlags;
308         BOOL fAnyOperationsAborted;
309         PVOID hNameMappings;
310         LPCWSTR lpszProgressTitle;
311 } SHFILEOPSTRUCTW,*LPSHFILEOPSTRUCTW;
312 typedef struct _SHFILEINFOA {
313         HICON hIcon;
314         int iIcon;
315         DWORD dwAttributes;
316         CHAR szDisplayName[MAX_PATH];
317         CHAR szTypeName[80];
318 } SHFILEINFOA;
319 typedef struct _SHFILEINFOW {
320         HICON hIcon;
321         int iIcon;
322         DWORD dwAttributes;
323         WCHAR szDisplayName[MAX_PATH];
324         WCHAR szTypeName[80];
325 } SHFILEINFOW;
326 typedef struct _SHQUERYRBINFO {
327         DWORD   cbSize;
328         __int64 i64Size;
329         __int64 i64NumItems;
330 } SHQUERYRBINFO, *LPSHQUERYRBINFO;
331 #include <poppack.h>
332
333 LPWSTR * WINAPI CommandLineToArgvW(LPCWSTR,int*);
334 void WINAPI DragAcceptFiles(HWND,BOOL);
335 void WINAPI DragFinish(HDROP);
336 UINT WINAPI DragQueryFileA(HDROP,UINT,LPSTR,UINT);
337 UINT WINAPI DragQueryFileW(HDROP,UINT,LPWSTR,UINT);
338 BOOL WINAPI DragQueryPoint(HDROP,LPPOINT);
339 HICON WINAPI DuplicateIcon(HINSTANCE,HICON);
340 HICON WINAPI ExtractAssociatedIconA(HINSTANCE,LPCSTR,PWORD);
341 HICON WINAPI ExtractAssociatedIconW(HINSTANCE,LPCWSTR,PWORD);
342 HICON WINAPI ExtractIconA(HINSTANCE,LPCSTR,UINT);
343 HICON WINAPI ExtractIconW(HINSTANCE,LPCWSTR,UINT);
344 UINT WINAPI ExtractIconExA(LPCSTR,int,HICON*,HICON*,UINT);
345 UINT WINAPI ExtractIconExW(LPCWSTR,int,HICON*,HICON*,UINT);
346 HINSTANCE WINAPI FindExecutableA(LPCSTR,LPCSTR,LPSTR);
347 HINSTANCE WINAPI FindExecutableW(LPCWSTR,LPCWSTR,LPWSTR);
348 UINT WINAPI SHAppBarMessage(DWORD,PAPPBARDATA);
349 BOOL WINAPI Shell_NotifyIconA(DWORD,PNOTIFYICONDATAA);
350 BOOL WINAPI Shell_NotifyIconW(DWORD,PNOTIFYICONDATAW);
351 int WINAPI ShellAboutA(HWND,LPCSTR,LPCSTR,HICON);
352 int WINAPI ShellAboutW(HWND,LPCWSTR,LPCWSTR,HICON);
353 HINSTANCE WINAPI ShellExecuteA(HWND,LPCSTR,LPCSTR,LPCSTR,LPCSTR,INT);
354 HINSTANCE WINAPI ShellExecuteW(HWND,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR,INT);
355 BOOL WINAPI ShellExecuteExA(LPSHELLEXECUTEINFOA);
356 BOOL WINAPI ShellExecuteExW(LPSHELLEXECUTEINFOW);
357 int WINAPI SHFileOperationA(LPSHFILEOPSTRUCTA);
358 int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW);
359 void WINAPI SHFreeNameMappings(HANDLE);
360 DWORD WINAPI SHGetFileInfoA(LPCSTR,DWORD,SHFILEINFOA*,UINT,UINT);
361 DWORD WINAPI SHGetFileInfoW(LPCWSTR,DWORD,SHFILEINFOW*,UINT,UINT);
362 HRESULT WINAPI SHQueryRecycleBinA(LPCSTR, LPSHQUERYRBINFO);
363 HRESULT WINAPI SHQueryRecycleBinW(LPCWSTR, LPSHQUERYRBINFO);
364 HRESULT WINAPI SHEmptyRecycleBinA(HWND,LPCSTR,DWORD);
365 HRESULT WINAPI SHEmptyRecycleBinW(HWND,LPCWSTR,DWORD);
366
367 #if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
368 #define SHIL_LARGE 0x0
369 #define SHIL_SMALL 0x1
370 #define SHIL_EXTRALARGE 0x2
371 #define SHIL_SYSSMALL 0x3
372 #define SHIL_JUMBO 0x4
373 #define SHIL_LAST SHIL_JUMBO
374 HRESULT WINAPI SHGetImageList(int,REFIID,void**);
375 #endif
376
377 typedef __AW(NOTIFYICONDATA) NOTIFYICONDATA,*PNOTIFYICONDATA;
378 typedef __AW(SHELLEXECUTEINFO) SHELLEXECUTEINFO,*LPSHELLEXECUTEINFO;
379 typedef __AW(SHFILEOPSTRUCT) SHFILEOPSTRUCT,*LPSHFILEOPSTRUCT;
380 typedef __AW(SHFILEINFO) SHFILEINFO;
381 #define DragQueryFile __AW(DragQueryFile)
382 #define ExtractAssociatedIcon __AW(ExtractAssociatedIcon)
383 #define ExtractIcon __AW(ExtractIcon)
384 #define ExtractIconEx __AW(ExtractIconEx)
385 #define FindExecutable __AW(FindExecutable)
386 #define Shell_NotifyIcon __AW(Shell_NotifyIcon)
387 #define ShellAbout __AW(ShellAbout)
388 #define ShellExecute __AW(ShellExecute)
389 #define ShellExecuteEx __AW(ShellExecuteEx)
390 #define SHFileOperation __AW(SHFileOperation)
391 #define SHGetFileInfo __AW(SHGetFileInfo)
392 #define SHQueryRecycleBin __AW(SHQueryRecycleBin)
393 #define SHEmptyRecycleBin __AW(SHEmptyRecycleBin)
394
395 #ifdef __cplusplus
396 }
397 #endif
398
399 #endif