mf/topoloader: Move node connection responsibility to connection function.
[wine/zf.git] / dlls / shell32 / undocshell.h
blob9b3d844b876bb129fa5fd986c9c621ee7290efd0
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, 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 LPITEMIDLIST WINAPI ILGlobalClone(LPCITEMIDLIST pidl);
53 void WINAPI ILGlobalFree(LPITEMIDLIST pidl);
55 LPITEMIDLIST SHSimpleIDListFromPathA (LPCSTR lpszPath);
56 LPITEMIDLIST SHSimpleIDListFromPathW (LPCWSTR lpszPath);
58 HRESULT SHILCreateFromPathW (
59 LPCWSTR path,
60 LPITEMIDLIST * ppidl,
61 DWORD *attributes);
64 string functions
66 BOOL WINAPI StrRetToStrNA(LPSTR,DWORD,LPSTRRET,const ITEMIDLIST*);
67 BOOL WINAPI StrRetToStrNW(LPWSTR,DWORD,LPSTRRET,const ITEMIDLIST*);
70 /****************************************************************************
71 * SHChangeNotifyRegister API
73 #define SHCNRF_InterruptLevel 0x0001
74 #define SHCNRF_ShellLevel 0x0002
75 #define SHCNRF_RecursiveInterrupt 0x1000 /* Must be combined with SHCNRF_InterruptLevel */
76 #define SHCNRF_NewDelivery 0x8000 /* Messages use shared memory */
78 /****************************************************************************
79 * Shell Common Dialogs
82 /* RunFileDlg flags */
83 #define RFF_NOBROWSE 0x01
84 #define RFF_NODEFAULT 0x02
85 #define RFF_CALCDIRECTORY 0x04
86 #define RFF_NOLABEL 0x08
87 #define RFF_NOSEPARATEMEM 0x20 /* NT only */
89 /* RunFileFlg notification structure */
90 typedef struct
92 NMHDR hdr;
93 LPCSTR lpFile;
94 LPCSTR lpDirectory;
95 int nShow;
96 } NM_RUNFILEDLG, * LPNM_RUNFILEDLG;
98 /* RunFileDlg notification return values */
99 #define RF_OK 0x00
100 #define RF_CANCEL 0x01
101 #define RF_RETRY 0x02
103 void WINAPI RunFileDlg(
104 HWND hwndOwner,
105 HICON hIcon,
106 LPCSTR lpstrDirectory,
107 LPCSTR lpstrTitle,
108 LPCSTR lpstrDescription,
109 UINT uFlags);
111 void WINAPI ExitWindowsDialog(HWND hwndOwner);
113 BOOL WINAPI SHFindComputer(
114 LPCITEMIDLIST pidlRoot,
115 LPCITEMIDLIST pidlSavedSearch);
117 void WINAPI SHHandleDiskFull(HWND hwndOwner,
118 UINT uDrive);
120 int WINAPI SHOutOfMemoryMessageBox(
121 HWND hwndOwner,
122 LPCSTR lpCaption,
123 UINT uType);
125 DWORD WINAPI SHNetConnectionDialog(
126 HWND hwndOwner,
127 LPCSTR lpstrRemoteName,
128 DWORD dwType);
130 /****************************************************************************
131 * Memory Routines
134 /* The Platform SDK's shlobj.h header defines similar functions with a
135 * leading underscore. However those are unusable because of the leading
136 * underscore, because they have an incorrect calling convention, and
137 * because these functions are not exported by name anyway.
139 HANDLE WINAPI SHAllocShared(
140 LPVOID pv,
141 ULONG cb,
142 DWORD pid);
144 BOOL WINAPI SHFreeShared(
145 HANDLE hMem,
146 DWORD pid);
148 LPVOID WINAPI SHLockShared(
149 HANDLE hMem,
150 DWORD pid);
152 BOOL WINAPI SHUnlockShared(LPVOID pv);
154 /****************************************************************************
155 * Cabinet Window Messages
158 #define CWM_SETPATH (WM_USER + 2)
159 #define CWM_WANTIDLE (WM_USER + 3)
160 #define CWM_GETSETCURRENTINFO (WM_USER + 4)
161 #define CWM_SELECTITEM (WM_USER + 5)
162 #define CWM_SELECTITEMSTR (WM_USER + 6)
163 #define CWM_GETISHELLBROWSER (WM_USER + 7)
164 #define CWM_TESTPATH (WM_USER + 9)
165 #define CWM_STATECHANGE (WM_USER + 10)
166 #define CWM_GETPATH (WM_USER + 12)
168 /* CWM_TESTPATH types */
169 #define CWTP_ISEQUAL 0
170 #define CWTP_ISCHILD 1
172 /* CWM_TESTPATH structure */
173 typedef struct
175 DWORD dwType;
176 ITEMIDLIST idl;
177 } CWTESTPATHSTRUCT,* LPCWTESTPATHSTRUCT;
179 /****************************************************************************
180 * System Imagelist Routines
183 int WINAPI Shell_GetCachedImageIndex(
184 LPCSTR lpszFileName,
185 UINT nIconIndex,
186 BOOL bSimulateDoc);
188 HICON WINAPI SHGetFileIcon(
189 DWORD dwReserved,
190 LPCSTR lpszPath,
191 DWORD dwFileAttributes,
192 UINT uFlags);
194 BOOL WINAPI FileIconInit(BOOL bFullInit);
196 /****************************************************************************
197 * File Menu Routines
199 /* FileMenu_Create nSelHeight constants */
200 #define FM_DEFAULT_SELHEIGHT -1
201 #define FM_FULL_SELHEIGHT 0
203 /* FileMenu_Create flags */
204 #define FMF_SMALL_ICONS 0x00
205 #define FMF_LARGE_ICONS 0x08
206 #define FMF_NO_COLUMN_BREAK 0x10
208 HMENU WINAPI FileMenu_Create(
209 COLORREF crBorderColor,
210 int nBorderWidth,
211 HBITMAP hBorderBmp,
212 int nSelHeight,
213 UINT uFlags);
215 void WINAPI FileMenu_Destroy(HMENU hMenu);
217 /* FileMenu_AppendItem constants */
218 #define FM_SEPARATOR (LPCSTR)1
219 #define FM_BLANK_ICON -1
220 #define FM_DEFAULT_HEIGHT 0
222 BOOL WINAPI FileMenu_AppendItem(
223 HMENU hMenu,
224 LPCSTR lpszText,
225 UINT uID,
226 int iIcon,
227 HMENU hMenuPopup,
228 int nItemHeight);
230 /* FileMenu_InsertUsingPidl flags */
231 #define FMF_NO_EMPTY_ITEM 0x01
232 #define FMF_NO_PROGRAM_GROUPS 0x04
234 /* FileMenu_InsertUsingPidl callback function */
235 typedef void (CALLBACK *LPFNFMCALLBACK)(LPCITEMIDLIST pidlFolder, LPCITEMIDLIST pidlFile);
237 int WINAPI FileMenu_InsertUsingPidl(
238 HMENU hMenu,
239 UINT uID,
240 LPCITEMIDLIST pidl,
241 UINT uFlags,
242 UINT uEnumFlags,
243 LPFNFMCALLBACK lpfnCallback);
245 int WINAPI FileMenu_ReplaceUsingPidl(
246 HMENU hMenu,
247 UINT uID,
248 LPCITEMIDLIST pidl,
249 UINT uEnumFlags,
250 LPFNFMCALLBACK lpfnCallback);
252 void WINAPI FileMenu_Invalidate(HMENU hMenu);
254 HMENU WINAPI FileMenu_FindSubMenuByPidl(
255 HMENU hMenu,
256 LPCITEMIDLIST pidl);
258 BOOL WINAPI FileMenu_TrackPopupMenuEx(
259 HMENU hMenu,
260 UINT uFlags,
261 int x,
262 int y,
263 HWND hWnd,
264 LPTPMPARAMS lptpm);
266 BOOL WINAPI FileMenu_GetLastSelectedItemPidls(
267 UINT uReserved,
268 LPCITEMIDLIST *ppidlFolder,
269 LPCITEMIDLIST *ppidlItem);
271 LRESULT WINAPI FileMenu_MeasureItem(
272 HWND hWnd,
273 LPMEASUREITEMSTRUCT lpmis);
275 LRESULT WINAPI FileMenu_DrawItem(
276 HWND hWnd,
277 LPDRAWITEMSTRUCT lpdis);
279 BOOL WINAPI FileMenu_InitMenuPopup(HMENU hMenu);
281 void WINAPI FileMenu_AbortInitMenu(void);
283 LRESULT WINAPI FileMenu_HandleMenuChar(
284 HMENU hMenu,
285 WPARAM wParam);
287 BOOL WINAPI FileMenu_DeleteAllItems(HMENU hMenu);
289 BOOL WINAPI FileMenu_DeleteItemByCmd(
290 HMENU hMenu,
291 UINT uID);
293 BOOL WINAPI FileMenu_DeleteItemByIndex(
294 HMENU hMenu,
295 UINT uPos);
297 BOOL WINAPI FileMenu_DeleteMenuItemByFirstID(
298 HMENU hMenu,
299 UINT uID);
301 BOOL WINAPI FileMenu_DeleteSeparator(HMENU hMenu);
303 BOOL WINAPI FileMenu_EnableItemByCmd(
304 HMENU hMenu,
305 UINT uID,
306 BOOL bEnable);
308 DWORD WINAPI FileMenu_GetItemExtent(
309 HMENU hMenu,
310 UINT uPos);
312 int WINAPI FileMenu_AppendFilesForPidl(
313 HMENU hMenu,
314 LPCITEMIDLIST pidl,
315 BOOL bAddSeparator);
317 int WINAPI FileMenu_AddFilesForPidl(
318 HMENU hMenu,
319 UINT uReserved,
320 UINT uID,
321 LPCITEMIDLIST pidl,
322 UINT uFlags,
323 UINT uEnumFlags,
324 LPFNFMCALLBACK lpfnCallback);
326 /****************************************************************************
327 * Drag And Drop Routines
330 HRESULT WINAPI SHRegisterDragDrop(
331 HWND hWnd,
332 LPDROPTARGET lpDropTarget);
334 HRESULT WINAPI SHRevokeDragDrop(HWND hWnd);
336 BOOL WINAPI DAD_DragEnter(HWND hWnd);
338 BOOL WINAPI DAD_SetDragImageFromListView(
339 HWND hWnd,
340 POINT pt);
342 BOOL WINAPI DAD_ShowDragImage(BOOL bShow);
344 HRESULT WINAPI CIDLData_CreateFromIDArray(
345 LPCITEMIDLIST pidlFolder,
346 DWORD cpidlFiles,
347 LPCITEMIDLIST *lppidlFiles,
348 LPDATAOBJECT *ppdataObject);
350 /****************************************************************************
351 * Path Manipulation Routines
354 BOOL WINAPI PathAppendAW(LPVOID lpszPath1, LPCVOID lpszPath2);
356 LPVOID WINAPI PathCombineAW(LPVOID szDest, LPCVOID lpszDir, LPCVOID lpszFile);
358 LPVOID WINAPI PathAddBackslashAW(LPVOID path);
360 LPVOID WINAPI PathBuildRootAW(LPVOID lpszPath, int drive);
362 LPVOID WINAPI PathFindExtensionAW(LPCVOID path);
364 LPVOID WINAPI PathFindFileNameAW(LPCVOID path);
366 LPVOID WINAPI PathGetExtensionAW(LPCVOID lpszPath, DWORD void1, DWORD void2);
368 LPVOID WINAPI PathGetArgsAW(LPVOID lpszPath);
370 BOOL WINAPI PathRemoveFileSpecAW(LPVOID lpszPath);
372 void WINAPI PathRemoveBlanksAW(LPVOID lpszPath);
374 VOID WINAPI PathQuoteSpacesAW(LPVOID path);
376 void WINAPI PathUnquoteSpacesAW(LPVOID lpszPath);
378 BOOL WINAPI PathIsUNCAW(LPCVOID lpszPath);
380 BOOL WINAPI PathIsRelativeAW(LPCVOID lpszPath);
382 BOOL WINAPI PathIsRootAW(LPCVOID x);
384 BOOL WINAPI PathIsExeAW(LPCVOID lpszPath);
386 BOOL WINAPI PathIsDirectoryAW(LPCVOID lpszPath);
388 BOOL WINAPI PathFileExistsAW(LPCVOID lpszPath);
390 BOOL WINAPI PathMatchSpecAW(LPVOID lpszPath, LPVOID lpszSpec);
392 BOOL WINAPI PathMakeUniqueNameAW(
393 LPVOID lpszBuffer,
394 DWORD dwBuffSize,
395 LPCVOID lpszShortName,
396 LPCVOID lpszLongName,
397 LPCVOID lpszPathName);
400 BOOL WINAPI PathQualifyAW(LPCVOID path);
402 BOOL WINAPI PathResolveAW(LPVOID lpszPath, LPCVOID *alpszPaths, DWORD dwFlags);
404 VOID WINAPI PathSetDlgItemPathAW(HWND hDlg, int nIDDlgItem, LPCVOID lpszPath);
406 HRESULT WINAPI PathProcessCommandAW(LPCVOID lpszPath, LPVOID lpszBuff,
407 DWORD dwBuffSize, DWORD dwFlags);
409 void WINAPI PathStripPathAW(LPVOID lpszPath);
411 BOOL WINAPI PathStripToRootAW(LPVOID lpszPath);
413 void WINAPI PathRemoveArgsAW(LPVOID lpszPath);
415 void WINAPI PathRemoveExtensionAW(LPVOID lpszPath);
417 int WINAPI PathParseIconLocationAW(LPVOID lpszPath);
419 BOOL WINAPI PathIsSameRootAW(LPCVOID lpszPath1, LPCVOID lpszPath2);
421 BOOL WINAPI PathFindOnPathAW(LPVOID sFile, LPCVOID *sOtherDirs);
423 /****************************************************************************
424 * Shell Namespace Routines
427 /* Generic structure used by several messages */
428 typedef struct
430 DWORD dwReserved;
431 DWORD dwReserved2;
432 LPCITEMIDLIST pidl;
433 LPDWORD lpdwUser;
434 } SFVCBINFO, * LPSFVCBINFO;
435 typedef const SFVCBINFO * LPCSFVCBINFO;
437 /* SFVCB_SELECTIONCHANGED structure */
438 typedef struct
440 UINT uOldState;
441 UINT uNewState;
442 LPCITEMIDLIST pidl;
443 LPDWORD lpdwUser;
444 } SFVSELECTSTATE, * LPSFVSELECTSTATE;
445 typedef const SFVSELECTSTATE * LPCSFVSELECTSTATE;
447 /* SFVCB_COPYHOOKCALLBACK structure */
448 typedef struct
450 HWND hwnd;
451 UINT wFunc;
452 UINT wFlags;
453 LPCSTR pszSrcFile;
454 DWORD dwSrcAttribs;
455 LPCSTR pszDestFile;
456 DWORD dwDestAttribs;
457 } SFVCOPYHOOKINFO, * LPSFVCOPYHOOKINFO;
458 typedef const SFVCOPYHOOKINFO * LPCSFVCOPYHOOKINFO;
460 /* SFVCB_GETDETAILSOF structure */
461 typedef struct
463 LPCITEMIDLIST pidl;
464 int fmt;
465 int cx;
466 STRRET lpText;
467 } SFVCOLUMNINFO, * LPSFVCOLUMNINFO;
469 /****************************************************************************
470 * Misc Stuff
473 /* SHWaitForFileToOpen flags */
474 #define SHWFF_ADD 0x01
475 #define SHWFF_REMOVE 0x02
476 #define SHWFF_WAIT 0x04
478 BOOL WINAPI SHWaitForFileToOpen(
479 LPCITEMIDLIST pidl,
480 DWORD dwFlags,
481 DWORD dwTimeout);
483 WORD WINAPI ArrangeWindows(HWND hwndParent, DWORD dwReserved, const RECT *lpRect,
484 WORD cKids, const HWND *lpKids);
486 /* RegisterShellHook types */
487 #define RSH_DEREGISTER 0
488 #define RSH_REGISTER 1
489 #define RSH_REGISTER_PROGMAN 2
490 #define RSH_REGISTER_TASKMAN 3
492 BOOL WINAPI RegisterShellHook(
493 HWND hWnd,
494 DWORD dwType);
496 /* SHCreateDefClassObject callback function */
497 typedef HRESULT (CALLBACK *LPFNCDCOCALLBACK)(
498 LPUNKNOWN pUnkOuter,
499 REFIID riidObject,
500 LPVOID *ppvObject);
502 HRESULT WINAPI SHCreateDefClassObject(
503 REFIID riidFactory,
504 LPVOID *ppvFactory,
505 LPFNCDCOCALLBACK lpfnCallback,
506 LPDWORD lpdwUsage,
507 REFIID riidObject);
509 void WINAPI SHFreeUnusedLibraries(void);
511 /* SHCreateLinks flags */
512 #define SHCLF_PREFIXNAME 0x01
513 #define SHCLF_CREATEONDESKTOP 0x02
515 HRESULT WINAPI SHCreateLinks(
516 HWND hWnd,
517 LPCSTR lpszDir,
518 LPDATAOBJECT lpDataObject,
519 UINT uFlags,
520 LPITEMIDLIST *lppidlLinks);
522 DWORD WINAPI CheckEscapesA(LPSTR string, DWORD len);
523 DWORD WINAPI CheckEscapesW(LPWSTR string, DWORD len);
525 /* policy functions */
526 BOOL WINAPI SHInitRestricted(LPCVOID unused, LPCVOID inpRegKey);
528 #ifdef __cplusplus
529 } /* extern "C" */
530 #endif /* defined(__cplusplus) */
532 #endif /* __WINE_UNDOCSHELL_H */