2 * Shell Library definitions
15 /****************************************************************************
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 /****************************************************************************
29 /****************************************************************************
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 /******************************
73 typedef struct { /* structure for dropped files */
76 BOOL16 fInNonClientArea
;
77 /* memory block with filenames follows */
78 } DROPFILESTRUCT
, *LPDROPFILESTRUCT
;
80 /****************************************************************************
83 typedef struct _NOTIFYICONDATA
{
88 UINT32 uCallbackMessage
;
91 } NOTIFYICONDATA
, *PNOTIFYICONDATA
;
93 /****************************************************************************
94 * SHITEMID, ITEMIDLIST, PIDL API
98 { WORD cb
; /* nr of bytes in this item */
99 BYTE abID
[1];/* first byte in this item */
100 } SHITEMID
,*LPSHITEMID
;
103 { SHITEMID mkid
; /* first itemid in list */
104 } ITEMIDLIST
,*LPITEMIDLIST
,*LPCITEMIDLIST
;
107 LPITEMIDLIST WINAPI
ILClone (LPCITEMIDLIST pidl
);
108 LPITEMIDLIST WINAPI
ILGetNext(LPITEMIDLIST pidl
);
109 LPITEMIDLIST WINAPI
ILCombine(LPCITEMIDLIST iil1
,LPCITEMIDLIST iil2
);
110 LPITEMIDLIST WINAPI
ILFindLastID(LPITEMIDLIST pidl
);
111 DWORD WINAPI
ILGetSize(LPITEMIDLIST pidl
);
113 DWORD WINAPI
SHGetPathFromIDList32A (LPCITEMIDLIST pidl
,LPSTR pszPath
);
114 DWORD WINAPI
SHGetPathFromIDList32W (LPCITEMIDLIST pidl
,LPWSTR pszPath
);
115 #define SHGetPathFromIDList WINELIB_NAME_AW(SHGetPathFromIDList)
117 /****************************************************************************
120 typedef struct tagSHFILEINFO32A
{
121 HICON32 hIcon
; /* icon */
122 int iIcon
; /* icon index */
123 DWORD dwAttributes
; /* SFGAO_ flags */
124 CHAR szDisplayName
[MAX_PATH
];/* display name (or path) */
125 CHAR szTypeName
[80]; /* type name */
128 typedef struct tagSHFILEINFO32W
{
129 HICON32 hIcon
; /* icon */
130 int iIcon
; /* icon index */
131 DWORD dwAttributes
; /* SFGAO_ flags */
132 WCHAR szDisplayName
[MAX_PATH
];/* display name (or path) */
133 WCHAR szTypeName
[80]; /* type name */
136 DECL_WINELIB_TYPE_AW(SHFILEINFO
)
138 DWORD WINAPI
SHGetFileInfo32A(LPCSTR
,DWORD
,SHFILEINFO32A
*,UINT32
,UINT32
);
139 DWORD WINAPI
SHGetFileInfo32W(LPCWSTR
,DWORD
,SHFILEINFO32W
*,UINT32
,UINT32
);
140 #define SHGetFileInfo WINELIB_NAME_AW(SHGetFileInfo)
142 /****************************************************************************
145 typedef struct _SHFILEOPSTRUCTA
151 BOOL32 fAnyOperationsAborted
;
152 LPVOID hNameMappings
;
153 LPCSTR lpszProgressTitle
;
154 } SHFILEOPSTRUCT32A
, *LPSHFILEOPSTRUCT32A
;
156 typedef struct _SHFILEOPSTRUCTW
162 BOOL32 fAnyOperationsAborted
;
163 LPVOID hNameMappings
;
164 LPCWSTR lpszProgressTitle
;
165 } SHFILEOPSTRUCT32W
, *LPSHFILEOPSTRUCT32W
;
167 #define SHFILEOPSTRUCT WINELIB_NAME_AW(SHFILEOPSTRUCT)
168 #define LPSHFILEOPSTRUCT WINELIB_NAME_AW(LPSHFILEOPSTRUCT)
170 DWORD WINAPI
SHFileOperation32A (LPSHFILEOPSTRUCT32A lpFileOp
);
171 DWORD WINAPI
SHFileOperation32W (LPSHFILEOPSTRUCT32W lpFileOp
);
172 #define SHFileOperation WINELIB_NAME_AW(SHFileOperation)
174 DWORD WINAPI
SHFileOperation32(DWORD x
);
176 /****************************************************************************
179 typedef struct _AppBarData
{
182 UINT32 uCallbackMessage
;
186 } APPBARDATA
, *PAPPBARDATA
;
188 #define SHGFI_ICON 0x000000100 /* get icon */
189 #define SHGFI_DISPLAYNAME 0x000000200 /* get display name */
190 #define SHGFI_TYPENAME 0x000000400 /* get type name */
191 #define SHGFI_ATTRIBUTES 0x000000800 /* get attributes */
192 #define SHGFI_ICONLOCATION 0x000001000 /* get icon location */
193 #define SHGFI_EXETYPE 0x000002000 /* return exe type */
194 #define SHGFI_SYSICONINDEX 0x000004000 /* get system icon index */
195 #define SHGFI_LINKOVERLAY 0x000008000 /* put a link overlay on icon */
196 #define SHGFI_SELECTED 0x000010000 /* show icon in selected state */
197 #define SHGFI_LARGEICON 0x000000000 /* get large icon */
198 #define SHGFI_SMALLICON 0x000000001 /* get small icon */
199 #define SHGFI_OPENICON 0x000000002 /* get open icon */
200 #define SHGFI_SHELLICONSIZE 0x000000004 /* get shell size icon */
201 #define SHGFI_PIDL 0x000000008 /* pszPath is a pidl */
202 #define SHGFI_USEFILEATTRIBUTES 0x000000010 /* use passed dwFileAttribute */
204 /****************************************************************************
205 * SHChangeNotifyRegister API
212 DWORD WINAPI
SHChangeNotifyRegister(HWND32 hwnd
,LONG events1
,LONG events2
,DWORD msg
,int count
,IDSTRUCT
*idlist
);
213 DWORD WINAPI
SHChangeNotifyDeregister(LONG x1
,LONG x2
);
215 /****************************************************************************
216 * SHAddToRecentDocs API
218 #define SHARD_PIDL 0x00000001L
219 #define SHARD_PATH 0x00000002L
221 DWORD WINAPI
SHAddToRecentDocs(UINT32 uFlags
, LPCVOID pv
);
223 /****************************************************************************
224 * SHGetSpecialFolderLocation API
226 HRESULT WINAPI
SHGetSpecialFolderLocation(HWND32
, INT32
, LPITEMIDLIST
*);
227 /****************************************************************************
228 * string and path functions
230 LPSTR WINAPI
PathAddBackslash32A(LPSTR path
);
231 LPWSTR WINAPI
PathAddBackslash32W(LPWSTR path
);
232 #define PathAddBackslash WINELIB_NAME_AW(PathAddBackslash)
233 LPVOID WINAPI
PathAddBackslash32AW(LPVOID path
);
235 LPSTR WINAPI
PathCombine32A(LPSTR szDest
, LPCSTR lpszDir
, LPCSTR lpszFile
);
236 LPWSTR WINAPI
PathCombine32W(LPWSTR szDest
, LPCWSTR lpszDir
, LPCWSTR lpszFile
);
237 #define PathCombine WINELIB_NAME_AW(PathCombine)
238 LPVOID WINAPI
PathCombine32AW(LPVOID szDest
, LPCVOID lpszDir
, LPCVOID lpszFile
);
240 LPCSTR WINAPI
PathFindExtension32A(LPCSTR path
);
241 LPCWSTR WINAPI
PathFindExtension32W(LPCWSTR path
);
242 #define PathFindExtension WINELIB_NAME_AW(PathFindExtension)
243 LPCVOID WINAPI
PathFindExtension32AW(LPCVOID path
);
245 LPCSTR WINAPI
PathGetExtension32A(LPCSTR path
, DWORD y
, DWORD x
);
246 LPCWSTR WINAPI
PathGetExtension32W(LPCWSTR path
, DWORD y
, DWORD x
);
247 #define PathGetExtension WINELIB_NAME_AW(PathGetExtension)
248 LPCVOID WINAPI
PathGetExtension32AW(LPCVOID path
, DWORD y
, DWORD x
);
250 LPSTR WINAPI
PathRemoveBlanks(LPSTR str
);
251 LPVOID WINAPI
PathFindFilename(LPVOID fn
);
252 /****************************************************************************
255 LPVOID WINAPI
SHAlloc(DWORD len
);
256 DWORD WINAPI
SHFree(LPVOID x
);
258 #define SE_ERR_SHARE 26
259 #define SE_ERR_ASSOCINCOMPLETE 27
260 #define SE_ERR_DDETIMEOUT 28
261 #define SE_ERR_DDEFAIL 29
262 #define SE_ERR_DDEBUSY 30
263 #define SE_ERR_NOASSOC 31
265 #define CSIDL_DESKTOP 0x0000
266 #define CSIDL_PROGRAMS 0x0002
267 #define CSIDL_CONTROLS 0x0003
268 #define CSIDL_PRINTERS 0x0004
269 #define CSIDL_PERSONAL 0x0005
270 #define CSIDL_FAVORITES 0x0006
271 #define CSIDL_STARTUP 0x0007
272 #define CSIDL_RECENT 0x0008
273 #define CSIDL_SENDTO 0x0009
274 #define CSIDL_BITBUCKET 0x000a
275 #define CSIDL_STARTMENU 0x000b
276 #define CSIDL_DESKTOPDIRECTORY 0x0010
277 #define CSIDL_DRIVES 0x0011
278 #define CSIDL_NETWORK 0x0012
279 #define CSIDL_NETHOOD 0x0013
280 #define CSIDL_FONTS 0x0014
281 #define CSIDL_TEMPLATES 0x0015
282 #define CSIDL_COMMON_STARTMENU 0x0016
283 #define CSIDL_COMMON_PROGRAMS 0X0017
284 #define CSIDL_COMMON_STARTUP 0x0018
285 #define CSIDL_COMMON_DESKTOPDIRECTORY 0x0019
286 #define CSIDL_APPDATA 0x001a
287 #define CSIDL_PRINTHOOD 0x001b
290 #endif /* __WINE_SHELL_H */