2 * Copyright 1999, 2000 Juergen Schmied
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __WINE_UNDOCSHELL_H
20 #define __WINE_UNDOCSHELL_H
32 #endif /* defined(__cplusplus) */
34 /****************************************************************************
37 BOOL WINAPI
ILGetDisplayName(
41 /* type parameter for ILGetDisplayNameEx() */
42 #define ILGDN_FORPARSING 0
43 #define ILGDN_NORMAL 1
44 #define ILGDN_INFOLDER 2
46 BOOL WINAPI
ILGetDisplayNameEx(
52 LPITEMIDLIST WINAPI
ILGlobalClone(LPCITEMIDLIST pidl
);
53 void WINAPI
ILGlobalFree(LPITEMIDLIST pidl
);
55 LPITEMIDLIST
SHSimpleIDListFromPathA (LPCSTR lpszPath
);
56 LPITEMIDLIST
SHSimpleIDListFromPathW (LPCWSTR lpszPath
);
58 HRESULT
SHILCreateFromPathW (
66 BOOL WINAPI
StrRetToStrNA(LPSTR
,DWORD
,LPSTRRET
,const ITEMIDLIST
*);
67 BOOL WINAPI
StrRetToStrNW(LPWSTR
,DWORD
,LPSTRRET
,const ITEMIDLIST
*);
70 /****************************************************************************
71 * SHChangeNotifyRegister API
73 #define SHCNRF_InterruptLevel 0x0001
74 #define SHCNRF_ShellLevel 0x0002
75 #define SHCNRF_RecursiveInterrupt 0x1000 /* Must be combined with SHCNRF_InterruptLevel */
76 #define SHCNRF_NewDelivery 0x8000 /* Messages use shared memory */
78 /****************************************************************************
79 * Shell Common Dialogs
82 /* RunFileDlg flags */
83 #define RFF_NOBROWSE 0x01
84 #define RFF_NODEFAULT 0x02
85 #define RFF_CALCDIRECTORY 0x04
86 #define RFF_NOLABEL 0x08
87 #define RFF_NOSEPARATEMEM 0x20 /* NT only */
89 /* RunFileFlg notification structure */
96 } NM_RUNFILEDLG
, * LPNM_RUNFILEDLG
;
98 /* RunFileDlg notification return values */
100 #define RF_CANCEL 0x01
101 #define RF_RETRY 0x02
103 void WINAPI
RunFileDlg(
106 LPCSTR lpstrDirectory
,
108 LPCSTR lpstrDescription
,
111 void WINAPI
ExitWindowsDialog(HWND hwndOwner
);
113 BOOL WINAPI
SHFindComputer(
114 LPCITEMIDLIST pidlRoot
,
115 LPCITEMIDLIST pidlSavedSearch
);
117 void WINAPI
SHHandleDiskFull(HWND hwndOwner
,
120 int WINAPI
SHOutOfMemoryMessageBox(
125 DWORD WINAPI
SHNetConnectionDialog(
127 LPCSTR lpstrRemoteName
,
130 /****************************************************************************
134 /* The Platform SDK's shlobj.h header defines similar functions with a
135 * leading underscore. However those are unusable because of the leading
136 * underscore, because they have an incorrect calling convention, and
137 * because these functions are not exported by name anyway.
139 HANDLE WINAPI
SHAllocShared(
144 BOOL WINAPI
SHFreeShared(
148 LPVOID WINAPI
SHLockShared(
152 BOOL WINAPI
SHUnlockShared(LPVOID pv
);
154 /****************************************************************************
155 * Cabinet Window Messages
158 #define CWM_SETPATH (WM_USER + 2)
159 #define CWM_WANTIDLE (WM_USER + 3)
160 #define CWM_GETSETCURRENTINFO (WM_USER + 4)
161 #define CWM_SELECTITEM (WM_USER + 5)
162 #define CWM_SELECTITEMSTR (WM_USER + 6)
163 #define CWM_GETISHELLBROWSER (WM_USER + 7)
164 #define CWM_TESTPATH (WM_USER + 9)
165 #define CWM_STATECHANGE (WM_USER + 10)
166 #define CWM_GETPATH (WM_USER + 12)
168 /* CWM_TESTPATH types */
169 #define CWTP_ISEQUAL 0
170 #define CWTP_ISCHILD 1
172 /* CWM_TESTPATH structure */
177 } CWTESTPATHSTRUCT
,* LPCWTESTPATHSTRUCT
;
179 /****************************************************************************
180 * System Imagelist Routines
183 int WINAPI
Shell_GetCachedImageIndex(
188 HICON WINAPI
SHGetFileIcon(
191 DWORD dwFileAttributes
,
194 BOOL WINAPI
FileIconInit(BOOL bFullInit
);
196 /****************************************************************************
199 /* FileMenu_Create nSelHeight constants */
200 #define FM_DEFAULT_SELHEIGHT -1
201 #define FM_FULL_SELHEIGHT 0
203 /* FileMenu_Create flags */
204 #define FMF_SMALL_ICONS 0x00
205 #define FMF_LARGE_ICONS 0x08
206 #define FMF_NO_COLUMN_BREAK 0x10
208 HMENU WINAPI
FileMenu_Create(
209 COLORREF crBorderColor
,
215 void WINAPI
FileMenu_Destroy(HMENU hMenu
);
217 /* FileMenu_AppendItem constants */
218 #define FM_SEPARATOR (LPCSTR)1
219 #define FM_BLANK_ICON -1
220 #define FM_DEFAULT_HEIGHT 0
222 BOOL WINAPI
FileMenu_AppendItem(
230 /* FileMenu_InsertUsingPidl flags */
231 #define FMF_NO_EMPTY_ITEM 0x01
232 #define FMF_NO_PROGRAM_GROUPS 0x04
234 /* FileMenu_InsertUsingPidl callback function */
235 typedef void (CALLBACK
*LPFNFMCALLBACK
)(LPCITEMIDLIST pidlFolder
, LPCITEMIDLIST pidlFile
);
237 int WINAPI
FileMenu_InsertUsingPidl(
243 LPFNFMCALLBACK lpfnCallback
);
245 int WINAPI
FileMenu_ReplaceUsingPidl(
250 LPFNFMCALLBACK lpfnCallback
);
252 void WINAPI
FileMenu_Invalidate(HMENU hMenu
);
254 HMENU WINAPI
FileMenu_FindSubMenuByPidl(
258 BOOL WINAPI
FileMenu_TrackPopupMenuEx(
266 BOOL WINAPI
FileMenu_GetLastSelectedItemPidls(
268 LPCITEMIDLIST
*ppidlFolder
,
269 LPCITEMIDLIST
*ppidlItem
);
271 LRESULT WINAPI
FileMenu_MeasureItem(
273 LPMEASUREITEMSTRUCT lpmis
);
275 LRESULT WINAPI
FileMenu_DrawItem(
277 LPDRAWITEMSTRUCT lpdis
);
279 BOOL WINAPI
FileMenu_InitMenuPopup(HMENU hMenu
);
281 void WINAPI
FileMenu_AbortInitMenu(void);
283 LRESULT WINAPI
FileMenu_HandleMenuChar(
287 BOOL WINAPI
FileMenu_DeleteAllItems(HMENU hMenu
);
289 BOOL WINAPI
FileMenu_DeleteItemByCmd(
293 BOOL WINAPI
FileMenu_DeleteItemByIndex(
297 BOOL WINAPI
FileMenu_DeleteMenuItemByFirstID(
301 BOOL WINAPI
FileMenu_DeleteSeparator(HMENU hMenu
);
303 BOOL WINAPI
FileMenu_EnableItemByCmd(
308 DWORD WINAPI
FileMenu_GetItemExtent(
312 int WINAPI
FileMenu_AppendFilesForPidl(
317 int WINAPI
FileMenu_AddFilesForPidl(
324 LPFNFMCALLBACK lpfnCallback
);
326 /****************************************************************************
327 * Drag And Drop Routines
330 HRESULT WINAPI
SHRegisterDragDrop(
332 LPDROPTARGET lpDropTarget
);
334 HRESULT WINAPI
SHRevokeDragDrop(HWND hWnd
);
336 BOOL WINAPI
DAD_DragEnter(HWND hWnd
);
338 BOOL WINAPI
DAD_SetDragImageFromListView(
342 BOOL WINAPI
DAD_ShowDragImage(BOOL bShow
);
344 HRESULT WINAPI
CIDLData_CreateFromIDArray(
345 LPCITEMIDLIST pidlFolder
,
347 LPCITEMIDLIST
*lppidlFiles
,
348 LPDATAOBJECT
*ppdataObject
);
350 /****************************************************************************
351 * Path Manipulation Routines
354 BOOL WINAPI
PathAppendAW(LPVOID lpszPath1
, LPCVOID lpszPath2
);
356 LPVOID WINAPI
PathCombineAW(LPVOID szDest
, LPCVOID lpszDir
, LPCVOID lpszFile
);
358 LPVOID WINAPI
PathAddBackslashAW(LPVOID path
);
360 LPVOID WINAPI
PathBuildRootAW(LPVOID lpszPath
, int drive
);
362 LPVOID WINAPI
PathFindExtensionAW(LPCVOID path
);
364 LPVOID WINAPI
PathFindFileNameAW(LPCVOID path
);
366 LPVOID WINAPI
PathGetExtensionAW(LPCVOID lpszPath
, DWORD void1
, DWORD void2
);
368 LPVOID WINAPI
PathGetArgsAW(LPVOID lpszPath
);
370 BOOL WINAPI
PathRemoveFileSpecAW(LPVOID lpszPath
);
372 void WINAPI
PathRemoveBlanksAW(LPVOID lpszPath
);
374 VOID WINAPI
PathQuoteSpacesAW(LPVOID path
);
376 void WINAPI
PathUnquoteSpacesAW(LPVOID lpszPath
);
378 BOOL WINAPI
PathIsUNCAW(LPCVOID lpszPath
);
380 BOOL WINAPI
PathIsRelativeAW(LPCVOID lpszPath
);
382 BOOL WINAPI
PathIsRootAW(LPCVOID x
);
384 BOOL WINAPI
PathIsExeAW(LPCVOID lpszPath
);
386 BOOL WINAPI
PathIsDirectoryAW(LPCVOID lpszPath
);
388 BOOL WINAPI
PathFileExistsAW(LPCVOID lpszPath
);
390 BOOL WINAPI
PathMatchSpecAW(LPVOID lpszPath
, LPVOID lpszSpec
);
392 BOOL WINAPI
PathMakeUniqueNameAW(
395 LPCVOID lpszShortName
,
396 LPCVOID lpszLongName
,
397 LPCVOID lpszPathName
);
400 BOOL WINAPI
PathQualifyAW(LPCVOID path
);
402 BOOL WINAPI
PathResolveAW(LPVOID lpszPath
, LPCVOID
*alpszPaths
, DWORD dwFlags
);
404 VOID WINAPI
PathSetDlgItemPathAW(HWND hDlg
, int nIDDlgItem
, LPCVOID lpszPath
);
406 HRESULT WINAPI
PathProcessCommandAW(LPCVOID lpszPath
, LPVOID lpszBuff
,
407 DWORD dwBuffSize
, DWORD dwFlags
);
409 void WINAPI
PathStripPathAW(LPVOID lpszPath
);
411 BOOL WINAPI
PathStripToRootAW(LPVOID lpszPath
);
413 void WINAPI
PathRemoveArgsAW(LPVOID lpszPath
);
415 void WINAPI
PathRemoveExtensionAW(LPVOID lpszPath
);
417 int WINAPI
PathParseIconLocationAW(LPVOID lpszPath
);
419 BOOL WINAPI
PathIsSameRootAW(LPCVOID lpszPath1
, LPCVOID lpszPath2
);
421 BOOL WINAPI
PathFindOnPathAW(LPVOID sFile
, LPCVOID
*sOtherDirs
);
423 /****************************************************************************
424 * Shell Namespace Routines
427 /* Generic structure used by several messages */
434 } SFVCBINFO
, * LPSFVCBINFO
;
435 typedef const SFVCBINFO
* LPCSFVCBINFO
;
437 /* SFVCB_SELECTIONCHANGED structure */
444 } SFVSELECTSTATE
, * LPSFVSELECTSTATE
;
445 typedef const SFVSELECTSTATE
* LPCSFVSELECTSTATE
;
447 /* SFVCB_COPYHOOKCALLBACK structure */
457 } SFVCOPYHOOKINFO
, * LPSFVCOPYHOOKINFO
;
458 typedef const SFVCOPYHOOKINFO
* LPCSFVCOPYHOOKINFO
;
460 /* SFVCB_GETDETAILSOF structure */
467 } SFVCOLUMNINFO
, * LPSFVCOLUMNINFO
;
469 /****************************************************************************
473 /* SHWaitForFileToOpen flags */
474 #define SHWFF_ADD 0x01
475 #define SHWFF_REMOVE 0x02
476 #define SHWFF_WAIT 0x04
478 BOOL WINAPI
SHWaitForFileToOpen(
483 WORD WINAPI
ArrangeWindows(HWND hwndParent
, DWORD dwReserved
, const RECT
*lpRect
,
484 WORD cKids
, const HWND
*lpKids
);
486 /* RegisterShellHook types */
487 #define RSH_DEREGISTER 0
488 #define RSH_REGISTER 1
489 #define RSH_REGISTER_PROGMAN 2
490 #define RSH_REGISTER_TASKMAN 3
492 BOOL WINAPI
RegisterShellHook(
496 /* SHCreateDefClassObject callback function */
497 typedef HRESULT (CALLBACK
*LPFNCDCOCALLBACK
)(
502 HRESULT WINAPI
SHCreateDefClassObject(
505 LPFNCDCOCALLBACK lpfnCallback
,
509 void WINAPI
SHFreeUnusedLibraries(void);
511 /* SHCreateLinks flags */
512 #define SHCLF_PREFIXNAME 0x01
513 #define SHCLF_CREATEONDESKTOP 0x02
515 HRESULT WINAPI
SHCreateLinks(
518 LPDATAOBJECT lpDataObject
,
520 LPITEMIDLIST
*lppidlLinks
);
522 DWORD WINAPI
CheckEscapesA(LPSTR string
, DWORD len
);
523 DWORD WINAPI
CheckEscapesW(LPWSTR string
, DWORD len
);
525 /* policy functions */
526 BOOL WINAPI
SHInitRestricted(LPCVOID unused
, LPCVOID inpRegKey
);
530 #endif /* defined(__cplusplus) */
532 #endif /* __WINE_UNDOCSHELL_H */