Release 1.1.37.
[wine/gsoc-2012-control.git] / dlls / shell32 / undocshell.h
blobf8a1b70415be2a6a3292ba11d9257df936127a9c
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 WINAPI SHSimpleIDListFromPathA (LPCSTR lpszPath);
56 LPITEMIDLIST WINAPI SHSimpleIDListFromPathW (LPCWSTR lpszPath);
58 HRESULT WINAPI 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 BOOL WINAPI PickIconDlg(
83 HWND hwndOwner,
84 LPSTR lpstrFile,
85 DWORD nMaxFile,
86 LPDWORD lpdwIconIndex);
88 /* RunFileDlg flags */
89 #define RFF_NOBROWSE 0x01
90 #define RFF_NODEFAULT 0x02
91 #define RFF_CALCDIRECTORY 0x04
92 #define RFF_NOLABEL 0x08
93 #define RFF_NOSEPARATEMEM 0x20 /* NT only */
95 /* RunFileFlg notification structure */
96 typedef struct
98 NMHDR hdr;
99 LPCSTR lpFile;
100 LPCSTR lpDirectory;
101 int nShow;
102 } NM_RUNFILEDLG, * LPNM_RUNFILEDLG;
104 /* RunFileDlg notification return values */
105 #define RF_OK 0x00
106 #define RF_CANCEL 0x01
107 #define RF_RETRY 0x02
109 void WINAPI RunFileDlg(
110 HWND hwndOwner,
111 HICON hIcon,
112 LPCSTR lpstrDirectory,
113 LPCSTR lpstrTitle,
114 LPCSTR lpstrDescription,
115 UINT uFlags);
117 void WINAPI ExitWindowsDialog(HWND hwndOwner);
119 BOOL WINAPI SHFindComputer(
120 LPCITEMIDLIST pidlRoot,
121 LPCITEMIDLIST pidlSavedSearch);
123 void WINAPI SHHandleDiskFull(HWND hwndOwner,
124 UINT uDrive);
126 int WINAPI SHOutOfMemoryMessageBox(
127 HWND hwndOwner,
128 LPCSTR lpCaption,
129 UINT uType);
131 DWORD WINAPI SHNetConnectionDialog(
132 HWND hwndOwner,
133 LPCSTR lpstrRemoteName,
134 DWORD dwType);
136 /****************************************************************************
137 * Memory Routines
140 /* The Platform SDK's shlobj.h header defines similar functions with a
141 * leading underscore. However those are unusable because of the leading
142 * underscore, because they have an incorrect calling convention, and
143 * because these functions are not exported by name anyway.
145 HANDLE WINAPI SHAllocShared(
146 LPVOID pv,
147 ULONG cb,
148 DWORD pid);
150 BOOL WINAPI SHFreeShared(
151 HANDLE hMem,
152 DWORD pid);
154 LPVOID WINAPI SHLockShared(
155 HANDLE hMem,
156 DWORD pid);
158 BOOL WINAPI SHUnlockShared(LPVOID pv);
160 /****************************************************************************
161 * Cabinet Window Messages
164 #define CWM_SETPATH (WM_USER + 2)
165 #define CWM_WANTIDLE (WM_USER + 3)
166 #define CWM_GETSETCURRENTINFO (WM_USER + 4)
167 #define CWM_SELECTITEM (WM_USER + 5)
168 #define CWM_SELECTITEMSTR (WM_USER + 6)
169 #define CWM_GETISHELLBROWSER (WM_USER + 7)
170 #define CWM_TESTPATH (WM_USER + 9)
171 #define CWM_STATECHANGE (WM_USER + 10)
172 #define CWM_GETPATH (WM_USER + 12)
174 /* CWM_TESTPATH types */
175 #define CWTP_ISEQUAL 0
176 #define CWTP_ISCHILD 1
178 /* CWM_TESTPATH structure */
179 typedef struct
181 DWORD dwType;
182 ITEMIDLIST idl;
183 } CWTESTPATHSTRUCT,* LPCWTESTPATHSTRUCT;
185 /****************************************************************************
186 * System Imagelist Routines
189 int WINAPI Shell_GetCachedImageIndex(
190 LPCSTR lpszFileName,
191 UINT nIconIndex,
192 BOOL bSimulateDoc);
194 BOOL WINAPI Shell_GetImageLists(
195 HIMAGELIST *lphimlLarge,
196 HIMAGELIST *lphimlSmall);
198 HICON WINAPI SHGetFileIcon(
199 DWORD dwReserved,
200 LPCSTR lpszPath,
201 DWORD dwFileAttributes,
202 UINT uFlags);
204 BOOL WINAPI FileIconInit(BOOL bFullInit);
206 /****************************************************************************
207 * File Menu Routines
209 /* FileMenu_Create nSelHeight constants */
210 #define FM_DEFAULT_SELHEIGHT -1
211 #define FM_FULL_SELHEIGHT 0
213 /* FileMenu_Create flags */
214 #define FMF_SMALL_ICONS 0x00
215 #define FMF_LARGE_ICONS 0x08
216 #define FMF_NO_COLUMN_BREAK 0x10
218 HMENU WINAPI FileMenu_Create(
219 COLORREF crBorderColor,
220 int nBorderWidth,
221 HBITMAP hBorderBmp,
222 int nSelHeight,
223 UINT uFlags);
225 void WINAPI FileMenu_Destroy(HMENU hMenu);
227 /* FileMenu_AppendItem constants */
228 #define FM_SEPARATOR (LPCSTR)1
229 #define FM_BLANK_ICON -1
230 #define FM_DEFAULT_HEIGHT 0
232 BOOL WINAPI FileMenu_AppendItem(
233 HMENU hMenu,
234 LPCSTR lpszText,
235 UINT uID,
236 int iIcon,
237 HMENU hMenuPopup,
238 int nItemHeight);
240 /* FileMenu_InsertUsingPidl flags */
241 #define FMF_NO_EMPTY_ITEM 0x01
242 #define FMF_NO_PROGRAM_GROUPS 0x04
244 /* FileMenu_InsertUsingPidl callback function */
245 typedef void (CALLBACK *LPFNFMCALLBACK)(LPCITEMIDLIST pidlFolder, LPCITEMIDLIST pidlFile);
247 int WINAPI FileMenu_InsertUsingPidl(
248 HMENU hMenu,
249 UINT uID,
250 LPCITEMIDLIST pidl,
251 UINT uFlags,
252 UINT uEnumFlags,
253 LPFNFMCALLBACK lpfnCallback);
255 int WINAPI FileMenu_ReplaceUsingPidl(
256 HMENU hMenu,
257 UINT uID,
258 LPCITEMIDLIST pidl,
259 UINT uEnumFlags,
260 LPFNFMCALLBACK lpfnCallback);
262 void WINAPI FileMenu_Invalidate(HMENU hMenu);
264 HMENU WINAPI FileMenu_FindSubMenuByPidl(
265 HMENU hMenu,
266 LPCITEMIDLIST pidl);
268 BOOL WINAPI FileMenu_TrackPopupMenuEx(
269 HMENU hMenu,
270 UINT uFlags,
271 int x,
272 int y,
273 HWND hWnd,
274 LPTPMPARAMS lptpm);
276 BOOL WINAPI FileMenu_GetLastSelectedItemPidls(
277 UINT uReserved,
278 LPCITEMIDLIST *ppidlFolder,
279 LPCITEMIDLIST *ppidlItem);
281 LRESULT WINAPI FileMenu_MeasureItem(
282 HWND hWnd,
283 LPMEASUREITEMSTRUCT lpmis);
285 LRESULT WINAPI FileMenu_DrawItem(
286 HWND hWnd,
287 LPDRAWITEMSTRUCT lpdis);
289 BOOL WINAPI FileMenu_InitMenuPopup(HMENU hMenu);
291 void WINAPI FileMenu_AbortInitMenu(void);
293 LRESULT WINAPI FileMenu_HandleMenuChar(
294 HMENU hMenu,
295 WPARAM wParam);
297 BOOL WINAPI FileMenu_DeleteAllItems(HMENU hMenu);
299 BOOL WINAPI FileMenu_DeleteItemByCmd(
300 HMENU hMenu,
301 UINT uID);
303 BOOL WINAPI FileMenu_DeleteItemByIndex(
304 HMENU hMenu,
305 UINT uPos);
307 BOOL WINAPI FileMenu_DeleteMenuItemByFirstID(
308 HMENU hMenu,
309 UINT uID);
311 BOOL WINAPI FileMenu_DeleteSeparator(HMENU hMenu);
313 BOOL WINAPI FileMenu_EnableItemByCmd(
314 HMENU hMenu,
315 UINT uID,
316 BOOL bEnable);
318 DWORD WINAPI FileMenu_GetItemExtent(
319 HMENU hMenu,
320 UINT uPos);
322 int WINAPI FileMenu_AppendFilesForPidl(
323 HMENU hMenu,
324 LPCITEMIDLIST pidl,
325 BOOL bAddSeparator);
327 int WINAPI FileMenu_AddFilesForPidl(
328 HMENU hMenu,
329 UINT uReserved,
330 UINT uID,
331 LPCITEMIDLIST pidl,
332 UINT uFlags,
333 UINT uEnumFlags,
334 LPFNFMCALLBACK lpfnCallback);
336 /****************************************************************************
337 * Drag And Drop Routines
340 HRESULT WINAPI SHRegisterDragDrop(
341 HWND hWnd,
342 LPDROPTARGET lpDropTarget);
344 HRESULT WINAPI SHRevokeDragDrop(HWND hWnd);
346 BOOL WINAPI DAD_DragEnter(HWND hWnd);
348 BOOL WINAPI DAD_SetDragImageFromListView(
349 HWND hWnd,
350 POINT pt);
352 BOOL WINAPI DAD_ShowDragImage(BOOL bShow);
354 HRESULT WINAPI CIDLData_CreateFromIDArray(
355 LPCITEMIDLIST pidlFolder,
356 DWORD cpidlFiles,
357 LPCITEMIDLIST *lppidlFiles,
358 LPDATAOBJECT *ppdataObject);
360 /****************************************************************************
361 * Path Manipulation Routines
364 BOOL WINAPI PathAppendAW(LPVOID lpszPath1, LPCVOID lpszPath2);
366 LPVOID WINAPI PathCombineAW(LPVOID szDest, LPCVOID lpszDir, LPCVOID lpszFile);
368 LPVOID WINAPI PathAddBackslashAW(LPVOID path);
370 LPVOID WINAPI PathBuildRootAW(LPVOID lpszPath, int drive);
372 LPVOID WINAPI PathFindExtensionAW(LPCVOID path);
374 LPVOID WINAPI PathFindFileNameAW(LPCVOID path);
376 LPVOID WINAPI PathGetExtensionAW(LPCVOID lpszPath, DWORD void1, DWORD void2);
378 LPVOID WINAPI PathGetArgsAW(LPVOID lpszPath);
380 BOOL WINAPI PathRemoveFileSpecAW(LPVOID lpszPath);
382 void WINAPI PathRemoveBlanksAW(LPVOID lpszPath);
384 VOID WINAPI PathQuoteSpacesAW(LPVOID path);
386 void WINAPI PathUnquoteSpacesAW(LPVOID lpszPath);
388 BOOL WINAPI PathIsUNCAW(LPCVOID lpszPath);
390 BOOL WINAPI PathIsRelativeAW(LPCVOID lpszPath);
392 BOOL WINAPI PathIsRootAW(LPCVOID x);
394 BOOL WINAPI PathIsExeAW(LPCVOID lpszPath);
396 BOOL WINAPI PathIsDirectoryAW(LPCVOID lpszPath);
398 BOOL WINAPI PathFileExistsAW(LPCVOID lpszPath);
400 BOOL WINAPI PathMatchSpecAW(LPVOID lpszPath, LPVOID lpszSpec);
402 BOOL WINAPI PathMakeUniqueNameAW(
403 LPVOID lpszBuffer,
404 DWORD dwBuffSize,
405 LPCVOID lpszShortName,
406 LPCVOID lpszLongName,
407 LPCVOID lpszPathName);
410 BOOL WINAPI PathQualifyAW(LPCVOID path);
412 BOOL WINAPI PathResolveAW(LPVOID lpszPath, LPCVOID *alpszPaths, DWORD dwFlags);
414 VOID WINAPI PathSetDlgItemPathAW(HWND hDlg, int nIDDlgItem, LPCVOID lpszPath);
416 HRESULT WINAPI PathProcessCommandAW(LPCVOID lpszPath, LPVOID lpszBuff,
417 DWORD dwBuffSize, DWORD dwFlags);
419 void WINAPI PathStripPathAW(LPVOID lpszPath);
421 BOOL WINAPI PathStripToRootAW(LPVOID lpszPath);
423 void WINAPI PathRemoveArgsAW(LPVOID lpszPath);
425 void WINAPI PathRemoveExtensionAW(LPVOID lpszPath);
427 int WINAPI PathParseIconLocationAW(LPVOID lpszPath);
429 BOOL WINAPI PathIsSameRootAW(LPCVOID lpszPath1, LPCVOID lpszPath2);
431 BOOL WINAPI PathFindOnPathAW(LPVOID sFile, LPCVOID *sOtherDirs);
433 /****************************************************************************
434 * Shell Namespace Routines
437 /* Generic structure used by several messages */
438 typedef struct
440 DWORD dwReserved;
441 DWORD dwReserved2;
442 LPCITEMIDLIST pidl;
443 LPDWORD lpdwUser;
444 } SFVCBINFO, * LPSFVCBINFO;
445 typedef const SFVCBINFO * LPCSFVCBINFO;
447 /* SFVCB_SELECTIONCHANGED structure */
448 typedef struct
450 UINT uOldState;
451 UINT uNewState;
452 LPCITEMIDLIST pidl;
453 LPDWORD lpdwUser;
454 } SFVSELECTSTATE, * LPSFVSELECTSTATE;
455 typedef const SFVSELECTSTATE * LPCSFVSELECTSTATE;
457 /* SFVCB_COPYHOOKCALLBACK structure */
458 typedef struct
460 HWND hwnd;
461 UINT wFunc;
462 UINT wFlags;
463 LPCSTR pszSrcFile;
464 DWORD dwSrcAttribs;
465 LPCSTR pszDestFile;
466 DWORD dwDestAttribs;
467 } SFVCOPYHOOKINFO, * LPSFVCOPYHOOKINFO;
468 typedef const SFVCOPYHOOKINFO * LPCSFVCOPYHOOKINFO;
470 /* SFVCB_GETDETAILSOF structure */
471 typedef struct
473 LPCITEMIDLIST pidl;
474 int fmt;
475 int cx;
476 STRRET lpText;
477 } SFVCOLUMNINFO, * LPSFVCOLUMNINFO;
479 /****************************************************************************
480 * Misc Stuff
483 /* SHWaitForFileToOpen flags */
484 #define SHWFF_ADD 0x01
485 #define SHWFF_REMOVE 0x02
486 #define SHWFF_WAIT 0x04
488 BOOL WINAPI SHWaitForFileToOpen(
489 LPCITEMIDLIST pidl,
490 DWORD dwFlags,
491 DWORD dwTimeout);
493 WORD WINAPI ArrangeWindows(
494 HWND hwndParent,
495 DWORD dwReserved,
496 LPCRECT lpRect,
497 WORD cKids,
498 CONST HWND * lpKids);
500 /* RegisterShellHook types */
501 #define RSH_DEREGISTER 0
502 #define RSH_REGISTER 1
503 #define RSH_REGISTER_PROGMAN 2
504 #define RSH_REGISTER_TASKMAN 3
506 BOOL WINAPI RegisterShellHook(
507 HWND hWnd,
508 DWORD dwType);
510 /* SHCreateDefClassObject callback function */
511 typedef HRESULT (CALLBACK *LPFNCDCOCALLBACK)(
512 LPUNKNOWN pUnkOuter,
513 REFIID riidObject,
514 LPVOID *ppvObject);
516 HRESULT WINAPI SHCreateDefClassObject(
517 REFIID riidFactory,
518 LPVOID *ppvFactory,
519 LPFNCDCOCALLBACK lpfnCallback,
520 LPDWORD lpdwUsage,
521 REFIID riidObject);
523 void WINAPI SHFreeUnusedLibraries(void);
525 /* SHCreateLinks flags */
526 #define SHCLF_PREFIXNAME 0x01
527 #define SHCLF_CREATEONDESKTOP 0x02
529 HRESULT WINAPI SHCreateLinks(
530 HWND hWnd,
531 LPCSTR lpszDir,
532 LPDATAOBJECT lpDataObject,
533 UINT uFlags,
534 LPITEMIDLIST *lppidlLinks);
536 DWORD WINAPI CheckEscapesA(LPSTR string, DWORD len);
537 DWORD WINAPI CheckEscapesW(LPWSTR string, DWORD len);
539 /* policy functions */
540 BOOL WINAPI SHInitRestricted(LPCVOID unused, LPCVOID inpRegKey);
542 #ifdef __cplusplus
543 } /* extern "C" */
544 #endif /* defined(__cplusplus) */
546 #endif /* __WINE_UNDOCSHELL_H */