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
88 /* RunFileFlg notification structure */
95 } NM_RUNFILEDLG
, * LPNM_RUNFILEDLG
;
97 /* RunFileDlg notification return values */
99 #define RF_CANCEL 0x01
100 #define RF_RETRY 0x02
102 void WINAPI
RunFileDlg(
105 LPCWSTR lpstrDirectory
,
107 LPCWSTR lpstrDescription
,
110 void WINAPI
ExitWindowsDialog(HWND hwndOwner
);
112 BOOL WINAPI
SHFindComputer(
113 LPCITEMIDLIST pidlRoot
,
114 LPCITEMIDLIST pidlSavedSearch
);
116 void WINAPI
SHHandleDiskFull(HWND hwndOwner
,
119 int WINAPI
SHOutOfMemoryMessageBox(
124 DWORD WINAPI
SHNetConnectionDialog(
126 LPCWSTR lpstrRemoteName
,
129 /****************************************************************************
133 /* The Platform SDK's shlobj.h header defines similar functions with a
134 * leading underscore. However those are unusable because of the leading
135 * underscore, because they have an incorrect calling convention, and
136 * because these functions are not exported by name anyway.
138 HANDLE WINAPI
SHAllocShared(
143 BOOL WINAPI
SHFreeShared(
147 LPVOID WINAPI
SHLockShared(
151 BOOL WINAPI
SHUnlockShared(LPVOID pv
);
153 /****************************************************************************
154 * Cabinet Window Messages
157 #define CWM_SETPATH (WM_USER + 2)
158 #define CWM_WANTIDLE (WM_USER + 3)
159 #define CWM_GETSETCURRENTINFO (WM_USER + 4)
160 #define CWM_SELECTITEM (WM_USER + 5)
161 #define CWM_SELECTITEMSTR (WM_USER + 6)
162 #define CWM_GETISHELLBROWSER (WM_USER + 7)
163 #define CWM_TESTPATH (WM_USER + 9)
164 #define CWM_STATECHANGE (WM_USER + 10)
165 #define CWM_GETPATH (WM_USER + 12)
167 /* CWM_TESTPATH types */
168 #define CWTP_ISEQUAL 0
169 #define CWTP_ISCHILD 1
171 /* CWM_TESTPATH structure */
176 } CWTESTPATHSTRUCT
,* LPCWTESTPATHSTRUCT
;
178 /****************************************************************************
179 * System Imagelist Routines
182 int WINAPI
Shell_GetCachedImageIndexA(
187 BOOL WINAPI
Shell_GetImageLists(
188 HIMAGELIST
*lphimlLarge
,
189 HIMAGELIST
*lphimlSmall
);
191 HICON WINAPI
SHGetFileIcon(
194 DWORD dwFileAttributes
,
197 BOOL WINAPI
FileIconInit(BOOL bFullInit
);
199 /****************************************************************************
202 /* FileMenu_Create nSelHeight constants */
203 #define FM_DEFAULT_SELHEIGHT -1
204 #define FM_FULL_SELHEIGHT 0
206 /* FileMenu_Create flags */
207 #define FMF_SMALL_ICONS 0x00
208 #define FMF_LARGE_ICONS 0x08
209 #define FMF_NO_COLUMN_BREAK 0x10
211 HMENU WINAPI
FileMenu_Create(
212 COLORREF crBorderColor
,
218 void WINAPI
FileMenu_Destroy(HMENU hMenu
);
220 /* FileMenu_AppendItem constants */
221 #define FM_SEPARATOR (LPCSTR)1
222 #define FM_BLANK_ICON -1
223 #define FM_DEFAULT_HEIGHT 0
225 BOOL WINAPI
FileMenu_AppendItem(
233 /* FileMenu_InsertUsingPidl flags */
234 #define FMF_NO_EMPTY_ITEM 0x01
235 #define FMF_NO_PROGRAM_GROUPS 0x04
237 /* FileMenu_InsertUsingPidl callback function */
238 typedef void (CALLBACK
*LPFNFMCALLBACK
)(LPCITEMIDLIST pidlFolder
, LPCITEMIDLIST pidlFile
);
240 int WINAPI
FileMenu_InsertUsingPidl(
246 LPFNFMCALLBACK lpfnCallback
);
248 int WINAPI
FileMenu_ReplaceUsingPidl(
253 LPFNFMCALLBACK lpfnCallback
);
255 void WINAPI
FileMenu_Invalidate(HMENU hMenu
);
257 HMENU WINAPI
FileMenu_FindSubMenuByPidl(
261 BOOL WINAPI
FileMenu_TrackPopupMenuEx(
269 BOOL WINAPI
FileMenu_GetLastSelectedItemPidls(
271 LPCITEMIDLIST
*ppidlFolder
,
272 LPCITEMIDLIST
*ppidlItem
);
274 LRESULT WINAPI
FileMenu_MeasureItem(
276 LPMEASUREITEMSTRUCT lpmis
);
278 LRESULT WINAPI
FileMenu_DrawItem(
280 LPDRAWITEMSTRUCT lpdis
);
282 BOOL WINAPI
FileMenu_InitMenuPopup(HMENU hMenu
);
284 void WINAPI
FileMenu_AbortInitMenu(void);
286 LRESULT WINAPI
FileMenu_HandleMenuChar(
290 BOOL WINAPI
FileMenu_DeleteAllItems(HMENU hMenu
);
292 BOOL WINAPI
FileMenu_DeleteItemByCmd(
296 BOOL WINAPI
FileMenu_DeleteItemByIndex(
300 BOOL WINAPI
FileMenu_DeleteMenuItemByFirstID(
304 BOOL WINAPI
FileMenu_DeleteSeparator(HMENU hMenu
);
306 BOOL WINAPI
FileMenu_EnableItemByCmd(
311 DWORD WINAPI
FileMenu_GetItemExtent(
315 int WINAPI
FileMenu_AppendFilesForPidl(
320 int WINAPI
FileMenu_AddFilesForPidl(
327 LPFNFMCALLBACK lpfnCallback
);
329 /****************************************************************************
330 * Drag And Drop Routines
333 HRESULT WINAPI
SHRegisterDragDrop(
335 LPDROPTARGET lpDropTarget
);
337 HRESULT WINAPI
SHRevokeDragDrop(HWND hWnd
);
339 BOOL WINAPI
DAD_DragEnter(HWND hWnd
);
341 BOOL WINAPI
DAD_SetDragImageFromListView(
345 BOOL WINAPI
DAD_ShowDragImage(BOOL bShow
);
347 /****************************************************************************
348 * Path Manipulation Routines
351 BOOL WINAPI
PathAppendAW(LPVOID lpszPath1
, LPCVOID lpszPath2
);
353 LPVOID WINAPI
PathCombineAW(LPVOID szDest
, LPCVOID lpszDir
, LPCVOID lpszFile
);
355 LPVOID WINAPI
PathAddBackslashAW(LPVOID path
);
357 LPVOID WINAPI
PathBuildRootAW(LPVOID lpszPath
, int drive
);
359 LPVOID WINAPI
PathFindExtensionAW(LPCVOID path
);
361 LPVOID WINAPI
PathFindFileNameAW(LPCVOID path
);
363 LPVOID WINAPI
PathGetExtensionAW(LPCVOID lpszPath
, DWORD void1
, DWORD void2
);
365 LPVOID WINAPI
PathGetArgsAW(LPVOID lpszPath
);
367 BOOL WINAPI
PathRemoveFileSpecAW(LPVOID lpszPath
);
369 void WINAPI
PathRemoveBlanksAW(LPVOID lpszPath
);
371 VOID WINAPI
PathQuoteSpacesAW(LPVOID path
);
373 void WINAPI
PathUnquoteSpacesAW(LPVOID lpszPath
);
375 BOOL WINAPI
PathIsUNCAW(LPCVOID lpszPath
);
377 BOOL WINAPI
PathIsRelativeAW(LPCVOID lpszPath
);
379 BOOL WINAPI
PathIsRootAW(LPCVOID x
);
381 BOOL WINAPI
PathIsExeAW(LPCVOID lpszPath
);
383 BOOL WINAPI
PathIsDirectoryAW(LPCVOID lpszPath
);
385 BOOL WINAPI
PathFileExistsAW(LPCVOID lpszPath
);
387 BOOL WINAPI
PathMatchSpecAW(LPVOID lpszPath
, LPVOID lpszSpec
);
389 BOOL WINAPI
PathMakeUniqueNameAW(
392 LPCVOID lpszShortName
,
393 LPCVOID lpszLongName
,
394 LPCVOID lpszPathName
);
396 BOOL WINAPI
PathYetAnotherMakeUniqueName(
398 LPCWSTR lpszPathName
,
399 LPCWSTR lpszShortName
,
400 LPCWSTR lpszLongName
);
402 BOOL WINAPI
PathQualifyAW(LPCVOID path
);
405 /* PathResolve flags */
406 #define PRF_CHECKEXISTANCE 0x01
407 #define PRF_EXECUTABLE 0x02
408 #define PRF_QUALIFYONPATH 0x04
409 #define PRF_WINDOWS31 0x08
411 BOOL WINAPI
PathResolveAW(LPVOID lpszPath
, LPCVOID
*alpszPaths
, DWORD dwFlags
);
413 VOID WINAPI
PathSetDlgItemPathAW(HWND hDlg
, int nIDDlgItem
, LPCVOID lpszPath
);
415 /* PathProcessCommand flags */
416 #define PPCF_QUOTEPATH 0x01 /* implies PPCF_INCLUDEARGS */
417 #define PPCF_INCLUDEARGS 0x02
418 //#define PPCF_NODIRECTORIES 0x10 move to shlobj
419 #define PPCF_DONTRESOLVE 0x20
420 #define PPCF_PATHISRELATIVE 0x40
422 HRESULT WINAPI
PathProcessCommandAW(LPCVOID lpszPath
, LPVOID lpszBuff
,
423 DWORD dwBuffSize
, DWORD dwFlags
);
425 void WINAPI
PathStripPathAW(LPVOID lpszPath
);
427 BOOL WINAPI
PathStripToRootAW(LPVOID lpszPath
);
429 void WINAPI
PathRemoveArgsAW(LPVOID lpszPath
);
431 void WINAPI
PathRemoveExtensionAW(LPVOID lpszPath
);
433 int WINAPI
PathParseIconLocationAW(LPVOID lpszPath
);
435 BOOL WINAPI
PathIsSameRootAW(LPCVOID lpszPath1
, LPCVOID lpszPath2
);
437 BOOL WINAPI
PathFindOnPathAW(LPVOID sFile
, LPCVOID
*sOtherDirs
);
439 /****************************************************************************
440 * Shell Namespace Routines
443 /* Generic structure used by several messages */
450 } SFVCBINFO
, * LPSFVCBINFO
;
451 typedef const SFVCBINFO
* LPCSFVCBINFO
;
453 /* SFVCB_SELECTIONCHANGED structure */
460 } SFVSELECTSTATE
, * LPSFVSELECTSTATE
;
461 typedef const SFVSELECTSTATE
* LPCSFVSELECTSTATE
;
463 /* SFVCB_COPYHOOKCALLBACK structure */
473 } SFVCOPYHOOKINFO
, * LPSFVCOPYHOOKINFO
;
474 typedef const SFVCOPYHOOKINFO
* LPCSFVCOPYHOOKINFO
;
476 /* SFVCB_GETDETAILSOF structure */
483 } SFVCOLUMNINFO
, * LPSFVCOLUMNINFO
;
485 /****************************************************************************
489 /* SHWaitForFileToOpen flags */
490 #define SHWFF_ADD 0x01
491 #define SHWFF_REMOVE 0x02
492 #define SHWFF_WAIT 0x04
494 BOOL WINAPI
SHWaitForFileToOpen(
499 WORD WINAPI
ArrangeWindows(
504 CONST HWND
* lpKids
);
506 /* RegisterShellHook types */
507 #define RSH_DEREGISTER 0
508 #define RSH_REGISTER 1
509 #define RSH_REGISTER_PROGMAN 2
510 #define RSH_REGISTER_TASKMAN 3
512 BOOL WINAPI
RegisterShellHook(
516 /* SHCreateDefClassObject callback function */
517 typedef HRESULT (CALLBACK
*LPFNCDCOCALLBACK
)(
522 HRESULT WINAPI
SHCreateDefClassObject(
525 LPFNCDCOCALLBACK lpfnCallback
,
529 void WINAPI
SHFreeUnusedLibraries(void);
531 /* SHCreateLinks flags */
532 #define SHCLF_PREFIXNAME 0x01
533 #define SHCLF_CREATEONDESKTOP 0x02
535 HRESULT WINAPI
SHCreateLinks(
538 LPDATAOBJECT lpDataObject
,
540 LPITEMIDLIST
*lppidlLinks
);
542 DWORD WINAPI
CheckEscapesA(LPSTR string
, DWORD len
);
543 DWORD WINAPI
CheckEscapesW(LPWSTR string
, DWORD len
);
545 /* policy functions */
546 BOOL WINAPI
SHInitRestricted(LPCVOID unused
, LPCVOID inpRegKey
);
548 /* Shell Desktop functions */
550 #define WM_GETISHELLBROWSER (WM_USER+7)
552 BOOL WINAPI
SHDesktopMessageLoop(HANDLE
);
554 #define CSIDL_FOLDER_MASK 0x00ff
558 #endif /* defined(__cplusplus) */
560 #endif /* __WINE_UNDOCSHELL_H */