New debug scheme with explicit debug channels declaration.
[wine/testsucceed.git] / include / shell.h
blob6a1c18a2babc21b5caaae43b24c78f6a86cc77fb
1 /*
2 * Shell Library definitions
3 */
4 #ifndef __WINE_SHELL_H
5 #define __WINE_SHELL_H
7 #include "windef.h"
10 /****************************************************************************
11 * shell 16
13 extern void SHELL_LoadRegistry(void);
14 extern void SHELL_SaveRegistry(void);
15 extern void SHELL_Init(void);
17 /* global functions used from shell32 */
18 extern HINSTANCE SHELL_FindExecutable(LPCSTR,LPCSTR ,LPSTR);
19 extern HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16,LPCSTR,UINT16,WORD);
21 /****************************************************************************
22 * shell 32
24 /****************************************************************************
25 * common return codes
27 #define SHELL_ERROR_SUCCESS 0L
28 #define SHELL_ERROR_BADDB 1L
29 #define SHELL_ERROR_BADKEY 2L
30 #define SHELL_ERROR_CANTOPEN 3L
31 #define SHELL_ERROR_CANTREAD 4L
32 #define SHELL_ERROR_CANTWRITE 5L
33 #define SHELL_ERROR_OUTOFMEMORY 6L
34 #define SHELL_ERROR_INVALID_PARAMETER 7L
35 #define SHELL_ERROR_ACCESS_DENIED 8L
37 /****************************************************************************
38 * common shell file structures
40 #define FO_MOVE 0x0001
41 #define FO_COPY 0x0002
42 #define FO_DELETE 0x0003
43 #define FO_RENAME 0x0004
45 #define FOF_MULTIDESTFILES 0x0001
46 #define FOF_CONFIRMMOUSE 0x0002
47 #define FOF_SILENT 0x0004
48 #define FOF_RENAMEONCOLLISION 0x0008
49 #define FOF_NOCONFIRMATION 0x0010
50 #define FOF_WANTMAPPINGHANDLE 0x0020
51 #define FOF_ALLOWUNDO 0x0040
52 #define FOF_FILESONLY 0x0080
53 #define FOF_SIMPLEPROGRESS 0x0100
54 #define FOF_NOCONFIRMMKDIR 0x0200
55 #define FOF_NOERRORUI 0x0400
57 typedef WORD FILEOP_FLAGS;
59 #define PO_DELETE 0x0013
60 #define PO_RENAME 0x0014
61 #define PO_PORTCHANGE 0x0020
63 typedef WORD PRINTEROP_FLAGS;
65 /******************************
66 * DRAG&DROP API
68 typedef struct { /* structure for dropped files */
69 WORD wSize;
70 POINT16 ptMousePos;
71 BOOL16 fInNonClientArea;
72 /* memory block with filenames follows */
73 } DROPFILESTRUCT16, *LPDROPFILESTRUCT16;
75 typedef struct { /* structure for dropped files */
76 DWORD lSize;
77 POINT ptMousePos;
78 BOOL fInNonClientArea;
79 BOOL fWideChar;
80 /* memory block with filenames follows */
81 } DROPFILESTRUCT, *LPDROPFILESTRUCT;
84 void WINAPI DragAcceptFiles16(HWND16 hWnd, BOOL16 b);
85 void WINAPI DragAcceptFiles(HWND hWnd, BOOL b);
86 UINT16 WINAPI DragQueryFile16(HDROP16 hDrop, WORD wFile, LPSTR lpszFile, WORD wLength);
87 UINT WINAPI DragQueryFileA(HDROP hDrop, UINT lFile, LPSTR lpszFile, UINT lLength);
88 UINT WINAPI DragQueryFileW(HDROP hDrop, UINT lFile, LPWSTR lpszFile, UINT lLength);
89 #define DragQueryFile WINELIB_NAME_AW(DragQueryFile)
90 void WINAPI DragFinish(HDROP h);
91 void WINAPI DragFinish16(HDROP16 h);
92 BOOL WINAPI DragQueryPoint(HDROP hDrop, POINT *p);
93 BOOL16 WINAPI DragQueryPoint16(HDROP16 hDrop, POINT16 *p);
96 /****************************************************************************
97 * NOTIFYICONDATA
99 typedef struct _NOTIFYICONDATA {
100 DWORD cbSize;
101 HWND hWnd;
102 UINT uID;
103 UINT uFlags;
104 UINT uCallbackMessage;
105 HICON hIcon;
106 CHAR szTip[64];
107 } NOTIFYICONDATA, *PNOTIFYICONDATA;
109 /****************************************************************************
110 * SHITEMID, ITEMIDLIST, PIDL API
112 #pragma pack(1)
113 typedef struct
114 { WORD cb; /* nr of bytes in this item */
115 BYTE abID[1];/* first byte in this item */
116 } SHITEMID,*LPSHITEMID;
118 typedef struct
119 { SHITEMID mkid; /* first itemid in list */
120 } ITEMIDLIST,*LPITEMIDLIST,*LPCITEMIDLIST;
121 #pragma pack(4)
123 DWORD WINAPI SHGetPathFromIDListA (LPCITEMIDLIST pidl,LPSTR pszPath);
124 DWORD WINAPI SHGetPathFromIDListW (LPCITEMIDLIST pidl,LPWSTR pszPath);
125 #define SHGetPathFromIDList WINELIB_NAME_AW(SHGetPathFromIDList)
127 /****************************************************************************
128 * SHFILEINFO API
130 typedef struct tagSHFILEINFOA {
131 HICON hIcon; /* icon */
132 int iIcon; /* icon index */
133 DWORD dwAttributes; /* SFGAO_ flags */
134 CHAR szDisplayName[MAX_PATH];/* display name (or path) */
135 CHAR szTypeName[80]; /* type name */
136 } SHFILEINFOA;
138 typedef struct tagSHFILEINFOW {
139 HICON hIcon; /* icon */
140 int iIcon; /* icon index */
141 DWORD dwAttributes; /* SFGAO_ flags */
142 WCHAR szDisplayName[MAX_PATH];/* display name (or path) */
143 WCHAR szTypeName[80]; /* type name */
144 } SHFILEINFOW;
146 DECL_WINELIB_TYPE_AW(SHFILEINFO)
148 DWORD WINAPI SHGetFileInfoA(LPCSTR,DWORD,SHFILEINFOA*,UINT,UINT);
149 DWORD WINAPI SHGetFileInfoW(LPCWSTR,DWORD,SHFILEINFOW*,UINT,UINT);
150 #define SHGetFileInfo WINELIB_NAME_AW(SHGetFileInfo)
152 /****************************************************************************
153 * SHFILEOPSTRUCT API
155 typedef struct _SHFILEOPSTRUCTA
156 { HWND hwnd;
157 UINT wFunc;
158 LPCSTR pFrom;
159 LPCSTR pTo;
160 FILEOP_FLAGS fFlags;
161 BOOL fAnyOperationsAborted;
162 LPVOID hNameMappings;
163 LPCSTR lpszProgressTitle;
164 } SHFILEOPSTRUCTA, *LPSHFILEOPSTRUCTA;
166 typedef struct _SHFILEOPSTRUCTW
167 { HWND hwnd;
168 UINT wFunc;
169 LPCWSTR pFrom;
170 LPCWSTR pTo;
171 FILEOP_FLAGS fFlags;
172 BOOL fAnyOperationsAborted;
173 LPVOID hNameMappings;
174 LPCWSTR lpszProgressTitle;
175 } SHFILEOPSTRUCTW, *LPSHFILEOPSTRUCTW;
177 #define SHFILEOPSTRUCT WINELIB_NAME_AW(SHFILEOPSTRUCT)
178 #define LPSHFILEOPSTRUCT WINELIB_NAME_AW(LPSHFILEOPSTRUCT)
180 DWORD WINAPI SHFileOperationA (LPSHFILEOPSTRUCTA lpFileOp);
181 DWORD WINAPI SHFileOperationW (LPSHFILEOPSTRUCTW lpFileOp);
182 #define SHFileOperation WINELIB_NAME_AW(SHFileOperation)
184 DWORD WINAPI SHFileOperationAW(DWORD x);
186 /****************************************************************************
187 * APPBARDATA
189 typedef struct _AppBarData {
190 DWORD cbSize;
191 HWND hWnd;
192 UINT uCallbackMessage;
193 UINT uEdge;
194 RECT rc;
195 LPARAM lParam;
196 } APPBARDATA, *PAPPBARDATA;
198 #define SHGFI_LARGEICON 0x000000000 /* get large icon */
199 #define SHGFI_SMALLICON 0x000000001 /* get small icon */
200 #define SHGFI_OPENICON 0x000000002 /* get open icon */
201 #define SHGFI_SHELLICONSIZE 0x000000004 /* get shell size icon */
202 #define SHGFI_PIDL 0x000000008 /* pszPath is a pidl */
203 #define SHGFI_USEFILEATTRIBUTES 0x000000010 /* use passed dwFileAttribute */
204 #define SHGFI_UNKNOWN1 0x000000020
205 #define SHGFI_UNKNOWN2 0x000000040
206 #define SHGFI_UNKNOWN3 0x000000080
207 #define SHGFI_ICON 0x000000100 /* get icon */
208 #define SHGFI_DISPLAYNAME 0x000000200 /* get display name */
209 #define SHGFI_TYPENAME 0x000000400 /* get type name */
210 #define SHGFI_ATTRIBUTES 0x000000800 /* get attributes */
211 #define SHGFI_ICONLOCATION 0x000001000 /* get icon location */
212 #define SHGFI_EXETYPE 0x000002000 /* return exe type */
213 #define SHGFI_SYSICONINDEX 0x000004000 /* get system icon index */
214 #define SHGFI_LINKOVERLAY 0x000008000 /* put a link overlay on icon */
215 #define SHGFI_SELECTED 0x000010000 /* show icon in selected state */
216 #define SHGFI_ATTR_SPECIFIED 0x000020000 /* get only specified attributes */
218 /****************************************************************************
219 * SHChangeNotifyRegister API
221 typedef struct
222 { LPITEMIDLIST pidl;
223 DWORD unknown;
224 } IDSTRUCT;
226 DWORD WINAPI SHChangeNotifyRegister(HWND hwnd,LONG events1,LONG events2,DWORD msg,int count,IDSTRUCT *idlist);
227 DWORD WINAPI SHChangeNotifyDeregister(LONG x1);
229 /****************************************************************************
230 * SHAddToRecentDocs API
232 #define SHARD_PIDL 0x00000001L
233 #define SHARD_PATH 0x00000002L
235 DWORD WINAPI SHAddToRecentDocs(UINT uFlags, LPCVOID pv);
237 /****************************************************************************
238 * SHGetSpecialFolderLocation API
240 HRESULT WINAPI SHGetSpecialFolderLocation(HWND, INT, LPITEMIDLIST *);
241 /****************************************************************************
242 * string and path functions
244 BOOL WINAPI PathIsRootA(LPCSTR x);
245 BOOL WINAPI PathIsRootW(LPCWSTR x);
246 #define PathIsRoot WINELIB_NAME_AW(PathIsRoot)
247 BOOL WINAPI PathIsRootAW(LPCVOID x);
249 LPSTR WINAPI PathAddBackslashA(LPSTR path);
250 LPWSTR WINAPI PathAddBackslashW(LPWSTR path);
251 #define PathAddBackslash WINELIB_NAME_AW(PathAddBackslash)
252 LPVOID WINAPI PathAddBackslashAW(LPVOID path);
254 BOOL WINAPI PathQualifyA(LPCSTR path);
255 BOOL WINAPI PathQualifyW(LPCWSTR path);
256 #define PathQualify WINELIB_NAME_AW(PathQualify)
257 BOOL WINAPI PathQualifyAW(LPCVOID path);
259 LPSTR WINAPI PathQuoteSpacesA(LPCSTR path);
260 LPWSTR WINAPI PathQuoteSpacesW(LPCWSTR path);
261 #define PathQuoteSpaces WINELIB_NAME_AW(PathQuoteSpaces)
262 LPVOID WINAPI PathQuoteSpacesAW(LPCVOID path);
264 LPSTR WINAPI PathCombineA(LPSTR szDest, LPCSTR lpszDir, LPCSTR lpszFile);
265 LPWSTR WINAPI PathCombineW(LPWSTR szDest, LPCWSTR lpszDir, LPCWSTR lpszFile);
266 #define PathCombine WINELIB_NAME_AW(PathCombine)
267 LPVOID WINAPI PathCombineAW(LPVOID szDest, LPCVOID lpszDir, LPCVOID lpszFile);
269 LPCSTR WINAPI PathFindExtensionA(LPCSTR path);
270 LPCWSTR WINAPI PathFindExtensionW(LPCWSTR path);
271 #define PathFindExtension WINELIB_NAME_AW(PathFindExtension)
272 LPCVOID WINAPI PathFindExtensionAW(LPCVOID path);
274 LPCSTR WINAPI PathGetExtensionA(LPCSTR path, DWORD y, DWORD x);
275 LPCWSTR WINAPI PathGetExtensionW(LPCWSTR path, DWORD y, DWORD x);
276 #define PathGetExtension WINELIB_NAME_AW(PathGetExtension)
277 LPCVOID WINAPI PathGetExtensionAW(LPCVOID path, DWORD y, DWORD x);
279 LPCSTR WINAPI PathFindFilenameA(LPCSTR path);
280 LPCWSTR WINAPI PathFindFilenameW(LPCWSTR path);
281 #define PathFindFilename WINELIB_NAME_AW(PathFindFilename)
282 LPCVOID WINAPI PathFindFilenameAW(LPCVOID path);
284 BOOL WINAPI PathMatchSpecA(LPCSTR x, LPCSTR y);
285 BOOL WINAPI PathMatchSpecW(LPCWSTR x, LPCWSTR y);
286 #define PathMatchSpec WINELIB_NAME_AW(PathMatchSpec)
287 BOOL WINAPI PathMatchSpecAW(LPVOID x, LPVOID y);
289 LPSTR WINAPI PathRemoveBlanksA(LPSTR str);
290 LPWSTR WINAPI PathRemoveBlanksW(LPWSTR str);
291 #define PathRemoveBlanks WINELIB_NAME_AW(PathRemoveBlanks)
292 LPVOID WINAPI PathRemoveBlanksAW(LPVOID str);
294 BOOL WINAPI PathIsRelativeA(LPCSTR str);
295 BOOL WINAPI PathIsRelativeW(LPCWSTR str);
296 #define PathIsRelative WINELIB_NAME_AW(PathIsRelative)
297 BOOL WINAPI PathIsRelativeAW(LPCVOID str);
299 BOOL WINAPI PathIsUNCA(LPCSTR str);
300 BOOL WINAPI PathIsUNCW(LPCWSTR str);
301 #define PathIsUNC WINELIB_NAME_AW(PathIsUNC)
302 BOOL WINAPI PathIsUNCAW(LPCVOID str);
304 BOOL WINAPI PathFindOnPathA(LPSTR sFile, LPCSTR sOtherDirs);
305 BOOL WINAPI PathFindOnPathW(LPWSTR sFile, LPCWSTR sOtherDirs);
306 #define PathFindOnPath WINELIB_NAME_AW(PathFindOnPath)
307 BOOL WINAPI PathFindOnPathAW(LPVOID sFile, LPCVOID sOtherDirs);
309 LPSTR WINAPI StrFormatByteSizeA ( DWORD dw, LPSTR pszBuf, UINT cchBuf );
310 LPWSTR WINAPI StrFormatByteSizeW ( DWORD dw, LPWSTR pszBuf, UINT cchBuf );
311 #define StrFormatByteSize WINELIB_NAME_AW(StrFormatByteSize)
313 /****************************************************************************
314 * other functions
316 HICON16 WINAPI ExtractIconEx16 ( LPCSTR, INT16, HICON16 *, HICON16 *, UINT16 );
317 HICON WINAPI ExtractIconExA( LPCSTR, INT, HICON *, HICON *, UINT );
318 HICON WINAPI ExtractIconExW( LPCWSTR, INT, HICON *, HICON *, UINT );
319 #define ExtractIconEx WINELIB_NAME_AW(ExtractIconEx)
320 HICON WINAPI ExtractIconExAW(LPCVOID, INT, HICON *, HICON *, UINT );
322 LPVOID WINAPI SHAlloc(DWORD len);
323 DWORD WINAPI SHFree(LPVOID x);
325 #define SE_ERR_SHARE 26
326 #define SE_ERR_ASSOCINCOMPLETE 27
327 #define SE_ERR_DDETIMEOUT 28
328 #define SE_ERR_DDEFAIL 29
329 #define SE_ERR_DDEBUSY 30
330 #define SE_ERR_NOASSOC 31
332 #define CSIDL_DESKTOP 0x0000
333 #define CSIDL_PROGRAMS 0x0002
334 #define CSIDL_CONTROLS 0x0003
335 #define CSIDL_PRINTERS 0x0004
336 #define CSIDL_PERSONAL 0x0005
337 #define CSIDL_FAVORITES 0x0006
338 #define CSIDL_STARTUP 0x0007
339 #define CSIDL_RECENT 0x0008
340 #define CSIDL_SENDTO 0x0009
341 #define CSIDL_BITBUCKET 0x000a
342 #define CSIDL_STARTMENU 0x000b
343 #define CSIDL_DESKTOPDIRECTORY 0x0010
344 #define CSIDL_DRIVES 0x0011
345 #define CSIDL_NETWORK 0x0012
346 #define CSIDL_NETHOOD 0x0013
347 #define CSIDL_FONTS 0x0014
348 #define CSIDL_TEMPLATES 0x0015
349 #define CSIDL_COMMON_STARTMENU 0x0016
350 #define CSIDL_COMMON_PROGRAMS 0X0017
351 #define CSIDL_COMMON_STARTUP 0x0018
352 #define CSIDL_COMMON_DESKTOPDIRECTORY 0x0019
353 #define CSIDL_APPDATA 0x001a
354 #define CSIDL_PRINTHOOD 0x001b
355 #define CSIDL_ALTSTARTUP 0x001d
356 #define CSIDL_COMMON_ALTSTARTUP 0x001e
357 #define CSIDL_COMMON_FAVORITES 0x001f
358 #define CSIDL_INTERNET_CACHE 0x0020
359 #define CSIDL_COOKIES 0x0021
360 #define CSIDL_HISTORY 0x0022
362 #endif /* __WINE_SHELL_H */