- move some PIDL function declarations from undocshell.h into public
[wine.git] / dlls / shell32 / undocshell.h
blob1ac6a7a890d5924b90a8335ce685cd20953e14ea
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 <stdarg.h>
24 #include "windef.h"
25 #include "winbase.h"
26 #include "winuser.h"
27 #include "commctrl.h"
28 #include "shlobj.h"
30 #ifdef __cplusplus
31 extern "C" {
32 #endif /* defined(__cplusplus) */
34 /****************************************************************************
35 * IDList Functions
37 BOOL WINAPI ILGetDisplayName(
38 LPCITEMIDLIST pidl,
39 LPVOID path);
41 /* type parameter for ILGetDisplayNameEx() */
42 #define ILGDN_FORPARSING 0
43 #define ILGDN_NORMAL 1
44 #define ILGDN_INFOLDER 2
46 BOOL WINAPI ILGetDisplayNameEx(
47 LPSHELLFOLDER psf,
48 LPCITEMIDLIST pidl,
49 LPVOID path,
50 DWORD type);
52 HRESULT WINAPI ILSaveToStream(
53 LPSTREAM pstrm,
54 LPCITEMIDLIST pidl);
56 HRESULT WINAPI ILLoadFromStream(
57 LPSTREAM pstrm,
58 LPITEMIDLIST *ppidl);
60 LPITEMIDLIST WINAPI ILGlobalClone(LPCITEMIDLIST pidl);
61 void WINAPI ILGlobalFree(LPITEMIDLIST pidl);
63 LPITEMIDLIST WINAPI SHSimpleIDListFromPathA (LPCSTR lpszPath);
64 LPITEMIDLIST WINAPI SHSimpleIDListFromPathW (LPCWSTR lpszPath);
65 LPITEMIDLIST WINAPI SHSimpleIDListFromPathAW (LPCVOID lpszPath);
67 HRESULT WINAPI SHILCreateFromPathA (
68 LPCSTR path,
69 LPITEMIDLIST * ppidl,
70 DWORD *attributes);
72 HRESULT WINAPI SHILCreateFromPathW (
73 LPCWSTR path,
74 LPITEMIDLIST * ppidl,
75 DWORD *attributes);
77 HRESULT WINAPI SHILCreateFromPathAW (
78 LPCVOID path,
79 LPITEMIDLIST * ppidl,
80 DWORD *attributes);
82 LPITEMIDLIST WINAPI ILCreateFromPathA(LPCSTR path);
83 LPITEMIDLIST WINAPI ILCreateFromPathW(LPCWSTR path);
84 LPITEMIDLIST WINAPI ILCreateFromPathAW(LPCVOID path);
87 string functions
89 BOOL WINAPI StrRetToStrNA(LPSTR,DWORD,LPSTRRET,const ITEMIDLIST*);
90 BOOL WINAPI StrRetToStrNW(LPWSTR,DWORD,LPSTRRET,const ITEMIDLIST*);
91 BOOL WINAPI StrRetToStrNAW(LPVOID,DWORD,LPSTRRET,const ITEMIDLIST*);
94 /****************************************************************************
95 * SHChangeNotifyRegister API
97 #define SHCNRF_InterruptLevel 0x0001
98 #define SHCNRF_ShellLevel 0x0002
99 #define SHCNRF_RecursiveInterrupt 0x1000 /* Must be combined with SHCNRF_InterruptLevel */
100 #define SHCNRF_NewDelivery 0x8000 /* Messages use shared memory */
102 /****************************************************************************
103 * Shell Common Dialogs
106 BOOL WINAPI PickIconDlg(
107 HWND hwndOwner,
108 LPSTR lpstrFile,
109 DWORD nMaxFile,
110 LPDWORD lpdwIconIndex);
112 /* RunFileDlg flags */
113 #define RFF_NOBROWSE 0x01
114 #define RFF_NODEFAULT 0x02
115 #define RFF_CALCDIRECTORY 0x04
116 #define RFF_NOLABEL 0x08
117 #define RFF_NOSEPARATEMEM 0x20 /* NT only */
119 /* RunFileFlg notification structure */
120 typedef struct
122 NMHDR hdr;
123 LPCSTR lpFile;
124 LPCSTR lpDirectory;
125 int nShow;
126 } NM_RUNFILEDLG, * LPNM_RUNFILEDLG;
128 /* RunFileDlg notification return values */
129 #define RF_OK 0x00
130 #define RF_CANCEL 0x01
131 #define RF_RETRY 0x02
133 void WINAPI RunFileDlg(
134 HWND hwndOwner,
135 HICON hIcon,
136 LPCSTR lpstrDirectory,
137 LPCSTR lpstrTitle,
138 LPCSTR lpstrDescription,
139 UINT uFlags);
141 void WINAPI ExitWindowsDialog(HWND hwndOwner);
143 int WINAPI RestartDialog(
144 HWND hwndOwner,
145 LPCSTR lpstrReason,
146 UINT uFlags);
148 BOOL WINAPI GetFileNameFromBrowse(
149 HWND hwndOwner,
150 LPSTR lpstrFile,
151 DWORD nMaxFile,
152 LPCSTR lpstrInitialDir,
153 LPCSTR lpstrDefExt,
154 LPCSTR lpstrFilter,
155 LPCSTR lpstrTitle);
157 BOOL WINAPI SHFindFiles(
158 LPCITEMIDLIST pidlRoot,
159 LPCITEMIDLIST pidlSavedSearch);
161 BOOL WINAPI SHFindComputer(
162 LPCITEMIDLIST pidlRoot,
163 LPCITEMIDLIST pidlSavedSearch);
165 /* SHObjectProperties flags */
166 #define OPF_PRINTERNAME 0x01
167 #define OPF_PATHNAME 0x02
169 BOOL WINAPI SHObjectProperties(
170 HWND hwndOwner,
171 UINT uFlags,
172 LPCSTR lpstrName,
173 LPCSTR lpstrParameters);
175 void WINAPI SHHandleDiskFull(HWND hwndOwner,
176 UINT uDrive);
178 int WINAPI SHOutOfMemoryMessageBox(
179 HWND hwndOwner,
180 LPCSTR lpCaption,
181 UINT uType);
183 DWORD WINAPI SHNetConnectionDialog(
184 HWND hwndOwner,
185 LPCSTR lpstrRemoteName,
186 DWORD dwType);
188 int WINAPIV ShellMessageBoxA(
189 HINSTANCE hInstance,
190 HWND hWnd,
191 LPCSTR lpText,
192 LPCSTR lpCaption,
193 UINT uType,
194 ...);
196 int WINAPIV ShellMessageBoxW(
197 HINSTANCE hInstance,
198 HWND hWnd,
199 LPCWSTR lpText,
200 LPCWSTR lpCaption,
201 UINT uType,
202 ...);
204 #define ShellMessageBox WINELIB_NAME_AW(ShellMessageBox)
206 /****************************************************************************
207 * Memory Routines
210 LPVOID WINAPI SHAlloc(ULONG cb);
211 void WINAPI SHFree(LPVOID pv);
213 HANDLE WINAPI SHAllocShared(
214 LPVOID pv,
215 ULONG cb,
216 DWORD pid);
218 BOOL WINAPI SHFreeShared(
219 HANDLE hMem,
220 DWORD pid);
222 LPVOID WINAPI SHLockShared(
223 HANDLE hMem,
224 DWORD pid);
226 BOOL WINAPI SHUnlockShared(LPVOID pv);
228 /****************************************************************************
229 * Cabinet Window Messages
232 #define CWM_SETPATH (WM_USER + 2)
233 #define CWM_WANTIDLE (WM_USER + 3)
234 #define CWM_GETSETCURRENTINFO (WM_USER + 4)
235 #define CWM_SELECTITEM (WM_USER + 5)
236 #define CWM_SELECTITEMSTR (WM_USER + 6)
237 #define CWM_GETISHELLBROWSER (WM_USER + 7)
238 #define CWM_TESTPATH (WM_USER + 9)
239 #define CWM_STATECHANGE (WM_USER + 10)
240 #define CWM_GETPATH (WM_USER + 12)
242 /* CWM_TESTPATH types */
243 #define CWTP_ISEQUAL 0
244 #define CWTP_ISCHILD 1
246 /* CWM_TESTPATH structure */
247 typedef struct
249 DWORD dwType;
250 ITEMIDLIST idl;
251 } CWTESTPATHSTRUCT,* LPCWTESTPATHSTRUCT;
253 /****************************************************************************
254 * System Imagelist Routines
257 int WINAPI Shell_GetCachedImageIndex(
258 LPCSTR lpszFileName,
259 UINT nIconIndex,
260 BOOL bSimulateDoc);
262 BOOL WINAPI Shell_GetImageLists(
263 HIMAGELIST *lphimlLarge,
264 HIMAGELIST *lphimlSmall);
266 HICON WINAPI SHGetFileIcon(
267 DWORD dwReserved,
268 LPCSTR lpszPath,
269 DWORD dwFileAttributes,
270 UINT uFlags);
272 int WINAPI SHMapPIDLToSystemImageListIndex(
273 LPSHELLFOLDER psf,
274 LPCITEMIDLIST pidl,
275 UINT * pOpenIndex);
277 BOOL WINAPI FileIconInit(BOOL bFullInit);
279 /****************************************************************************
280 * File Menu Routines
282 /* FileMenu_Create nSelHeight constants */
283 #define FM_DEFAULT_SELHEIGHT -1
284 #define FM_FULL_SELHEIGHT 0
286 /* FileMenu_Create flags */
287 #define FMF_SMALL_ICONS 0x00
288 #define FMF_LARGE_ICONS 0x08
289 #define FMF_NO_COLUMN_BREAK 0x10
291 HMENU WINAPI FileMenu_Create(
292 COLORREF crBorderColor,
293 int nBorderWidth,
294 HBITMAP hBorderBmp,
295 int nSelHeight,
296 UINT uFlags);
298 void WINAPI FileMenu_Destroy(HMENU hMenu);
300 /* FileMenu_AppendItem constants */
301 #define FM_SEPARATOR (LPCSTR)1
302 #define FM_BLANK_ICON -1
303 #define FM_DEFAULT_HEIGHT 0
305 BOOL WINAPI FileMenu_AppendItem(
306 HMENU hMenu,
307 LPCSTR lpszText,
308 UINT uID,
309 int iIcon,
310 HMENU hMenuPopup,
311 int nItemHeight);
313 /* FileMenu_InsertUsingPidl flags */
314 #define FMF_NO_EMPTY_ITEM 0x01
315 #define FMF_NO_PROGRAM_GROUPS 0x04
317 /* FileMenu_InsertUsingPidl callback function */
318 typedef void (CALLBACK *LPFNFMCALLBACK)(LPCITEMIDLIST pidlFolder, LPCITEMIDLIST pidlFile);
320 int WINAPI FileMenu_InsertUsingPidl(
321 HMENU hMenu,
322 UINT uID,
323 LPCITEMIDLIST pidl,
324 UINT uFlags,
325 UINT uEnumFlags,
326 LPFNFMCALLBACK lpfnCallback);
328 int WINAPI FileMenu_ReplaceUsingPidl(
329 HMENU hMenu,
330 UINT uID,
331 LPCITEMIDLIST pidl,
332 UINT uEnumFlags,
333 LPFNFMCALLBACK lpfnCallback);
335 void WINAPI FileMenu_Invalidate(HMENU hMenu);
337 HMENU WINAPI FileMenu_FindSubMenuByPidl(
338 HMENU hMenu,
339 LPCITEMIDLIST pidl);
341 BOOL WINAPI FileMenu_TrackPopupMenuEx(
342 HMENU hMenu,
343 UINT uFlags,
344 int x,
345 int y,
346 HWND hWnd,
347 LPTPMPARAMS lptpm);
349 BOOL WINAPI FileMenu_GetLastSelectedItemPidls(
350 UINT uReserved,
351 LPCITEMIDLIST *ppidlFolder,
352 LPCITEMIDLIST *ppidlItem);
354 LRESULT WINAPI FileMenu_MeasureItem(
355 HWND hWnd,
356 LPMEASUREITEMSTRUCT lpmis);
358 LRESULT WINAPI FileMenu_DrawItem(
359 HWND hWnd,
360 LPDRAWITEMSTRUCT lpdis);
362 BOOL WINAPI FileMenu_InitMenuPopup(HMENU hMenu);
364 void WINAPI FileMenu_AbortInitMenu(void);
366 LRESULT WINAPI FileMenu_HandleMenuChar(
367 HMENU hMenu,
368 WPARAM wParam);
370 BOOL WINAPI FileMenu_DeleteAllItems(HMENU hMenu);
372 BOOL WINAPI FileMenu_DeleteItemByCmd(
373 HMENU hMenu,
374 UINT uID);
376 BOOL WINAPI FileMenu_DeleteItemByIndex(
377 HMENU hMenu,
378 UINT uPos);
380 BOOL WINAPI FileMenu_DeleteMenuItemByFirstID(
381 HMENU hMenu,
382 UINT uID);
384 BOOL WINAPI FileMenu_DeleteSeparator(HMENU hMenu);
386 BOOL WINAPI FileMenu_EnableItemByCmd(
387 HMENU hMenu,
388 UINT uID,
389 BOOL bEnable);
391 DWORD WINAPI FileMenu_GetItemExtent(
392 HMENU hMenu,
393 UINT uPos);
395 int WINAPI FileMenu_AppendFilesForPidl(
396 HMENU hMenu,
397 LPCITEMIDLIST pidl,
398 BOOL bAddSeparator);
400 int WINAPI FileMenu_AddFilesForPidl(
401 HMENU hMenu,
402 UINT uReserved,
403 UINT uID,
404 LPCITEMIDLIST pidl,
405 UINT uFlags,
406 UINT uEnumFlags,
407 LPFNFMCALLBACK lpfnCallback);
409 /****************************************************************************
410 * Drag And Drop Routines
412 HRESULT WINAPI SHLoadOLE(DWORD dwFlags);
414 HRESULT WINAPI SHRegisterDragDrop(
415 HWND hWnd,
416 LPDROPTARGET lpDropTarget);
418 HRESULT WINAPI SHRevokeDragDrop(HWND hWnd);
420 HRESULT WINAPI SHDoDragDrop(
421 HWND hWnd,
422 LPDATAOBJECT lpDataObject,
423 LPDROPSOURCE lpDropSource,
424 DWORD dwOKEffect,
425 LPDWORD pdwEffect);
427 BOOL WINAPI DAD_DragEnter(HWND hWnd);
429 BOOL WINAPI DAD_DragEnterEx(
430 HWND hWnd,
431 POINT pt);
433 BOOL WINAPI DAD_DragMove(POINT pt);
435 /* DAD_AutoScroll return values */
436 #define DAD_SCROLL_UP 1
437 #define DAD_SCROLL_DOWN 2
438 #define DAD_SCROLL_LEFT 4
439 #define DAD_SCROLL_RIGHT 8
441 /* DAD_AutoScroll sample structure */
442 typedef struct
444 DWORD dwCount;
445 DWORD dwLastTime;
446 BOOL bWrapped;
447 POINT aptPositions[3];
448 DWORD adwTimes[3];
449 } SCROLLSAMPLES, *LPSCROLLSAMPLES;
451 DWORD WINAPI DAD_AutoScroll(HWND hWnd,
452 LPSCROLLSAMPLES lpSamples,
453 LPPOINT lppt);
455 BOOL WINAPI DAD_DragLeave();
457 BOOL WINAPI DAD_SetDragImageFromListView(
458 HWND hWnd,
459 POINT pt);
461 BOOL WINAPI DAD_SetDragImage(
462 HIMAGELIST himlTrack,
463 LPPOINT lppt);
465 BOOL WINAPI DAD_ShowDragImage(BOOL bShow);
467 HRESULT WINAPI SHCreateStdEnumFmtEtc(
468 DWORD cFormats,
469 const FORMATETC *lpFormats,
470 LPENUMFORMATETC *ppenumFormatetc);
472 HRESULT WINAPI CIDLData_CreateFromIDArray(
473 LPCITEMIDLIST pidlFolder,
474 DWORD cpidlFiles,
475 LPCITEMIDLIST *lppidlFiles,
476 LPDATAOBJECT *ppdataObject);
478 /****************************************************************************
479 * Path Manipulation Routines
482 BOOL WINAPI PathAppendAW(LPVOID lpszPath1, LPCVOID lpszPath2);
484 LPVOID WINAPI PathCombineAW(LPVOID szDest, LPCVOID lpszDir, LPCVOID lpszFile);
486 LPVOID WINAPI PathAddBackslashAW(LPVOID path);
488 LPVOID WINAPI PathBuildRootAW(LPVOID lpszPath, int drive);
490 LPVOID WINAPI PathFindExtensionAW(LPCVOID path);
492 LPVOID WINAPI PathFindFileNameAW(LPCVOID path);
494 LPVOID WINAPI PathGetExtensionAW(LPCVOID lpszPath, DWORD void1, DWORD void2);
496 LPVOID WINAPI PathGetArgsAW(LPVOID lpszPath);
498 BOOL WINAPI PathRemoveFileSpecAW(LPVOID lpszPath);
500 void WINAPI PathRemoveBlanksAW(LPVOID lpszPath);
502 VOID WINAPI PathQuoteSpacesAW(LPVOID path);
504 void WINAPI PathUnquoteSpacesAW(LPVOID lpszPath);
506 BOOL WINAPI PathIsUNCAW(LPCVOID lpszPath);
508 BOOL WINAPI PathIsRelativeAW(LPCVOID lpszPath);
510 BOOL WINAPI PathIsRootAW(LPCVOID x);
512 BOOL WINAPI PathIsExeAW(LPCVOID lpszPath);
514 BOOL WINAPI PathIsDirectoryAW(LPCVOID lpszPath);
516 BOOL WINAPI PathFileExistsAW(LPCVOID lpszPath);
518 BOOL WINAPI PathMatchSpecAW(LPVOID lpszPath, LPVOID lpszSpec);
520 BOOL WINAPI PathMakeUniqueNameAW(
521 LPVOID lpszBuffer,
522 DWORD dwBuffSize,
523 LPCVOID lpszShortName,
524 LPCVOID lpszLongName,
525 LPCVOID lpszPathName);
527 BOOL WINAPI PathYetAnotherMakeUniqueName(
528 LPWSTR lpszBuffer,
529 LPCWSTR lpszPathName,
530 LPCWSTR lpszShortName,
531 LPCWSTR lpszLongName);
533 /* PathCleanupSpec return values */
534 #define PCS_REPLACEDCHARS 0x00000001
535 #define PCS_REMOVEDCHARS 0x00000002
536 #define PCS_SHORTENED 0x00000004
537 #define PCS_PATHTOOLONG 0x80000008
539 DWORD WINAPI PathCleanupSpecAW(LPCVOID lpszPath, LPVOID lpszFile);
541 BOOL WINAPI PathQualifyA(LPCSTR path);
542 BOOL WINAPI PathQualifyW(LPCWSTR path);
543 #define PathQualify WINELIB_NAME_AW(PathQualify)
544 BOOL WINAPI PathQualifyAW(LPCVOID path);
547 /* PathResolve flags */
548 #define PRF_CHECKEXISTANCE 0x01
549 #define PRF_EXECUTABLE 0x02
550 #define PRF_QUALIFYONPATH 0x04
551 #define PRF_WINDOWS31 0x08
553 BOOL WINAPI PathResolveAW(LPVOID lpszPath, LPCVOID *alpszPaths, DWORD dwFlags);
555 VOID WINAPI PathSetDlgItemPathAW(HWND hDlg, int nIDDlgItem, LPCVOID lpszPath);
557 /* PathProcessCommand flags */
558 #define PPCF_QUOTEPATH 0x01 /* implies PPCF_INCLUDEARGS */
559 #define PPCF_INCLUDEARGS 0x02
560 #define PPCF_NODIRECTORIES 0x10
561 #define PPCF_DONTRESOLVE 0x20
562 #define PPCF_PATHISRELATIVE 0x40
564 HRESULT WINAPI PathProcessCommandAW(LPCVOID lpszPath, LPVOID lpszBuff,
565 DWORD dwBuffSize, DWORD dwFlags);
567 void WINAPI PathStripPathAW(LPVOID lpszPath);
569 BOOL WINAPI PathStripToRootAW(LPVOID lpszPath);
571 void WINAPI PathRemoveArgsAW(LPVOID lpszPath);
573 void WINAPI PathRemoveExtensionAW(LPVOID lpszPath);
575 int WINAPI PathParseIconLocationAW(LPVOID lpszPath);
577 BOOL WINAPI PathIsSameRootAW(LPCVOID lpszPath1, LPCVOID lpszPath2);
579 BOOL WINAPI PathFindOnPathAW(LPVOID sFile, LPCVOID sOtherDirs);
581 /****************************************************************************
582 * Shell Namespace Routines
585 /* SHCreateShellFolderViewEx callback function */
586 typedef HRESULT (CALLBACK *LPFNSFVCALLBACK)(
587 DWORD dwUser,
588 LPSHELLFOLDER pshf,
589 HWND hWnd,
590 UINT uMsg,
591 WPARAM wParam,
592 LPARAM lParam);
594 /* SHCreateShellFolderViewEx structure */
595 typedef struct
597 DWORD dwSize;
598 LPSHELLFOLDER pshf;
599 DWORD dwUser;
600 LPCITEMIDLIST pidlFolder;
601 DWORD dwEventId;
602 LPFNSFVCALLBACK lpfnCallback;
603 UINT uViewMode;
604 } SHELLFOLDERVIEWINFO, * LPSHELLFOLDERVIEWINFO;
605 typedef const SHELLFOLDERVIEWINFO * LPCSHELLFOLDERVIEWINFO;
607 HRESULT WINAPI SHCreateShellFolderViewEx(
608 LPCSHELLFOLDERVIEWINFO pshfvi,
609 LPSHELLVIEW *ppshv);
611 /* SHCreateShellFolderViewEx callback messages */
612 #define SFVCB_ADDTOMENU 0x0001
613 #define SFVCB_INVOKECOMMAND 0x0002
614 #define SFVCB_GETMENUHELP 0x0003
615 #define SFVCB_GETTOOLBARTIP 0x0004
616 #define SFVCB_GETTOOLBARINFO 0x0005
617 #define SFVCB_ADDTOOLBARITEMS 0x0006
618 #define SFVCB_INITMENUPOPUP 0x0007
619 #define SFVCB_SELECTIONCHANGED 0x0008
620 #define SFVCB_DRAWMENUITEM 0x0009
621 #define SFVCB_MEASUREMENUITEM 0x000A
622 #define SFVCB_EXITMENULOOP 0x000B
623 #define SFVCB_VIEWRELEASE 0x000C
624 #define SFVCB_GETNAMELENGTH 0x000D
625 #define SFVCB_CHANGENOTIFY 0x000E
626 #define SFVCB_WINDOWCREATED 0x000F
627 #define SFVCB_WINDOWCLOSING 0x0010
628 #define SFVCB_LISTREFRESHED 0x0011
629 #define SFVCB_WINDOWFOCUSED 0x0012
630 #define SFVCB_REGISTERCOPYHOOK 0x0014
631 #define SFVCB_COPYHOOKCALLBACK 0x0015
632 #define SFVCB_GETDETAILSOF 0x0017
633 #define SFVCB_COLUMNCLICK 0x0018
634 #define SFVCB_GETCHANGENOTIFYPIDL 0x0019
635 #define SFVCB_GETESTIMATEDCOUNT 0x001A
636 #define SFVCB_ADJUSTVIEWMODE 0x001B
637 #define SFVCB_REMOVEFROMMENU 0x001C
638 #define SFVCB_ADDINGOBJECT 0x001D
639 #define SFVCB_REMOVINGOBJECT 0x001E
640 #define SFVCB_UPDATESTATUSBAR 0x001F
641 #define SFVCB_ISSLOWREFRESH 0x0020
642 #define SFVCB_GETCOMMANDDIR 0x0021
643 #define SFVCB_GETCOLUMNSTREAM 0x0022
644 #define SFVCB_CANSELECTALL 0x0023
645 #define SFVCB_DRAGSUCCEEDED 0x0024
646 #define SFVCB_ISSTRICTREFRESH 0x0025
647 #define SFVCB_ISCHILDOBJECT 0x0026
649 /* Generic structure used by several messages */
650 typedef struct
652 DWORD dwReserved;
653 DWORD dwReserved2;
654 LPCITEMIDLIST pidl;
655 LPDWORD lpdwUser;
656 } SFVCBINFO, * LPSFVCBINFO;
657 typedef const SFVCBINFO * LPCSFVCBINFO;
659 /* SFVCB_ADDTOMENU structure */
660 typedef struct
662 HMENU hMenu;
663 UINT indexMenu;
664 UINT idCmdFirst;
665 UINT idCmdLast;
666 } SFVMENUINFO, * LPSFVMENUINFO;
668 /* SFVCB_GETTOOLBARINFO structure */
669 typedef struct
671 UINT nButtons;
672 UINT uFlags;
673 } SFVTOOLBARINFO, * LPSFVTOOLBARINFO;
675 /* SFVTOOLBARINFO flags */
676 typedef enum
678 SFVTI_ADDTOEND = 0,
679 SFVTI_ADDTOFRONT = 1,
680 SFVTI_OVERWRITE = 2
681 } SFVTIF;
683 /* SFVCB_SELECTIONCHANGED structure */
684 typedef struct
686 UINT uOldState;
687 UINT uNewState;
688 LPCITEMIDLIST pidl;
689 LPDWORD lpdwUser;
690 } SFVSELECTSTATE, * LPSFVSELECTSTATE;
691 typedef const SFVSELECTSTATE * LPCSFVSELECTSTATE;
693 /* SFVCB_COPYHOOKCALLBACK structure */
694 typedef struct
696 HWND hwnd;
697 UINT wFunc;
698 UINT wFlags;
699 LPCSTR pszSrcFile;
700 DWORD dwSrcAttribs;
701 LPCSTR pszDestFile;
702 DWORD dwDestAttribs;
703 } SFVCOPYHOOKINFO, * LPSFVCOPYHOOKINFO;
704 typedef const SFVCOPYHOOKINFO * LPCSFVCOPYHOOKINFO;
706 /* SFVCB_GETDETAILSOF structure */
707 typedef struct
709 LPCITEMIDLIST pidl;
710 int fmt;
711 int cx;
712 STRRET lpText;
713 } SFVCOLUMNINFO, * LPSFVCOLUMNINFO;
715 int WINAPI SHShellFolderView_Message(
716 HWND hwndCabinet,
717 DWORD dwMessage,
718 DWORD dwParam);
720 /* SHShellFolderView_Message messages */
721 #define SFVM_REARRANGE 0x0001
722 #define SFVM_GETARRANGECOLUMN 0x0002
723 #define SFVM_ADDOBJECT 0x0003
724 #define SFVM_GETITEMCOUNT 0x0004
725 #define SFVM_GETITEMPIDL 0x0005
726 #define SFVM_REMOVEOBJECT 0x0006
727 #define SFVM_UPDATEOBJECT 0x0007
728 #define SFVM_SETREDRAW 0x0008
729 #define SFVM_GETSELECTEDOBJECTS 0x0009
730 #define SFVM_ISDROPONSOURCE 0x000A
731 #define SFVM_MOVEICONS 0x000B
732 #define SFVM_GETDRAGPOINT 0x000C
733 #define SFVM_GETDROPPOINT 0x000D
734 #define SFVM_SETOBJECTPOS 0x000E
735 #define SFVM_ISDROPONBACKGROUND 0x000F
736 #define SFVM_CUTOBJECTS 0x0010
737 #define SFVM_TOGGLEAUTOARRANGE 0x0011
738 #define SFVM_LINEUPICONS 0x0012
739 #define SFVM_GETAUTOARRANGE 0x0013
740 #define SFVM_GETSELECTEDCOUNT 0x0014
741 #define SFVM_GETITEMSPACING 0x0015
742 #define SFVM_REFRESHOBJECT 0x0016
743 #define SFVM_SETCLIPBOARDPOINTS 0x0017
745 /****************************************************************************
746 * Misc Stuff
749 /* SHWaitForFileToOpen flags */
750 #define SHWFF_ADD 0x01
751 #define SHWFF_REMOVE 0x02
752 #define SHWFF_WAIT 0x04
754 BOOL WINAPI SHWaitForFileToOpen(
755 LPCITEMIDLIST pidl,
756 DWORD dwFlags,
757 DWORD dwTimeout);
759 WORD WINAPI ArrangeWindows(
760 HWND hwndParent,
761 DWORD dwReserved,
762 LPCRECT lpRect,
763 WORD cKids,
764 CONST HWND * lpKids);
766 /* RegisterShellHook types */
767 #define RSH_DEREGISTER 0
768 #define RSH_REGISTER 1
769 #define RSH_REGISTER_PROGMAN 2
770 #define RSH_REGISTER_TASKMAN 3
772 BOOL WINAPI RegisterShellHook(
773 HWND hWnd,
774 DWORD dwType);
776 /* SHCreateDefClassObject callback function */
777 typedef HRESULT (CALLBACK *LPFNCDCOCALLBACK)(
778 LPUNKNOWN pUnkOuter,
779 REFIID riidObject,
780 LPVOID *ppvObject);
782 HRESULT WINAPI SHCreateDefClassObject(
783 REFIID riidFactory,
784 LPVOID *ppvFactory,
785 LPFNCDCOCALLBACK lpfnCallback,
786 LPDWORD lpdwUsage,
787 REFIID riidObject);
789 DWORD WINAPI SHCLSIDFromStringA (LPCSTR clsid, CLSID *id);
790 DWORD WINAPI SHCLSIDFromStringW (LPCWSTR clsid, CLSID *id);
792 void WINAPI SHFreeUnusedLibraries();
794 /* SHCreateLinks flags */
795 #define SHCLF_PREFIXNAME 0x01
796 #define SHCLF_CREATEONDESKTOP 0x02
798 HRESULT WINAPI SHCreateLinks(
799 HWND hWnd,
800 LPCSTR lpszDir,
801 LPDATAOBJECT lpDataObject,
802 UINT uFlags,
803 LPITEMIDLIST *lppidlLinks);
805 /* SHGetNewLinkInfo flags */
806 #define SHGNLI_PIDL 0x01
807 #define SHGNLI_PREFIXNAME 0x02
808 #define SHGNLI_NOUNIQUE 0x04
810 BOOL WINAPI SHGetNewLinkInfoA(
811 LPCSTR pszLinkTo,
812 LPCSTR pszDir,
813 LPSTR pszName,
814 BOOL *pfMustCopy,
815 UINT uFlags);
817 BOOL WINAPI SHGetNewLinkInfoW(
818 LPCWSTR pszLinkTo,
819 LPCWSTR pszDir,
820 LPWSTR pszName,
821 BOOL *pfMustCopy,
822 UINT uFlags);
823 #define SHGetNewLinkInfo WINELIB_NAME_AW(SHGetNewLinkInfo)
825 DWORD WINAPI CheckEscapesA(LPSTR string, DWORD len);
826 DWORD WINAPI CheckEscapesW(LPWSTR string, DWORD len);
828 /* policy functions */
829 BOOL WINAPI SHInitRestricted(LPCVOID unused, LPCVOID inpRegKey);
831 /* cabinet functions */
833 #include "pshpack1.h"
835 typedef struct {
836 WORD cLength;
837 WORD nVersion;
838 BOOL fFullPathTitle:1;
839 BOOL fSaveLocalView:1;
840 BOOL fNotShell:1;
841 BOOL fSimpleDefault:1;
842 BOOL fDontShowDescBar:1;
843 BOOL fNewWindowMode:1;
844 BOOL fShowCompColor:1;
845 BOOL fDontPrettyNames:1;
846 BOOL fAdminsCreateCommonGroups:1;
847 UINT fUnusedFlags:7;
848 UINT fMenuEnumFilter;
849 } CABINETSTATE;
851 #include "poppack.h"
853 BOOL WINAPI ReadCabinetState(CABINETSTATE *, int);
854 BOOL WINAPI WriteCabinetState(CABINETSTATE *);
856 #ifdef __cplusplus
857 } /* extern "C" */
858 #endif /* defined(__cplusplus) */
860 #endif /* __WINE_UNDOCSHELL_H */