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 BOOL WINAPI
PickIconDlg(
86 LPDWORD lpdwIconIndex
);
88 /* RunFileDlg flags */
89 #define RFF_NOBROWSE 0x01
90 #define RFF_NODEFAULT 0x02
91 #define RFF_CALCDIRECTORY 0x04
92 #define RFF_NOLABEL 0x08
93 #define RFF_NOSEPARATEMEM 0x20 /* NT only */
95 /* RunFileFlg notification structure */
102 } NM_RUNFILEDLG
, * LPNM_RUNFILEDLG
;
104 /* RunFileDlg notification return values */
106 #define RF_CANCEL 0x01
107 #define RF_RETRY 0x02
109 void WINAPI
RunFileDlg(
112 LPCSTR lpstrDirectory
,
114 LPCSTR lpstrDescription
,
117 void WINAPI
ExitWindowsDialog(HWND hwndOwner
);
119 BOOL WINAPI
SHFindComputer(
120 LPCITEMIDLIST pidlRoot
,
121 LPCITEMIDLIST pidlSavedSearch
);
123 void WINAPI
SHHandleDiskFull(HWND hwndOwner
,
126 int WINAPI
SHOutOfMemoryMessageBox(
131 DWORD WINAPI
SHNetConnectionDialog(
133 LPCSTR lpstrRemoteName
,
136 /****************************************************************************
140 /* The Platform SDK's shlobj.h header defines similar functions with a
141 * leading underscore. However those are unusable because of the leading
142 * underscore, because they have an incorrect calling convention, and
143 * because these functions are not exported by name anyway.
145 HANDLE WINAPI
SHAllocShared(
150 BOOL WINAPI
SHFreeShared(
154 LPVOID WINAPI
SHLockShared(
158 BOOL WINAPI
SHUnlockShared(LPVOID pv
);
160 /****************************************************************************
161 * Cabinet Window Messages
164 #define CWM_SETPATH (WM_USER + 2)
165 #define CWM_WANTIDLE (WM_USER + 3)
166 #define CWM_GETSETCURRENTINFO (WM_USER + 4)
167 #define CWM_SELECTITEM (WM_USER + 5)
168 #define CWM_SELECTITEMSTR (WM_USER + 6)
169 #define CWM_GETISHELLBROWSER (WM_USER + 7)
170 #define CWM_TESTPATH (WM_USER + 9)
171 #define CWM_STATECHANGE (WM_USER + 10)
172 #define CWM_GETPATH (WM_USER + 12)
174 /* CWM_TESTPATH types */
175 #define CWTP_ISEQUAL 0
176 #define CWTP_ISCHILD 1
178 /* CWM_TESTPATH structure */
183 } CWTESTPATHSTRUCT
,* LPCWTESTPATHSTRUCT
;
185 /****************************************************************************
186 * System Imagelist Routines
189 int WINAPI
Shell_GetCachedImageIndex(
194 HICON WINAPI
SHGetFileIcon(
197 DWORD dwFileAttributes
,
200 BOOL WINAPI
FileIconInit(BOOL bFullInit
);
202 /****************************************************************************
205 /* FileMenu_Create nSelHeight constants */
206 #define FM_DEFAULT_SELHEIGHT -1
207 #define FM_FULL_SELHEIGHT 0
209 /* FileMenu_Create flags */
210 #define FMF_SMALL_ICONS 0x00
211 #define FMF_LARGE_ICONS 0x08
212 #define FMF_NO_COLUMN_BREAK 0x10
214 HMENU WINAPI
FileMenu_Create(
215 COLORREF crBorderColor
,
221 void WINAPI
FileMenu_Destroy(HMENU hMenu
);
223 /* FileMenu_AppendItem constants */
224 #define FM_SEPARATOR (LPCSTR)1
225 #define FM_BLANK_ICON -1
226 #define FM_DEFAULT_HEIGHT 0
228 BOOL WINAPI
FileMenu_AppendItem(
236 /* FileMenu_InsertUsingPidl flags */
237 #define FMF_NO_EMPTY_ITEM 0x01
238 #define FMF_NO_PROGRAM_GROUPS 0x04
240 /* FileMenu_InsertUsingPidl callback function */
241 typedef void (CALLBACK
*LPFNFMCALLBACK
)(LPCITEMIDLIST pidlFolder
, LPCITEMIDLIST pidlFile
);
243 int WINAPI
FileMenu_InsertUsingPidl(
249 LPFNFMCALLBACK lpfnCallback
);
251 int WINAPI
FileMenu_ReplaceUsingPidl(
256 LPFNFMCALLBACK lpfnCallback
);
258 void WINAPI
FileMenu_Invalidate(HMENU hMenu
);
260 HMENU WINAPI
FileMenu_FindSubMenuByPidl(
264 BOOL WINAPI
FileMenu_TrackPopupMenuEx(
272 BOOL WINAPI
FileMenu_GetLastSelectedItemPidls(
274 LPCITEMIDLIST
*ppidlFolder
,
275 LPCITEMIDLIST
*ppidlItem
);
277 LRESULT WINAPI
FileMenu_MeasureItem(
279 LPMEASUREITEMSTRUCT lpmis
);
281 LRESULT WINAPI
FileMenu_DrawItem(
283 LPDRAWITEMSTRUCT lpdis
);
285 BOOL WINAPI
FileMenu_InitMenuPopup(HMENU hMenu
);
287 void WINAPI
FileMenu_AbortInitMenu(void);
289 LRESULT WINAPI
FileMenu_HandleMenuChar(
293 BOOL WINAPI
FileMenu_DeleteAllItems(HMENU hMenu
);
295 BOOL WINAPI
FileMenu_DeleteItemByCmd(
299 BOOL WINAPI
FileMenu_DeleteItemByIndex(
303 BOOL WINAPI
FileMenu_DeleteMenuItemByFirstID(
307 BOOL WINAPI
FileMenu_DeleteSeparator(HMENU hMenu
);
309 BOOL WINAPI
FileMenu_EnableItemByCmd(
314 DWORD WINAPI
FileMenu_GetItemExtent(
318 int WINAPI
FileMenu_AppendFilesForPidl(
323 int WINAPI
FileMenu_AddFilesForPidl(
330 LPFNFMCALLBACK lpfnCallback
);
332 /****************************************************************************
333 * Drag And Drop Routines
336 HRESULT WINAPI
SHRegisterDragDrop(
338 LPDROPTARGET lpDropTarget
);
340 HRESULT WINAPI
SHRevokeDragDrop(HWND hWnd
);
342 BOOL WINAPI
DAD_DragEnter(HWND hWnd
);
344 BOOL WINAPI
DAD_SetDragImageFromListView(
348 BOOL WINAPI
DAD_ShowDragImage(BOOL bShow
);
350 HRESULT WINAPI
CIDLData_CreateFromIDArray(
351 LPCITEMIDLIST pidlFolder
,
353 LPCITEMIDLIST
*lppidlFiles
,
354 LPDATAOBJECT
*ppdataObject
);
356 /****************************************************************************
357 * Path Manipulation Routines
360 BOOL WINAPI
PathAppendAW(LPVOID lpszPath1
, LPCVOID lpszPath2
);
362 LPVOID WINAPI
PathCombineAW(LPVOID szDest
, LPCVOID lpszDir
, LPCVOID lpszFile
);
364 LPVOID WINAPI
PathAddBackslashAW(LPVOID path
);
366 LPVOID WINAPI
PathBuildRootAW(LPVOID lpszPath
, int drive
);
368 LPVOID WINAPI
PathFindExtensionAW(LPCVOID path
);
370 LPVOID WINAPI
PathFindFileNameAW(LPCVOID path
);
372 LPVOID WINAPI
PathGetExtensionAW(LPCVOID lpszPath
, DWORD void1
, DWORD void2
);
374 LPVOID WINAPI
PathGetArgsAW(LPVOID lpszPath
);
376 BOOL WINAPI
PathRemoveFileSpecAW(LPVOID lpszPath
);
378 void WINAPI
PathRemoveBlanksAW(LPVOID lpszPath
);
380 VOID WINAPI
PathQuoteSpacesAW(LPVOID path
);
382 void WINAPI
PathUnquoteSpacesAW(LPVOID lpszPath
);
384 BOOL WINAPI
PathIsUNCAW(LPCVOID lpszPath
);
386 BOOL WINAPI
PathIsRelativeAW(LPCVOID lpszPath
);
388 BOOL WINAPI
PathIsRootAW(LPCVOID x
);
390 BOOL WINAPI
PathIsExeAW(LPCVOID lpszPath
);
392 BOOL WINAPI
PathIsDirectoryAW(LPCVOID lpszPath
);
394 BOOL WINAPI
PathFileExistsAW(LPCVOID lpszPath
);
396 BOOL WINAPI
PathMatchSpecAW(LPVOID lpszPath
, LPVOID lpszSpec
);
398 BOOL WINAPI
PathMakeUniqueNameAW(
401 LPCVOID lpszShortName
,
402 LPCVOID lpszLongName
,
403 LPCVOID lpszPathName
);
406 BOOL WINAPI
PathQualifyAW(LPCVOID path
);
408 BOOL WINAPI
PathResolveAW(LPVOID lpszPath
, LPCVOID
*alpszPaths
, DWORD dwFlags
);
410 VOID WINAPI
PathSetDlgItemPathAW(HWND hDlg
, int nIDDlgItem
, LPCVOID lpszPath
);
412 HRESULT WINAPI
PathProcessCommandAW(LPCVOID lpszPath
, LPVOID lpszBuff
,
413 DWORD dwBuffSize
, DWORD dwFlags
);
415 void WINAPI
PathStripPathAW(LPVOID lpszPath
);
417 BOOL WINAPI
PathStripToRootAW(LPVOID lpszPath
);
419 void WINAPI
PathRemoveArgsAW(LPVOID lpszPath
);
421 void WINAPI
PathRemoveExtensionAW(LPVOID lpszPath
);
423 int WINAPI
PathParseIconLocationAW(LPVOID lpszPath
);
425 BOOL WINAPI
PathIsSameRootAW(LPCVOID lpszPath1
, LPCVOID lpszPath2
);
427 BOOL WINAPI
PathFindOnPathAW(LPVOID sFile
, LPCVOID
*sOtherDirs
);
429 /****************************************************************************
430 * Shell Namespace Routines
433 /* Generic structure used by several messages */
440 } SFVCBINFO
, * LPSFVCBINFO
;
441 typedef const SFVCBINFO
* LPCSFVCBINFO
;
443 /* SFVCB_SELECTIONCHANGED structure */
450 } SFVSELECTSTATE
, * LPSFVSELECTSTATE
;
451 typedef const SFVSELECTSTATE
* LPCSFVSELECTSTATE
;
453 /* SFVCB_COPYHOOKCALLBACK structure */
463 } SFVCOPYHOOKINFO
, * LPSFVCOPYHOOKINFO
;
464 typedef const SFVCOPYHOOKINFO
* LPCSFVCOPYHOOKINFO
;
466 /* SFVCB_GETDETAILSOF structure */
473 } SFVCOLUMNINFO
, * LPSFVCOLUMNINFO
;
475 /****************************************************************************
479 /* SHWaitForFileToOpen flags */
480 #define SHWFF_ADD 0x01
481 #define SHWFF_REMOVE 0x02
482 #define SHWFF_WAIT 0x04
484 BOOL WINAPI
SHWaitForFileToOpen(
489 WORD WINAPI
ArrangeWindows(
494 CONST HWND
* lpKids
);
496 /* RegisterShellHook types */
497 #define RSH_DEREGISTER 0
498 #define RSH_REGISTER 1
499 #define RSH_REGISTER_PROGMAN 2
500 #define RSH_REGISTER_TASKMAN 3
502 BOOL WINAPI
RegisterShellHook(
506 /* SHCreateDefClassObject callback function */
507 typedef HRESULT (CALLBACK
*LPFNCDCOCALLBACK
)(
512 HRESULT WINAPI
SHCreateDefClassObject(
515 LPFNCDCOCALLBACK lpfnCallback
,
519 void WINAPI
SHFreeUnusedLibraries(void);
521 /* SHCreateLinks flags */
522 #define SHCLF_PREFIXNAME 0x01
523 #define SHCLF_CREATEONDESKTOP 0x02
525 HRESULT WINAPI
SHCreateLinks(
528 LPDATAOBJECT lpDataObject
,
530 LPITEMIDLIST
*lppidlLinks
);
532 DWORD WINAPI
CheckEscapesA(LPSTR string
, DWORD len
);
533 DWORD WINAPI
CheckEscapesW(LPWSTR string
, DWORD len
);
535 /* policy functions */
536 BOOL WINAPI
SHInitRestricted(LPCVOID unused
, LPCVOID inpRegKey
);
540 #endif /* defined(__cplusplus) */
542 #endif /* __WINE_UNDOCSHELL_H */