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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 WINAPI SHSimpleIDListFromPathA (LPCSTR lpszPath);
56 LPITEMIDLIST WINAPI SHSimpleIDListFromPathW (LPCWSTR lpszPath);
58 HRESULT WINAPI SHILCreateFromPathA (
63 HRESULT WINAPI SHILCreateFromPathW (
68 LPITEMIDLIST WINAPI ILCreateFromPathA(LPCSTR path);
69 LPITEMIDLIST WINAPI ILCreateFromPathW(LPCWSTR path);
74 BOOL WINAPI StrRetToStrNA(LPSTR,DWORD,LPSTRRET,const ITEMIDLIST*);
75 BOOL WINAPI StrRetToStrNW(LPWSTR,DWORD,LPSTRRET,const ITEMIDLIST*);
78 /****************************************************************************
79 * SHChangeNotifyRegister API
81 #define SHCNRF_InterruptLevel 0x0001
82 #define SHCNRF_ShellLevel 0x0002
83 #define SHCNRF_RecursiveInterrupt 0x1000 /* Must be combined with SHCNRF_InterruptLevel */
84 #define SHCNRF_NewDelivery 0x8000 /* Messages use shared memory */
86 /****************************************************************************
87 * Shell Common Dialogs
90 BOOL WINAPI PickIconDlg(
94 LPDWORD lpdwIconIndex);
96 /* RunFileDlg flags */
97 #define RFF_NOBROWSE 0x01
98 #define RFF_NODEFAULT 0x02
99 #define RFF_CALCDIRECTORY 0x04
100 #define RFF_NOLABEL 0x08
101 #define RFF_NOSEPARATEMEM 0x20 /* NT only */
103 /* RunFileFlg notification structure */
110 } NM_RUNFILEDLG, * LPNM_RUNFILEDLG;
112 /* RunFileDlg notification return values */
114 #define RF_CANCEL 0x01
115 #define RF_RETRY 0x02
117 void WINAPI RunFileDlg(
120 LPCSTR lpstrDirectory,
122 LPCSTR lpstrDescription,
125 void WINAPI ExitWindowsDialog(HWND hwndOwner);
127 BOOL WINAPI GetFileNameFromBrowse(
131 LPCSTR lpstrInitialDir,
136 BOOL WINAPI SHFindComputer(
137 LPCITEMIDLIST pidlRoot,
138 LPCITEMIDLIST pidlSavedSearch);
140 void WINAPI SHHandleDiskFull(HWND hwndOwner,
143 int WINAPI SHOutOfMemoryMessageBox(
148 DWORD WINAPI SHNetConnectionDialog(
150 LPCSTR lpstrRemoteName,
153 /****************************************************************************
157 /* The Platform SDK's shlobj.h header defines similar functions with a
158 * leading underscore. However those are unusable because of the leading
159 * underscore, because they have an incorrect calling convention, and
160 * because these functions are not exported by name anyway.
162 HANDLE WINAPI SHAllocShared(
167 BOOL WINAPI SHFreeShared(
171 LPVOID WINAPI SHLockShared(
175 BOOL WINAPI SHUnlockShared(LPVOID pv);
177 /****************************************************************************
178 * Cabinet Window Messages
181 #define CWM_SETPATH (WM_USER + 2)
182 #define CWM_WANTIDLE (WM_USER + 3)
183 #define CWM_GETSETCURRENTINFO (WM_USER + 4)
184 #define CWM_SELECTITEM (WM_USER + 5)
185 #define CWM_SELECTITEMSTR (WM_USER + 6)
186 #define CWM_GETISHELLBROWSER (WM_USER + 7)
187 #define CWM_TESTPATH (WM_USER + 9)
188 #define CWM_STATECHANGE (WM_USER + 10)
189 #define CWM_GETPATH (WM_USER + 12)
191 /* CWM_TESTPATH types */
192 #define CWTP_ISEQUAL 0
193 #define CWTP_ISCHILD 1
195 /* CWM_TESTPATH structure */
200 } CWTESTPATHSTRUCT,* LPCWTESTPATHSTRUCT;
202 /****************************************************************************
203 * System Imagelist Routines
206 int WINAPI Shell_GetCachedImageIndex(
211 BOOL WINAPI Shell_GetImageLists(
212 HIMAGELIST *lphimlLarge,
213 HIMAGELIST *lphimlSmall);
215 HICON WINAPI SHGetFileIcon(
218 DWORD dwFileAttributes,
221 BOOL WINAPI FileIconInit(BOOL bFullInit);
223 /****************************************************************************
226 /* FileMenu_Create nSelHeight constants */
227 #define FM_DEFAULT_SELHEIGHT -1
228 #define FM_FULL_SELHEIGHT 0
230 /* FileMenu_Create flags */
231 #define FMF_SMALL_ICONS 0x00
232 #define FMF_LARGE_ICONS 0x08
233 #define FMF_NO_COLUMN_BREAK 0x10
235 HMENU WINAPI FileMenu_Create(
236 COLORREF crBorderColor,
242 void WINAPI FileMenu_Destroy(HMENU hMenu);
244 /* FileMenu_AppendItem constants */
245 #define FM_SEPARATOR (LPCSTR)1
246 #define FM_BLANK_ICON -1
247 #define FM_DEFAULT_HEIGHT 0
249 BOOL WINAPI FileMenu_AppendItem(
257 /* FileMenu_InsertUsingPidl flags */
258 #define FMF_NO_EMPTY_ITEM 0x01
259 #define FMF_NO_PROGRAM_GROUPS 0x04
261 /* FileMenu_InsertUsingPidl callback function */
262 typedef void (CALLBACK *LPFNFMCALLBACK)(LPCITEMIDLIST pidlFolder, LPCITEMIDLIST pidlFile);
264 int WINAPI FileMenu_InsertUsingPidl(
270 LPFNFMCALLBACK lpfnCallback);
272 int WINAPI FileMenu_ReplaceUsingPidl(
277 LPFNFMCALLBACK lpfnCallback);
279 void WINAPI FileMenu_Invalidate(HMENU hMenu);
281 HMENU WINAPI FileMenu_FindSubMenuByPidl(
285 BOOL WINAPI FileMenu_TrackPopupMenuEx(
293 BOOL WINAPI FileMenu_GetLastSelectedItemPidls(
295 LPCITEMIDLIST *ppidlFolder,
296 LPCITEMIDLIST *ppidlItem);
298 LRESULT WINAPI FileMenu_MeasureItem(
300 LPMEASUREITEMSTRUCT lpmis);
302 LRESULT WINAPI FileMenu_DrawItem(
304 LPDRAWITEMSTRUCT lpdis);
306 BOOL WINAPI FileMenu_InitMenuPopup(HMENU hMenu);
308 void WINAPI FileMenu_AbortInitMenu(void);
310 LRESULT WINAPI FileMenu_HandleMenuChar(
314 BOOL WINAPI FileMenu_DeleteAllItems(HMENU hMenu);
316 BOOL WINAPI FileMenu_DeleteItemByCmd(
320 BOOL WINAPI FileMenu_DeleteItemByIndex(
324 BOOL WINAPI FileMenu_DeleteMenuItemByFirstID(
328 BOOL WINAPI FileMenu_DeleteSeparator(HMENU hMenu);
330 BOOL WINAPI FileMenu_EnableItemByCmd(
335 DWORD WINAPI FileMenu_GetItemExtent(
339 int WINAPI FileMenu_AppendFilesForPidl(
344 int WINAPI FileMenu_AddFilesForPidl(
351 LPFNFMCALLBACK lpfnCallback);
353 /****************************************************************************
354 * Drag And Drop Routines
357 HRESULT WINAPI SHRegisterDragDrop(
359 LPDROPTARGET lpDropTarget);
361 HRESULT WINAPI SHRevokeDragDrop(HWND hWnd);
363 BOOL WINAPI DAD_DragEnter(HWND hWnd);
365 BOOL WINAPI DAD_SetDragImageFromListView(
369 BOOL WINAPI DAD_ShowDragImage(BOOL bShow);
371 HRESULT WINAPI CIDLData_CreateFromIDArray(
372 LPCITEMIDLIST pidlFolder,
374 LPCITEMIDLIST *lppidlFiles,
375 LPDATAOBJECT *ppdataObject);
377 /****************************************************************************
378 * Path Manipulation Routines
381 BOOL WINAPI PathAppendAW(LPVOID lpszPath1, LPCVOID lpszPath2);
383 LPVOID WINAPI PathCombineAW(LPVOID szDest, LPCVOID lpszDir, LPCVOID lpszFile);
385 LPVOID WINAPI PathAddBackslashAW(LPVOID path);
387 LPVOID WINAPI PathBuildRootAW(LPVOID lpszPath, int drive);
389 LPVOID WINAPI PathFindExtensionAW(LPCVOID path);
391 LPVOID WINAPI PathFindFileNameAW(LPCVOID path);
393 LPVOID WINAPI PathGetExtensionAW(LPCVOID lpszPath, DWORD void1, DWORD void2);
395 LPVOID WINAPI PathGetArgsAW(LPVOID lpszPath);
397 BOOL WINAPI PathRemoveFileSpecAW(LPVOID lpszPath);
399 void WINAPI PathRemoveBlanksAW(LPVOID lpszPath);
401 VOID WINAPI PathQuoteSpacesAW(LPVOID path);
403 void WINAPI PathUnquoteSpacesAW(LPVOID lpszPath);
405 BOOL WINAPI PathIsUNCAW(LPCVOID lpszPath);
407 BOOL WINAPI PathIsRelativeAW(LPCVOID lpszPath);
409 BOOL WINAPI PathIsRootAW(LPCVOID x);
411 BOOL WINAPI PathIsExeAW(LPCVOID lpszPath);
413 BOOL WINAPI PathIsDirectoryAW(LPCVOID lpszPath);
415 BOOL WINAPI PathFileExistsAW(LPCVOID lpszPath);
417 BOOL WINAPI PathMatchSpecAW(LPVOID lpszPath, LPVOID lpszSpec);
419 BOOL WINAPI PathMakeUniqueNameAW(
422 LPCVOID lpszShortName,
423 LPCVOID lpszLongName,
424 LPCVOID lpszPathName);
426 BOOL WINAPI PathYetAnotherMakeUniqueName(
428 LPCWSTR lpszPathName,
429 LPCWSTR lpszShortName,
430 LPCWSTR lpszLongName);
432 BOOL WINAPI PathQualifyA(LPCSTR path);
433 BOOL WINAPI PathQualifyW(LPCWSTR path);
434 #define PathQualify WINELIB_NAME_AW(PathQualify)
435 BOOL WINAPI PathQualifyAW(LPCVOID path);
438 /* PathResolve flags */
439 #define PRF_CHECKEXISTANCE 0x01
440 #define PRF_EXECUTABLE 0x02
441 #define PRF_QUALIFYONPATH 0x04
442 #define PRF_WINDOWS31 0x08
444 BOOL WINAPI PathResolveAW(LPVOID lpszPath, LPCVOID *alpszPaths, DWORD dwFlags);
446 VOID WINAPI PathSetDlgItemPathAW(HWND hDlg, int nIDDlgItem, LPCVOID lpszPath);
448 /* PathProcessCommand flags */
449 #define PPCF_QUOTEPATH 0x01 /* implies PPCF_INCLUDEARGS */
450 #define PPCF_INCLUDEARGS 0x02
451 #define PPCF_NODIRECTORIES 0x10
452 #define PPCF_DONTRESOLVE 0x20
453 #define PPCF_PATHISRELATIVE 0x40
455 HRESULT WINAPI PathProcessCommandAW(LPCVOID lpszPath, LPVOID lpszBuff,
456 DWORD dwBuffSize, DWORD dwFlags);
458 void WINAPI PathStripPathAW(LPVOID lpszPath);
460 BOOL WINAPI PathStripToRootAW(LPVOID lpszPath);
462 void WINAPI PathRemoveArgsAW(LPVOID lpszPath);
464 void WINAPI PathRemoveExtensionAW(LPVOID lpszPath);
466 int WINAPI PathParseIconLocationAW(LPVOID lpszPath);
468 BOOL WINAPI PathIsSameRootAW(LPCVOID lpszPath1, LPCVOID lpszPath2);
470 BOOL WINAPI PathFindOnPathAW(LPVOID sFile, LPCVOID sOtherDirs);
472 /****************************************************************************
473 * Shell Namespace Routines
476 /* Generic structure used by several messages */
483 } SFVCBINFO, * LPSFVCBINFO;
484 typedef const SFVCBINFO * LPCSFVCBINFO;
486 /* SFVCB_SELECTIONCHANGED structure */
493 } SFVSELECTSTATE, * LPSFVSELECTSTATE;
494 typedef const SFVSELECTSTATE * LPCSFVSELECTSTATE;
496 /* SFVCB_COPYHOOKCALLBACK structure */
506 } SFVCOPYHOOKINFO, * LPSFVCOPYHOOKINFO;
507 typedef const SFVCOPYHOOKINFO * LPCSFVCOPYHOOKINFO;
509 /* SFVCB_GETDETAILSOF structure */
516 } SFVCOLUMNINFO, * LPSFVCOLUMNINFO;
518 /****************************************************************************
522 /* SHWaitForFileToOpen flags */
523 #define SHWFF_ADD 0x01
524 #define SHWFF_REMOVE 0x02
525 #define SHWFF_WAIT 0x04
527 BOOL WINAPI SHWaitForFileToOpen(
532 WORD WINAPI ArrangeWindows(
537 CONST HWND * lpKids);
539 /* RegisterShellHook types */
540 #define RSH_DEREGISTER 0
541 #define RSH_REGISTER 1
542 #define RSH_REGISTER_PROGMAN 2
543 #define RSH_REGISTER_TASKMAN 3
545 BOOL WINAPI RegisterShellHook(
549 /* SHCreateDefClassObject callback function */
550 typedef HRESULT (CALLBACK *LPFNCDCOCALLBACK)(
555 HRESULT WINAPI SHCreateDefClassObject(
558 LPFNCDCOCALLBACK lpfnCallback,
562 void WINAPI SHFreeUnusedLibraries(void);
564 /* SHCreateLinks flags */
565 #define SHCLF_PREFIXNAME 0x01
566 #define SHCLF_CREATEONDESKTOP 0x02
568 HRESULT WINAPI SHCreateLinks(
571 LPDATAOBJECT lpDataObject,
573 LPITEMIDLIST *lppidlLinks);
575 DWORD WINAPI CheckEscapesA(LPSTR string, DWORD len);
576 DWORD WINAPI CheckEscapesW(LPWSTR string, DWORD len);
578 /* policy functions */
579 BOOL WINAPI SHInitRestricted(LPCVOID unused, LPCVOID inpRegKey);
583 #endif /* defined(__cplusplus) */
585 #endif /* __WINE_UNDOCSHELL_H */