BeginDeferWindowPos should allow zero count.
[wine.git] / include / wine / undocshell.h
blob122bba3323a42e7e22fe5ca6348e3324d3a76f92
1 #ifndef __WINE_UNDOCSHELL_H
2 #define __WINE_UNDOCSHELL_H
4 #include "windef.h"
5 //#include "shell.h"
6 #include "commctrl.h"
7 #include "wine/obj_shellfolder.h"
8 #include "wine/obj_shellview.h"
9 #include "wine/obj_dragdrop.h"
11 #ifdef __cplusplus
12 extern "C" {
13 #endif /* defined(__cplusplus) */
15 /****************************************************************************
16 * IDList Functions
18 LPITEMIDLIST WINAPI ILClone (LPCITEMIDLIST pidl);
19 LPITEMIDLIST WINAPI ILCloneFirst(LPCITEMIDLIST pidl);
21 LPITEMIDLIST WINAPI ILCombine(
22 LPCITEMIDLIST iil1,
23 LPCITEMIDLIST iil2);
25 DWORD WINAPI ILGetSize(LPITEMIDLIST pidl);
27 LPITEMIDLIST WINAPI ILGetNext(LPITEMIDLIST pidl);
28 LPITEMIDLIST WINAPI ILFindLastID(LPITEMIDLIST pidl);
29 BOOL WINAPI ILRemoveLastID(LPCITEMIDLIST pidl);
31 LPITEMIDLIST WINAPI ILFindChild(
32 LPCITEMIDLIST pidl1,
33 LPCITEMIDLIST pidl2);
35 LPITEMIDLIST WINAPI ILAppendID(
36 LPITEMIDLIST pidl,
37 LPCSHITEMID lpItemID,
38 BOOL bAddToEnd);
40 BOOL WINAPI ILIsEqual(
41 LPCITEMIDLIST pidl1,
42 LPCITEMIDLIST pidl2);
44 BOOL WINAPI ILIsParent(
45 LPCITEMIDLIST pidlParent,
46 LPCITEMIDLIST pidlChild,
47 BOOL bImmediate);
49 BOOL WINAPI ILGetDisplayName(
50 LPCITEMIDLIST pidl,
51 LPSTR path);
53 DWORD WINAPI ILFree(LPITEMIDLIST pidl);
55 HRESULT WINAPI ILSaveToStream(
56 LPSTREAM pstrm,
57 LPCITEMIDLIST pidl);
59 HRESULT WINAPI ILLoadFromStream(
60 LPSTREAM pstrm,
61 LPITEMIDLIST *ppidl);
63 LPITEMIDLIST WINAPI ILGlobalClone(LPCITEMIDLIST pidl);
64 void WINAPI ILGlobalFree(LPCITEMIDLIST pidl);
66 LPITEMIDLIST WINAPI SHSimpleIDListFromPathA (LPCSTR lpszPath);
67 LPITEMIDLIST WINAPI SHSimpleIDListFromPathW (LPCWSTR lpszPath);
68 LPITEMIDLIST WINAPI SHSimpleIDListFromPathAW (LPCVOID lpszPath);
70 HRESULT WINAPI SHILCreateFromPathA (
71 LPCSTR path,
72 LPITEMIDLIST * ppidl,
73 DWORD *attributes);
75 HRESULT WINAPI SHILCreateFromPathW (
76 LPCWSTR path,
77 LPITEMIDLIST * ppidl,
78 DWORD *attributes);
80 HRESULT WINAPI SHILCreateFromPathAW (
81 LPCVOID path,
82 LPITEMIDLIST * ppidl,
83 DWORD *attributes);
85 LPITEMIDLIST WINAPI ILCreateFromPathA(LPCSTR path);
86 LPITEMIDLIST WINAPI ILCreateFromPathW(LPCWSTR path);
87 LPITEMIDLIST WINAPI ILCreateFromPathAW(LPCVOID path);
89 HRESULT WINAPI SHBindToParent(
90 LPCITEMIDLIST pidl,
91 REFIID riid,
92 LPVOID *ppv,
93 LPCITEMIDLIST *ppidlLast);
96 string functions
98 HRESULT WINAPI StrRetToStrNA (
99 LPVOID dest,
100 DWORD len,
101 LPSTRRET src,
102 LPITEMIDLIST pidl);
104 HRESULT WINAPI StrRetToStrNW (
105 LPVOID dest,
106 DWORD len,
107 LPSTRRET src,
108 LPITEMIDLIST pidl);
110 HRESULT WINAPI StrRetToStrNAW (
111 LPVOID dest,
112 DWORD len,
113 LPSTRRET src,
114 LPITEMIDLIST pidl);
116 HRESULT WINAPI StrRetToBufA (
117 LPSTRRET src,
118 LPITEMIDLIST pidl,
119 LPSTR dest,
120 DWORD len);
122 HRESULT WINAPI StrRetToBufW (
123 LPSTRRET src,
124 LPITEMIDLIST pidl,
125 LPWSTR dest,
126 DWORD len);
128 /****************************************************************************
129 * SHChangeNotifyRegister API
131 #define SHCNF_ACCEPT_INTERRUPTS 0x0001
132 #define SHCNF_ACCEPT_NON_INTERRUPTS 0x0002
133 #define SHCNF_NO_PROXY 0x8001
135 typedef struct
137 LPCITEMIDLIST pidlPath;
138 BOOL bWatchSubtree;
139 } NOTIFYREGISTER, *LPNOTIFYREGISTER;
141 typedef const LPNOTIFYREGISTER LPCNOTIFYREGISTER;
143 typedef struct
145 USHORT cb;
146 DWORD dwItem1;
147 DWORD dwItem2;
148 } DWORDITEMID;
150 HANDLE WINAPI SHChangeNotifyRegister(
151 HWND hwnd,
152 LONG dwFlags,
153 LONG wEventMask,
154 DWORD uMsg,
155 int cItems,
156 LPCNOTIFYREGISTER lpItems);
158 BOOL WINAPI SHChangeNotifyDeregister(HANDLE hNotify);
160 HANDLE WINAPI SHChangeNotification_Lock(
161 HANDLE hMemoryMap,
162 DWORD dwProcessId,
163 LPCITEMIDLIST **lppidls,
164 LPLONG lpwEventId);
166 BOOL WINAPI SHChangeNotification_Unlock(HANDLE hLock);
168 /****************************************************************************
169 * Shell Common Dialogs
172 BOOL WINAPI PickIconDlg(
173 HWND hwndOwner,
174 LPSTR lpstrFile,
175 DWORD nMaxFile,
176 LPDWORD lpdwIconIndex);
178 /* RunFileDlg flags */
179 #define RFF_NOBROWSE 0x01
180 #define RFF_NODEFAULT 0x02
181 #define RFF_CALCDIRECTORY 0x04
182 #define RFF_NOLABEL 0x08
183 #define RFF_NOSEPARATEMEM 0x20 /* NT only */
185 /* RunFileFlg notification structure */
186 typedef struct
188 NMHDR hdr;
189 LPCSTR lpFile;
190 LPCSTR lpDirectory;
191 int nShow;
192 } NM_RUNFILEDLG, * LPNM_RUNFILEDLG;
194 /* RunFileDlg notification return values */
195 #define RF_OK 0x00
196 #define RF_CANCEL 0x01
197 #define RF_RETRY 0x02
199 void WINAPI RunFileDlg(
200 HWND hwndOwner,
201 HICON hIcon,
202 LPCSTR lpstrDirectory,
203 LPCSTR lpstrTitle,
204 LPCSTR lpstrDescription,
205 UINT uFlags);
207 void WINAPI ExitWindowsDialog(HWND hwndOwner);
209 int WINAPI RestartDialog(
210 HWND hwndOwner,
211 LPCSTR lpstrReason,
212 UINT uFlags);
214 BOOL WINAPI GetFileNameFromBrowse(
215 HWND hwndOwner,
216 LPSTR lpstrFile,
217 DWORD nMaxFile,
218 LPCSTR lpstrInitialDir,
219 LPCSTR lpstrDefExt,
220 LPCSTR lpstrFilter,
221 LPCSTR lpstrTitle);
223 BOOL WINAPI SHFindFiles(
224 LPCITEMIDLIST pidlRoot,
225 LPCITEMIDLIST pidlSavedSearch);
227 BOOL WINAPI SHFindComputer(
228 LPCITEMIDLIST pidlRoot,
229 LPCITEMIDLIST pidlSavedSearch);
231 /* SHObjectProperties flags */
232 #define OPF_PRINTERNAME 0x01
233 #define OPF_PATHNAME 0x02
235 BOOL WINAPI SHObjectProperties(
236 HWND hwndOwner,
237 UINT uFlags,
238 LPCSTR lpstrName,
239 LPCSTR lpstrParameters);
241 void WINAPI SHHandleDiskFull(HWND hwndOwner,
242 UINT uDrive);
244 int WINAPI SHOutOfMemoryMessageBox(
245 HWND hwndOwner,
246 LPCSTR lpCaption,
247 UINT uType);
249 DWORD WINAPI SHNetConnectionDialog(
250 HWND hwndOwner,
251 LPCSTR lpstrRemoteName,
252 DWORD dwType);
254 int WINAPIV ShellMessageBoxA(
255 HINSTANCE hInstance,
256 HWND hWnd,
257 LPCSTR lpText,
258 LPCSTR lpCaption,
259 UINT uType,
260 ...);
262 int WINAPIV ShellMessageBoxW(
263 HINSTANCE hInstance,
264 HWND hWnd,
265 LPCWSTR lpText,
266 LPCWSTR lpCaption,
267 UINT uType,
268 ...);
270 #define ShellMessageBox WINELIB_NAME_AW(ShellMessageBox)
272 /****************************************************************************
273 * Memory Routines
276 LPVOID WINAPI SHAlloc(ULONG cb);
277 void WINAPI SHFree(LPVOID pv);
279 HANDLE WINAPI SHAllocShared(
280 LPVOID pv,
281 ULONG cb,
282 DWORD pid);
284 BOOL WINAPI SHFreeShared(
285 HANDLE hMem,
286 DWORD pid);
288 LPVOID WINAPI SHLockShared(
289 HANDLE hMem,
290 DWORD pid);
292 BOOL WINAPI SHUnlockShared(LPVOID pv);
294 /****************************************************************************
295 * Cabinet Window Messages
298 #define CWM_SETPATH (WM_USER + 2)
299 #define CWM_WANTIDLE (WM_USER + 3)
300 #define CWM_GETSETCURRENTINFO (WM_USER + 4)
301 #define CWM_SELECTITEM (WM_USER + 5)
302 #define CWM_SELECTITEMSTR (WM_USER + 6)
303 #define CWM_GETISHELLBROWSER (WM_USER + 7)
304 #define CWM_TESTPATH (WM_USER + 9)
305 #define CWM_STATECHANGE (WM_USER + 10)
306 #define CWM_GETPATH (WM_USER + 12)
308 /* CWM_TESTPATH types */
309 #define CWTP_ISEQUAL 0
310 #define CWTP_ISCHILD 1
312 /* CWM_TESTPATH structure */
313 typedef struct
315 DWORD dwType;
316 ITEMIDLIST idl;
317 } CWTESTPATHSTRUCT,* LPCWTESTPATHSTRUCT;
319 /****************************************************************************
320 * System Imagelist Routines
323 int WINAPI Shell_GetCachedImageIndex(
324 LPCSTR lpszFileName,
325 UINT nIconIndex,
326 BOOL bSimulateDoc);
328 BOOL WINAPI Shell_GetImageLists(
329 HIMAGELIST *lphimlLarge,
330 HIMAGELIST *lphimlSmall);
332 HICON WINAPI SHGetFileIcon(
333 DWORD dwReserved,
334 LPCSTR lpszPath,
335 DWORD dwFileAttributes,
336 UINT uFlags);
338 int WINAPI SHMapPIDLToSystemImageListIndex(
339 LPSHELLFOLDER psf,
340 LPCITEMIDLIST pidl,
341 UINT * pOpenIndex);
343 BOOL WINAPI FileIconInit(BOOL bFullInit);
345 /****************************************************************************
346 * File Menu Routines
348 /* FileMenu_Create nSelHeight constants */
349 #define FM_DEFAULT_SELHEIGHT -1
350 #define FM_FULL_SELHEIGHT 0
352 /* FileMenu_Create flags */
353 #define FMF_SMALL_ICONS 0x00
354 #define FMF_LARGE_ICONS 0x08
355 #define FMF_NO_COLUMN_BREAK 0x10
357 HMENU WINAPI FileMenu_Create(
358 COLORREF crBorderColor,
359 int nBorderWidth,
360 HBITMAP hBorderBmp,
361 int nSelHeight,
362 UINT uFlags);
364 void WINAPI FileMenu_Destroy(HMENU hMenu);
366 /* FileMenu_AppendItem constants */
367 #define FM_SEPARATOR (LPCSTR)1
368 #define FM_BLANK_ICON -1
369 #define FM_DEFAULT_HEIGHT 0
371 BOOL WINAPI FileMenu_AppendItem(
372 HMENU hMenu,
373 LPCSTR lpszText,
374 UINT uID,
375 int iIcon,
376 HMENU hMenuPopup,
377 int nItemHeight);
379 /* FileMenu_InsertUsingPidl flags */
380 #define FMF_NO_EMPTY_ITEM 0x01
381 #define FMF_NO_PROGRAM_GROUPS 0x04
383 /* FileMenu_InsertUsingPidl callback function */
384 typedef void CALLBACK (*LPFNFMCALLBACK)(LPCITEMIDLIST pidlFolder, LPCITEMIDLIST pidlFile);
386 int WINAPI FileMenu_InsertUsingPidl(
387 HMENU hMenu,
388 UINT uID,
389 LPCITEMIDLIST pidl,
390 UINT uFlags,
391 UINT uEnumFlags,
392 LPFNFMCALLBACK lpfnCallback);
394 int WINAPI FileMenu_ReplaceUsingPidl(
395 HMENU hMenu,
396 UINT uID,
397 LPCITEMIDLIST pidl,
398 UINT uEnumFlags,
399 LPFNFMCALLBACK lpfnCallback);
401 void WINAPI FileMenu_Invalidate(HMENU hMenu);
403 HMENU WINAPI FileMenu_FindSubMenuByPidl(
404 HMENU hMenu,
405 LPCITEMIDLIST pidl);
407 BOOL WINAPI FileMenu_TrackPopupMenuEx(
408 HMENU hMenu,
409 UINT uFlags,
410 int x,
411 int y,
412 HWND hWnd,
413 LPTPMPARAMS lptpm);
415 BOOL WINAPI FileMenu_GetLastSelectedItemPidls(
416 UINT uReserved,
417 LPITEMIDLIST *ppidlFolder,
418 LPITEMIDLIST *ppidlItem);
420 LRESULT WINAPI FileMenu_MeasureItem(
421 HWND hWnd,
422 LPMEASUREITEMSTRUCT lpmis);
424 LRESULT WINAPI FileMenu_DrawItem(
425 HWND hWnd,
426 LPDRAWITEMSTRUCT lpdis);
428 BOOL WINAPI FileMenu_InitMenuPopup(HMENU hMenu);
430 void WINAPI FileMenu_AbortInitMenu(void);
432 LRESULT WINAPI FileMenu_HandleMenuChar(
433 HMENU hMenu,
434 WPARAM wParam);
436 BOOL WINAPI FileMenu_DeleteAllItems(HMENU hMenu);
438 BOOL WINAPI FileMenu_DeleteItemByCmd(
439 HMENU hMenu,
440 UINT uID);
442 BOOL WINAPI FileMenu_DeleteItemByIndex(
443 HMENU hMenu,
444 UINT uPos);
446 BOOL WINAPI FileMenu_DeleteMenuItemByFirstID(
447 HMENU hMenu,
448 UINT uID);
450 BOOL WINAPI FileMenu_DeleteSeparator(HMENU hMenu);
452 BOOL WINAPI FileMenu_EnableItemByCmd(
453 HMENU hMenu,
454 UINT uID,
455 BOOL bEnable);
457 DWORD WINAPI FileMenu_GetItemExtent(
458 HMENU hMenu,
459 UINT uPos);
461 int WINAPI FileMenu_AppendFilesForPidl(
462 HMENU hMenu,
463 LPCITEMIDLIST pidl,
464 BOOL bAddSeparator);
466 int WINAPI FileMenu_AddFilesForPidl(
467 HMENU hMenu,
468 UINT uReserved,
469 UINT uID,
470 LPCITEMIDLIST pidl,
471 UINT uFlags,
472 UINT uEnumFlags,
473 LPFNFMCALLBACK lpfnCallback);
475 /****************************************************************************
476 * Drag And Drop Routines
478 HRESULT WINAPI SHLoadOLE(DWORD dwFlags);
480 HRESULT WINAPI SHRegisterDragDrop(
481 HWND hWnd,
482 LPDROPTARGET lpDropTarget);
484 HRESULT WINAPI SHRevokeDragDrop(HWND hWnd);
486 HRESULT WINAPI SHDoDragDrop(
487 HWND hWnd,
488 LPDATAOBJECT lpDataObject,
489 LPDROPSOURCE lpDropSource,
490 DWORD dwOKEffect,
491 LPDWORD pdwEffect);
493 BOOL WINAPI DAD_DragEnter(HWND hWnd);
495 BOOL WINAPI DAD_DragEnterEx(
496 HWND hWnd,
497 POINT pt);
499 BOOL WINAPI DAD_DragMove(POINT pt);
501 /* DAD_AutoScroll return values */
502 #define DAD_SCROLL_UP 1
503 #define DAD_SCROLL_DOWN 2
504 #define DAD_SCROLL_LEFT 4
505 #define DAD_SCROLL_RIGHT 8
507 /* DAD_AutoScroll sample structure */
508 typedef struct
510 DWORD dwCount;
511 DWORD dwLastTime;
512 BOOL bWrapped;
513 POINT aptPositions[3];
514 DWORD adwTimes[3];
515 } SCROLLSAMPLES, *LPSCROLLSAMPLES;
517 DWORD WINAPI DAD_AutoScroll(HWND hWnd,
518 LPSCROLLSAMPLES lpSamples,
519 LPPOINT lppt);
521 BOOL WINAPI DAD_DragLeave();
523 BOOL WINAPI DAD_SetDragImageFromListView(
524 HWND hWnd,
525 POINT pt);
527 BOOL WINAPI DAD_SetDragImage(
528 HIMAGELIST himlTrack,
529 LPPOINT lppt);
531 BOOL WINAPI DAD_ShowDragImage(BOOL bShow);
533 HRESULT WINAPI SHCreateStdEnumFmtEtc(
534 DWORD cFormats,
535 const FORMATETC *lpFormats,
536 LPENUMFORMATETC *ppenumFormatetc);
538 HRESULT WINAPI CIDLData_CreateFromIDArray(
539 LPCITEMIDLIST pidlFolder,
540 DWORD cpidlFiles,
541 LPCITEMIDLIST *lppidlFiles,
542 LPDATAOBJECT *ppdataObject);
544 /****************************************************************************
545 * Path Manipulation Routines
548 LPSTR WINAPI PathAppend(
549 LPSTR lpszPath1,
550 LPCSTR lpszPath2);
552 LPSTR WINAPI PathCombineA(LPSTR szDest, LPCSTR lpszDir, LPCSTR lpszFile);
553 LPWSTR WINAPI PathCombineW(LPWSTR szDest, LPCWSTR lpszDir, LPCWSTR lpszFile);
554 #define PathCombine WINELIB_NAME_AW(PathCombine)
555 LPVOID WINAPI PathCombineAW(LPVOID szDest, LPCVOID lpszDir, LPCVOID lpszFile);
557 LPSTR WINAPI PathAddBackslashA(LPSTR path);
558 LPWSTR WINAPI PathAddBackslashW(LPWSTR path);
559 #define PathAddBackslash WINELIB_NAME_AW(PathAddBackslash)
560 LPVOID WINAPI PathAddBackslashAW(LPVOID path);
562 LPSTR WINAPI PathRemoveBackslashA(LPSTR lpszPath);
563 LPWSTR WINAPI PathRemoveBackslashW(LPWSTR lpszPath);
564 #define PathRemoveBackslash WINELIB_NAME_AW(PathRemoveBackslash)
566 LPSTR WINAPI PathBuildRoot(
567 LPSTR lpszPath,
568 int drive);
570 LPSTR WINAPI PathFindExtensionA(LPCSTR path);
571 LPWSTR WINAPI PathFindExtensionW(LPCWSTR path);
572 #define PathFindExtension WINELIB_NAME_AW(PathFindExtension)
573 LPVOID WINAPI PathFindExtensionAW(LPCVOID path);
575 LPSTR WINAPI PathGetExtensionA(LPCSTR lpszPath);
576 LPWSTR WINAPI PathGetExtensionW(LPCWSTR lpszPath);
577 #define PathGetExtension WINELIB_NAME_AW(PathGetExtension)
578 LPVOID WINAPI PathGetExtensionAW(LPCVOID lpszPath);
580 LPSTR WINAPI PathGetArgs(LPCSTR lpszPath);
582 BOOL WINAPI PathRemoveFileSpec(LPSTR lpszPath);
584 LPSTR WINAPI PathGetShortPath(LPSTR lpszPath);
586 LPSTR WINAPI PathQuoteSpacesA(LPSTR path);
587 LPWSTR WINAPI PathQuoteSpacesW(LPWSTR path);
588 #define PathQuoteSpaces WINELIB_NAME_AW(PathQuoteSpaces)
589 LPVOID WINAPI PathQuoteSpacesAW(LPVOID path);
591 void WINAPI PathUnquoteSpaces(LPSTR lpszPath);
593 BOOL WINAPI PathIsUNCA(LPCSTR lpszPath);
594 BOOL WINAPI PathIsUNCW(LPCWSTR lpszPath);
595 #define PathIsUNC WINELIB_NAME_AW(PathIsUNC)
596 BOOL WINAPI PathIsUNCAW(LPCVOID lpszPath);
598 BOOL WINAPI PathIsRelativeA(LPCSTR lpszPath);
599 BOOL WINAPI PathIsRelativeW(LPCWSTR lpszPath);
600 #define PathIsRelative WINELIB_NAME_AW(PathIsRelative)
601 BOOL WINAPI PathIsRelativeAW(LPCVOID lpszPath);
603 BOOL WINAPI PathIsRootA(LPCSTR x);
604 BOOL WINAPI PathIsRootW(LPCWSTR x);
605 #define PathIsRoot WINELIB_NAME_AW(PathIsRoot)
606 BOOL WINAPI PathIsRootAW(LPCVOID x);
608 BOOL WINAPI PathIsExe(LPCSTR lpszPath);
610 BOOL WINAPI PathIsDirectory(LPCSTR lpszPath);
612 BOOL WINAPI PathFileExists(LPCSTR lpszPath);
614 BOOL WINAPI PathMatchSpecA(
615 LPCSTR lpszPath,
616 LPCSTR lpszSpec);
617 BOOL WINAPI PathMatchSpecW(
618 LPCWSTR lpszPath,
619 LPCWSTR lpszSpec);
620 #define PathMatchSpec WINELIB_NAME_AW(PathMatchSpec)
621 BOOL WINAPI PathMatchSpecAW(LPVOID lpszPath, LPVOID lpszSpec);
623 BOOL WINAPI PathMakeUniqueName(
624 LPSTR lpszBuffer,
625 DWORD dwBuffSize,
626 LPCSTR lpszShortName,
627 LPCSTR lpszLongName,
628 LPCSTR lpszPathName);
630 BOOL WINAPI PathYetAnotherMakeUniqueName(
631 LPSTR lpszBuffer,
632 LPCSTR lpszPathName,
633 LPCSTR lpszShortName,
634 LPCSTR lpszLongName);
636 BOOL WINAPI PathFindOnPath(
637 LPSTR lpszFile,
638 LPCSTR *alpszPaths);
640 /* PathCleanupSpec return values */
641 #define PCS_REPLACEDCHARS 0x00000001
642 #define PCS_REMOVEDCHARS 0x00000002
643 #define PCS_SHORTENED 0x00000004
644 #define PCS_PATHTOOLONG 0x80000008
646 DWORD WINAPI PathCleanupSpec(
647 LPCSTR lpszPath,
648 LPSTR lpszFile);
650 BOOL WINAPI PathQualifyA(LPCSTR path);
651 BOOL WINAPI PathQualifyW(LPCWSTR path);
652 #define PathQualify WINELIB_NAME_AW(PathQualify)
653 BOOL WINAPI PathQualifyAW(LPCVOID path);
656 /* PathResolve flags */
657 #define PRF_CHECKEXISTANCE 0x01
658 #define PRF_EXECUTABLE 0x02
659 #define PRF_QUALIFYONPATH 0x04
660 #define PRF_WINDOWS31 0x08
662 BOOL WINAPI PathResolve(
663 LPSTR lpszPath,
664 LPCSTR *alpszPaths,
665 DWORD dwFlags);
667 BOOL WINAPI PathSetDlgItemPath(
668 HWND hDlg,
669 int nIDDlgItem,
670 LPCSTR lpszPath);
672 /* PathProcessCommand flags */
673 #define PPCF_QUOTEPATH 0x01 /* implies PPCF_INCLUDEARGS */
674 #define PPCF_INCLUDEARGS 0x02
675 #define PPCF_NODIRECTORIES 0x10
676 #define PPCF_DONTRESOLVE 0x20
677 #define PPCF_PATHISRELATIVE 0x40
679 int WINAPI PathProcessCommand(
680 LPCWSTR lpszPath,
681 LPWSTR lpszBuff,
682 DWORD dwBuffSize,
683 DWORD dwFlags);
685 void WINAPI PathStripPath(LPWSTR lpszPath);
687 BOOL WINAPI PathStripToRoot(LPWSTR lpszPath);
689 void WINAPI PathRemoveArgs(LPWSTR lpszPath);
691 void WINAPI PathRemoveExtension(LPWSTR lpszPath);
693 int WINAPI PathParseIconLocation(LPWSTR lpszPath);
695 BOOL WINAPI PathIsSameRoot(
696 LPCWSTR lpszPath1,
697 LPCWSTR lpszPath2);
699 BOOL WINAPI PathFindOnPathA(LPSTR sFile, LPCSTR sOtherDirs);
700 BOOL WINAPI PathFindOnPathW(LPWSTR sFile, LPCWSTR sOtherDirs);
701 #define PathFindOnPath WINELIB_NAME_AW(PathFindOnPath)
702 BOOL WINAPI PathFindOnPathAW(LPVOID sFile, LPCVOID sOtherDirs);
704 LPSTR WINAPI StrFormatByteSizeA ( DWORD dw, LPSTR pszBuf, UINT cchBuf );
705 LPWSTR WINAPI StrFormatByteSizeW ( DWORD dw, LPWSTR pszBuf, UINT cchBuf );
706 #define StrFormatByteSize WINELIB_NAME_AW(StrFormatByteSize)
708 DWORD WINAPI PathCleanupSpecA(LPSTR x, LPSTR y);
709 DWORD WINAPI PathCleanupSpecW(LPWSTR x, LPWSTR y);
710 #define PathCleanupSpec WINELIB_NAME_AW(PathCleanupSpec)
712 /****************************************************************************
713 * Shell Namespace Routines
716 /* SHCreateShellFolderViewEx callback function */
717 typedef HRESULT (CALLBACK* LPFNSFVCALLBACK)(
718 DWORD dwUser,
719 LPSHELLFOLDER pshf,
720 HWND hWnd,
721 UINT uMsg,
722 WPARAM wParam,
723 LPARAM lParam);
725 /* SHCreateShellFolderViewEx structure */
726 typedef struct
728 DWORD dwSize;
729 LPSHELLFOLDER pshf;
730 DWORD dwUser;
731 LPCITEMIDLIST pidlFolder;
732 DWORD dwEventId;
733 LPFNSFVCALLBACK lpfnCallback;
734 UINT uViewMode;
735 } SHELLFOLDERVIEWINFO, * LPSHELLFOLDERVIEWINFO;
736 typedef const SHELLFOLDERVIEWINFO * LPCSHELLFOLDERVIEWINFO;
738 HRESULT WINAPI SHCreateShellFolderViewEx(
739 LPCSHELLFOLDERVIEWINFO pshfvi,
740 LPSHELLVIEW *ppshv);
742 /* SHCreateShellFolderViewEx callback messages */
743 #define SFVCB_ADDTOMENU 0x0001
744 #define SFVCB_INVOKECOMMAND 0x0002
745 #define SFVCB_GETMENUHELP 0x0003
746 #define SFVCB_GETTOOLBARTIP 0x0004
747 #define SFVCB_GETTOOLBARINFO 0x0005
748 #define SFVCB_ADDTOOLBARITEMS 0x0006
749 #define SFVCB_INITMENUPOPUP 0x0007
750 #define SFVCB_SELECTIONCHANGED 0x0008
751 #define SFVCB_DRAWMENUITEM 0x0009
752 #define SFVCB_MEASUREMENUITEM 0x000A
753 #define SFVCB_EXITMENULOOP 0x000B
754 #define SFVCB_VIEWRELEASE 0x000C
755 #define SFVCB_GETNAMELENGTH 0x000D
756 #define SFVCB_CHANGENOTIFY 0x000E
757 #define SFVCB_WINDOWCREATED 0x000F
758 #define SFVCB_WINDOWCLOSING 0x0010
759 #define SFVCB_LISTREFRESHED 0x0011
760 #define SFVCB_WINDOWFOCUSED 0x0012
761 #define SFVCB_REGISTERCOPYHOOK 0x0014
762 #define SFVCB_COPYHOOKCALLBACK 0x0015
763 #define SFVCB_GETDETAILSOF 0x0017
764 #define SFVCB_COLUMNCLICK 0x0018
765 #define SFVCB_GETCHANGENOTIFYPIDL 0x0019
766 #define SFVCB_GETESTIMATEDCOUNT 0x001A
767 #define SFVCB_ADJUSTVIEWMODE 0x001B
768 #define SFVCB_REMOVEFROMMENU 0x001C
769 #define SFVCB_ADDINGOBJECT 0x001D
770 #define SFVCB_REMOVINGOBJECT 0x001E
771 #define SFVCB_UPDATESTATUSBAR 0x001F
772 #define SFVCB_ISSLOWREFRESH 0x0020
773 #define SFVCB_GETCOMMANDDIR 0x0021
774 #define SFVCB_GETCOLUMNSTREAM 0x0022
775 #define SFVCB_CANSELECTALL 0x0023
776 #define SFVCB_DRAGSUCCEEDED 0x0024
777 #define SFVCB_ISSTRICTREFRESH 0x0025
778 #define SFVCB_ISCHILDOBJECT 0x0026
780 /* Generic structure used by several messages */
781 typedef struct
783 DWORD dwReserved;
784 DWORD dwReserved2;
785 LPCITEMIDLIST pidl;
786 LPDWORD lpdwUser;
787 } SFVCBINFO, * LPSFVCBINFO;
788 typedef const SFVCBINFO * LPCSFVCBINFO;
790 /* SFVCB_ADDTOMENU structure */
791 typedef struct
793 HMENU hMenu;
794 UINT indexMenu;
795 UINT idCmdFirst;
796 UINT idCmdLast;
797 } SFVMENUINFO, * LPSFVMENUINFO;
799 /* SFVCB_GETTOOLBARINFO structure */
800 typedef struct
802 UINT nButtons;
803 UINT uFlags;
804 } SFVTOOLBARINFO, * LPSFVTOOLBARINFO;
806 /* SFVTOOLBARINFO flags */
807 typedef enum
809 SFVTI_ADDTOEND = 0,
810 SFVTI_ADDTOFRONT = 1,
811 SFVTI_OVERWRITE = 2
812 } SFVTIF;
814 /* SFVCB_SELECTIONCHANGED structure */
815 typedef struct
817 UINT uOldState;
818 UINT uNewState;
819 LPCITEMIDLIST pidl;
820 LPDWORD lpdwUser;
821 } SFVSELECTSTATE, * LPSFVSELECTSTATE;
822 typedef const SFVSELECTSTATE * LPCSFVSELECTSTATE;
824 /* SFVCB_COPYHOOKCALLBACK structure */
825 typedef struct
827 HWND hwnd;
828 UINT wFunc;
829 UINT wFlags;
830 LPCSTR pszSrcFile;
831 DWORD dwSrcAttribs;
832 LPCSTR pszDestFile;
833 DWORD dwDestAttribs;
834 } SFVCOPYHOOKINFO, * LPSFVCOPYHOOKINFO;
835 typedef const SFVCOPYHOOKINFO * LPCSFVCOPYHOOKINFO;
837 /* SFVCB_GETDETAILSOF structure */
838 typedef struct
840 LPCITEMIDLIST pidl;
841 int fmt;
842 int cx;
843 STRRET lpText;
844 } SFVCOLUMNINFO, * LPSFVCOLUMNINFO;
846 int WINAPI SHShellFolderView_Message(
847 HWND hwndCabinet,
848 DWORD dwMessage,
849 DWORD dwParam);
851 /* SHShellFolderView_Message messages */
852 #define SFVM_REARRANGE 0x0001
853 #define SFVM_GETARRANGECOLUMN 0x0002
854 #define SFVM_ADDOBJECT 0x0003
855 #define SFVM_GETITEMCOUNT 0x0004
856 #define SFVM_GETITEMPIDL 0x0005
857 #define SFVM_REMOVEOBJECT 0x0006
858 #define SFVM_UPDATEOBJECT 0x0007
859 #define SFVM_SETREDRAW 0x0008
860 #define SFVM_GETSELECTEDOBJECTS 0x0009
861 #define SFVM_ISDROPONSOURCE 0x000A
862 #define SFVM_MOVEICONS 0x000B
863 #define SFVM_GETDRAGPOINT 0x000C
864 #define SFVM_GETDROPPOINT 0x000D
865 #define SFVM_SETOBJECTPOS 0x000E
866 #define SFVM_ISDROPONBACKGROUND 0x000F
867 #define SFVM_CUTOBJECTS 0x0010
868 #define SFVM_TOGGLEAUTOARRANGE 0x0011
869 #define SFVM_LINEUPICONS 0x0012
870 #define SFVM_GETAUTOARRANGE 0x0013
871 #define SFVM_GETSELECTEDCOUNT 0x0014
872 #define SFVM_GETITEMSPACING 0x0015
873 #define SFVM_REFRESHOBJECT 0x0016
874 #define SFVM_SETCLIPBOARDPOINTS 0x0017
876 /****************************************************************************
877 * Misc Stuff
880 /* SHWaitForFileToOpen flags */
881 #define SHWFF_ADD 0x01
882 #define SHWFF_REMOVE 0x02
883 #define SHWFF_WAIT 0x04
885 BOOL WINAPI SHWaitForFileToOpen(
886 LPCITEMIDLIST pidl,
887 DWORD dwFlags,
888 DWORD dwTimeout);
890 WORD WINAPI ArrangeWindows(
891 HWND hwndParent,
892 DWORD dwReserved,
893 LPCRECT lpRect,
894 WORD cKids,
895 CONST HWND * lpKids);
897 /* RegisterShellHook types */
898 #define RSH_DEREGISTER 0
899 #define RSH_REGISTER 1
900 #define RSH_REGISTER_PROGMAN 2
901 #define RSH_REGISTER_TASKMAN 3
903 BOOL WINAPI RegisterShellHook(
904 HWND hWnd,
905 DWORD dwType);
907 /* SHCreateDefClassObject callback function */
908 typedef HRESULT CALLBACK (*LPFNCDCOCALLBACK)(
909 LPUNKNOWN pUnkOuter,
910 REFIID riidObject,
911 LPVOID *ppvObject);
913 HRESULT WINAPI SHCreateDefClassObject(
914 REFIID riidFactory,
915 LPVOID *ppvFactory,
916 LPFNCDCOCALLBACK lpfnCallback,
917 LPDWORD lpdwUsage,
918 REFIID riidObject);
920 HRESULT WINAPI SHCoCreateInstance(
921 LPCSTR lpszClsid,
922 REFCLSID rClsid,
923 LPUNKNOWN pUnkOuter,
924 REFIID riid,
925 LPVOID *ppv);
927 void WINAPI SHFreeUnusedLibraries();
929 /* SHCreateLinks flags */
930 #define SHCLF_PREFIXNAME 0x01
931 #define SHCLF_CREATEONDESKTOP 0x02
933 HRESULT WINAPI SHCreateLinks(
934 HWND hWnd,
935 LPCSTR lpszDir,
936 LPDATAOBJECT lpDataObject,
937 UINT uFlags,
938 LPITEMIDLIST *lppidlLinks);
940 /* SHGetNewLinkInfo flags */
941 #define SHGNLI_PIDL 0x01
942 #define SHGNLI_PREFIXNAME 0x02
943 #define SHGNLI_NOUNIQUE 0x04
945 BOOL WINAPI SHGetNewLinkInfoA(
946 LPCSTR pszLinkTo,
947 LPCSTR pszDir,
948 LPSTR pszName,
949 BOOL *pfMustCopy,
950 UINT uFlags);
952 BOOL WINAPI SHGetNewLinkInfoW(
953 LPCWSTR pszLinkTo,
954 LPCWSTR pszDir,
955 LPWSTR pszName,
956 BOOL *pfMustCopy,
957 UINT uFlags);
958 #define SHGetNewLinkInfo WINELIB_NAME_AW(SHGetNewLinkInfo)
960 /* policy functions */
961 BOOL WINAPI SHInitRestricted(LPSTR, LPSTR);
963 #ifdef __cplusplus
964 } /* extern "C" */
965 #endif /* defined(__cplusplus) */
967 #endif /* __WINE_SHLOBJ_H */