2 * Shell Library definitions
11 /****************************************************************************
14 extern void SHELL_LoadRegistry(void);
15 extern void SHELL_SaveRegistry(void);
16 extern void SHELL_Init(void);
18 /* global functions used from shell32 */
19 extern HINSTANCE
SHELL_FindExecutable(LPCSTR
,LPCSTR
,LPSTR
);
20 extern HGLOBAL16 WINAPI
InternalExtractIcon16(HINSTANCE16
,LPCSTR
,UINT16
,WORD
);
22 /****************************************************************************
25 /****************************************************************************
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
38 /****************************************************************************
39 * common shell file structures
41 #define FO_MOVE 0x0001
42 #define FO_COPY 0x0002
43 #define FO_DELETE 0x0003
44 #define FO_RENAME 0x0004
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
58 typedef WORD FILEOP_FLAGS
;
60 #define PO_DELETE 0x0013
61 #define PO_RENAME 0x0014
62 #define PO_PORTCHANGE 0x0020
64 typedef WORD PRINTEROP_FLAGS
;
66 /******************************
69 typedef struct { /* structure for dropped files */
72 BOOL16 fInNonClientArea
;
73 /* memory block with filenames follows */
74 } DROPFILESTRUCT16
, *LPDROPFILESTRUCT16
;
76 typedef struct { /* structure for dropped files */
79 BOOL fInNonClientArea
;
81 /* memory block with filenames follows */
82 } DROPFILESTRUCT
, *LPDROPFILESTRUCT
;
85 void WINAPI
DragAcceptFiles16(HWND16 hWnd
, BOOL16 b
);
86 void WINAPI
DragAcceptFiles(HWND hWnd
, BOOL b
);
87 UINT16 WINAPI
DragQueryFile16(HDROP16 hDrop
, WORD wFile
, LPSTR lpszFile
, WORD wLength
);
88 UINT WINAPI
DragQueryFileA(HDROP hDrop
, UINT lFile
, LPSTR lpszFile
, UINT lLength
);
89 UINT WINAPI
DragQueryFileW(HDROP hDrop
, UINT lFile
, LPWSTR lpszFile
, UINT lLength
);
90 #define DragQueryFile WINELIB_NAME_AW(DragQueryFile)
91 void WINAPI
DragFinish(HDROP h
);
92 void WINAPI
DragFinish16(HDROP16 h
);
93 BOOL WINAPI
DragQueryPoint(HDROP hDrop
, POINT
*p
);
94 BOOL16 WINAPI
DragQueryPoint16(HDROP16 hDrop
, POINT16
*p
);
97 /****************************************************************************
100 typedef struct _NOTIFYICONDATA
{
105 UINT uCallbackMessage
;
108 } NOTIFYICONDATA
, *PNOTIFYICONDATA
;
110 /****************************************************************************
111 * SHITEMID, ITEMIDLIST, PIDL API
115 { WORD cb
; /* nr of bytes in this item */
116 BYTE abID
[1];/* first byte in this item */
117 } SHITEMID
,*LPSHITEMID
;
120 { SHITEMID mkid
; /* first itemid in list */
121 } ITEMIDLIST
,*LPITEMIDLIST
,*LPCITEMIDLIST
;
124 DWORD WINAPI
SHGetPathFromIDListA (LPCITEMIDLIST pidl
,LPSTR pszPath
);
125 DWORD WINAPI
SHGetPathFromIDListW (LPCITEMIDLIST pidl
,LPWSTR pszPath
);
126 #define SHGetPathFromIDList WINELIB_NAME_AW(SHGetPathFromIDList)
128 /****************************************************************************
131 typedef struct tagSHFILEINFOA
{
132 HICON hIcon
; /* icon */
133 int iIcon
; /* icon index */
134 DWORD dwAttributes
; /* SFGAO_ flags */
135 CHAR szDisplayName
[MAX_PATH
];/* display name (or path) */
136 CHAR szTypeName
[80]; /* type name */
139 typedef struct tagSHFILEINFOW
{
140 HICON hIcon
; /* icon */
141 int iIcon
; /* icon index */
142 DWORD dwAttributes
; /* SFGAO_ flags */
143 WCHAR szDisplayName
[MAX_PATH
];/* display name (or path) */
144 WCHAR szTypeName
[80]; /* type name */
147 DECL_WINELIB_TYPE_AW(SHFILEINFO
)
149 DWORD WINAPI
SHGetFileInfoA(LPCSTR
,DWORD
,SHFILEINFOA
*,UINT
,UINT
);
150 DWORD WINAPI
SHGetFileInfoW(LPCWSTR
,DWORD
,SHFILEINFOW
*,UINT
,UINT
);
151 #define SHGetFileInfo WINELIB_NAME_AW(SHGetFileInfo)
153 /****************************************************************************
156 typedef struct _SHFILEOPSTRUCTA
162 BOOL fAnyOperationsAborted
;
163 LPVOID hNameMappings
;
164 LPCSTR lpszProgressTitle
;
165 } SHFILEOPSTRUCTA
, *LPSHFILEOPSTRUCTA
;
167 typedef struct _SHFILEOPSTRUCTW
173 BOOL fAnyOperationsAborted
;
174 LPVOID hNameMappings
;
175 LPCWSTR lpszProgressTitle
;
176 } SHFILEOPSTRUCTW
, *LPSHFILEOPSTRUCTW
;
178 #define SHFILEOPSTRUCT WINELIB_NAME_AW(SHFILEOPSTRUCT)
179 #define LPSHFILEOPSTRUCT WINELIB_NAME_AW(LPSHFILEOPSTRUCT)
181 DWORD WINAPI
SHFileOperationA (LPSHFILEOPSTRUCTA lpFileOp
);
182 DWORD WINAPI
SHFileOperationW (LPSHFILEOPSTRUCTW lpFileOp
);
183 #define SHFileOperation WINELIB_NAME_AW(SHFileOperation)
185 DWORD WINAPI
SHFileOperationAW(DWORD x
);
187 /****************************************************************************
190 typedef struct _AppBarData
{
193 UINT uCallbackMessage
;
197 } APPBARDATA
, *PAPPBARDATA
;
199 #define SHGFI_ICON 0x000000100 /* get icon */
200 #define SHGFI_DISPLAYNAME 0x000000200 /* get display name */
201 #define SHGFI_TYPENAME 0x000000400 /* get type name */
202 #define SHGFI_ATTRIBUTES 0x000000800 /* get attributes */
203 #define SHGFI_ICONLOCATION 0x000001000 /* get icon location */
204 #define SHGFI_EXETYPE 0x000002000 /* return exe type */
205 #define SHGFI_SYSICONINDEX 0x000004000 /* get system icon index */
206 #define SHGFI_LINKOVERLAY 0x000008000 /* put a link overlay on icon */
207 #define SHGFI_SELECTED 0x000010000 /* show icon in selected state */
208 #define SHGFI_LARGEICON 0x000000000 /* get large icon */
209 #define SHGFI_SMALLICON 0x000000001 /* get small icon */
210 #define SHGFI_OPENICON 0x000000002 /* get open icon */
211 #define SHGFI_SHELLICONSIZE 0x000000004 /* get shell size icon */
212 #define SHGFI_PIDL 0x000000008 /* pszPath is a pidl */
213 #define SHGFI_USEFILEATTRIBUTES 0x000000010 /* use passed dwFileAttribute */
215 /****************************************************************************
216 * SHChangeNotifyRegister API
223 DWORD WINAPI
SHChangeNotifyRegister(HWND hwnd
,LONG events1
,LONG events2
,DWORD msg
,int count
,IDSTRUCT
*idlist
);
224 DWORD WINAPI
SHChangeNotifyDeregister(LONG x1
);
226 /****************************************************************************
227 * SHAddToRecentDocs API
229 #define SHARD_PIDL 0x00000001L
230 #define SHARD_PATH 0x00000002L
232 DWORD WINAPI
SHAddToRecentDocs(UINT uFlags
, LPCVOID pv
);
234 /****************************************************************************
235 * SHGetSpecialFolderLocation API
237 HRESULT WINAPI
SHGetSpecialFolderLocation(HWND
, INT
, LPITEMIDLIST
*);
238 /****************************************************************************
239 * string and path functions
241 BOOL WINAPI
PathIsRootA(LPCSTR x
);
242 BOOL WINAPI
PathIsRootW(LPCWSTR x
);
243 #define PathIsRoot WINELIB_NAME_AW(PathIsRoot)
244 BOOL WINAPI
PathIsRootAW(LPCVOID x
);
246 LPSTR WINAPI
PathAddBackslashA(LPSTR path
);
247 LPWSTR WINAPI
PathAddBackslashW(LPWSTR path
);
248 #define PathAddBackslash WINELIB_NAME_AW(PathAddBackslash)
249 LPVOID WINAPI
PathAddBackslashAW(LPVOID path
);
251 BOOL WINAPI
PathQualifyA(LPCSTR path
);
252 BOOL WINAPI
PathQualifyW(LPCWSTR path
);
253 #define PathQualify WINELIB_NAME_AW(PathQualify)
254 BOOL WINAPI
PathQualifyAW(LPCVOID path
);
256 LPSTR WINAPI
PathQuoteSpacesA(LPCSTR path
);
257 LPWSTR WINAPI
PathQuoteSpacesW(LPCWSTR path
);
258 #define PathQuoteSpaces WINELIB_NAME_AW(PathQuoteSpaces)
259 LPVOID WINAPI
PathQuoteSpacesAW(LPCVOID path
);
261 LPSTR WINAPI
PathCombineA(LPSTR szDest
, LPCSTR lpszDir
, LPCSTR lpszFile
);
262 LPWSTR WINAPI
PathCombineW(LPWSTR szDest
, LPCWSTR lpszDir
, LPCWSTR lpszFile
);
263 #define PathCombine WINELIB_NAME_AW(PathCombine)
264 LPVOID WINAPI
PathCombineAW(LPVOID szDest
, LPCVOID lpszDir
, LPCVOID lpszFile
);
266 LPCSTR WINAPI
PathFindExtensionA(LPCSTR path
);
267 LPCWSTR WINAPI
PathFindExtensionW(LPCWSTR path
);
268 #define PathFindExtension WINELIB_NAME_AW(PathFindExtension)
269 LPCVOID WINAPI
PathFindExtensionAW(LPCVOID path
);
271 LPCSTR WINAPI
PathGetExtensionA(LPCSTR path
, DWORD y
, DWORD x
);
272 LPCWSTR WINAPI
PathGetExtensionW(LPCWSTR path
, DWORD y
, DWORD x
);
273 #define PathGetExtension WINELIB_NAME_AW(PathGetExtension)
274 LPCVOID WINAPI
PathGetExtensionAW(LPCVOID path
, DWORD y
, DWORD x
);
276 LPCSTR WINAPI
PathFindFilenameA(LPCSTR path
);
277 LPCWSTR WINAPI
PathFindFilenameW(LPCWSTR path
);
278 #define PathFindFilename WINELIB_NAME_AW(PathFindFilename)
279 LPCVOID WINAPI
PathFindFilenameAW(LPCVOID path
);
281 BOOL WINAPI
PathMatchSpecA(LPCSTR x
, LPCSTR y
);
282 BOOL WINAPI
PathMatchSpecW(LPCWSTR x
, LPCWSTR y
);
283 #define PathMatchSpec WINELIB_NAME_AW(PathMatchSpec)
284 BOOL WINAPI
PathMatchSpecAW(LPVOID x
, LPVOID y
);
286 LPSTR WINAPI
PathRemoveBlanksA(LPSTR str
);
287 LPWSTR WINAPI
PathRemoveBlanksW(LPWSTR str
);
288 #define PathRemoveBlanks WINELIB_NAME_AW(PathRemoveBlanks)
289 LPVOID WINAPI
PathRemoveBlanksAW(LPVOID str
);
291 BOOL WINAPI
PathIsRelativeA(LPCSTR str
);
292 BOOL WINAPI
PathIsRelativeW(LPCWSTR str
);
293 #define PathIsRelative WINELIB_NAME_AW(PathIsRelative)
294 BOOL WINAPI
PathIsRelativeAW(LPCVOID str
);
296 BOOL WINAPI
PathIsUNCA(LPCSTR str
);
297 BOOL WINAPI
PathIsUNCW(LPCWSTR str
);
298 #define PathIsUNC WINELIB_NAME_AW(PathIsUNC)
299 BOOL WINAPI
PathIsUNCAW(LPCVOID str
);
301 BOOL WINAPI
PathFindOnPathA(LPSTR sFile
, LPCSTR sOtherDirs
);
302 BOOL WINAPI
PathFindOnPathW(LPWSTR sFile
, LPCWSTR sOtherDirs
);
303 #define PathFindOnPath WINELIB_NAME_AW(PathFindOnPath)
304 BOOL WINAPI
PathFindOnPathAW(LPVOID sFile
, LPCVOID sOtherDirs
);
306 LPSTR WINAPI
StrFormatByteSizeA ( DWORD dw
, LPSTR pszBuf
, UINT cchBuf
);
307 LPWSTR WINAPI
StrFormatByteSizeW ( DWORD dw
, LPWSTR pszBuf
, UINT cchBuf
);
308 #define StrFormatByteSize WINELIB_NAME_AW(StrFormatByteSize)
310 /****************************************************************************
313 HICON16 WINAPI
ExtractIconEx16 ( LPCSTR
, INT16
, HICON16
*, HICON16
*, UINT16
);
314 HICON WINAPI
ExtractIconExA( LPCSTR
, INT
, HICON
*, HICON
*, UINT
);
315 HICON WINAPI
ExtractIconExW( LPCWSTR
, INT
, HICON
*, HICON
*, UINT
);
316 #define ExtractIconEx WINELIB_NAME_AW(ExtractIconEx)
317 HICON WINAPI
ExtractIconExAW(LPCVOID
, INT
, HICON
*, HICON
*, UINT
);
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 */