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 SHILCreateFromPathA (
63 HRESULT WINAPI SHILCreateFromPathW (
71 BOOL WINAPI StrRetToStrNA(LPSTR,DWORD,LPSTRRET,const ITEMIDLIST*);
72 BOOL WINAPI StrRetToStrNW(LPWSTR,DWORD,LPSTRRET,const ITEMIDLIST*);
75 /****************************************************************************
76 * SHChangeNotifyRegister API
78 #define SHCNRF_InterruptLevel 0x0001
79 #define SHCNRF_ShellLevel 0x0002
80 #define SHCNRF_RecursiveInterrupt 0x1000 /* Must be combined with SHCNRF_InterruptLevel */
81 #define SHCNRF_NewDelivery 0x8000 /* Messages use shared memory */
83 /****************************************************************************
84 * Shell Common Dialogs
87 BOOL WINAPI PickIconDlg(
91 LPDWORD lpdwIconIndex);
93 /* RunFileDlg flags */
94 #define RFF_NOBROWSE 0x01
95 #define RFF_NODEFAULT 0x02
96 #define RFF_CALCDIRECTORY 0x04
97 #define RFF_NOLABEL 0x08
98 #define RFF_NOSEPARATEMEM 0x20 /* NT only */
100 /* RunFileFlg notification structure */
107 } NM_RUNFILEDLG, * LPNM_RUNFILEDLG;
109 /* RunFileDlg notification return values */
111 #define RF_CANCEL 0x01
112 #define RF_RETRY 0x02
114 void WINAPI RunFileDlg(
117 LPCSTR lpstrDirectory,
119 LPCSTR lpstrDescription,
122 void WINAPI ExitWindowsDialog(HWND hwndOwner);
124 BOOL WINAPI SHFindComputer(
125 LPCITEMIDLIST pidlRoot,
126 LPCITEMIDLIST pidlSavedSearch);
128 void WINAPI SHHandleDiskFull(HWND hwndOwner,
131 int WINAPI SHOutOfMemoryMessageBox(
136 DWORD WINAPI SHNetConnectionDialog(
138 LPCSTR lpstrRemoteName,
141 /****************************************************************************
145 /* The Platform SDK's shlobj.h header defines similar functions with a
146 * leading underscore. However those are unusable because of the leading
147 * underscore, because they have an incorrect calling convention, and
148 * because these functions are not exported by name anyway.
150 HANDLE WINAPI SHAllocShared(
155 BOOL WINAPI SHFreeShared(
159 LPVOID WINAPI SHLockShared(
163 BOOL WINAPI SHUnlockShared(LPVOID pv);
165 /****************************************************************************
166 * Cabinet Window Messages
169 #define CWM_SETPATH (WM_USER + 2)
170 #define CWM_WANTIDLE (WM_USER + 3)
171 #define CWM_GETSETCURRENTINFO (WM_USER + 4)
172 #define CWM_SELECTITEM (WM_USER + 5)
173 #define CWM_SELECTITEMSTR (WM_USER + 6)
174 #define CWM_GETISHELLBROWSER (WM_USER + 7)
175 #define CWM_TESTPATH (WM_USER + 9)
176 #define CWM_STATECHANGE (WM_USER + 10)
177 #define CWM_GETPATH (WM_USER + 12)
179 /* CWM_TESTPATH types */
180 #define CWTP_ISEQUAL 0
181 #define CWTP_ISCHILD 1
183 /* CWM_TESTPATH structure */
188 } CWTESTPATHSTRUCT,* LPCWTESTPATHSTRUCT;
190 /****************************************************************************
191 * System Imagelist Routines
194 int WINAPI Shell_GetCachedImageIndex(
199 BOOL WINAPI Shell_GetImageLists(
200 HIMAGELIST *lphimlLarge,
201 HIMAGELIST *lphimlSmall);
203 HICON WINAPI SHGetFileIcon(
206 DWORD dwFileAttributes,
209 BOOL WINAPI FileIconInit(BOOL bFullInit);
211 /****************************************************************************
214 /* FileMenu_Create nSelHeight constants */
215 #define FM_DEFAULT_SELHEIGHT -1
216 #define FM_FULL_SELHEIGHT 0
218 /* FileMenu_Create flags */
219 #define FMF_SMALL_ICONS 0x00
220 #define FMF_LARGE_ICONS 0x08
221 #define FMF_NO_COLUMN_BREAK 0x10
223 HMENU WINAPI FileMenu_Create(
224 COLORREF crBorderColor,
230 void WINAPI FileMenu_Destroy(HMENU hMenu);
232 /* FileMenu_AppendItem constants */
233 #define FM_SEPARATOR (LPCSTR)1
234 #define FM_BLANK_ICON -1
235 #define FM_DEFAULT_HEIGHT 0
237 BOOL WINAPI FileMenu_AppendItem(
245 /* FileMenu_InsertUsingPidl flags */
246 #define FMF_NO_EMPTY_ITEM 0x01
247 #define FMF_NO_PROGRAM_GROUPS 0x04
249 /* FileMenu_InsertUsingPidl callback function */
250 typedef void (CALLBACK *LPFNFMCALLBACK)(LPCITEMIDLIST pidlFolder, LPCITEMIDLIST pidlFile);
252 int WINAPI FileMenu_InsertUsingPidl(
258 LPFNFMCALLBACK lpfnCallback);
260 int WINAPI FileMenu_ReplaceUsingPidl(
265 LPFNFMCALLBACK lpfnCallback);
267 void WINAPI FileMenu_Invalidate(HMENU hMenu);
269 HMENU WINAPI FileMenu_FindSubMenuByPidl(
273 BOOL WINAPI FileMenu_TrackPopupMenuEx(
281 BOOL WINAPI FileMenu_GetLastSelectedItemPidls(
283 LPCITEMIDLIST *ppidlFolder,
284 LPCITEMIDLIST *ppidlItem);
286 LRESULT WINAPI FileMenu_MeasureItem(
288 LPMEASUREITEMSTRUCT lpmis);
290 LRESULT WINAPI FileMenu_DrawItem(
292 LPDRAWITEMSTRUCT lpdis);
294 BOOL WINAPI FileMenu_InitMenuPopup(HMENU hMenu);
296 void WINAPI FileMenu_AbortInitMenu(void);
298 LRESULT WINAPI FileMenu_HandleMenuChar(
302 BOOL WINAPI FileMenu_DeleteAllItems(HMENU hMenu);
304 BOOL WINAPI FileMenu_DeleteItemByCmd(
308 BOOL WINAPI FileMenu_DeleteItemByIndex(
312 BOOL WINAPI FileMenu_DeleteMenuItemByFirstID(
316 BOOL WINAPI FileMenu_DeleteSeparator(HMENU hMenu);
318 BOOL WINAPI FileMenu_EnableItemByCmd(
323 DWORD WINAPI FileMenu_GetItemExtent(
327 int WINAPI FileMenu_AppendFilesForPidl(
332 int WINAPI FileMenu_AddFilesForPidl(
339 LPFNFMCALLBACK lpfnCallback);
341 /****************************************************************************
342 * Drag And Drop Routines
345 HRESULT WINAPI SHRegisterDragDrop(
347 LPDROPTARGET lpDropTarget);
349 HRESULT WINAPI SHRevokeDragDrop(HWND hWnd);
351 BOOL WINAPI DAD_DragEnter(HWND hWnd);
353 BOOL WINAPI DAD_SetDragImageFromListView(
357 BOOL WINAPI DAD_ShowDragImage(BOOL bShow);
359 HRESULT WINAPI CIDLData_CreateFromIDArray(
360 LPCITEMIDLIST pidlFolder,
362 LPCITEMIDLIST *lppidlFiles,
363 LPDATAOBJECT *ppdataObject);
365 /****************************************************************************
366 * Path Manipulation Routines
369 BOOL WINAPI PathAppendAW(LPVOID lpszPath1, LPCVOID lpszPath2);
371 LPVOID WINAPI PathCombineAW(LPVOID szDest, LPCVOID lpszDir, LPCVOID lpszFile);
373 LPVOID WINAPI PathAddBackslashAW(LPVOID path);
375 LPVOID WINAPI PathBuildRootAW(LPVOID lpszPath, int drive);
377 LPVOID WINAPI PathFindExtensionAW(LPCVOID path);
379 LPVOID WINAPI PathFindFileNameAW(LPCVOID path);
381 LPVOID WINAPI PathGetExtensionAW(LPCVOID lpszPath, DWORD void1, DWORD void2);
383 LPVOID WINAPI PathGetArgsAW(LPVOID lpszPath);
385 BOOL WINAPI PathRemoveFileSpecAW(LPVOID lpszPath);
387 void WINAPI PathRemoveBlanksAW(LPVOID lpszPath);
389 VOID WINAPI PathQuoteSpacesAW(LPVOID path);
391 void WINAPI PathUnquoteSpacesAW(LPVOID lpszPath);
393 BOOL WINAPI PathIsUNCAW(LPCVOID lpszPath);
395 BOOL WINAPI PathIsRelativeAW(LPCVOID lpszPath);
397 BOOL WINAPI PathIsRootAW(LPCVOID x);
399 BOOL WINAPI PathIsExeAW(LPCVOID lpszPath);
401 BOOL WINAPI PathIsDirectoryAW(LPCVOID lpszPath);
403 BOOL WINAPI PathFileExistsAW(LPCVOID lpszPath);
405 BOOL WINAPI PathMatchSpecAW(LPVOID lpszPath, LPVOID lpszSpec);
407 BOOL WINAPI PathMakeUniqueNameAW(
410 LPCVOID lpszShortName,
411 LPCVOID lpszLongName,
412 LPCVOID lpszPathName);
415 BOOL WINAPI PathQualifyA(LPCSTR path);
416 BOOL WINAPI PathQualifyW(LPCWSTR path);
417 #define PathQualify WINELIB_NAME_AW(PathQualify)
418 BOOL WINAPI PathQualifyAW(LPCVOID path);
421 BOOL WINAPI PathResolveAW(LPVOID lpszPath, LPCVOID *alpszPaths, DWORD dwFlags);
423 VOID WINAPI PathSetDlgItemPathAW(HWND hDlg, int nIDDlgItem, LPCVOID lpszPath);
425 HRESULT WINAPI PathProcessCommandAW(LPCVOID lpszPath, LPVOID lpszBuff,
426 DWORD dwBuffSize, DWORD dwFlags);
428 void WINAPI PathStripPathAW(LPVOID lpszPath);
430 BOOL WINAPI PathStripToRootAW(LPVOID lpszPath);
432 void WINAPI PathRemoveArgsAW(LPVOID lpszPath);
434 void WINAPI PathRemoveExtensionAW(LPVOID lpszPath);
436 int WINAPI PathParseIconLocationAW(LPVOID lpszPath);
438 BOOL WINAPI PathIsSameRootAW(LPCVOID lpszPath1, LPCVOID lpszPath2);
440 BOOL WINAPI PathFindOnPathAW(LPVOID sFile, LPCVOID *sOtherDirs);
442 /****************************************************************************
443 * Shell Namespace Routines
446 /* Generic structure used by several messages */
453 } SFVCBINFO, * LPSFVCBINFO;
454 typedef const SFVCBINFO * LPCSFVCBINFO;
456 /* SFVCB_SELECTIONCHANGED structure */
463 } SFVSELECTSTATE, * LPSFVSELECTSTATE;
464 typedef const SFVSELECTSTATE * LPCSFVSELECTSTATE;
466 /* SFVCB_COPYHOOKCALLBACK structure */
476 } SFVCOPYHOOKINFO, * LPSFVCOPYHOOKINFO;
477 typedef const SFVCOPYHOOKINFO * LPCSFVCOPYHOOKINFO;
479 /* SFVCB_GETDETAILSOF structure */
486 } SFVCOLUMNINFO, * LPSFVCOLUMNINFO;
488 /****************************************************************************
492 /* SHWaitForFileToOpen flags */
493 #define SHWFF_ADD 0x01
494 #define SHWFF_REMOVE 0x02
495 #define SHWFF_WAIT 0x04
497 BOOL WINAPI SHWaitForFileToOpen(
502 WORD WINAPI ArrangeWindows(
507 CONST HWND * lpKids);
509 /* RegisterShellHook types */
510 #define RSH_DEREGISTER 0
511 #define RSH_REGISTER 1
512 #define RSH_REGISTER_PROGMAN 2
513 #define RSH_REGISTER_TASKMAN 3
515 BOOL WINAPI RegisterShellHook(
519 /* SHCreateDefClassObject callback function */
520 typedef HRESULT (CALLBACK *LPFNCDCOCALLBACK)(
525 HRESULT WINAPI SHCreateDefClassObject(
528 LPFNCDCOCALLBACK lpfnCallback,
532 void WINAPI SHFreeUnusedLibraries(void);
534 /* SHCreateLinks flags */
535 #define SHCLF_PREFIXNAME 0x01
536 #define SHCLF_CREATEONDESKTOP 0x02
538 HRESULT WINAPI SHCreateLinks(
541 LPDATAOBJECT lpDataObject,
543 LPITEMIDLIST *lppidlLinks);
545 DWORD WINAPI CheckEscapesA(LPSTR string, DWORD len);
546 DWORD WINAPI CheckEscapesW(LPWSTR string, DWORD len);
548 /* policy functions */
549 BOOL WINAPI SHInitRestricted(LPCVOID unused, LPCVOID inpRegKey);
553 #endif /* defined(__cplusplus) */
555 #endif /* __WINE_UNDOCSHELL_H */