Recovery of release 990110 after disk crash.
[wine/multimedia.git] / include / shell.h
blob2b5cdf69137d477a51af905b2ae756ce47e21964
1 /*
2 * Shell Library definitions
3 */
4 #ifndef __WINE_SHELL_H
5 #define __WINE_SHELL_H
7 #include "windows.h"
8 #include "winreg.h"
9 #include "imagelist.h"
12 /****************************************************************************
13 * shell 16
15 extern void SHELL_LoadRegistry(void);
16 extern void SHELL_SaveRegistry(void);
17 extern void SHELL_Init(void);
19 /* global functions used from shell32 */
20 extern HINSTANCE32 SHELL_FindExecutable(LPCSTR,LPCSTR ,LPSTR);
21 extern HGLOBAL16 WINAPI InternalExtractIcon(HINSTANCE16,LPCSTR,UINT16,WORD);
23 /****************************************************************************
24 * shell 32
26 /****************************************************************************
27 * common return codes
29 #define SHELL_ERROR_SUCCESS 0L
30 #define SHELL_ERROR_BADDB 1L
31 #define SHELL_ERROR_BADKEY 2L
32 #define SHELL_ERROR_CANTOPEN 3L
33 #define SHELL_ERROR_CANTREAD 4L
34 #define SHELL_ERROR_CANTWRITE 5L
35 #define SHELL_ERROR_OUTOFMEMORY 6L
36 #define SHELL_ERROR_INVALID_PARAMETER 7L
37 #define SHELL_ERROR_ACCESS_DENIED 8L
39 /****************************************************************************
40 * common shell file structures
42 #define FO_MOVE 0x0001
43 #define FO_COPY 0x0002
44 #define FO_DELETE 0x0003
45 #define FO_RENAME 0x0004
47 #define FOF_MULTIDESTFILES 0x0001
48 #define FOF_CONFIRMMOUSE 0x0002
49 #define FOF_SILENT 0x0004
50 #define FOF_RENAMEONCOLLISION 0x0008
51 #define FOF_NOCONFIRMATION 0x0010
52 #define FOF_WANTMAPPINGHANDLE 0x0020
53 #define FOF_ALLOWUNDO 0x0040
54 #define FOF_FILESONLY 0x0080
55 #define FOF_SIMPLEPROGRESS 0x0100
56 #define FOF_NOCONFIRMMKDIR 0x0200
57 #define FOF_NOERRORUI 0x0400
59 typedef WORD FILEOP_FLAGS;
61 #define PO_DELETE 0x0013
62 #define PO_RENAME 0x0014
63 #define PO_PORTCHANGE 0x0020
65 typedef WORD PRINTEROP_FLAGS;
67 /******************************
68 * DRAG&DROP API
70 typedef struct { /* structure for dropped files */
71 WORD wSize;
72 POINT16 ptMousePos;
73 BOOL16 fInNonClientArea;
74 /* memory block with filenames follows */
75 } DROPFILESTRUCT16, *LPDROPFILESTRUCT16;
77 typedef struct { /* structure for dropped files */
78 DWORD lSize;
79 POINT32 ptMousePos;
80 BOOL32 fInNonClientArea;
81 BOOL32 fWideChar;
82 /* memory block with filenames follows */
83 } DROPFILESTRUCT32, *LPDROPFILESTRUCT32;
85 DECL_WINELIB_TYPE(DROPFILESTRUCT)
86 DECL_WINELIB_TYPE(LPDROPFILESTRUCT)
88 void WINAPI DragAcceptFiles16(HWND16 hWnd, BOOL16 b);
89 void WINAPI DragAcceptFiles32(HWND32 hWnd, BOOL32 b);
90 #define DragAcceptFiles WINELIB_NAME(DragAcceptFiles)
91 UINT16 WINAPI DragQueryFile16(HDROP16 hDrop, WORD wFile, LPSTR lpszFile, WORD wLength);
92 UINT32 WINAPI DragQueryFile32A(HDROP32 hDrop, UINT32 lFile, LPSTR lpszFile, UINT32 lLength);
93 UINT32 WINAPI DragQueryFile32W(HDROP32 hDrop, UINT32 lFile, LPWSTR lpszFile, UINT32 lLength);
94 #define DragQueryFile WINELIB_NAME_AW(DragQueryFile)
95 void WINAPI DragFinish32(HDROP32 h);
96 void WINAPI DragFinish16(HDROP16 h);
97 #define DragFinish WINELIB_NAME(DragFinish)
98 BOOL32 WINAPI DragQueryPoint32(HDROP32 hDrop, POINT32 *p);
99 BOOL16 WINAPI DragQueryPoint16(HDROP16 hDrop, POINT16 *p);
100 #define DragQueryPoint WINELIB_NAME(DragQueryPoint)
103 /****************************************************************************
104 * NOTIFYICONDATA
106 typedef struct _NOTIFYICONDATA {
107 DWORD cbSize;
108 HWND32 hWnd;
109 UINT32 uID;
110 UINT32 uFlags;
111 UINT32 uCallbackMessage;
112 HICON32 hIcon;
113 CHAR szTip[64];
114 } NOTIFYICONDATA, *PNOTIFYICONDATA;
116 /****************************************************************************
117 * SHITEMID, ITEMIDLIST, PIDL API
119 #pragma pack(1)
120 typedef struct
121 { WORD cb; /* nr of bytes in this item */
122 BYTE abID[1];/* first byte in this item */
123 } SHITEMID,*LPSHITEMID;
125 typedef struct
126 { SHITEMID mkid; /* first itemid in list */
127 } ITEMIDLIST,*LPITEMIDLIST,*LPCITEMIDLIST;
128 #pragma pack(4)
130 DWORD WINAPI SHGetPathFromIDList32A (LPCITEMIDLIST pidl,LPSTR pszPath);
131 DWORD WINAPI SHGetPathFromIDList32W (LPCITEMIDLIST pidl,LPWSTR pszPath);
132 #define SHGetPathFromIDList WINELIB_NAME_AW(SHGetPathFromIDList)
134 /****************************************************************************
135 * SHFILEINFO API
137 typedef struct tagSHFILEINFO32A {
138 HICON32 hIcon; /* icon */
139 int iIcon; /* icon index */
140 DWORD dwAttributes; /* SFGAO_ flags */
141 CHAR szDisplayName[MAX_PATH];/* display name (or path) */
142 CHAR szTypeName[80]; /* type name */
143 } SHFILEINFO32A;
145 typedef struct tagSHFILEINFO32W {
146 HICON32 hIcon; /* icon */
147 int iIcon; /* icon index */
148 DWORD dwAttributes; /* SFGAO_ flags */
149 WCHAR szDisplayName[MAX_PATH];/* display name (or path) */
150 WCHAR szTypeName[80]; /* type name */
151 } SHFILEINFO32W;
153 DECL_WINELIB_TYPE_AW(SHFILEINFO)
155 DWORD WINAPI SHGetFileInfo32A(LPCSTR,DWORD,SHFILEINFO32A*,UINT32,UINT32);
156 DWORD WINAPI SHGetFileInfo32W(LPCWSTR,DWORD,SHFILEINFO32W*,UINT32,UINT32);
157 #define SHGetFileInfo WINELIB_NAME_AW(SHGetFileInfo)
159 /****************************************************************************
160 * SHFILEOPSTRUCT API
162 typedef struct _SHFILEOPSTRUCTA
163 { HWND32 hwnd;
164 UINT32 wFunc;
165 LPCSTR pFrom;
166 LPCSTR pTo;
167 FILEOP_FLAGS fFlags;
168 BOOL32 fAnyOperationsAborted;
169 LPVOID hNameMappings;
170 LPCSTR lpszProgressTitle;
171 } SHFILEOPSTRUCT32A, *LPSHFILEOPSTRUCT32A;
173 typedef struct _SHFILEOPSTRUCTW
174 { HWND32 hwnd;
175 UINT32 wFunc;
176 LPCWSTR pFrom;
177 LPCWSTR pTo;
178 FILEOP_FLAGS fFlags;
179 BOOL32 fAnyOperationsAborted;
180 LPVOID hNameMappings;
181 LPCWSTR lpszProgressTitle;
182 } SHFILEOPSTRUCT32W, *LPSHFILEOPSTRUCT32W;
184 #define SHFILEOPSTRUCT WINELIB_NAME_AW(SHFILEOPSTRUCT)
185 #define LPSHFILEOPSTRUCT WINELIB_NAME_AW(LPSHFILEOPSTRUCT)
187 DWORD WINAPI SHFileOperation32A (LPSHFILEOPSTRUCT32A lpFileOp);
188 DWORD WINAPI SHFileOperation32W (LPSHFILEOPSTRUCT32W lpFileOp);
189 #define SHFileOperation WINELIB_NAME_AW(SHFileOperation)
191 DWORD WINAPI SHFileOperation32(DWORD x);
193 /****************************************************************************
194 * APPBARDATA
196 typedef struct _AppBarData {
197 DWORD cbSize;
198 HWND32 hWnd;
199 UINT32 uCallbackMessage;
200 UINT32 uEdge;
201 RECT32 rc;
202 LPARAM lParam;
203 } APPBARDATA, *PAPPBARDATA;
205 #define SHGFI_ICON 0x000000100 /* get icon */
206 #define SHGFI_DISPLAYNAME 0x000000200 /* get display name */
207 #define SHGFI_TYPENAME 0x000000400 /* get type name */
208 #define SHGFI_ATTRIBUTES 0x000000800 /* get attributes */
209 #define SHGFI_ICONLOCATION 0x000001000 /* get icon location */
210 #define SHGFI_EXETYPE 0x000002000 /* return exe type */
211 #define SHGFI_SYSICONINDEX 0x000004000 /* get system icon index */
212 #define SHGFI_LINKOVERLAY 0x000008000 /* put a link overlay on icon */
213 #define SHGFI_SELECTED 0x000010000 /* show icon in selected state */
214 #define SHGFI_LARGEICON 0x000000000 /* get large icon */
215 #define SHGFI_SMALLICON 0x000000001 /* get small icon */
216 #define SHGFI_OPENICON 0x000000002 /* get open icon */
217 #define SHGFI_SHELLICONSIZE 0x000000004 /* get shell size icon */
218 #define SHGFI_PIDL 0x000000008 /* pszPath is a pidl */
219 #define SHGFI_USEFILEATTRIBUTES 0x000000010 /* use passed dwFileAttribute */
221 /****************************************************************************
222 * SHChangeNotifyRegister API
224 typedef struct
225 { LPITEMIDLIST pidl;
226 DWORD unknown;
227 } IDSTRUCT;
229 DWORD WINAPI SHChangeNotifyRegister(HWND32 hwnd,LONG events1,LONG events2,DWORD msg,int count,IDSTRUCT *idlist);
230 DWORD WINAPI SHChangeNotifyDeregister(LONG x1);
232 /****************************************************************************
233 * SHAddToRecentDocs API
235 #define SHARD_PIDL 0x00000001L
236 #define SHARD_PATH 0x00000002L
238 DWORD WINAPI SHAddToRecentDocs(UINT32 uFlags, LPCVOID pv);
240 /****************************************************************************
241 * SHGetSpecialFolderLocation API
243 HRESULT WINAPI SHGetSpecialFolderLocation(HWND32, INT32, LPITEMIDLIST *);
244 /****************************************************************************
245 * string and path functions
247 BOOL32 WINAPI PathIsRoot32A(LPCSTR x);
248 BOOL32 WINAPI PathIsRoot32W(LPCWSTR x);
249 #define PathIsRoot WINELIB_NAME_AW(PathIsRoot)
250 BOOL32 WINAPI PathIsRoot32AW(LPCVOID x);
252 LPSTR WINAPI PathAddBackslash32A(LPSTR path);
253 LPWSTR WINAPI PathAddBackslash32W(LPWSTR path);
254 #define PathAddBackslash WINELIB_NAME_AW(PathAddBackslash)
255 LPVOID WINAPI PathAddBackslash32AW(LPVOID path);
257 LPSTR WINAPI PathQuoteSpaces32A(LPCSTR path);
258 LPWSTR WINAPI PathQuoteSpaces32W(LPCWSTR path);
259 #define PathQuoteSpaces WINELIB_NAME_AW(PathQuoteSpaces)
260 LPVOID WINAPI PathQuoteSpaces32AW(LPCVOID path);
262 LPSTR WINAPI PathCombine32A(LPSTR szDest, LPCSTR lpszDir, LPCSTR lpszFile);
263 LPWSTR WINAPI PathCombine32W(LPWSTR szDest, LPCWSTR lpszDir, LPCWSTR lpszFile);
264 #define PathCombine WINELIB_NAME_AW(PathCombine)
265 LPVOID WINAPI PathCombine32AW(LPVOID szDest, LPCVOID lpszDir, LPCVOID lpszFile);
267 LPCSTR WINAPI PathFindExtension32A(LPCSTR path);
268 LPCWSTR WINAPI PathFindExtension32W(LPCWSTR path);
269 #define PathFindExtension WINELIB_NAME_AW(PathFindExtension)
270 LPCVOID WINAPI PathFindExtension32AW(LPCVOID path);
272 LPCSTR WINAPI PathGetExtension32A(LPCSTR path, DWORD y, DWORD x);
273 LPCWSTR WINAPI PathGetExtension32W(LPCWSTR path, DWORD y, DWORD x);
274 #define PathGetExtension WINELIB_NAME_AW(PathGetExtension)
275 LPCVOID WINAPI PathGetExtension32AW(LPCVOID path, DWORD y, DWORD x);
277 LPCSTR WINAPI PathFindFilename32A(LPCSTR path);
278 LPCWSTR WINAPI PathFindFilename32W(LPCWSTR path);
279 #define PathFindFilename WINELIB_NAME_AW(PathFindFilename)
280 LPCVOID WINAPI PathFindFilename32AW(LPCVOID path);
282 BOOL32 WINAPI PathMatchSpec32A(LPCSTR x, LPCSTR y);
283 BOOL32 WINAPI PathMatchSpec32W(LPCWSTR x, LPCWSTR y);
284 #define PathMatchSpec WINELIB_NAME_AW(PathMatchSpec)
285 BOOL32 WINAPI PathMatchSpec32AW(LPVOID x, LPVOID y);
287 LPSTR WINAPI PathRemoveBlanks32A(LPSTR str);
288 LPWSTR WINAPI PathRemoveBlanks32W(LPWSTR str);
289 #define PathRemoveBlanks WINELIB_NAME_AW(PathRemoveBlanks)
290 LPVOID WINAPI PathRemoveBlanks32AW(LPVOID str);
292 BOOL32 WINAPI PathIsRelative32A(LPCSTR str);
293 BOOL32 WINAPI PathIsRelative32W(LPCWSTR str);
294 #define PathIsRelative WINELIB_NAME_AW(PathIsRelative)
295 BOOL32 WINAPI PathIsRelative32AW(LPCVOID str);
297 BOOL32 WINAPI PathIsUNC32A(LPCSTR str);
298 BOOL32 WINAPI PathIsUNC32W(LPCWSTR str);
299 #define PathIsUNC WINELIB_NAME_AW(PathIsUNC)
300 BOOL32 WINAPI PathIsUNC32AW(LPCVOID str);
302 BOOL32 WINAPI PathFindOnPath32A(LPSTR sFile, LPCSTR sOtherDirs);
303 BOOL32 WINAPI PathFindOnPath32W(LPWSTR sFile, LPCWSTR sOtherDirs);
304 #define PathFindOnPath WINELIB_NAME_AW(PathFindOnPath)
305 BOOL32 WINAPI PathFindOnPath32AW(LPVOID sFile, LPCVOID sOtherDirs);
307 LPSTR WINAPI StrFormatByteSize32A ( DWORD dw, LPSTR pszBuf, UINT32 cchBuf );
308 LPWSTR WINAPI StrFormatByteSize32W ( DWORD dw, LPWSTR pszBuf, UINT32 cchBuf );
309 #define StrFormatByteSize WINELIB_NAME_AW(StrFormatByteSize)
311 /****************************************************************************
312 * other functions
314 HICON32 WINAPI ExtractIconEx32A ( LPSTR, INT32, HICON32 *, HICON32 *, UINT32 );
315 HICON32 WINAPI ExtractIconEx32W ( LPWSTR, INT32, HICON32 *, HICON32 *, UINT32 );
316 #define ExtractIconEx WINELIB_NAME_AW(ExtractIconEx)
317 HICON32 WINAPI ExtractIconEx32AW ( LPVOID, INT32, HICON32 *, HICON32 *, UINT32 );
319 LPVOID WINAPI SHAlloc(DWORD len);
320 DWORD WINAPI SHFree(LPVOID x);
322 #define SE_ERR_SHARE 26
323 #define SE_ERR_ASSOCINCOMPLETE 27
324 #define SE_ERR_DDETIMEOUT 28
325 #define SE_ERR_DDEFAIL 29
326 #define SE_ERR_DDEBUSY 30
327 #define SE_ERR_NOASSOC 31
329 #define CSIDL_DESKTOP 0x0000
330 #define CSIDL_PROGRAMS 0x0002
331 #define CSIDL_CONTROLS 0x0003
332 #define CSIDL_PRINTERS 0x0004
333 #define CSIDL_PERSONAL 0x0005
334 #define CSIDL_FAVORITES 0x0006
335 #define CSIDL_STARTUP 0x0007
336 #define CSIDL_RECENT 0x0008
337 #define CSIDL_SENDTO 0x0009
338 #define CSIDL_BITBUCKET 0x000a
339 #define CSIDL_STARTMENU 0x000b
340 #define CSIDL_DESKTOPDIRECTORY 0x0010
341 #define CSIDL_DRIVES 0x0011
342 #define CSIDL_NETWORK 0x0012
343 #define CSIDL_NETHOOD 0x0013
344 #define CSIDL_FONTS 0x0014
345 #define CSIDL_TEMPLATES 0x0015
346 #define CSIDL_COMMON_STARTMENU 0x0016
347 #define CSIDL_COMMON_PROGRAMS 0X0017
348 #define CSIDL_COMMON_STARTUP 0x0018
349 #define CSIDL_COMMON_DESKTOPDIRECTORY 0x0019
350 #define CSIDL_APPDATA 0x001a
351 #define CSIDL_PRINTHOOD 0x001b
354 #endif /* __WINE_SHELL_H */