Added missing #include "config.h"
[wine/multimedia.git] / include / shell.h
blob64c9dbc0c82c343faf2161c113c4c79388487400
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"
11 #ifndef MAX_PATH
12 #define MAX_PATH 260
13 #endif
15 /****************************************************************************
16 * shell 16
18 extern void SHELL_LoadRegistry(void);
19 extern void SHELL_SaveRegistry(void);
20 extern void SHELL_Init(void);
22 /* global functions used from shell32 */
23 extern HINSTANCE32 SHELL_FindExecutable(LPCSTR,LPCSTR ,LPSTR);
24 extern HGLOBAL16 WINAPI InternalExtractIcon(HINSTANCE16,LPCSTR,UINT16,WORD);
26 /****************************************************************************
27 * shell 32
29 /****************************************************************************
30 * common return codes
32 #define SHELL_ERROR_SUCCESS 0L
33 #define SHELL_ERROR_BADDB 1L
34 #define SHELL_ERROR_BADKEY 2L
35 #define SHELL_ERROR_CANTOPEN 3L
36 #define SHELL_ERROR_CANTREAD 4L
37 #define SHELL_ERROR_CANTWRITE 5L
38 #define SHELL_ERROR_OUTOFMEMORY 6L
39 #define SHELL_ERROR_INVALID_PARAMETER 7L
40 #define SHELL_ERROR_ACCESS_DENIED 8L
42 /****************************************************************************
43 * common shell file structures
45 #define FO_MOVE 0x0001
46 #define FO_COPY 0x0002
47 #define FO_DELETE 0x0003
48 #define FO_RENAME 0x0004
50 #define FOF_MULTIDESTFILES 0x0001
51 #define FOF_CONFIRMMOUSE 0x0002
52 #define FOF_SILENT 0x0004
53 #define FOF_RENAMEONCOLLISION 0x0008
54 #define FOF_NOCONFIRMATION 0x0010
55 #define FOF_WANTMAPPINGHANDLE 0x0020
56 #define FOF_ALLOWUNDO 0x0040
57 #define FOF_FILESONLY 0x0080
58 #define FOF_SIMPLEPROGRESS 0x0100
59 #define FOF_NOCONFIRMMKDIR 0x0200
60 #define FOF_NOERRORUI 0x0400
62 typedef WORD FILEOP_FLAGS;
64 #define PO_DELETE 0x0013
65 #define PO_RENAME 0x0014
66 #define PO_PORTCHANGE 0x0020
68 typedef WORD PRINTEROP_FLAGS;
70 /******************************
71 * DRAG&DROP API
73 typedef struct { /* structure for dropped files */
74 WORD wSize;
75 POINT16 ptMousePos;
76 BOOL16 fInNonClientArea;
77 /* memory block with filenames follows */
78 } DROPFILESTRUCT16, *LPDROPFILESTRUCT16;
80 typedef struct { /* structure for dropped files */
81 DWORD lSize;
82 POINT32 ptMousePos;
83 BOOL32 fInNonClientArea;
84 BOOL32 fWideChar;
85 /* memory block with filenames follows */
86 } DROPFILESTRUCT32, *LPDROPFILESTRUCT32;
88 DECL_WINELIB_TYPE(DROPFILESTRUCT)
89 DECL_WINELIB_TYPE(LPDROPFILESTRUCT)
91 void WINAPI DragAcceptFiles16(HWND16 hWnd, BOOL16 b);
92 void WINAPI DragAcceptFiles32(HWND32 hWnd, BOOL32 b);
93 #define DragAcceptFiles WINELIB_NAME(DragAcceptFiles)
94 UINT16 WINAPI DragQueryFile16(HDROP16 hDrop, WORD wFile, LPSTR lpszFile, WORD wLength);
95 UINT32 WINAPI DragQueryFile32A(HDROP32 hDrop, UINT32 lFile, LPSTR lpszFile, UINT32 lLength);
96 UINT32 WINAPI DragQueryFile32W(HDROP32 hDrop, UINT32 lFile, LPWSTR lpszFile, UINT32 lLength);
97 #define DragQueryFile WINELIB_NAME_AW(DragQueryFile)
98 void WINAPI DragFinish32(HDROP32 h);
99 void WINAPI DragFinish16(HDROP16 h);
100 #define DragFinish WINELIB_NAME(DragFinish)
101 BOOL32 WINAPI DragQueryPoint32(HDROP32 hDrop, POINT32 *p);
102 BOOL16 WINAPI DragQueryPoint16(HDROP16 hDrop, POINT16 *p);
103 #define DragQueryPoint WINELIB_NAME(DragQueryPoint)
106 /****************************************************************************
107 * NOTIFYICONDATA
109 typedef struct _NOTIFYICONDATA {
110 DWORD cbSize;
111 HWND32 hWnd;
112 UINT32 uID;
113 UINT32 uFlags;
114 UINT32 uCallbackMessage;
115 HICON32 hIcon;
116 CHAR szTip[64];
117 } NOTIFYICONDATA, *PNOTIFYICONDATA;
119 /****************************************************************************
120 * SHITEMID, ITEMIDLIST, PIDL API
122 #pragma pack(1)
123 typedef struct
124 { WORD cb; /* nr of bytes in this item */
125 BYTE abID[1];/* first byte in this item */
126 } SHITEMID,*LPSHITEMID;
128 typedef struct
129 { SHITEMID mkid; /* first itemid in list */
130 } ITEMIDLIST,*LPITEMIDLIST,*LPCITEMIDLIST;
131 #pragma pack(4)
133 LPITEMIDLIST WINAPI ILClone (LPCITEMIDLIST pidl);
134 LPITEMIDLIST WINAPI ILGetNext(LPITEMIDLIST pidl);
135 LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST iil1,LPCITEMIDLIST iil2);
136 LPITEMIDLIST WINAPI ILFindLastID(LPITEMIDLIST pidl);
137 DWORD WINAPI ILGetSize(LPITEMIDLIST pidl);
139 DWORD WINAPI SHGetPathFromIDList32A (LPCITEMIDLIST pidl,LPSTR pszPath);
140 DWORD WINAPI SHGetPathFromIDList32W (LPCITEMIDLIST pidl,LPWSTR pszPath);
141 #define SHGetPathFromIDList WINELIB_NAME_AW(SHGetPathFromIDList)
143 /****************************************************************************
144 * SHFILEINFO API
146 typedef struct tagSHFILEINFO32A {
147 HICON32 hIcon; /* icon */
148 int iIcon; /* icon index */
149 DWORD dwAttributes; /* SFGAO_ flags */
150 CHAR szDisplayName[MAX_PATH];/* display name (or path) */
151 CHAR szTypeName[80]; /* type name */
152 } SHFILEINFO32A;
154 typedef struct tagSHFILEINFO32W {
155 HICON32 hIcon; /* icon */
156 int iIcon; /* icon index */
157 DWORD dwAttributes; /* SFGAO_ flags */
158 WCHAR szDisplayName[MAX_PATH];/* display name (or path) */
159 WCHAR szTypeName[80]; /* type name */
160 } SHFILEINFO32W;
162 DECL_WINELIB_TYPE_AW(SHFILEINFO)
164 DWORD WINAPI SHGetFileInfo32A(LPCSTR,DWORD,SHFILEINFO32A*,UINT32,UINT32);
165 DWORD WINAPI SHGetFileInfo32W(LPCWSTR,DWORD,SHFILEINFO32W*,UINT32,UINT32);
166 #define SHGetFileInfo WINELIB_NAME_AW(SHGetFileInfo)
168 /****************************************************************************
169 * SHFILEOPSTRUCT API
171 typedef struct _SHFILEOPSTRUCTA
172 { HWND32 hwnd;
173 UINT32 wFunc;
174 LPCSTR pFrom;
175 LPCSTR pTo;
176 FILEOP_FLAGS fFlags;
177 BOOL32 fAnyOperationsAborted;
178 LPVOID hNameMappings;
179 LPCSTR lpszProgressTitle;
180 } SHFILEOPSTRUCT32A, *LPSHFILEOPSTRUCT32A;
182 typedef struct _SHFILEOPSTRUCTW
183 { HWND32 hwnd;
184 UINT32 wFunc;
185 LPCWSTR pFrom;
186 LPCWSTR pTo;
187 FILEOP_FLAGS fFlags;
188 BOOL32 fAnyOperationsAborted;
189 LPVOID hNameMappings;
190 LPCWSTR lpszProgressTitle;
191 } SHFILEOPSTRUCT32W, *LPSHFILEOPSTRUCT32W;
193 #define SHFILEOPSTRUCT WINELIB_NAME_AW(SHFILEOPSTRUCT)
194 #define LPSHFILEOPSTRUCT WINELIB_NAME_AW(LPSHFILEOPSTRUCT)
196 DWORD WINAPI SHFileOperation32A (LPSHFILEOPSTRUCT32A lpFileOp);
197 DWORD WINAPI SHFileOperation32W (LPSHFILEOPSTRUCT32W lpFileOp);
198 #define SHFileOperation WINELIB_NAME_AW(SHFileOperation)
200 DWORD WINAPI SHFileOperation32(DWORD x);
202 /****************************************************************************
203 * APPBARDATA
205 typedef struct _AppBarData {
206 DWORD cbSize;
207 HWND32 hWnd;
208 UINT32 uCallbackMessage;
209 UINT32 uEdge;
210 RECT32 rc;
211 LPARAM lParam;
212 } APPBARDATA, *PAPPBARDATA;
214 #define SHGFI_ICON 0x000000100 /* get icon */
215 #define SHGFI_DISPLAYNAME 0x000000200 /* get display name */
216 #define SHGFI_TYPENAME 0x000000400 /* get type name */
217 #define SHGFI_ATTRIBUTES 0x000000800 /* get attributes */
218 #define SHGFI_ICONLOCATION 0x000001000 /* get icon location */
219 #define SHGFI_EXETYPE 0x000002000 /* return exe type */
220 #define SHGFI_SYSICONINDEX 0x000004000 /* get system icon index */
221 #define SHGFI_LINKOVERLAY 0x000008000 /* put a link overlay on icon */
222 #define SHGFI_SELECTED 0x000010000 /* show icon in selected state */
223 #define SHGFI_LARGEICON 0x000000000 /* get large icon */
224 #define SHGFI_SMALLICON 0x000000001 /* get small icon */
225 #define SHGFI_OPENICON 0x000000002 /* get open icon */
226 #define SHGFI_SHELLICONSIZE 0x000000004 /* get shell size icon */
227 #define SHGFI_PIDL 0x000000008 /* pszPath is a pidl */
228 #define SHGFI_USEFILEATTRIBUTES 0x000000010 /* use passed dwFileAttribute */
230 /****************************************************************************
231 * SHChangeNotifyRegister API
233 typedef struct
234 { LPITEMIDLIST pidl;
235 DWORD unknown;
236 } IDSTRUCT;
238 DWORD WINAPI SHChangeNotifyRegister(HWND32 hwnd,LONG events1,LONG events2,DWORD msg,int count,IDSTRUCT *idlist);
239 DWORD WINAPI SHChangeNotifyDeregister(LONG x1,LONG x2);
241 /****************************************************************************
242 * SHAddToRecentDocs API
244 #define SHARD_PIDL 0x00000001L
245 #define SHARD_PATH 0x00000002L
247 DWORD WINAPI SHAddToRecentDocs(UINT32 uFlags, LPCVOID pv);
249 /****************************************************************************
250 * SHGetSpecialFolderLocation API
252 HRESULT WINAPI SHGetSpecialFolderLocation(HWND32, INT32, LPITEMIDLIST *);
253 /****************************************************************************
254 * string and path functions
256 LPSTR WINAPI PathAddBackslash32A(LPSTR path);
257 LPWSTR WINAPI PathAddBackslash32W(LPWSTR path);
258 #define PathAddBackslash WINELIB_NAME_AW(PathAddBackslash)
259 LPVOID WINAPI PathAddBackslash32AW(LPVOID path);
261 LPSTR WINAPI PathCombine32A(LPSTR szDest, LPCSTR lpszDir, LPCSTR lpszFile);
262 LPWSTR WINAPI PathCombine32W(LPWSTR szDest, LPCWSTR lpszDir, LPCWSTR lpszFile);
263 #define PathCombine WINELIB_NAME_AW(PathCombine)
264 LPVOID WINAPI PathCombine32AW(LPVOID szDest, LPCVOID lpszDir, LPCVOID lpszFile);
266 LPCSTR WINAPI PathFindExtension32A(LPCSTR path);
267 LPCWSTR WINAPI PathFindExtension32W(LPCWSTR path);
268 #define PathFindExtension WINELIB_NAME_AW(PathFindExtension)
269 LPCVOID WINAPI PathFindExtension32AW(LPCVOID path);
271 LPCSTR WINAPI PathGetExtension32A(LPCSTR path, DWORD y, DWORD x);
272 LPCWSTR WINAPI PathGetExtension32W(LPCWSTR path, DWORD y, DWORD x);
273 #define PathGetExtension WINELIB_NAME_AW(PathGetExtension)
274 LPCVOID WINAPI PathGetExtension32AW(LPCVOID path, DWORD y, DWORD x);
276 LPCSTR WINAPI PathFindFilename32A(LPCSTR path);
277 LPCWSTR WINAPI PathFindFilename32W(LPCWSTR path);
278 #define PathFindFilename WINELIB_NAME_AW(PathFindFilename)
279 LPCVOID WINAPI PathFindFilename32AW(LPCVOID path);
281 LPSTR WINAPI PathRemoveBlanks(LPSTR str);
282 /****************************************************************************
283 * other functions
285 LPVOID WINAPI SHAlloc(DWORD len);
286 DWORD WINAPI SHFree(LPVOID x);
288 #define SE_ERR_SHARE 26
289 #define SE_ERR_ASSOCINCOMPLETE 27
290 #define SE_ERR_DDETIMEOUT 28
291 #define SE_ERR_DDEFAIL 29
292 #define SE_ERR_DDEBUSY 30
293 #define SE_ERR_NOASSOC 31
295 #define CSIDL_DESKTOP 0x0000
296 #define CSIDL_PROGRAMS 0x0002
297 #define CSIDL_CONTROLS 0x0003
298 #define CSIDL_PRINTERS 0x0004
299 #define CSIDL_PERSONAL 0x0005
300 #define CSIDL_FAVORITES 0x0006
301 #define CSIDL_STARTUP 0x0007
302 #define CSIDL_RECENT 0x0008
303 #define CSIDL_SENDTO 0x0009
304 #define CSIDL_BITBUCKET 0x000a
305 #define CSIDL_STARTMENU 0x000b
306 #define CSIDL_DESKTOPDIRECTORY 0x0010
307 #define CSIDL_DRIVES 0x0011
308 #define CSIDL_NETWORK 0x0012
309 #define CSIDL_NETHOOD 0x0013
310 #define CSIDL_FONTS 0x0014
311 #define CSIDL_TEMPLATES 0x0015
312 #define CSIDL_COMMON_STARTMENU 0x0016
313 #define CSIDL_COMMON_PROGRAMS 0X0017
314 #define CSIDL_COMMON_STARTUP 0x0018
315 #define CSIDL_COMMON_DESKTOPDIRECTORY 0x0019
316 #define CSIDL_APPDATA 0x001a
317 #define CSIDL_PRINTHOOD 0x001b
320 #endif /* __WINE_SHELL_H */