Merged the two serializer and unserializer functions into one, cleaned
[wine.git] / dlls / shell32 / undocshell.h
blob38ccc1ede9f9c95e4957d49e0b03f179e17954b5
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);
104 HRESULT WINAPI SHBindToParent(
105 LPCITEMIDLIST pidl,
106 REFIID riid,
107 LPVOID *ppv,
108 LPCITEMIDLIST *ppidlLast);
111 string functions
113 HRESULT WINAPI StrRetToStrNA (
114 LPVOID dest,
115 DWORD len,
116 LPSTRRET src,
117 const ITEMIDLIST *pidl);
119 HRESULT WINAPI StrRetToStrNW (
120 LPVOID dest,
121 DWORD len,
122 LPSTRRET src,
123 const ITEMIDLIST *pidl);
125 HRESULT WINAPI StrRetToStrNAW (
126 LPVOID dest,
127 DWORD len,
128 LPSTRRET src,
129 const ITEMIDLIST *pidl);
132 /****************************************************************************
133 * SHChangeNotifyRegister API
135 #define SHCNF_ACCEPT_INTERRUPTS 0x0001
136 #define SHCNF_ACCEPT_NON_INTERRUPTS 0x0002
137 #define SHCNF_NO_PROXY 0x8001
139 typedef struct
141 LPCITEMIDLIST pidlPath;
142 BOOL bWatchSubtree;
143 } NOTIFYREGISTER, *LPNOTIFYREGISTER;
145 typedef const LPNOTIFYREGISTER LPCNOTIFYREGISTER;
147 typedef struct
149 USHORT cb;
150 DWORD dwItem1;
151 DWORD dwItem2;
152 } DWORDITEMID;
154 HANDLE WINAPI SHChangeNotifyRegister(
155 HWND hwnd,
156 LONG dwFlags,
157 LONG wEventMask,
158 DWORD uMsg,
159 int cItems,
160 LPCNOTIFYREGISTER lpItems);
162 BOOL WINAPI SHChangeNotifyDeregister(HANDLE hNotify);
164 HANDLE WINAPI SHChangeNotification_Lock(
165 HANDLE hMemoryMap,
166 DWORD dwProcessId,
167 LPCITEMIDLIST **lppidls,
168 LPLONG lpwEventId);
170 BOOL WINAPI SHChangeNotification_Unlock(HANDLE hLock);
172 /****************************************************************************
173 * Shell Common Dialogs
176 BOOL WINAPI PickIconDlg(
177 HWND hwndOwner,
178 LPSTR lpstrFile,
179 DWORD nMaxFile,
180 LPDWORD lpdwIconIndex);
182 /* RunFileDlg flags */
183 #define RFF_NOBROWSE 0x01
184 #define RFF_NODEFAULT 0x02
185 #define RFF_CALCDIRECTORY 0x04
186 #define RFF_NOLABEL 0x08
187 #define RFF_NOSEPARATEMEM 0x20 /* NT only */
189 /* RunFileFlg notification structure */
190 typedef struct
192 NMHDR hdr;
193 LPCSTR lpFile;
194 LPCSTR lpDirectory;
195 int nShow;
196 } NM_RUNFILEDLG, * LPNM_RUNFILEDLG;
198 /* RunFileDlg notification return values */
199 #define RF_OK 0x00
200 #define RF_CANCEL 0x01
201 #define RF_RETRY 0x02
203 void WINAPI RunFileDlg(
204 HWND hwndOwner,
205 HICON hIcon,
206 LPCSTR lpstrDirectory,
207 LPCSTR lpstrTitle,
208 LPCSTR lpstrDescription,
209 UINT uFlags);
211 void WINAPI ExitWindowsDialog(HWND hwndOwner);
213 int WINAPI RestartDialog(
214 HWND hwndOwner,
215 LPCSTR lpstrReason,
216 UINT uFlags);
218 BOOL WINAPI GetFileNameFromBrowse(
219 HWND hwndOwner,
220 LPSTR lpstrFile,
221 DWORD nMaxFile,
222 LPCSTR lpstrInitialDir,
223 LPCSTR lpstrDefExt,
224 LPCSTR lpstrFilter,
225 LPCSTR lpstrTitle);
227 BOOL WINAPI SHFindFiles(
228 LPCITEMIDLIST pidlRoot,
229 LPCITEMIDLIST pidlSavedSearch);
231 BOOL WINAPI SHFindComputer(
232 LPCITEMIDLIST pidlRoot,
233 LPCITEMIDLIST pidlSavedSearch);
235 /* SHObjectProperties flags */
236 #define OPF_PRINTERNAME 0x01
237 #define OPF_PATHNAME 0x02
239 BOOL WINAPI SHObjectProperties(
240 HWND hwndOwner,
241 UINT uFlags,
242 LPCSTR lpstrName,
243 LPCSTR lpstrParameters);
245 void WINAPI SHHandleDiskFull(HWND hwndOwner,
246 UINT uDrive);
248 int WINAPI SHOutOfMemoryMessageBox(
249 HWND hwndOwner,
250 LPCSTR lpCaption,
251 UINT uType);
253 DWORD WINAPI SHNetConnectionDialog(
254 HWND hwndOwner,
255 LPCSTR lpstrRemoteName,
256 DWORD dwType);
258 int WINAPIV ShellMessageBoxA(
259 HINSTANCE hInstance,
260 HWND hWnd,
261 LPCSTR lpText,
262 LPCSTR lpCaption,
263 UINT uType,
264 ...);
266 int WINAPIV ShellMessageBoxW(
267 HINSTANCE hInstance,
268 HWND hWnd,
269 LPCWSTR lpText,
270 LPCWSTR lpCaption,
271 UINT uType,
272 ...);
274 #define ShellMessageBox WINELIB_NAME_AW(ShellMessageBox)
276 /****************************************************************************
277 * Memory Routines
280 LPVOID WINAPI SHAlloc(ULONG cb);
281 void WINAPI SHFree(LPVOID pv);
283 HANDLE WINAPI SHAllocShared(
284 LPVOID pv,
285 ULONG cb,
286 DWORD pid);
288 BOOL WINAPI SHFreeShared(
289 HANDLE hMem,
290 DWORD pid);
292 LPVOID WINAPI SHLockShared(
293 HANDLE hMem,
294 DWORD pid);
296 BOOL WINAPI SHUnlockShared(LPVOID pv);
298 /****************************************************************************
299 * Cabinet Window Messages
302 #define CWM_SETPATH (WM_USER + 2)
303 #define CWM_WANTIDLE (WM_USER + 3)
304 #define CWM_GETSETCURRENTINFO (WM_USER + 4)
305 #define CWM_SELECTITEM (WM_USER + 5)
306 #define CWM_SELECTITEMSTR (WM_USER + 6)
307 #define CWM_GETISHELLBROWSER (WM_USER + 7)
308 #define CWM_TESTPATH (WM_USER + 9)
309 #define CWM_STATECHANGE (WM_USER + 10)
310 #define CWM_GETPATH (WM_USER + 12)
312 /* CWM_TESTPATH types */
313 #define CWTP_ISEQUAL 0
314 #define CWTP_ISCHILD 1
316 /* CWM_TESTPATH structure */
317 typedef struct
319 DWORD dwType;
320 ITEMIDLIST idl;
321 } CWTESTPATHSTRUCT,* LPCWTESTPATHSTRUCT;
323 /****************************************************************************
324 * System Imagelist Routines
327 int WINAPI Shell_GetCachedImageIndex(
328 LPCSTR lpszFileName,
329 UINT nIconIndex,
330 BOOL bSimulateDoc);
332 BOOL WINAPI Shell_GetImageLists(
333 HIMAGELIST *lphimlLarge,
334 HIMAGELIST *lphimlSmall);
336 HICON WINAPI SHGetFileIcon(
337 DWORD dwReserved,
338 LPCSTR lpszPath,
339 DWORD dwFileAttributes,
340 UINT uFlags);
342 int WINAPI SHMapPIDLToSystemImageListIndex(
343 LPSHELLFOLDER psf,
344 LPCITEMIDLIST pidl,
345 UINT * pOpenIndex);
347 BOOL WINAPI FileIconInit(BOOL bFullInit);
349 /****************************************************************************
350 * File Menu Routines
352 /* FileMenu_Create nSelHeight constants */
353 #define FM_DEFAULT_SELHEIGHT -1
354 #define FM_FULL_SELHEIGHT 0
356 /* FileMenu_Create flags */
357 #define FMF_SMALL_ICONS 0x00
358 #define FMF_LARGE_ICONS 0x08
359 #define FMF_NO_COLUMN_BREAK 0x10
361 HMENU WINAPI FileMenu_Create(
362 COLORREF crBorderColor,
363 int nBorderWidth,
364 HBITMAP hBorderBmp,
365 int nSelHeight,
366 UINT uFlags);
368 void WINAPI FileMenu_Destroy(HMENU hMenu);
370 /* FileMenu_AppendItem constants */
371 #define FM_SEPARATOR (LPCSTR)1
372 #define FM_BLANK_ICON -1
373 #define FM_DEFAULT_HEIGHT 0
375 BOOL WINAPI FileMenu_AppendItem(
376 HMENU hMenu,
377 LPCSTR lpszText,
378 UINT uID,
379 int iIcon,
380 HMENU hMenuPopup,
381 int nItemHeight);
383 /* FileMenu_InsertUsingPidl flags */
384 #define FMF_NO_EMPTY_ITEM 0x01
385 #define FMF_NO_PROGRAM_GROUPS 0x04
387 /* FileMenu_InsertUsingPidl callback function */
388 typedef void (CALLBACK *LPFNFMCALLBACK)(LPCITEMIDLIST pidlFolder, LPCITEMIDLIST pidlFile);
390 int WINAPI FileMenu_InsertUsingPidl(
391 HMENU hMenu,
392 UINT uID,
393 LPCITEMIDLIST pidl,
394 UINT uFlags,
395 UINT uEnumFlags,
396 LPFNFMCALLBACK lpfnCallback);
398 int WINAPI FileMenu_ReplaceUsingPidl(
399 HMENU hMenu,
400 UINT uID,
401 LPCITEMIDLIST pidl,
402 UINT uEnumFlags,
403 LPFNFMCALLBACK lpfnCallback);
405 void WINAPI FileMenu_Invalidate(HMENU hMenu);
407 HMENU WINAPI FileMenu_FindSubMenuByPidl(
408 HMENU hMenu,
409 LPCITEMIDLIST pidl);
411 BOOL WINAPI FileMenu_TrackPopupMenuEx(
412 HMENU hMenu,
413 UINT uFlags,
414 int x,
415 int y,
416 HWND hWnd,
417 LPTPMPARAMS lptpm);
419 BOOL WINAPI FileMenu_GetLastSelectedItemPidls(
420 UINT uReserved,
421 LPITEMIDLIST *ppidlFolder,
422 LPITEMIDLIST *ppidlItem);
424 LRESULT WINAPI FileMenu_MeasureItem(
425 HWND hWnd,
426 LPMEASUREITEMSTRUCT lpmis);
428 LRESULT WINAPI FileMenu_DrawItem(
429 HWND hWnd,
430 LPDRAWITEMSTRUCT lpdis);
432 BOOL WINAPI FileMenu_InitMenuPopup(HMENU hMenu);
434 void WINAPI FileMenu_AbortInitMenu(void);
436 LRESULT WINAPI FileMenu_HandleMenuChar(
437 HMENU hMenu,
438 WPARAM wParam);
440 BOOL WINAPI FileMenu_DeleteAllItems(HMENU hMenu);
442 BOOL WINAPI FileMenu_DeleteItemByCmd(
443 HMENU hMenu,
444 UINT uID);
446 BOOL WINAPI FileMenu_DeleteItemByIndex(
447 HMENU hMenu,
448 UINT uPos);
450 BOOL WINAPI FileMenu_DeleteMenuItemByFirstID(
451 HMENU hMenu,
452 UINT uID);
454 BOOL WINAPI FileMenu_DeleteSeparator(HMENU hMenu);
456 BOOL WINAPI FileMenu_EnableItemByCmd(
457 HMENU hMenu,
458 UINT uID,
459 BOOL bEnable);
461 DWORD WINAPI FileMenu_GetItemExtent(
462 HMENU hMenu,
463 UINT uPos);
465 int WINAPI FileMenu_AppendFilesForPidl(
466 HMENU hMenu,
467 LPCITEMIDLIST pidl,
468 BOOL bAddSeparator);
470 int WINAPI FileMenu_AddFilesForPidl(
471 HMENU hMenu,
472 UINT uReserved,
473 UINT uID,
474 LPCITEMIDLIST pidl,
475 UINT uFlags,
476 UINT uEnumFlags,
477 LPFNFMCALLBACK lpfnCallback);
479 /****************************************************************************
480 * Drag And Drop Routines
482 HRESULT WINAPI SHLoadOLE(DWORD dwFlags);
484 HRESULT WINAPI SHRegisterDragDrop(
485 HWND hWnd,
486 LPDROPTARGET lpDropTarget);
488 HRESULT WINAPI SHRevokeDragDrop(HWND hWnd);
490 HRESULT WINAPI SHDoDragDrop(
491 HWND hWnd,
492 LPDATAOBJECT lpDataObject,
493 LPDROPSOURCE lpDropSource,
494 DWORD dwOKEffect,
495 LPDWORD pdwEffect);
497 BOOL WINAPI DAD_DragEnter(HWND hWnd);
499 BOOL WINAPI DAD_DragEnterEx(
500 HWND hWnd,
501 POINT pt);
503 BOOL WINAPI DAD_DragMove(POINT pt);
505 /* DAD_AutoScroll return values */
506 #define DAD_SCROLL_UP 1
507 #define DAD_SCROLL_DOWN 2
508 #define DAD_SCROLL_LEFT 4
509 #define DAD_SCROLL_RIGHT 8
511 /* DAD_AutoScroll sample structure */
512 typedef struct
514 DWORD dwCount;
515 DWORD dwLastTime;
516 BOOL bWrapped;
517 POINT aptPositions[3];
518 DWORD adwTimes[3];
519 } SCROLLSAMPLES, *LPSCROLLSAMPLES;
521 DWORD WINAPI DAD_AutoScroll(HWND hWnd,
522 LPSCROLLSAMPLES lpSamples,
523 LPPOINT lppt);
525 BOOL WINAPI DAD_DragLeave();
527 BOOL WINAPI DAD_SetDragImageFromListView(
528 HWND hWnd,
529 POINT pt);
531 BOOL WINAPI DAD_SetDragImage(
532 HIMAGELIST himlTrack,
533 LPPOINT lppt);
535 BOOL WINAPI DAD_ShowDragImage(BOOL bShow);
537 HRESULT WINAPI SHCreateStdEnumFmtEtc(
538 DWORD cFormats,
539 const FORMATETC *lpFormats,
540 LPENUMFORMATETC *ppenumFormatetc);
542 HRESULT WINAPI CIDLData_CreateFromIDArray(
543 LPCITEMIDLIST pidlFolder,
544 DWORD cpidlFiles,
545 LPCITEMIDLIST *lppidlFiles,
546 LPDATAOBJECT *ppdataObject);
548 /****************************************************************************
549 * Path Manipulation Routines
552 BOOL WINAPI PathAppendAW(LPVOID lpszPath1, LPCVOID lpszPath2);
554 LPVOID WINAPI PathCombineAW(LPVOID szDest, LPCVOID lpszDir, LPCVOID lpszFile);
556 LPVOID WINAPI PathAddBackslashAW(LPVOID path);
558 LPVOID WINAPI PathBuildRootAW(LPVOID lpszPath, int drive);
560 LPVOID WINAPI PathFindExtensionAW(LPCVOID path);
562 LPVOID WINAPI PathFindFileNameAW(LPCVOID path);
564 LPVOID WINAPI PathGetExtensionAW(LPCVOID lpszPath, DWORD void1, DWORD void2);
566 LPVOID WINAPI PathGetArgsAW(LPVOID lpszPath);
568 BOOL WINAPI PathRemoveFileSpecAW(LPVOID lpszPath);
570 LPVOID WINAPI PathGetShortPathAW(LPVOID lpszPath);
572 void WINAPI PathRemoveBlanksAW(LPVOID lpszPath);
574 VOID WINAPI PathQuoteSpacesAW(LPVOID path);
576 void WINAPI PathUnquoteSpacesAW(LPVOID lpszPath);
578 BOOL WINAPI PathIsUNCAW(LPCVOID lpszPath);
580 BOOL WINAPI PathIsRelativeAW(LPCVOID lpszPath);
582 BOOL WINAPI PathIsRootAW(LPCVOID x);
584 BOOL WINAPI PathIsExeAW(LPCVOID lpszPath);
586 BOOL WINAPI PathIsDirectoryAW(LPCVOID lpszPath);
588 BOOL WINAPI PathFileExistsAW(LPCVOID lpszPath);
590 BOOL WINAPI PathMatchSpecAW(LPVOID lpszPath, LPVOID lpszSpec);
592 BOOL WINAPI PathMakeUniqueNameAW(
593 LPVOID lpszBuffer,
594 DWORD dwBuffSize,
595 LPCVOID lpszShortName,
596 LPCVOID lpszLongName,
597 LPCVOID lpszPathName);
599 BOOL WINAPI PathYetAnotherMakeUniqueNameA(
600 LPSTR lpszBuffer,
601 LPCSTR lpszPathName,
602 LPCSTR lpszShortName,
603 LPCSTR lpszLongName);
605 /* PathCleanupSpec return values */
606 #define PCS_REPLACEDCHARS 0x00000001
607 #define PCS_REMOVEDCHARS 0x00000002
608 #define PCS_SHORTENED 0x00000004
609 #define PCS_PATHTOOLONG 0x80000008
611 DWORD WINAPI PathCleanupSpecAW(LPCVOID lpszPath, LPVOID lpszFile);
613 BOOL WINAPI PathQualifyA(LPCSTR path);
614 BOOL WINAPI PathQualifyW(LPCWSTR path);
615 #define PathQualify WINELIB_NAME_AW(PathQualify)
616 BOOL WINAPI PathQualifyAW(LPCVOID path);
619 /* PathResolve flags */
620 #define PRF_CHECKEXISTANCE 0x01
621 #define PRF_EXECUTABLE 0x02
622 #define PRF_QUALIFYONPATH 0x04
623 #define PRF_WINDOWS31 0x08
625 BOOL WINAPI PathResolveAW(LPVOID lpszPath, LPCVOID *alpszPaths, DWORD dwFlags);
627 VOID WINAPI PathSetDlgItemPathAW(HWND hDlg, int nIDDlgItem, LPCVOID lpszPath);
629 /* PathProcessCommand flags */
630 #define PPCF_QUOTEPATH 0x01 /* implies PPCF_INCLUDEARGS */
631 #define PPCF_INCLUDEARGS 0x02
632 #define PPCF_NODIRECTORIES 0x10
633 #define PPCF_DONTRESOLVE 0x20
634 #define PPCF_PATHISRELATIVE 0x40
636 HRESULT WINAPI PathProcessCommandAW(LPCVOID lpszPath, LPVOID lpszBuff,
637 DWORD dwBuffSize, DWORD dwFlags);
639 void WINAPI PathStripPathAW(LPVOID lpszPath);
641 BOOL WINAPI PathStripToRootAW(LPVOID lpszPath);
643 void WINAPI PathRemoveArgsAW(LPVOID lpszPath);
645 void WINAPI PathRemoveExtensionAW(LPVOID lpszPath);
647 int WINAPI PathParseIconLocationAW(LPVOID lpszPath);
649 BOOL WINAPI PathIsSameRootAW(LPCVOID lpszPath1, LPCVOID lpszPath2);
651 BOOL WINAPI PathFindOnPathAW(LPVOID sFile, LPCVOID sOtherDirs);
653 /****************************************************************************
654 * Shell Namespace Routines
657 /* SHCreateShellFolderViewEx callback function */
658 typedef HRESULT (CALLBACK *LPFNSFVCALLBACK)(
659 DWORD dwUser,
660 LPSHELLFOLDER pshf,
661 HWND hWnd,
662 UINT uMsg,
663 WPARAM wParam,
664 LPARAM lParam);
666 /* SHCreateShellFolderViewEx structure */
667 typedef struct
669 DWORD dwSize;
670 LPSHELLFOLDER pshf;
671 DWORD dwUser;
672 LPCITEMIDLIST pidlFolder;
673 DWORD dwEventId;
674 LPFNSFVCALLBACK lpfnCallback;
675 UINT uViewMode;
676 } SHELLFOLDERVIEWINFO, * LPSHELLFOLDERVIEWINFO;
677 typedef const SHELLFOLDERVIEWINFO * LPCSHELLFOLDERVIEWINFO;
679 HRESULT WINAPI SHCreateShellFolderViewEx(
680 LPCSHELLFOLDERVIEWINFO pshfvi,
681 LPSHELLVIEW *ppshv);
683 /* SHCreateShellFolderViewEx callback messages */
684 #define SFVCB_ADDTOMENU 0x0001
685 #define SFVCB_INVOKECOMMAND 0x0002
686 #define SFVCB_GETMENUHELP 0x0003
687 #define SFVCB_GETTOOLBARTIP 0x0004
688 #define SFVCB_GETTOOLBARINFO 0x0005
689 #define SFVCB_ADDTOOLBARITEMS 0x0006
690 #define SFVCB_INITMENUPOPUP 0x0007
691 #define SFVCB_SELECTIONCHANGED 0x0008
692 #define SFVCB_DRAWMENUITEM 0x0009
693 #define SFVCB_MEASUREMENUITEM 0x000A
694 #define SFVCB_EXITMENULOOP 0x000B
695 #define SFVCB_VIEWRELEASE 0x000C
696 #define SFVCB_GETNAMELENGTH 0x000D
697 #define SFVCB_CHANGENOTIFY 0x000E
698 #define SFVCB_WINDOWCREATED 0x000F
699 #define SFVCB_WINDOWCLOSING 0x0010
700 #define SFVCB_LISTREFRESHED 0x0011
701 #define SFVCB_WINDOWFOCUSED 0x0012
702 #define SFVCB_REGISTERCOPYHOOK 0x0014
703 #define SFVCB_COPYHOOKCALLBACK 0x0015
704 #define SFVCB_GETDETAILSOF 0x0017
705 #define SFVCB_COLUMNCLICK 0x0018
706 #define SFVCB_GETCHANGENOTIFYPIDL 0x0019
707 #define SFVCB_GETESTIMATEDCOUNT 0x001A
708 #define SFVCB_ADJUSTVIEWMODE 0x001B
709 #define SFVCB_REMOVEFROMMENU 0x001C
710 #define SFVCB_ADDINGOBJECT 0x001D
711 #define SFVCB_REMOVINGOBJECT 0x001E
712 #define SFVCB_UPDATESTATUSBAR 0x001F
713 #define SFVCB_ISSLOWREFRESH 0x0020
714 #define SFVCB_GETCOMMANDDIR 0x0021
715 #define SFVCB_GETCOLUMNSTREAM 0x0022
716 #define SFVCB_CANSELECTALL 0x0023
717 #define SFVCB_DRAGSUCCEEDED 0x0024
718 #define SFVCB_ISSTRICTREFRESH 0x0025
719 #define SFVCB_ISCHILDOBJECT 0x0026
721 /* Generic structure used by several messages */
722 typedef struct
724 DWORD dwReserved;
725 DWORD dwReserved2;
726 LPCITEMIDLIST pidl;
727 LPDWORD lpdwUser;
728 } SFVCBINFO, * LPSFVCBINFO;
729 typedef const SFVCBINFO * LPCSFVCBINFO;
731 /* SFVCB_ADDTOMENU structure */
732 typedef struct
734 HMENU hMenu;
735 UINT indexMenu;
736 UINT idCmdFirst;
737 UINT idCmdLast;
738 } SFVMENUINFO, * LPSFVMENUINFO;
740 /* SFVCB_GETTOOLBARINFO structure */
741 typedef struct
743 UINT nButtons;
744 UINT uFlags;
745 } SFVTOOLBARINFO, * LPSFVTOOLBARINFO;
747 /* SFVTOOLBARINFO flags */
748 typedef enum
750 SFVTI_ADDTOEND = 0,
751 SFVTI_ADDTOFRONT = 1,
752 SFVTI_OVERWRITE = 2
753 } SFVTIF;
755 /* SFVCB_SELECTIONCHANGED structure */
756 typedef struct
758 UINT uOldState;
759 UINT uNewState;
760 LPCITEMIDLIST pidl;
761 LPDWORD lpdwUser;
762 } SFVSELECTSTATE, * LPSFVSELECTSTATE;
763 typedef const SFVSELECTSTATE * LPCSFVSELECTSTATE;
765 /* SFVCB_COPYHOOKCALLBACK structure */
766 typedef struct
768 HWND hwnd;
769 UINT wFunc;
770 UINT wFlags;
771 LPCSTR pszSrcFile;
772 DWORD dwSrcAttribs;
773 LPCSTR pszDestFile;
774 DWORD dwDestAttribs;
775 } SFVCOPYHOOKINFO, * LPSFVCOPYHOOKINFO;
776 typedef const SFVCOPYHOOKINFO * LPCSFVCOPYHOOKINFO;
778 /* SFVCB_GETDETAILSOF structure */
779 typedef struct
781 LPCITEMIDLIST pidl;
782 int fmt;
783 int cx;
784 STRRET lpText;
785 } SFVCOLUMNINFO, * LPSFVCOLUMNINFO;
787 int WINAPI SHShellFolderView_Message(
788 HWND hwndCabinet,
789 DWORD dwMessage,
790 DWORD dwParam);
792 /* SHShellFolderView_Message messages */
793 #define SFVM_REARRANGE 0x0001
794 #define SFVM_GETARRANGECOLUMN 0x0002
795 #define SFVM_ADDOBJECT 0x0003
796 #define SFVM_GETITEMCOUNT 0x0004
797 #define SFVM_GETITEMPIDL 0x0005
798 #define SFVM_REMOVEOBJECT 0x0006
799 #define SFVM_UPDATEOBJECT 0x0007
800 #define SFVM_SETREDRAW 0x0008
801 #define SFVM_GETSELECTEDOBJECTS 0x0009
802 #define SFVM_ISDROPONSOURCE 0x000A
803 #define SFVM_MOVEICONS 0x000B
804 #define SFVM_GETDRAGPOINT 0x000C
805 #define SFVM_GETDROPPOINT 0x000D
806 #define SFVM_SETOBJECTPOS 0x000E
807 #define SFVM_ISDROPONBACKGROUND 0x000F
808 #define SFVM_CUTOBJECTS 0x0010
809 #define SFVM_TOGGLEAUTOARRANGE 0x0011
810 #define SFVM_LINEUPICONS 0x0012
811 #define SFVM_GETAUTOARRANGE 0x0013
812 #define SFVM_GETSELECTEDCOUNT 0x0014
813 #define SFVM_GETITEMSPACING 0x0015
814 #define SFVM_REFRESHOBJECT 0x0016
815 #define SFVM_SETCLIPBOARDPOINTS 0x0017
817 /****************************************************************************
818 * Misc Stuff
821 /* SHWaitForFileToOpen flags */
822 #define SHWFF_ADD 0x01
823 #define SHWFF_REMOVE 0x02
824 #define SHWFF_WAIT 0x04
826 BOOL WINAPI SHWaitForFileToOpen(
827 LPCITEMIDLIST pidl,
828 DWORD dwFlags,
829 DWORD dwTimeout);
831 WORD WINAPI ArrangeWindows(
832 HWND hwndParent,
833 DWORD dwReserved,
834 LPCRECT lpRect,
835 WORD cKids,
836 CONST HWND * lpKids);
838 /* RegisterShellHook types */
839 #define RSH_DEREGISTER 0
840 #define RSH_REGISTER 1
841 #define RSH_REGISTER_PROGMAN 2
842 #define RSH_REGISTER_TASKMAN 3
844 BOOL WINAPI RegisterShellHook(
845 HWND hWnd,
846 DWORD dwType);
848 /* SHCreateDefClassObject callback function */
849 typedef HRESULT (CALLBACK *LPFNCDCOCALLBACK)(
850 LPUNKNOWN pUnkOuter,
851 REFIID riidObject,
852 LPVOID *ppvObject);
854 HRESULT WINAPI SHCreateDefClassObject(
855 REFIID riidFactory,
856 LPVOID *ppvFactory,
857 LPFNCDCOCALLBACK lpfnCallback,
858 LPDWORD lpdwUsage,
859 REFIID riidObject);
861 HRESULT WINAPI SHCoCreateInstance(
862 LPCSTR lpszClsid,
863 REFCLSID rClsid,
864 LPUNKNOWN pUnkOuter,
865 REFIID riid,
866 LPVOID *ppv);
868 void WINAPI SHFreeUnusedLibraries();
870 /* SHCreateLinks flags */
871 #define SHCLF_PREFIXNAME 0x01
872 #define SHCLF_CREATEONDESKTOP 0x02
874 HRESULT WINAPI SHCreateLinks(
875 HWND hWnd,
876 LPCSTR lpszDir,
877 LPDATAOBJECT lpDataObject,
878 UINT uFlags,
879 LPITEMIDLIST *lppidlLinks);
881 /* SHGetNewLinkInfo flags */
882 #define SHGNLI_PIDL 0x01
883 #define SHGNLI_PREFIXNAME 0x02
884 #define SHGNLI_NOUNIQUE 0x04
886 BOOL WINAPI SHGetNewLinkInfoA(
887 LPCSTR pszLinkTo,
888 LPCSTR pszDir,
889 LPSTR pszName,
890 BOOL *pfMustCopy,
891 UINT uFlags);
893 BOOL WINAPI SHGetNewLinkInfoW(
894 LPCWSTR pszLinkTo,
895 LPCWSTR pszDir,
896 LPWSTR pszName,
897 BOOL *pfMustCopy,
898 UINT uFlags);
899 #define SHGetNewLinkInfo WINELIB_NAME_AW(SHGetNewLinkInfo)
901 /* policy functions */
902 BOOL WINAPI SHInitRestricted(LPSTR, LPSTR);
904 #ifdef __cplusplus
905 } /* extern "C" */
906 #endif /* defined(__cplusplus) */
908 #endif /* __WINE_UNDOCSHELL_H */