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 WINAPI SHSimpleIDListFromPathA (LPCSTR lpszPath);
56 LPITEMIDLIST WINAPI SHSimpleIDListFromPathW (LPCWSTR lpszPath);
58 HRESULT WINAPI 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 BOOL WINAPI Shell_GetImageLists(
195 HIMAGELIST *lphimlLarge,
196 HIMAGELIST *lphimlSmall);
198 HICON WINAPI SHGetFileIcon(
201 DWORD dwFileAttributes,
204 BOOL WINAPI FileIconInit(BOOL bFullInit);
206 /****************************************************************************
209 /* FileMenu_Create nSelHeight constants */
210 #define FM_DEFAULT_SELHEIGHT -1
211 #define FM_FULL_SELHEIGHT 0
213 /* FileMenu_Create flags */
214 #define FMF_SMALL_ICONS 0x00
215 #define FMF_LARGE_ICONS 0x08
216 #define FMF_NO_COLUMN_BREAK 0x10
218 HMENU WINAPI FileMenu_Create(
219 COLORREF crBorderColor,
225 void WINAPI FileMenu_Destroy(HMENU hMenu);
227 /* FileMenu_AppendItem constants */
228 #define FM_SEPARATOR (LPCSTR)1
229 #define FM_BLANK_ICON -1
230 #define FM_DEFAULT_HEIGHT 0
232 BOOL WINAPI FileMenu_AppendItem(
240 /* FileMenu_InsertUsingPidl flags */
241 #define FMF_NO_EMPTY_ITEM 0x01
242 #define FMF_NO_PROGRAM_GROUPS 0x04
244 /* FileMenu_InsertUsingPidl callback function */
245 typedef void (CALLBACK *LPFNFMCALLBACK)(LPCITEMIDLIST pidlFolder, LPCITEMIDLIST pidlFile);
247 int WINAPI FileMenu_InsertUsingPidl(
253 LPFNFMCALLBACK lpfnCallback);
255 int WINAPI FileMenu_ReplaceUsingPidl(
260 LPFNFMCALLBACK lpfnCallback);
262 void WINAPI FileMenu_Invalidate(HMENU hMenu);
264 HMENU WINAPI FileMenu_FindSubMenuByPidl(
268 BOOL WINAPI FileMenu_TrackPopupMenuEx(
276 BOOL WINAPI FileMenu_GetLastSelectedItemPidls(
278 LPCITEMIDLIST *ppidlFolder,
279 LPCITEMIDLIST *ppidlItem);
281 LRESULT WINAPI FileMenu_MeasureItem(
283 LPMEASUREITEMSTRUCT lpmis);
285 LRESULT WINAPI FileMenu_DrawItem(
287 LPDRAWITEMSTRUCT lpdis);
289 BOOL WINAPI FileMenu_InitMenuPopup(HMENU hMenu);
291 void WINAPI FileMenu_AbortInitMenu(void);
293 LRESULT WINAPI FileMenu_HandleMenuChar(
297 BOOL WINAPI FileMenu_DeleteAllItems(HMENU hMenu);
299 BOOL WINAPI FileMenu_DeleteItemByCmd(
303 BOOL WINAPI FileMenu_DeleteItemByIndex(
307 BOOL WINAPI FileMenu_DeleteMenuItemByFirstID(
311 BOOL WINAPI FileMenu_DeleteSeparator(HMENU hMenu);
313 BOOL WINAPI FileMenu_EnableItemByCmd(
318 DWORD WINAPI FileMenu_GetItemExtent(
322 int WINAPI FileMenu_AppendFilesForPidl(
327 int WINAPI FileMenu_AddFilesForPidl(
334 LPFNFMCALLBACK lpfnCallback);
336 /****************************************************************************
337 * Drag And Drop Routines
340 HRESULT WINAPI SHRegisterDragDrop(
342 LPDROPTARGET lpDropTarget);
344 HRESULT WINAPI SHRevokeDragDrop(HWND hWnd);
346 BOOL WINAPI DAD_DragEnter(HWND hWnd);
348 BOOL WINAPI DAD_SetDragImageFromListView(
352 BOOL WINAPI DAD_ShowDragImage(BOOL bShow);
354 HRESULT WINAPI CIDLData_CreateFromIDArray(
355 LPCITEMIDLIST pidlFolder,
357 LPCITEMIDLIST *lppidlFiles,
358 LPDATAOBJECT *ppdataObject);
360 /****************************************************************************
361 * Path Manipulation Routines
364 BOOL WINAPI PathAppendAW(LPVOID lpszPath1, LPCVOID lpszPath2);
366 LPVOID WINAPI PathCombineAW(LPVOID szDest, LPCVOID lpszDir, LPCVOID lpszFile);
368 LPVOID WINAPI PathAddBackslashAW(LPVOID path);
370 LPVOID WINAPI PathBuildRootAW(LPVOID lpszPath, int drive);
372 LPVOID WINAPI PathFindExtensionAW(LPCVOID path);
374 LPVOID WINAPI PathFindFileNameAW(LPCVOID path);
376 LPVOID WINAPI PathGetExtensionAW(LPCVOID lpszPath, DWORD void1, DWORD void2);
378 LPVOID WINAPI PathGetArgsAW(LPVOID lpszPath);
380 BOOL WINAPI PathRemoveFileSpecAW(LPVOID lpszPath);
382 void WINAPI PathRemoveBlanksAW(LPVOID lpszPath);
384 VOID WINAPI PathQuoteSpacesAW(LPVOID path);
386 void WINAPI PathUnquoteSpacesAW(LPVOID lpszPath);
388 BOOL WINAPI PathIsUNCAW(LPCVOID lpszPath);
390 BOOL WINAPI PathIsRelativeAW(LPCVOID lpszPath);
392 BOOL WINAPI PathIsRootAW(LPCVOID x);
394 BOOL WINAPI PathIsExeAW(LPCVOID lpszPath);
396 BOOL WINAPI PathIsDirectoryAW(LPCVOID lpszPath);
398 BOOL WINAPI PathFileExistsAW(LPCVOID lpszPath);
400 BOOL WINAPI PathMatchSpecAW(LPVOID lpszPath, LPVOID lpszSpec);
402 BOOL WINAPI PathMakeUniqueNameAW(
405 LPCVOID lpszShortName,
406 LPCVOID lpszLongName,
407 LPCVOID lpszPathName);
410 BOOL WINAPI PathQualifyAW(LPCVOID path);
412 BOOL WINAPI PathResolveAW(LPVOID lpszPath, LPCVOID *alpszPaths, DWORD dwFlags);
414 VOID WINAPI PathSetDlgItemPathAW(HWND hDlg, int nIDDlgItem, LPCVOID lpszPath);
416 HRESULT WINAPI PathProcessCommandAW(LPCVOID lpszPath, LPVOID lpszBuff,
417 DWORD dwBuffSize, DWORD dwFlags);
419 void WINAPI PathStripPathAW(LPVOID lpszPath);
421 BOOL WINAPI PathStripToRootAW(LPVOID lpszPath);
423 void WINAPI PathRemoveArgsAW(LPVOID lpszPath);
425 void WINAPI PathRemoveExtensionAW(LPVOID lpszPath);
427 int WINAPI PathParseIconLocationAW(LPVOID lpszPath);
429 BOOL WINAPI PathIsSameRootAW(LPCVOID lpszPath1, LPCVOID lpszPath2);
431 BOOL WINAPI PathFindOnPathAW(LPVOID sFile, LPCVOID *sOtherDirs);
433 /****************************************************************************
434 * Shell Namespace Routines
437 /* Generic structure used by several messages */
444 } SFVCBINFO, * LPSFVCBINFO;
445 typedef const SFVCBINFO * LPCSFVCBINFO;
447 /* SFVCB_SELECTIONCHANGED structure */
454 } SFVSELECTSTATE, * LPSFVSELECTSTATE;
455 typedef const SFVSELECTSTATE * LPCSFVSELECTSTATE;
457 /* SFVCB_COPYHOOKCALLBACK structure */
467 } SFVCOPYHOOKINFO, * LPSFVCOPYHOOKINFO;
468 typedef const SFVCOPYHOOKINFO * LPCSFVCOPYHOOKINFO;
470 /* SFVCB_GETDETAILSOF structure */
477 } SFVCOLUMNINFO, * LPSFVCOLUMNINFO;
479 /****************************************************************************
483 /* SHWaitForFileToOpen flags */
484 #define SHWFF_ADD 0x01
485 #define SHWFF_REMOVE 0x02
486 #define SHWFF_WAIT 0x04
488 BOOL WINAPI SHWaitForFileToOpen(
493 WORD WINAPI ArrangeWindows(
498 CONST HWND * lpKids);
500 /* RegisterShellHook types */
501 #define RSH_DEREGISTER 0
502 #define RSH_REGISTER 1
503 #define RSH_REGISTER_PROGMAN 2
504 #define RSH_REGISTER_TASKMAN 3
506 BOOL WINAPI RegisterShellHook(
510 /* SHCreateDefClassObject callback function */
511 typedef HRESULT (CALLBACK *LPFNCDCOCALLBACK)(
516 HRESULT WINAPI SHCreateDefClassObject(
519 LPFNCDCOCALLBACK lpfnCallback,
523 void WINAPI SHFreeUnusedLibraries(void);
525 /* SHCreateLinks flags */
526 #define SHCLF_PREFIXNAME 0x01
527 #define SHCLF_CREATEONDESKTOP 0x02
529 HRESULT WINAPI SHCreateLinks(
532 LPDATAOBJECT lpDataObject,
534 LPITEMIDLIST *lppidlLinks);
536 DWORD WINAPI CheckEscapesA(LPSTR string, DWORD len);
537 DWORD WINAPI CheckEscapesW(LPWSTR string, DWORD len);
539 /* policy functions */
540 BOOL WINAPI SHInitRestricted(LPCVOID unused, LPCVOID inpRegKey);
544 #endif /* defined(__cplusplus) */
546 #endif /* __WINE_UNDOCSHELL_H */