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