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
24 #endif /* defined(__cplusplus) */
26 /****************************************************************************
29 BOOL WINAPI
ILGetDisplayName(
33 /* type parameter for ILGetDisplayNameEx() */
34 #define ILGDN_FORPARSING 0
35 #define ILGDN_NORMAL 1
36 #define ILGDN_INFOLDER 2
38 BOOL WINAPI
ILGetDisplayNameEx(
44 LPITEMIDLIST WINAPI
ILGlobalClone(LPCITEMIDLIST pidl
);
45 void WINAPI
ILGlobalFree(LPITEMIDLIST pidl
);
46 LPITEMIDLIST WINAPI
SHSimpleIDListFromPathA (LPCSTR lpszPath
); //FIXME
47 LPITEMIDLIST WINAPI
SHSimpleIDListFromPathW (LPCWSTR lpszPath
);
49 HRESULT WINAPI
SHILCreateFromPathA (
54 HRESULT WINAPI
SHILCreateFromPathW (
62 BOOL WINAPI
StrRetToStrNA(LPSTR
,DWORD
,LPSTRRET
,const ITEMIDLIST
*);
63 BOOL WINAPI
StrRetToStrNW(LPWSTR
,DWORD
,LPSTRRET
,const ITEMIDLIST
*);
66 /****************************************************************************
67 * SHChangeNotifyRegister API
69 #define SHCNRF_InterruptLevel 0x0001
70 #define SHCNRF_ShellLevel 0x0002
71 #define SHCNRF_RecursiveInterrupt 0x1000 /* Must be combined with SHCNRF_InterruptLevel */
72 #define SHCNRF_NewDelivery 0x8000 /* Messages use shared memory */
75 /****************************************************************************
76 * Shell Common Dialogs
79 /* RunFileDlg flags */
80 #define RFF_NOBROWSE 0x01
81 #define RFF_NODEFAULT 0x02
82 #define RFF_CALCDIRECTORY 0x04
83 #define RFF_NOLABEL 0x08
84 #define RFF_NOSEPARATEMEM 0x20 /* NT only */
86 #define DE_SAMEFILE 0x71
87 #define DE_DESTSAMETREE 0x7D
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 LPCWSTR lpstrDirectory
,
108 LPCWSTR 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 LPCWSTR 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_GetCachedImageIndexA(
188 BOOL WINAPI
Shell_GetImageLists(
189 HIMAGELIST
*lphimlLarge
,
190 HIMAGELIST
*lphimlSmall
);
192 HICON WINAPI
SHGetFileIcon(
195 DWORD dwFileAttributes
,
198 BOOL WINAPI
FileIconInit(BOOL bFullInit
);
200 /****************************************************************************
203 /* FileMenu_Create nSelHeight constants */
204 #define FM_DEFAULT_SELHEIGHT -1
205 #define FM_FULL_SELHEIGHT 0
207 /* FileMenu_Create flags */
208 #define FMF_SMALL_ICONS 0x00
209 #define FMF_LARGE_ICONS 0x08
210 #define FMF_NO_COLUMN_BREAK 0x10
212 HMENU WINAPI
FileMenu_Create(
213 COLORREF crBorderColor
,
219 void WINAPI
FileMenu_Destroy(HMENU hMenu
);
221 /* FileMenu_AppendItem constants */
222 #define FM_SEPARATOR (LPCSTR)1
223 #define FM_BLANK_ICON -1
224 #define FM_DEFAULT_HEIGHT 0
226 BOOL WINAPI
FileMenu_AppendItem(
234 /* FileMenu_InsertUsingPidl flags */
235 #define FMF_NO_EMPTY_ITEM 0x01
236 #define FMF_NO_PROGRAM_GROUPS 0x04
238 /* FileMenu_InsertUsingPidl callback function */
239 typedef void (CALLBACK
*LPFNFMCALLBACK
)(LPCITEMIDLIST pidlFolder
, LPCITEMIDLIST pidlFile
);
241 int WINAPI
FileMenu_InsertUsingPidl(
247 LPFNFMCALLBACK lpfnCallback
);
249 int WINAPI
FileMenu_ReplaceUsingPidl(
254 LPFNFMCALLBACK lpfnCallback
);
256 void WINAPI
FileMenu_Invalidate(HMENU hMenu
);
258 HMENU WINAPI
FileMenu_FindSubMenuByPidl(
262 BOOL WINAPI
FileMenu_TrackPopupMenuEx(
270 BOOL WINAPI
FileMenu_GetLastSelectedItemPidls(
272 LPCITEMIDLIST
*ppidlFolder
,
273 LPCITEMIDLIST
*ppidlItem
);
275 LRESULT WINAPI
FileMenu_MeasureItem(
277 LPMEASUREITEMSTRUCT lpmis
);
279 LRESULT WINAPI
FileMenu_DrawItem(
281 LPDRAWITEMSTRUCT lpdis
);
283 BOOL WINAPI
FileMenu_InitMenuPopup(HMENU hMenu
);
285 void WINAPI
FileMenu_AbortInitMenu(void);
287 LRESULT WINAPI
FileMenu_HandleMenuChar(
291 BOOL WINAPI
FileMenu_DeleteAllItems(HMENU hMenu
);
293 BOOL WINAPI
FileMenu_DeleteItemByCmd(
297 BOOL WINAPI
FileMenu_DeleteItemByIndex(
301 BOOL WINAPI
FileMenu_DeleteMenuItemByFirstID(
305 BOOL WINAPI
FileMenu_DeleteSeparator(HMENU hMenu
);
307 BOOL WINAPI
FileMenu_EnableItemByCmd(
312 DWORD WINAPI
FileMenu_GetItemExtent(
316 int WINAPI
FileMenu_AppendFilesForPidl(
321 int WINAPI
FileMenu_AddFilesForPidl(
328 LPFNFMCALLBACK lpfnCallback
);
330 /****************************************************************************
331 * Drag And Drop Routines
334 HRESULT WINAPI
SHRegisterDragDrop(
336 LPDROPTARGET lpDropTarget
);
338 HRESULT WINAPI
SHRevokeDragDrop(HWND hWnd
);
340 BOOL WINAPI
DAD_DragEnter(HWND hWnd
);
342 BOOL WINAPI
DAD_SetDragImageFromListView(
346 BOOL WINAPI
DAD_ShowDragImage(BOOL bShow
);
348 /****************************************************************************
349 * Path Manipulation Routines
352 BOOL WINAPI
PathAppendAW(LPVOID lpszPath1
, LPCVOID lpszPath2
);
354 LPVOID WINAPI
PathCombineAW(LPVOID szDest
, LPCVOID lpszDir
, LPCVOID lpszFile
);
356 LPVOID WINAPI
PathAddBackslashAW(LPVOID path
);
358 LPVOID WINAPI
PathBuildRootAW(LPVOID lpszPath
, int drive
);
360 LPVOID WINAPI
PathFindExtensionAW(LPCVOID path
);
362 LPVOID WINAPI
PathFindFileNameAW(LPCVOID path
);
364 LPVOID WINAPI
PathGetExtensionAW(LPCVOID lpszPath
, DWORD void1
, DWORD void2
);
366 LPVOID WINAPI
PathGetArgsAW(LPVOID lpszPath
);
368 BOOL WINAPI
PathRemoveFileSpecAW(LPVOID lpszPath
);
370 void WINAPI
PathRemoveBlanksAW(LPVOID lpszPath
);
372 VOID WINAPI
PathQuoteSpacesAW(LPVOID path
);
374 void WINAPI
PathUnquoteSpacesAW(LPVOID lpszPath
);
376 BOOL WINAPI
PathIsUNCAW(LPCVOID lpszPath
);
378 BOOL WINAPI
PathIsRelativeAW(LPCVOID lpszPath
);
380 BOOL WINAPI
PathIsRootAW(LPCVOID x
);
382 BOOL WINAPI
PathIsExeAW(LPCVOID lpszPath
);
384 BOOL WINAPI
PathIsDirectoryAW(LPCVOID lpszPath
);
386 BOOL WINAPI
PathFileExistsAW(LPCVOID lpszPath
);
388 BOOL WINAPI
PathMatchSpecAW(LPVOID lpszPath
, LPVOID lpszSpec
);
390 BOOL WINAPI
PathMakeUniqueNameAW(
393 LPCVOID lpszShortName
,
394 LPCVOID lpszLongName
,
395 LPCVOID lpszPathName
);
397 BOOL WINAPI
PathYetAnotherMakeUniqueName(
399 LPCWSTR lpszPathName
,
400 LPCWSTR lpszShortName
,
401 LPCWSTR lpszLongName
);
403 BOOL WINAPI
PathQualifyAW(LPCVOID path
);
406 /* PathResolve flags */
407 #define PRF_CHECKEXISTANCE 0x01
408 #define PRF_EXECUTABLE 0x02
409 #define PRF_QUALIFYONPATH 0x04
410 #define PRF_WINDOWS31 0x08
412 BOOL WINAPI
PathResolveAW(LPVOID lpszPath
, LPCVOID
*alpszPaths
, DWORD dwFlags
);
414 VOID WINAPI
PathSetDlgItemPathAW(HWND hDlg
, int nIDDlgItem
, LPCVOID lpszPath
);
416 /* PathProcessCommand flags */
417 #define PPCF_QUOTEPATH 0x01 /* implies PPCF_INCLUDEARGS */
418 #define PPCF_INCLUDEARGS 0x02
419 //#define PPCF_NODIRECTORIES 0x10 move to shlobj
420 #define PPCF_DONTRESOLVE 0x20
421 #define PPCF_PATHISRELATIVE 0x40
423 HRESULT WINAPI
PathProcessCommandAW(LPCVOID lpszPath
, LPVOID lpszBuff
,
424 DWORD dwBuffSize
, DWORD dwFlags
);
426 void WINAPI
PathStripPathAW(LPVOID lpszPath
);
428 BOOL WINAPI
PathStripToRootAW(LPVOID lpszPath
);
430 void WINAPI
PathRemoveArgsAW(LPVOID lpszPath
);
432 void WINAPI
PathRemoveExtensionAW(LPVOID lpszPath
);
434 int WINAPI
PathParseIconLocationAW(LPVOID lpszPath
);
436 BOOL WINAPI
PathIsSameRootAW(LPCVOID lpszPath1
, LPCVOID lpszPath2
);
438 BOOL WINAPI
PathFindOnPathAW(LPVOID sFile
, LPCVOID
*sOtherDirs
);
440 /****************************************************************************
441 * Shell Namespace Routines
444 /* Generic structure used by several messages */
451 } SFVCBINFO
, * LPSFVCBINFO
;
452 typedef const SFVCBINFO
* LPCSFVCBINFO
;
454 /* SFVCB_SELECTIONCHANGED structure */
461 } SFVSELECTSTATE
, * LPSFVSELECTSTATE
;
462 typedef const SFVSELECTSTATE
* LPCSFVSELECTSTATE
;
464 /* SFVCB_COPYHOOKCALLBACK structure */
474 } SFVCOPYHOOKINFO
, * LPSFVCOPYHOOKINFO
;
475 typedef const SFVCOPYHOOKINFO
* LPCSFVCOPYHOOKINFO
;
477 /* SFVCB_GETDETAILSOF structure */
484 } SFVCOLUMNINFO
, * LPSFVCOLUMNINFO
;
486 /****************************************************************************
490 /* SHWaitForFileToOpen flags */
491 #define SHWFF_ADD 0x01
492 #define SHWFF_REMOVE 0x02
493 #define SHWFF_WAIT 0x04
495 BOOL WINAPI
SHWaitForFileToOpen(
500 WORD WINAPI
ArrangeWindows(
505 CONST HWND
* lpKids
);
507 /* RegisterShellHook types */
508 #define RSH_DEREGISTER 0
509 #define RSH_REGISTER 1
510 #define RSH_REGISTER_PROGMAN 2
511 #define RSH_REGISTER_TASKMAN 3
513 BOOL WINAPI
RegisterShellHook(
517 /* SHCreateDefClassObject callback function */
518 typedef HRESULT (CALLBACK
*LPFNCDCOCALLBACK
)(
523 HRESULT WINAPI
SHCreateDefClassObject(
526 LPFNCDCOCALLBACK lpfnCallback
,
530 void WINAPI
SHFreeUnusedLibraries(void);
532 /* SHCreateLinks flags */
533 #define SHCLF_PREFIXNAME 0x01
534 #define SHCLF_CREATEONDESKTOP 0x02
536 HRESULT WINAPI
SHCreateLinks(
539 LPDATAOBJECT lpDataObject
,
541 LPITEMIDLIST
*lppidlLinks
);
543 DWORD WINAPI
CheckEscapesA(LPSTR string
, DWORD len
);
544 DWORD WINAPI
CheckEscapesW(LPWSTR string
, DWORD len
);
546 /* policy functions */
547 BOOL WINAPI
SHInitRestricted(LPCVOID unused
, LPCVOID inpRegKey
);
549 /* Shell Desktop functions */
551 #define WM_GETISHELLBROWSER (WM_USER+7)
553 BOOL WINAPI
SHDesktopMessageLoop(HANDLE
);
555 #define CSIDL_FOLDER_MASK 0x00ff
559 #endif /* defined(__cplusplus) */
561 #endif /* __WINE_UNDOCSHELL_H */