Release 20030408.
[wine/gsoc-2012-control.git] / dlls / shell32 / undocshell.h
blob248fd81d69e1032383a9eab46fff025733809183
1 /*
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
22 #include "windef.h"
23 #include "commctrl.h"
24 #include "shlobj.h"
26 #ifdef __cplusplus
27 extern "C" {
28 #endif /* defined(__cplusplus) */
30 /****************************************************************************
31 * IDList Functions
33 LPITEMIDLIST WINAPI ILClone (LPCITEMIDLIST pidl);
34 LPITEMIDLIST WINAPI ILCloneFirst(LPCITEMIDLIST pidl);
36 LPITEMIDLIST WINAPI ILCombine(
37 LPCITEMIDLIST iil1,
38 LPCITEMIDLIST iil2);
40 DWORD WINAPI ILGetSize(LPITEMIDLIST pidl);
42 LPITEMIDLIST WINAPI ILGetNext(LPITEMIDLIST pidl);
43 LPITEMIDLIST WINAPI ILFindLastID(LPITEMIDLIST pidl);
44 BOOL WINAPI ILRemoveLastID(LPCITEMIDLIST pidl);
46 LPITEMIDLIST WINAPI ILFindChild(
47 LPCITEMIDLIST pidl1,
48 LPCITEMIDLIST pidl2);
50 LPITEMIDLIST WINAPI ILAppendID(
51 LPITEMIDLIST pidl,
52 LPCSHITEMID lpItemID,
53 BOOL bAddToEnd);
55 BOOL WINAPI ILIsEqual(
56 LPCITEMIDLIST pidl1,
57 LPCITEMIDLIST pidl2);
59 BOOL WINAPI ILIsParent(
60 LPCITEMIDLIST pidlParent,
61 LPCITEMIDLIST pidlChild,
62 BOOL bImmediate);
64 BOOL WINAPI ILGetDisplayName(
65 LPCITEMIDLIST pidl,
66 LPSTR path);
68 DWORD WINAPI ILFree(LPITEMIDLIST pidl);
70 HRESULT WINAPI ILSaveToStream(
71 LPSTREAM pstrm,
72 LPCITEMIDLIST pidl);
74 HRESULT WINAPI ILLoadFromStream(
75 LPSTREAM pstrm,
76 LPITEMIDLIST *ppidl);
78 LPITEMIDLIST WINAPI ILGlobalClone(LPCITEMIDLIST pidl);
79 void WINAPI ILGlobalFree(LPCITEMIDLIST pidl);
81 LPITEMIDLIST WINAPI SHSimpleIDListFromPathA (LPCSTR lpszPath);
82 LPITEMIDLIST WINAPI SHSimpleIDListFromPathW (LPCWSTR lpszPath);
83 LPITEMIDLIST WINAPI SHSimpleIDListFromPathAW (LPCVOID lpszPath);
85 HRESULT WINAPI SHILCreateFromPathA (
86 LPCSTR path,
87 LPITEMIDLIST * ppidl,
88 DWORD *attributes);
90 HRESULT WINAPI SHILCreateFromPathW (
91 LPCWSTR path,
92 LPITEMIDLIST * ppidl,
93 DWORD *attributes);
95 HRESULT WINAPI SHILCreateFromPathAW (
96 LPCVOID path,
97 LPITEMIDLIST * ppidl,
98 DWORD *attributes);
100 LPITEMIDLIST WINAPI ILCreateFromPathA(LPCSTR path);
101 LPITEMIDLIST WINAPI ILCreateFromPathW(LPCWSTR path);
102 LPITEMIDLIST WINAPI ILCreateFromPathAW(LPCVOID path);
105 string functions
107 HRESULT WINAPI StrRetToStrNA (
108 LPVOID dest,
109 DWORD len,
110 LPSTRRET src,
111 const ITEMIDLIST *pidl);
113 HRESULT WINAPI StrRetToStrNW (
114 LPVOID dest,
115 DWORD len,
116 LPSTRRET src,
117 const ITEMIDLIST *pidl);
119 HRESULT WINAPI StrRetToStrNAW (
120 LPVOID dest,
121 DWORD len,
122 LPSTRRET src,
123 const ITEMIDLIST *pidl);
126 /****************************************************************************
127 * SHChangeNotifyRegister API
129 #define SHCNF_ACCEPT_INTERRUPTS 0x0001
130 #define SHCNF_ACCEPT_NON_INTERRUPTS 0x0002
131 #define SHCNF_NO_PROXY 0x8001
133 typedef struct
135 LPCITEMIDLIST pidlPath;
136 BOOL bWatchSubtree;
137 } NOTIFYREGISTER, *LPNOTIFYREGISTER;
139 typedef const LPNOTIFYREGISTER LPCNOTIFYREGISTER;
141 typedef struct
143 USHORT cb;
144 DWORD dwItem1;
145 DWORD dwItem2;
146 } DWORDITEMID;
148 HANDLE WINAPI SHChangeNotifyRegister(
149 HWND hwnd,
150 LONG dwFlags,
151 LONG wEventMask,
152 DWORD uMsg,
153 int cItems,
154 LPCNOTIFYREGISTER lpItems);
156 BOOL WINAPI SHChangeNotifyDeregister(HANDLE hNotify);
158 HANDLE WINAPI SHChangeNotification_Lock(
159 HANDLE hMemoryMap,
160 DWORD dwProcessId,
161 LPCITEMIDLIST **lppidls,
162 LPLONG lpwEventId);
164 BOOL WINAPI SHChangeNotification_Unlock(HANDLE hLock);
166 /****************************************************************************
167 * Shell Common Dialogs
170 BOOL WINAPI PickIconDlg(
171 HWND hwndOwner,
172 LPSTR lpstrFile,
173 DWORD nMaxFile,
174 LPDWORD lpdwIconIndex);
176 /* RunFileDlg flags */
177 #define RFF_NOBROWSE 0x01
178 #define RFF_NODEFAULT 0x02
179 #define RFF_CALCDIRECTORY 0x04
180 #define RFF_NOLABEL 0x08
181 #define RFF_NOSEPARATEMEM 0x20 /* NT only */
183 /* RunFileFlg notification structure */
184 typedef struct
186 NMHDR hdr;
187 LPCSTR lpFile;
188 LPCSTR lpDirectory;
189 int nShow;
190 } NM_RUNFILEDLG, * LPNM_RUNFILEDLG;
192 /* RunFileDlg notification return values */
193 #define RF_OK 0x00
194 #define RF_CANCEL 0x01
195 #define RF_RETRY 0x02
197 void WINAPI RunFileDlg(
198 HWND hwndOwner,
199 HICON hIcon,
200 LPCSTR lpstrDirectory,
201 LPCSTR lpstrTitle,
202 LPCSTR lpstrDescription,
203 UINT uFlags);
205 void WINAPI ExitWindowsDialog(HWND hwndOwner);
207 int WINAPI RestartDialog(
208 HWND hwndOwner,
209 LPCSTR lpstrReason,
210 UINT uFlags);
212 BOOL WINAPI GetFileNameFromBrowse(
213 HWND hwndOwner,
214 LPSTR lpstrFile,
215 DWORD nMaxFile,
216 LPCSTR lpstrInitialDir,
217 LPCSTR lpstrDefExt,
218 LPCSTR lpstrFilter,
219 LPCSTR lpstrTitle);
221 BOOL WINAPI SHFindFiles(
222 LPCITEMIDLIST pidlRoot,
223 LPCITEMIDLIST pidlSavedSearch);
225 BOOL WINAPI SHFindComputer(
226 LPCITEMIDLIST pidlRoot,
227 LPCITEMIDLIST pidlSavedSearch);
229 /* SHObjectProperties flags */
230 #define OPF_PRINTERNAME 0x01
231 #define OPF_PATHNAME 0x02
233 BOOL WINAPI SHObjectProperties(
234 HWND hwndOwner,
235 UINT uFlags,
236 LPCSTR lpstrName,
237 LPCSTR lpstrParameters);
239 void WINAPI SHHandleDiskFull(HWND hwndOwner,
240 UINT uDrive);
242 int WINAPI SHOutOfMemoryMessageBox(
243 HWND hwndOwner,
244 LPCSTR lpCaption,
245 UINT uType);
247 DWORD WINAPI SHNetConnectionDialog(
248 HWND hwndOwner,
249 LPCSTR lpstrRemoteName,
250 DWORD dwType);
252 int WINAPIV ShellMessageBoxA(
253 HINSTANCE hInstance,
254 HWND hWnd,
255 LPCSTR lpText,
256 LPCSTR lpCaption,
257 UINT uType,
258 ...);
260 int WINAPIV ShellMessageBoxW(
261 HINSTANCE hInstance,
262 HWND hWnd,
263 LPCWSTR lpText,
264 LPCWSTR lpCaption,
265 UINT uType,
266 ...);
268 #define ShellMessageBox WINELIB_NAME_AW(ShellMessageBox)
270 /****************************************************************************
271 * Memory Routines
274 LPVOID WINAPI SHAlloc(ULONG cb);
275 void WINAPI SHFree(LPVOID pv);
277 HANDLE WINAPI SHAllocShared(
278 LPVOID pv,
279 ULONG cb,
280 DWORD pid);
282 BOOL WINAPI SHFreeShared(
283 HANDLE hMem,
284 DWORD pid);
286 LPVOID WINAPI SHLockShared(
287 HANDLE hMem,
288 DWORD pid);
290 BOOL WINAPI SHUnlockShared(LPVOID pv);
292 /****************************************************************************
293 * Cabinet Window Messages
296 #define CWM_SETPATH (WM_USER + 2)
297 #define CWM_WANTIDLE (WM_USER + 3)
298 #define CWM_GETSETCURRENTINFO (WM_USER + 4)
299 #define CWM_SELECTITEM (WM_USER + 5)
300 #define CWM_SELECTITEMSTR (WM_USER + 6)
301 #define CWM_GETISHELLBROWSER (WM_USER + 7)
302 #define CWM_TESTPATH (WM_USER + 9)
303 #define CWM_STATECHANGE (WM_USER + 10)
304 #define CWM_GETPATH (WM_USER + 12)
306 /* CWM_TESTPATH types */
307 #define CWTP_ISEQUAL 0
308 #define CWTP_ISCHILD 1
310 /* CWM_TESTPATH structure */
311 typedef struct
313 DWORD dwType;
314 ITEMIDLIST idl;
315 } CWTESTPATHSTRUCT,* LPCWTESTPATHSTRUCT;
317 /****************************************************************************
318 * System Imagelist Routines
321 int WINAPI Shell_GetCachedImageIndex(
322 LPCSTR lpszFileName,
323 UINT nIconIndex,
324 BOOL bSimulateDoc);
326 BOOL WINAPI Shell_GetImageLists(
327 HIMAGELIST *lphimlLarge,
328 HIMAGELIST *lphimlSmall);
330 HICON WINAPI SHGetFileIcon(
331 DWORD dwReserved,
332 LPCSTR lpszPath,
333 DWORD dwFileAttributes,
334 UINT uFlags);
336 int WINAPI SHMapPIDLToSystemImageListIndex(
337 LPSHELLFOLDER psf,
338 LPCITEMIDLIST pidl,
339 UINT * pOpenIndex);
341 BOOL WINAPI FileIconInit(BOOL bFullInit);
343 /****************************************************************************
344 * File Menu Routines
346 /* FileMenu_Create nSelHeight constants */
347 #define FM_DEFAULT_SELHEIGHT -1
348 #define FM_FULL_SELHEIGHT 0
350 /* FileMenu_Create flags */
351 #define FMF_SMALL_ICONS 0x00
352 #define FMF_LARGE_ICONS 0x08
353 #define FMF_NO_COLUMN_BREAK 0x10
355 HMENU WINAPI FileMenu_Create(
356 COLORREF crBorderColor,
357 int nBorderWidth,
358 HBITMAP hBorderBmp,
359 int nSelHeight,
360 UINT uFlags);
362 void WINAPI FileMenu_Destroy(HMENU hMenu);
364 /* FileMenu_AppendItem constants */
365 #define FM_SEPARATOR (LPCSTR)1
366 #define FM_BLANK_ICON -1
367 #define FM_DEFAULT_HEIGHT 0
369 BOOL WINAPI FileMenu_AppendItem(
370 HMENU hMenu,
371 LPCSTR lpszText,
372 UINT uID,
373 int iIcon,
374 HMENU hMenuPopup,
375 int nItemHeight);
377 /* FileMenu_InsertUsingPidl flags */
378 #define FMF_NO_EMPTY_ITEM 0x01
379 #define FMF_NO_PROGRAM_GROUPS 0x04
381 /* FileMenu_InsertUsingPidl callback function */
382 typedef void (CALLBACK *LPFNFMCALLBACK)(LPCITEMIDLIST pidlFolder, LPCITEMIDLIST pidlFile);
384 int WINAPI FileMenu_InsertUsingPidl(
385 HMENU hMenu,
386 UINT uID,
387 LPCITEMIDLIST pidl,
388 UINT uFlags,
389 UINT uEnumFlags,
390 LPFNFMCALLBACK lpfnCallback);
392 int WINAPI FileMenu_ReplaceUsingPidl(
393 HMENU hMenu,
394 UINT uID,
395 LPCITEMIDLIST pidl,
396 UINT uEnumFlags,
397 LPFNFMCALLBACK lpfnCallback);
399 void WINAPI FileMenu_Invalidate(HMENU hMenu);
401 HMENU WINAPI FileMenu_FindSubMenuByPidl(
402 HMENU hMenu,
403 LPCITEMIDLIST pidl);
405 BOOL WINAPI FileMenu_TrackPopupMenuEx(
406 HMENU hMenu,
407 UINT uFlags,
408 int x,
409 int y,
410 HWND hWnd,
411 LPTPMPARAMS lptpm);
413 BOOL WINAPI FileMenu_GetLastSelectedItemPidls(
414 UINT uReserved,
415 LPITEMIDLIST *ppidlFolder,
416 LPITEMIDLIST *ppidlItem);
418 LRESULT WINAPI FileMenu_MeasureItem(
419 HWND hWnd,
420 LPMEASUREITEMSTRUCT lpmis);
422 LRESULT WINAPI FileMenu_DrawItem(
423 HWND hWnd,
424 LPDRAWITEMSTRUCT lpdis);
426 BOOL WINAPI FileMenu_InitMenuPopup(HMENU hMenu);
428 void WINAPI FileMenu_AbortInitMenu(void);
430 LRESULT WINAPI FileMenu_HandleMenuChar(
431 HMENU hMenu,
432 WPARAM wParam);
434 BOOL WINAPI FileMenu_DeleteAllItems(HMENU hMenu);
436 BOOL WINAPI FileMenu_DeleteItemByCmd(
437 HMENU hMenu,
438 UINT uID);
440 BOOL WINAPI FileMenu_DeleteItemByIndex(
441 HMENU hMenu,
442 UINT uPos);
444 BOOL WINAPI FileMenu_DeleteMenuItemByFirstID(
445 HMENU hMenu,
446 UINT uID);
448 BOOL WINAPI FileMenu_DeleteSeparator(HMENU hMenu);
450 BOOL WINAPI FileMenu_EnableItemByCmd(
451 HMENU hMenu,
452 UINT uID,
453 BOOL bEnable);
455 DWORD WINAPI FileMenu_GetItemExtent(
456 HMENU hMenu,
457 UINT uPos);
459 int WINAPI FileMenu_AppendFilesForPidl(
460 HMENU hMenu,
461 LPCITEMIDLIST pidl,
462 BOOL bAddSeparator);
464 int WINAPI FileMenu_AddFilesForPidl(
465 HMENU hMenu,
466 UINT uReserved,
467 UINT uID,
468 LPCITEMIDLIST pidl,
469 UINT uFlags,
470 UINT uEnumFlags,
471 LPFNFMCALLBACK lpfnCallback);
473 /****************************************************************************
474 * Drag And Drop Routines
476 HRESULT WINAPI SHLoadOLE(DWORD dwFlags);
478 HRESULT WINAPI SHRegisterDragDrop(
479 HWND hWnd,
480 LPDROPTARGET lpDropTarget);
482 HRESULT WINAPI SHRevokeDragDrop(HWND hWnd);
484 HRESULT WINAPI SHDoDragDrop(
485 HWND hWnd,
486 LPDATAOBJECT lpDataObject,
487 LPDROPSOURCE lpDropSource,
488 DWORD dwOKEffect,
489 LPDWORD pdwEffect);
491 BOOL WINAPI DAD_DragEnter(HWND hWnd);
493 BOOL WINAPI DAD_DragEnterEx(
494 HWND hWnd,
495 POINT pt);
497 BOOL WINAPI DAD_DragMove(POINT pt);
499 /* DAD_AutoScroll return values */
500 #define DAD_SCROLL_UP 1
501 #define DAD_SCROLL_DOWN 2
502 #define DAD_SCROLL_LEFT 4
503 #define DAD_SCROLL_RIGHT 8
505 /* DAD_AutoScroll sample structure */
506 typedef struct
508 DWORD dwCount;
509 DWORD dwLastTime;
510 BOOL bWrapped;
511 POINT aptPositions[3];
512 DWORD adwTimes[3];
513 } SCROLLSAMPLES, *LPSCROLLSAMPLES;
515 DWORD WINAPI DAD_AutoScroll(HWND hWnd,
516 LPSCROLLSAMPLES lpSamples,
517 LPPOINT lppt);
519 BOOL WINAPI DAD_DragLeave();
521 BOOL WINAPI DAD_SetDragImageFromListView(
522 HWND hWnd,
523 POINT pt);
525 BOOL WINAPI DAD_SetDragImage(
526 HIMAGELIST himlTrack,
527 LPPOINT lppt);
529 BOOL WINAPI DAD_ShowDragImage(BOOL bShow);
531 HRESULT WINAPI SHCreateStdEnumFmtEtc(
532 DWORD cFormats,
533 const FORMATETC *lpFormats,
534 LPENUMFORMATETC *ppenumFormatetc);
536 HRESULT WINAPI CIDLData_CreateFromIDArray(
537 LPCITEMIDLIST pidlFolder,
538 DWORD cpidlFiles,
539 LPCITEMIDLIST *lppidlFiles,
540 LPDATAOBJECT *ppdataObject);
542 /****************************************************************************
543 * Path Manipulation Routines
546 BOOL WINAPI PathAppendAW(LPVOID lpszPath1, LPCVOID lpszPath2);
548 LPVOID WINAPI PathCombineAW(LPVOID szDest, LPCVOID lpszDir, LPCVOID lpszFile);
550 LPVOID WINAPI PathAddBackslashAW(LPVOID path);
552 LPVOID WINAPI PathBuildRootAW(LPVOID lpszPath, int drive);
554 LPVOID WINAPI PathFindExtensionAW(LPCVOID path);
556 LPVOID WINAPI PathFindFileNameAW(LPCVOID path);
558 LPVOID WINAPI PathGetExtensionAW(LPCVOID lpszPath, DWORD void1, DWORD void2);
560 LPVOID WINAPI PathGetArgsAW(LPVOID lpszPath);
562 BOOL WINAPI PathRemoveFileSpecAW(LPVOID lpszPath);
564 LPVOID WINAPI PathGetShortPathAW(LPVOID lpszPath);
566 void WINAPI PathRemoveBlanksAW(LPVOID lpszPath);
568 VOID WINAPI PathQuoteSpacesAW(LPVOID path);
570 void WINAPI PathUnquoteSpacesAW(LPVOID lpszPath);
572 BOOL WINAPI PathIsUNCAW(LPCVOID lpszPath);
574 BOOL WINAPI PathIsRelativeAW(LPCVOID lpszPath);
576 BOOL WINAPI PathIsRootAW(LPCVOID x);
578 BOOL WINAPI PathIsExeAW(LPCVOID lpszPath);
580 BOOL WINAPI PathIsDirectoryAW(LPCVOID lpszPath);
582 BOOL WINAPI PathFileExistsAW(LPCVOID lpszPath);
584 BOOL WINAPI PathMatchSpecAW(LPVOID lpszPath, LPVOID lpszSpec);
586 BOOL WINAPI PathMakeUniqueNameAW(
587 LPVOID lpszBuffer,
588 DWORD dwBuffSize,
589 LPCVOID lpszShortName,
590 LPCVOID lpszLongName,
591 LPCVOID lpszPathName);
593 BOOL WINAPI PathYetAnotherMakeUniqueNameA(
594 LPSTR lpszBuffer,
595 LPCSTR lpszPathName,
596 LPCSTR lpszShortName,
597 LPCSTR lpszLongName);
599 /* PathCleanupSpec return values */
600 #define PCS_REPLACEDCHARS 0x00000001
601 #define PCS_REMOVEDCHARS 0x00000002
602 #define PCS_SHORTENED 0x00000004
603 #define PCS_PATHTOOLONG 0x80000008
605 DWORD WINAPI PathCleanupSpecAW(LPCVOID lpszPath, LPVOID lpszFile);
607 BOOL WINAPI PathQualifyA(LPCSTR path);
608 BOOL WINAPI PathQualifyW(LPCWSTR path);
609 #define PathQualify WINELIB_NAME_AW(PathQualify)
610 BOOL WINAPI PathQualifyAW(LPCVOID path);
613 /* PathResolve flags */
614 #define PRF_CHECKEXISTANCE 0x01
615 #define PRF_EXECUTABLE 0x02
616 #define PRF_QUALIFYONPATH 0x04
617 #define PRF_WINDOWS31 0x08
619 BOOL WINAPI PathResolveAW(LPVOID lpszPath, LPCVOID *alpszPaths, DWORD dwFlags);
621 VOID WINAPI PathSetDlgItemPathAW(HWND hDlg, int nIDDlgItem, LPCVOID lpszPath);
623 /* PathProcessCommand flags */
624 #define PPCF_QUOTEPATH 0x01 /* implies PPCF_INCLUDEARGS */
625 #define PPCF_INCLUDEARGS 0x02
626 #define PPCF_NODIRECTORIES 0x10
627 #define PPCF_DONTRESOLVE 0x20
628 #define PPCF_PATHISRELATIVE 0x40
630 HRESULT WINAPI PathProcessCommandAW(LPCVOID lpszPath, LPVOID lpszBuff,
631 DWORD dwBuffSize, DWORD dwFlags);
633 void WINAPI PathStripPathAW(LPVOID lpszPath);
635 BOOL WINAPI PathStripToRootAW(LPVOID lpszPath);
637 void WINAPI PathRemoveArgsAW(LPVOID lpszPath);
639 void WINAPI PathRemoveExtensionAW(LPVOID lpszPath);
641 int WINAPI PathParseIconLocationAW(LPVOID lpszPath);
643 BOOL WINAPI PathIsSameRootAW(LPCVOID lpszPath1, LPCVOID lpszPath2);
645 BOOL WINAPI PathFindOnPathAW(LPVOID sFile, LPCVOID sOtherDirs);
647 /****************************************************************************
648 * Shell Namespace Routines
651 /* SHCreateShellFolderViewEx callback function */
652 typedef HRESULT (CALLBACK *LPFNSFVCALLBACK)(
653 DWORD dwUser,
654 LPSHELLFOLDER pshf,
655 HWND hWnd,
656 UINT uMsg,
657 WPARAM wParam,
658 LPARAM lParam);
660 /* SHCreateShellFolderViewEx structure */
661 typedef struct
663 DWORD dwSize;
664 LPSHELLFOLDER pshf;
665 DWORD dwUser;
666 LPCITEMIDLIST pidlFolder;
667 DWORD dwEventId;
668 LPFNSFVCALLBACK lpfnCallback;
669 UINT uViewMode;
670 } SHELLFOLDERVIEWINFO, * LPSHELLFOLDERVIEWINFO;
671 typedef const SHELLFOLDERVIEWINFO * LPCSHELLFOLDERVIEWINFO;
673 HRESULT WINAPI SHCreateShellFolderViewEx(
674 LPCSHELLFOLDERVIEWINFO pshfvi,
675 LPSHELLVIEW *ppshv);
677 /* SHCreateShellFolderViewEx callback messages */
678 #define SFVCB_ADDTOMENU 0x0001
679 #define SFVCB_INVOKECOMMAND 0x0002
680 #define SFVCB_GETMENUHELP 0x0003
681 #define SFVCB_GETTOOLBARTIP 0x0004
682 #define SFVCB_GETTOOLBARINFO 0x0005
683 #define SFVCB_ADDTOOLBARITEMS 0x0006
684 #define SFVCB_INITMENUPOPUP 0x0007
685 #define SFVCB_SELECTIONCHANGED 0x0008
686 #define SFVCB_DRAWMENUITEM 0x0009
687 #define SFVCB_MEASUREMENUITEM 0x000A
688 #define SFVCB_EXITMENULOOP 0x000B
689 #define SFVCB_VIEWRELEASE 0x000C
690 #define SFVCB_GETNAMELENGTH 0x000D
691 #define SFVCB_CHANGENOTIFY 0x000E
692 #define SFVCB_WINDOWCREATED 0x000F
693 #define SFVCB_WINDOWCLOSING 0x0010
694 #define SFVCB_LISTREFRESHED 0x0011
695 #define SFVCB_WINDOWFOCUSED 0x0012
696 #define SFVCB_REGISTERCOPYHOOK 0x0014
697 #define SFVCB_COPYHOOKCALLBACK 0x0015
698 #define SFVCB_GETDETAILSOF 0x0017
699 #define SFVCB_COLUMNCLICK 0x0018
700 #define SFVCB_GETCHANGENOTIFYPIDL 0x0019
701 #define SFVCB_GETESTIMATEDCOUNT 0x001A
702 #define SFVCB_ADJUSTVIEWMODE 0x001B
703 #define SFVCB_REMOVEFROMMENU 0x001C
704 #define SFVCB_ADDINGOBJECT 0x001D
705 #define SFVCB_REMOVINGOBJECT 0x001E
706 #define SFVCB_UPDATESTATUSBAR 0x001F
707 #define SFVCB_ISSLOWREFRESH 0x0020
708 #define SFVCB_GETCOMMANDDIR 0x0021
709 #define SFVCB_GETCOLUMNSTREAM 0x0022
710 #define SFVCB_CANSELECTALL 0x0023
711 #define SFVCB_DRAGSUCCEEDED 0x0024
712 #define SFVCB_ISSTRICTREFRESH 0x0025
713 #define SFVCB_ISCHILDOBJECT 0x0026
715 /* Generic structure used by several messages */
716 typedef struct
718 DWORD dwReserved;
719 DWORD dwReserved2;
720 LPCITEMIDLIST pidl;
721 LPDWORD lpdwUser;
722 } SFVCBINFO, * LPSFVCBINFO;
723 typedef const SFVCBINFO * LPCSFVCBINFO;
725 /* SFVCB_ADDTOMENU structure */
726 typedef struct
728 HMENU hMenu;
729 UINT indexMenu;
730 UINT idCmdFirst;
731 UINT idCmdLast;
732 } SFVMENUINFO, * LPSFVMENUINFO;
734 /* SFVCB_GETTOOLBARINFO structure */
735 typedef struct
737 UINT nButtons;
738 UINT uFlags;
739 } SFVTOOLBARINFO, * LPSFVTOOLBARINFO;
741 /* SFVTOOLBARINFO flags */
742 typedef enum
744 SFVTI_ADDTOEND = 0,
745 SFVTI_ADDTOFRONT = 1,
746 SFVTI_OVERWRITE = 2
747 } SFVTIF;
749 /* SFVCB_SELECTIONCHANGED structure */
750 typedef struct
752 UINT uOldState;
753 UINT uNewState;
754 LPCITEMIDLIST pidl;
755 LPDWORD lpdwUser;
756 } SFVSELECTSTATE, * LPSFVSELECTSTATE;
757 typedef const SFVSELECTSTATE * LPCSFVSELECTSTATE;
759 /* SFVCB_COPYHOOKCALLBACK structure */
760 typedef struct
762 HWND hwnd;
763 UINT wFunc;
764 UINT wFlags;
765 LPCSTR pszSrcFile;
766 DWORD dwSrcAttribs;
767 LPCSTR pszDestFile;
768 DWORD dwDestAttribs;
769 } SFVCOPYHOOKINFO, * LPSFVCOPYHOOKINFO;
770 typedef const SFVCOPYHOOKINFO * LPCSFVCOPYHOOKINFO;
772 /* SFVCB_GETDETAILSOF structure */
773 typedef struct
775 LPCITEMIDLIST pidl;
776 int fmt;
777 int cx;
778 STRRET lpText;
779 } SFVCOLUMNINFO, * LPSFVCOLUMNINFO;
781 int WINAPI SHShellFolderView_Message(
782 HWND hwndCabinet,
783 DWORD dwMessage,
784 DWORD dwParam);
786 /* SHShellFolderView_Message messages */
787 #define SFVM_REARRANGE 0x0001
788 #define SFVM_GETARRANGECOLUMN 0x0002
789 #define SFVM_ADDOBJECT 0x0003
790 #define SFVM_GETITEMCOUNT 0x0004
791 #define SFVM_GETITEMPIDL 0x0005
792 #define SFVM_REMOVEOBJECT 0x0006
793 #define SFVM_UPDATEOBJECT 0x0007
794 #define SFVM_SETREDRAW 0x0008
795 #define SFVM_GETSELECTEDOBJECTS 0x0009
796 #define SFVM_ISDROPONSOURCE 0x000A
797 #define SFVM_MOVEICONS 0x000B
798 #define SFVM_GETDRAGPOINT 0x000C
799 #define SFVM_GETDROPPOINT 0x000D
800 #define SFVM_SETOBJECTPOS 0x000E
801 #define SFVM_ISDROPONBACKGROUND 0x000F
802 #define SFVM_CUTOBJECTS 0x0010
803 #define SFVM_TOGGLEAUTOARRANGE 0x0011
804 #define SFVM_LINEUPICONS 0x0012
805 #define SFVM_GETAUTOARRANGE 0x0013
806 #define SFVM_GETSELECTEDCOUNT 0x0014
807 #define SFVM_GETITEMSPACING 0x0015
808 #define SFVM_REFRESHOBJECT 0x0016
809 #define SFVM_SETCLIPBOARDPOINTS 0x0017
811 /****************************************************************************
812 * Misc Stuff
815 /* SHWaitForFileToOpen flags */
816 #define SHWFF_ADD 0x01
817 #define SHWFF_REMOVE 0x02
818 #define SHWFF_WAIT 0x04
820 BOOL WINAPI SHWaitForFileToOpen(
821 LPCITEMIDLIST pidl,
822 DWORD dwFlags,
823 DWORD dwTimeout);
825 WORD WINAPI ArrangeWindows(
826 HWND hwndParent,
827 DWORD dwReserved,
828 LPCRECT lpRect,
829 WORD cKids,
830 CONST HWND * lpKids);
832 /* RegisterShellHook types */
833 #define RSH_DEREGISTER 0
834 #define RSH_REGISTER 1
835 #define RSH_REGISTER_PROGMAN 2
836 #define RSH_REGISTER_TASKMAN 3
838 BOOL WINAPI RegisterShellHook(
839 HWND hWnd,
840 DWORD dwType);
842 /* SHCreateDefClassObject callback function */
843 typedef HRESULT (CALLBACK *LPFNCDCOCALLBACK)(
844 LPUNKNOWN pUnkOuter,
845 REFIID riidObject,
846 LPVOID *ppvObject);
848 HRESULT WINAPI SHCreateDefClassObject(
849 REFIID riidFactory,
850 LPVOID *ppvFactory,
851 LPFNCDCOCALLBACK lpfnCallback,
852 LPDWORD lpdwUsage,
853 REFIID riidObject);
855 DWORD WINAPI SHCLSIDFromStringA (LPCSTR clsid, CLSID *id);
856 DWORD WINAPI SHCLSIDFromStringW (LPWSTR clsid, CLSID *id);
858 HRESULT WINAPI SHCoCreateInstance(
859 LPCSTR lpszClsid,
860 REFCLSID rClsid,
861 LPUNKNOWN pUnkOuter,
862 REFIID riid,
863 LPVOID *ppv);
865 void WINAPI SHFreeUnusedLibraries();
867 /* SHCreateLinks flags */
868 #define SHCLF_PREFIXNAME 0x01
869 #define SHCLF_CREATEONDESKTOP 0x02
871 HRESULT WINAPI SHCreateLinks(
872 HWND hWnd,
873 LPCSTR lpszDir,
874 LPDATAOBJECT lpDataObject,
875 UINT uFlags,
876 LPITEMIDLIST *lppidlLinks);
878 /* SHGetNewLinkInfo flags */
879 #define SHGNLI_PIDL 0x01
880 #define SHGNLI_PREFIXNAME 0x02
881 #define SHGNLI_NOUNIQUE 0x04
883 BOOL WINAPI SHGetNewLinkInfoA(
884 LPCSTR pszLinkTo,
885 LPCSTR pszDir,
886 LPSTR pszName,
887 BOOL *pfMustCopy,
888 UINT uFlags);
890 BOOL WINAPI SHGetNewLinkInfoW(
891 LPCWSTR pszLinkTo,
892 LPCWSTR pszDir,
893 LPWSTR pszName,
894 BOOL *pfMustCopy,
895 UINT uFlags);
896 #define SHGetNewLinkInfo WINELIB_NAME_AW(SHGetNewLinkInfo)
898 DWORD WINAPI CheckEscapesA(LPSTR string, DWORD len);
899 DWORD WINAPI CheckEscapesW(LPWSTR string, DWORD len);
901 /* policy functions */
902 BOOL WINAPI SHInitRestricted(LPCVOID unused, LPCVOID inpRegKey);
903 DWORD WINAPI SHRestricted (DWORD policy);
905 #ifdef __cplusplus
906 } /* extern "C" */
907 #endif /* defined(__cplusplus) */
909 #endif /* __WINE_UNDOCSHELL_H */