Moved some more definitions out of undocshell.h into the exported
[wine/multimedia.git] / include / shellapi.h
blob55d883365bff2d22d660465eec164dea6d258957
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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);
60 #define NIF_MESSAGE 0x00000001
61 #define NIF_ICON 0x00000002
62 #define NIF_TIP 0x00000004
64 #define NIM_ADD 0x00000000
65 #define NIM_MODIFY 0x00000001
66 #define NIM_DELETE 0x00000002
70 /******************************************
71 * Application Bar
73 #define ABM_NEW 0x00000000
74 #define ABM_REMOVE 0x00000001
75 #define ABM_QUERYPOS 0x00000002
76 #define ABM_SETPOS 0x00000003
77 #define ABM_GETSTATE 0x00000004
78 #define ABM_GETTASKBARPOS 0x00000005
79 #define ABM_ACTIVATE 0x00000006
80 #define ABM_GETAUTOHIDEBAR 0x00000007
81 #define ABM_SETAUTOHIDEBAR 0x00000008
82 #define ABM_WINDOWPOSCHANGED 0x00000009
84 #define ABN_STATECHANGE 0x00000000
85 #define ABN_POSCHANGED 0x00000001
86 #define ABN_FULLSCREENAPP 0x00000002
87 #define ABN_WINDOWARRANGE 0x00000003
89 #define ABS_AUTOHIDE 0x00000001
90 #define ABS_ALWAYSONTOP 0x00000002
92 #define ABE_LEFT 0
93 #define ABE_TOP 1
94 #define ABE_RIGHT 2
95 #define ABE_BOTTOM 3
97 typedef struct _AppBarData
98 { DWORD cbSize;
99 HWND hWnd;
100 UINT uCallbackMessage;
101 UINT uEdge;
102 RECT rc;
103 LPARAM lParam;
104 } APPBARDATA, *PAPPBARDATA;
106 UINT WINAPI SHAppBarMessage(DWORD,PAPPBARDATA);
108 /******************************************
109 * SHGetFileInfo
112 #define SHGFI_LARGEICON 0x000000000 /* get large icon */
113 #define SHGFI_SMALLICON 0x000000001 /* get small icon */
114 #define SHGFI_OPENICON 0x000000002 /* get open icon */
115 #define SHGFI_SHELLICONSIZE 0x000000004 /* get shell size icon */
116 #define SHGFI_PIDL 0x000000008 /* pszPath is a pidl */
117 #define SHGFI_USEFILEATTRIBUTES 0x000000010 /* use passed dwFileAttribute */
118 #define SHGFI_UNKNOWN1 0x000000020
119 #define SHGFI_UNKNOWN2 0x000000040
120 #define SHGFI_UNKNOWN3 0x000000080
121 #define SHGFI_ICON 0x000000100 /* get icon */
122 #define SHGFI_DISPLAYNAME 0x000000200 /* get display name */
123 #define SHGFI_TYPENAME 0x000000400 /* get type name */
124 #define SHGFI_ATTRIBUTES 0x000000800 /* get attributes */
125 #define SHGFI_ICONLOCATION 0x000001000 /* get icon location */
126 #define SHGFI_EXETYPE 0x000002000 /* return exe type */
127 #define SHGFI_SYSICONINDEX 0x000004000 /* get system icon index */
128 #define SHGFI_LINKOVERLAY 0x000008000 /* put a link overlay on icon */
129 #define SHGFI_SELECTED 0x000010000 /* show icon in selected state */
130 #define SHGFI_ATTR_SPECIFIED 0x000020000 /* get only specified attributes */
132 typedef struct tagSHFILEINFOA
133 { HICON hIcon; /* icon */
134 int iIcon; /* icon index */
135 DWORD dwAttributes; /* SFGAO_ flags */
136 CHAR szDisplayName[MAX_PATH];/* display name (or path) */
137 CHAR szTypeName[80]; /* type name */
138 } SHFILEINFOA;
140 typedef struct tagSHFILEINFOW
141 { HICON hIcon; /* icon */
142 int iIcon; /* icon index */
143 DWORD dwAttributes; /* SFGAO_ flags */
144 WCHAR szDisplayName[MAX_PATH];/* display name (or path) */
145 WCHAR szTypeName[80]; /* type name */
146 } SHFILEINFOW;
148 DECL_WINELIB_TYPE_AW(SHFILEINFO)
150 DWORD WINAPI SHGetFileInfoA(LPCSTR,DWORD,SHFILEINFOA*,UINT,UINT);
151 DWORD WINAPI SHGetFileInfoW(LPCWSTR,DWORD,SHFILEINFOW*,UINT,UINT);
152 #define SHGetFileInfo WINELIB_NAME_AW(SHGetFileInfo)
154 /******************************************
155 * SHSetFileInfo
158 /******************************************
159 * SHFileOperation
161 #define FO_MOVE 0x0001
162 #define FO_COPY 0x0002
163 #define FO_DELETE 0x0003
164 #define FO_RENAME 0x0004
166 #define FOF_MULTIDESTFILES 0x0001
167 #define FOF_CONFIRMMOUSE 0x0002
168 #define FOF_SILENT 0x0004
169 #define FOF_RENAMEONCOLLISION 0x0008
170 #define FOF_NOCONFIRMATION 0x0010
171 #define FOF_WANTMAPPINGHANDLE 0x0020
172 #define FOF_ALLOWUNDO 0x0040
173 #define FOF_FILESONLY 0x0080
174 #define FOF_SIMPLEPROGRESS 0x0100
175 #define FOF_NOCONFIRMMKDIR 0x0200
176 #define FOF_NOERRORUI 0x0400
177 #define FOF_NOCOPYSECURITYATTRIBS 0x0800
179 typedef WORD FILEOP_FLAGS;
181 #define PO_DELETE 0x0013
182 #define PO_RENAME 0x0014
183 #define PO_PORTCHANGE 0x0020
185 typedef WORD PRINTEROP_FLAGS;
187 typedef struct _SHFILEOPSTRUCTA
188 { HWND hwnd;
189 UINT wFunc;
190 LPCSTR pFrom;
191 LPCSTR pTo;
192 FILEOP_FLAGS fFlags;
193 BOOL fAnyOperationsAborted;
194 LPVOID hNameMappings;
195 LPCSTR lpszProgressTitle;
196 } SHFILEOPSTRUCTA, *LPSHFILEOPSTRUCTA;
198 typedef struct _SHFILEOPSTRUCTW
199 { HWND hwnd;
200 UINT wFunc;
201 LPCWSTR pFrom;
202 LPCWSTR pTo;
203 FILEOP_FLAGS fFlags;
204 BOOL fAnyOperationsAborted;
205 LPVOID hNameMappings;
206 LPCWSTR lpszProgressTitle;
207 } SHFILEOPSTRUCTW, *LPSHFILEOPSTRUCTW;
209 #define SHFILEOPSTRUCT WINELIB_NAME_AW(SHFILEOPSTRUCT)
210 #define LPSHFILEOPSTRUCT WINELIB_NAME_AW(LPSHFILEOPSTRUCT)
212 int WINAPI SHFileOperationA (LPSHFILEOPSTRUCTA lpFileOp);
213 int WINAPI SHFileOperationW (LPSHFILEOPSTRUCTW lpFileOp);
214 #define SHFileOperation WINELIB_NAME_AW(SHFileOperation)
216 /******************************************
217 * ShellExecute
219 #define SE_ERR_SHARE 26
220 #define SE_ERR_ASSOCINCOMPLETE 27
221 #define SE_ERR_DDETIMEOUT 28
222 #define SE_ERR_DDEFAIL 29
223 #define SE_ERR_DDEBUSY 30
224 #define SE_ERR_NOASSOC 31
226 HINSTANCE WINAPI ShellExecuteA(HWND,LPCSTR,LPCSTR,LPCSTR,LPCSTR,INT);
227 HINSTANCE WINAPI ShellExecuteW(HWND,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR,INT);
228 #define ShellExecute WINELIB_NAME_AW(ShellExecute)
230 #define SE_ERR_FNF 2 /* file not found */
231 #define SE_ERR_PNF 3 /* path not found */
232 #define SE_ERR_ACCESSDENIED 5 /* access denied */
233 #define SE_ERR_OOM 8 /* out of memory */
234 #define SE_ERR_DLLNOTFOUND 32
235 #define SE_ERR_SHARE 26
236 #define SE_ERR_ASSOCINCOMPLETE 27
237 #define SE_ERR_DDETIMEOUT 28
238 #define SE_ERR_DDEFAIL 29
239 #define SE_ERR_DDEBUSY 30
240 #define SE_ERR_NOASSOC 31
242 #define SEE_MASK_CLASSNAME 0x00000001
243 #define SEE_MASK_CLASSKEY 0x00000003
244 #define SEE_MASK_IDLIST 0x00000004
245 #define SEE_MASK_INVOKEIDLIST 0x0000000c
246 #define SEE_MASK_ICON 0x00000010
247 #define SEE_MASK_HOTKEY 0x00000020
248 #define SEE_MASK_NOCLOSEPROCESS 0x00000040
249 #define SEE_MASK_CONNECTNETDRV 0x00000080
250 #define SEE_MASK_FLAG_DDEWAIT 0x00000100
251 #define SEE_MASK_DOENVSUBST 0x00000200
252 #define SEE_MASK_FLAG_NO_UI 0x00000400
253 #define SEE_MASK_UNICODE 0x00004000
254 #define SEE_MASK_NO_CONSOLE 0x00008000
255 #define SEE_MASK_ASYNCOK 0x00100000
256 #define SEE_MASK_HMONITOR 0x00200000
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 /* Optional fields */
269 LPVOID lpIDList;
270 LPCSTR lpClass;
271 HKEY hkeyClass;
272 DWORD dwHotKey;
273 union
274 { HANDLE hIcon;
275 HANDLE hMonitor;
276 } DUMMYUNIONNAME;
277 HANDLE hProcess;
278 } SHELLEXECUTEINFOA, *LPSHELLEXECUTEINFOA;
280 typedef struct _SHELLEXECUTEINFOW
281 { DWORD cbSize;
282 ULONG fMask;
283 HWND hwnd;
284 LPCWSTR lpVerb;
285 LPCWSTR lpFile;
286 LPCWSTR lpParameters;
287 LPCWSTR lpDirectory;
288 INT nShow;
289 HINSTANCE hInstApp;
290 /* Optional fields*/
291 LPVOID lpIDList;
292 LPCWSTR lpClass;
293 HKEY hkeyClass;
294 DWORD dwHotKey;
295 union
296 { HANDLE hIcon;
297 HANDLE hMonitor;
298 } DUMMYUNIONNAME;
299 HANDLE hProcess;
300 } SHELLEXECUTEINFOW, *LPSHELLEXECUTEINFOW;
302 #define SHELLEXECUTEINFO WINELIB_NAME_AW(SHELLEXECUTEINFO)
303 #define LPSHELLEXECUTEINFO WINELIB_NAME_AW(LPSHELLEXECUTEINFO)
305 BOOL WINAPI ShellExecuteExA(LPSHELLEXECUTEINFOA lpExecInfo);
306 BOOL WINAPI ShellExecuteExW(LPSHELLEXECUTEINFOW lpExecInfo);
307 #define ShellExecuteEx WINELIB_NAME_AW(ShellExecuteEx)
309 void WINAPI WinExecErrorA(HWND hwnd,INT error, LPCSTR lpstrFileName, LPCSTR lpstrTitle);
310 void WINAPI WinExecErrorW(HWND hwnd,INT error, LPCWSTR lpstrFileName, LPCWSTR lpstrTitle);
311 #define WinExecError WINELIB_NAME_AW(WinExecError)
313 /******************************************
314 * Tray Notification
316 typedef struct _NOTIFYICONDATAA
317 { DWORD cbSize;
318 HWND hWnd;
319 UINT uID;
320 UINT uFlags;
321 UINT uCallbackMessage;
322 HICON hIcon;
323 CHAR szTip[64];
324 } NOTIFYICONDATAA, *PNOTIFYICONDATAA;
326 typedef struct _NOTIFYICONDATAW
327 { DWORD cbSize;
328 HWND hWnd;
329 UINT uID;
330 UINT uFlags;
331 UINT uCallbackMessage;
332 HICON hIcon;
333 WCHAR szTip[64];
334 } NOTIFYICONDATAW, *PNOTIFYICONDATAW;
336 DECL_WINELIB_TYPE_AW(NOTIFYICONDATA)
337 DECL_WINELIB_TYPE_AW(PNOTIFYICONDATA)
339 BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA lpData);
340 BOOL WINAPI Shell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW lpData);
342 #define Shell_NotifyIcon WINELIB_NAME_AW(Shell_NotifyIcon)
344 /******************************************
345 * Links
348 #define SHGNLI_PIDL 0x01
349 #define SHGNLI_PREFIXNAME 0x02
350 #define SHGNLI_NOUNIQUE 0x04
351 #define SHGNLI_NOLNK 0x08
353 BOOL WINAPI SHGetNewLinkInfoA(LPCSTR,LPCSTR,LPSTR,BOOL*,UINT);
354 BOOL WINAPI SHGetNewLinkInfoW(LPCWSTR,LPCWSTR,LPWSTR,BOOL*,UINT);
355 #define SHGetNewLinkInfo WINELIB_NAME_AW(SHGetNewLinkInfo)
357 /******************************************
358 * Misc
361 LPWSTR* WINAPI CommandLineToArgvW(LPCWSTR,int*);
362 HICON WINAPI ExtractIconA(HINSTANCE,LPCSTR,UINT);
363 HICON WINAPI ExtractIconW(HINSTANCE,LPCWSTR,UINT);
364 #define ExtractIcon WINELIB_NAME_AW(ExtractIcon)
365 HICON WINAPI ExtractAssociatedIconA(HINSTANCE,LPSTR,LPWORD);
366 HICON WINAPI ExtractAssociatedIconW(HINSTANCE,LPWSTR,LPWORD);
367 #define ExtractAssociatedIcon WINELIB_NAME_AW(ExtractAssociatedIcon)
368 HICON WINAPI ExtractAssociatedIconExA(HINSTANCE,LPSTR,LPWORD,LPWORD);
369 HICON WINAPI ExtractAssociatedIconExW(HINSTANCE,LPWSTR,LPWORD,LPWORD);
370 #define ExtractAssociatedIconEx WINELIB_NAME_AW(ExtractAssociatedIconEx)
371 UINT WINAPI ExtractIconExA(LPCSTR,INT,HICON*,HICON*,UINT);
372 UINT WINAPI ExtractIconExW(LPCWSTR,INT,HICON*,HICON*,UINT);
373 #define ExtractIconEx WINELIB_NAME_AW(ExtractIconEx)
374 UINT WINAPI ExtractIconExAW(LPCVOID,INT,HICON*,HICON*,UINT);
375 HINSTANCE WINAPI FindExecutableA(LPCSTR,LPCSTR,LPSTR);
376 HINSTANCE WINAPI FindExecutableW(LPCWSTR,LPCWSTR,LPWSTR);
377 #define FindExecutable WINELIB_NAME_AW(FindExecutable)
378 BOOL WINAPI ShellAboutA(HWND,LPCSTR,LPCSTR,HICON);
379 BOOL WINAPI ShellAboutW(HWND,LPCWSTR,LPCWSTR,HICON);
380 #define ShellAbout WINELIB_NAME_AW(ShellAbout)
381 int WINAPIV ShellMessageBoxA(HINSTANCE,HWND,LPCSTR,LPCSTR,UINT,...);
382 int WINAPIV ShellMessageBoxW(HINSTANCE,HWND,LPCWSTR,LPCWSTR,UINT,...);
383 #define ShellMessageBox WINELIB_NAME_AW(ShellMessageBox)
385 #ifdef __cplusplus
386 } /* extern "C" */
387 #endif /* defined(__cplusplus) */
389 #include <poppack.h>
391 #endif /* __WINE_SHELLAPI_H */