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 (
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);
414 BOOL WINAPI PathYetAnotherMakeUniqueName(
416 LPCWSTR lpszPathName,
417 LPCWSTR lpszShortName,
418 LPCWSTR lpszLongName);
420 BOOL WINAPI PathQualifyA(LPCSTR path);
421 BOOL WINAPI PathQualifyW(LPCWSTR path);
422 #define PathQualify WINELIB_NAME_AW(PathQualify)
423 BOOL WINAPI PathQualifyAW(LPCVOID path);
426 /* PathResolve flags */
427 #define PRF_CHECKEXISTANCE 0x01
428 #define PRF_EXECUTABLE 0x02
429 #define PRF_QUALIFYONPATH 0x04
430 #define PRF_WINDOWS31 0x08
432 BOOL WINAPI PathResolveAW(LPVOID lpszPath, LPCVOID *alpszPaths, DWORD dwFlags);
434 VOID WINAPI PathSetDlgItemPathAW(HWND hDlg, int nIDDlgItem, LPCVOID lpszPath);
436 /* PathProcessCommand flags */
437 #define PPCF_QUOTEPATH 0x01 /* implies PPCF_INCLUDEARGS */
438 #define PPCF_INCLUDEARGS 0x02
439 #define PPCF_NODIRECTORIES 0x10
440 #define PPCF_DONTRESOLVE 0x20
441 #define PPCF_PATHISRELATIVE 0x40
443 HRESULT WINAPI PathProcessCommandAW(LPCVOID lpszPath, LPVOID lpszBuff,
444 DWORD dwBuffSize, DWORD dwFlags);
446 void WINAPI PathStripPathAW(LPVOID lpszPath);
448 BOOL WINAPI PathStripToRootAW(LPVOID lpszPath);
450 void WINAPI PathRemoveArgsAW(LPVOID lpszPath);
452 void WINAPI PathRemoveExtensionAW(LPVOID lpszPath);
454 int WINAPI PathParseIconLocationAW(LPVOID lpszPath);
456 BOOL WINAPI PathIsSameRootAW(LPCVOID lpszPath1, LPCVOID lpszPath2);
458 BOOL WINAPI PathFindOnPathAW(LPVOID sFile, LPCVOID sOtherDirs);
460 /****************************************************************************
461 * Shell Namespace Routines
464 /* Generic structure used by several messages */
471 } SFVCBINFO, * LPSFVCBINFO;
472 typedef const SFVCBINFO * LPCSFVCBINFO;
474 /* SFVCB_SELECTIONCHANGED structure */
481 } SFVSELECTSTATE, * LPSFVSELECTSTATE;
482 typedef const SFVSELECTSTATE * LPCSFVSELECTSTATE;
484 /* SFVCB_COPYHOOKCALLBACK structure */
494 } SFVCOPYHOOKINFO, * LPSFVCOPYHOOKINFO;
495 typedef const SFVCOPYHOOKINFO * LPCSFVCOPYHOOKINFO;
497 /* SFVCB_GETDETAILSOF structure */
504 } SFVCOLUMNINFO, * LPSFVCOLUMNINFO;
506 /****************************************************************************
510 /* SHWaitForFileToOpen flags */
511 #define SHWFF_ADD 0x01
512 #define SHWFF_REMOVE 0x02
513 #define SHWFF_WAIT 0x04
515 BOOL WINAPI SHWaitForFileToOpen(
520 WORD WINAPI ArrangeWindows(
525 CONST HWND * lpKids);
527 /* RegisterShellHook types */
528 #define RSH_DEREGISTER 0
529 #define RSH_REGISTER 1
530 #define RSH_REGISTER_PROGMAN 2
531 #define RSH_REGISTER_TASKMAN 3
533 BOOL WINAPI RegisterShellHook(
537 /* SHCreateDefClassObject callback function */
538 typedef HRESULT (CALLBACK *LPFNCDCOCALLBACK)(
543 HRESULT WINAPI SHCreateDefClassObject(
546 LPFNCDCOCALLBACK lpfnCallback,
550 void WINAPI SHFreeUnusedLibraries(void);
552 /* SHCreateLinks flags */
553 #define SHCLF_PREFIXNAME 0x01
554 #define SHCLF_CREATEONDESKTOP 0x02
556 HRESULT WINAPI SHCreateLinks(
559 LPDATAOBJECT lpDataObject,
561 LPITEMIDLIST *lppidlLinks);
563 DWORD WINAPI CheckEscapesA(LPSTR string, DWORD len);
564 DWORD WINAPI CheckEscapesW(LPWSTR string, DWORD len);
566 /* policy functions */
567 BOOL WINAPI SHInitRestricted(LPCVOID unused, LPCVOID inpRegKey);
571 #endif /* defined(__cplusplus) */
573 #endif /* __WINE_UNDOCSHELL_H */