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