include: Don't import files in control.idl that aren't imported on Windows.
[wine/dcerpc.git] / dlls / shell32 / undocshell.h
blob941e7b379885741d47ff76ff2d6ff0db6e9487fc
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 SHILCreateFromPathA (
59 LPCSTR path,
60 LPITEMIDLIST * ppidl,
61 DWORD *attributes);
63 HRESULT WINAPI SHILCreateFromPathW (
64 LPCWSTR path,
65 LPITEMIDLIST * ppidl,
66 DWORD *attributes);
69 string functions
71 BOOL WINAPI StrRetToStrNA(LPSTR,DWORD,LPSTRRET,const ITEMIDLIST*);
72 BOOL WINAPI StrRetToStrNW(LPWSTR,DWORD,LPSTRRET,const ITEMIDLIST*);
75 /****************************************************************************
76 * SHChangeNotifyRegister API
78 #define SHCNRF_InterruptLevel 0x0001
79 #define SHCNRF_ShellLevel 0x0002
80 #define SHCNRF_RecursiveInterrupt 0x1000 /* Must be combined with SHCNRF_InterruptLevel */
81 #define SHCNRF_NewDelivery 0x8000 /* Messages use shared memory */
83 /****************************************************************************
84 * Shell Common Dialogs
87 BOOL WINAPI PickIconDlg(
88 HWND hwndOwner,
89 LPSTR lpstrFile,
90 DWORD nMaxFile,
91 LPDWORD lpdwIconIndex);
93 /* RunFileDlg flags */
94 #define RFF_NOBROWSE 0x01
95 #define RFF_NODEFAULT 0x02
96 #define RFF_CALCDIRECTORY 0x04
97 #define RFF_NOLABEL 0x08
98 #define RFF_NOSEPARATEMEM 0x20 /* NT only */
100 /* RunFileFlg notification structure */
101 typedef struct
103 NMHDR hdr;
104 LPCSTR lpFile;
105 LPCSTR lpDirectory;
106 int nShow;
107 } NM_RUNFILEDLG, * LPNM_RUNFILEDLG;
109 /* RunFileDlg notification return values */
110 #define RF_OK 0x00
111 #define RF_CANCEL 0x01
112 #define RF_RETRY 0x02
114 void WINAPI RunFileDlg(
115 HWND hwndOwner,
116 HICON hIcon,
117 LPCSTR lpstrDirectory,
118 LPCSTR lpstrTitle,
119 LPCSTR lpstrDescription,
120 UINT uFlags);
122 void WINAPI ExitWindowsDialog(HWND hwndOwner);
124 BOOL WINAPI SHFindComputer(
125 LPCITEMIDLIST pidlRoot,
126 LPCITEMIDLIST pidlSavedSearch);
128 void WINAPI SHHandleDiskFull(HWND hwndOwner,
129 UINT uDrive);
131 int WINAPI SHOutOfMemoryMessageBox(
132 HWND hwndOwner,
133 LPCSTR lpCaption,
134 UINT uType);
136 DWORD WINAPI SHNetConnectionDialog(
137 HWND hwndOwner,
138 LPCSTR lpstrRemoteName,
139 DWORD dwType);
141 /****************************************************************************
142 * Memory Routines
145 /* The Platform SDK's shlobj.h header defines similar functions with a
146 * leading underscore. However those are unusable because of the leading
147 * underscore, because they have an incorrect calling convention, and
148 * because these functions are not exported by name anyway.
150 HANDLE WINAPI SHAllocShared(
151 LPVOID pv,
152 ULONG cb,
153 DWORD pid);
155 BOOL WINAPI SHFreeShared(
156 HANDLE hMem,
157 DWORD pid);
159 LPVOID WINAPI SHLockShared(
160 HANDLE hMem,
161 DWORD pid);
163 BOOL WINAPI SHUnlockShared(LPVOID pv);
165 /****************************************************************************
166 * Cabinet Window Messages
169 #define CWM_SETPATH (WM_USER + 2)
170 #define CWM_WANTIDLE (WM_USER + 3)
171 #define CWM_GETSETCURRENTINFO (WM_USER + 4)
172 #define CWM_SELECTITEM (WM_USER + 5)
173 #define CWM_SELECTITEMSTR (WM_USER + 6)
174 #define CWM_GETISHELLBROWSER (WM_USER + 7)
175 #define CWM_TESTPATH (WM_USER + 9)
176 #define CWM_STATECHANGE (WM_USER + 10)
177 #define CWM_GETPATH (WM_USER + 12)
179 /* CWM_TESTPATH types */
180 #define CWTP_ISEQUAL 0
181 #define CWTP_ISCHILD 1
183 /* CWM_TESTPATH structure */
184 typedef struct
186 DWORD dwType;
187 ITEMIDLIST idl;
188 } CWTESTPATHSTRUCT,* LPCWTESTPATHSTRUCT;
190 /****************************************************************************
191 * System Imagelist Routines
194 int WINAPI Shell_GetCachedImageIndex(
195 LPCSTR lpszFileName,
196 UINT nIconIndex,
197 BOOL bSimulateDoc);
199 BOOL WINAPI Shell_GetImageLists(
200 HIMAGELIST *lphimlLarge,
201 HIMAGELIST *lphimlSmall);
203 HICON WINAPI SHGetFileIcon(
204 DWORD dwReserved,
205 LPCSTR lpszPath,
206 DWORD dwFileAttributes,
207 UINT uFlags);
209 BOOL WINAPI FileIconInit(BOOL bFullInit);
211 /****************************************************************************
212 * File Menu Routines
214 /* FileMenu_Create nSelHeight constants */
215 #define FM_DEFAULT_SELHEIGHT -1
216 #define FM_FULL_SELHEIGHT 0
218 /* FileMenu_Create flags */
219 #define FMF_SMALL_ICONS 0x00
220 #define FMF_LARGE_ICONS 0x08
221 #define FMF_NO_COLUMN_BREAK 0x10
223 HMENU WINAPI FileMenu_Create(
224 COLORREF crBorderColor,
225 int nBorderWidth,
226 HBITMAP hBorderBmp,
227 int nSelHeight,
228 UINT uFlags);
230 void WINAPI FileMenu_Destroy(HMENU hMenu);
232 /* FileMenu_AppendItem constants */
233 #define FM_SEPARATOR (LPCSTR)1
234 #define FM_BLANK_ICON -1
235 #define FM_DEFAULT_HEIGHT 0
237 BOOL WINAPI FileMenu_AppendItem(
238 HMENU hMenu,
239 LPCSTR lpszText,
240 UINT uID,
241 int iIcon,
242 HMENU hMenuPopup,
243 int nItemHeight);
245 /* FileMenu_InsertUsingPidl flags */
246 #define FMF_NO_EMPTY_ITEM 0x01
247 #define FMF_NO_PROGRAM_GROUPS 0x04
249 /* FileMenu_InsertUsingPidl callback function */
250 typedef void (CALLBACK *LPFNFMCALLBACK)(LPCITEMIDLIST pidlFolder, LPCITEMIDLIST pidlFile);
252 int WINAPI FileMenu_InsertUsingPidl(
253 HMENU hMenu,
254 UINT uID,
255 LPCITEMIDLIST pidl,
256 UINT uFlags,
257 UINT uEnumFlags,
258 LPFNFMCALLBACK lpfnCallback);
260 int WINAPI FileMenu_ReplaceUsingPidl(
261 HMENU hMenu,
262 UINT uID,
263 LPCITEMIDLIST pidl,
264 UINT uEnumFlags,
265 LPFNFMCALLBACK lpfnCallback);
267 void WINAPI FileMenu_Invalidate(HMENU hMenu);
269 HMENU WINAPI FileMenu_FindSubMenuByPidl(
270 HMENU hMenu,
271 LPCITEMIDLIST pidl);
273 BOOL WINAPI FileMenu_TrackPopupMenuEx(
274 HMENU hMenu,
275 UINT uFlags,
276 int x,
277 int y,
278 HWND hWnd,
279 LPTPMPARAMS lptpm);
281 BOOL WINAPI FileMenu_GetLastSelectedItemPidls(
282 UINT uReserved,
283 LPCITEMIDLIST *ppidlFolder,
284 LPCITEMIDLIST *ppidlItem);
286 LRESULT WINAPI FileMenu_MeasureItem(
287 HWND hWnd,
288 LPMEASUREITEMSTRUCT lpmis);
290 LRESULT WINAPI FileMenu_DrawItem(
291 HWND hWnd,
292 LPDRAWITEMSTRUCT lpdis);
294 BOOL WINAPI FileMenu_InitMenuPopup(HMENU hMenu);
296 void WINAPI FileMenu_AbortInitMenu(void);
298 LRESULT WINAPI FileMenu_HandleMenuChar(
299 HMENU hMenu,
300 WPARAM wParam);
302 BOOL WINAPI FileMenu_DeleteAllItems(HMENU hMenu);
304 BOOL WINAPI FileMenu_DeleteItemByCmd(
305 HMENU hMenu,
306 UINT uID);
308 BOOL WINAPI FileMenu_DeleteItemByIndex(
309 HMENU hMenu,
310 UINT uPos);
312 BOOL WINAPI FileMenu_DeleteMenuItemByFirstID(
313 HMENU hMenu,
314 UINT uID);
316 BOOL WINAPI FileMenu_DeleteSeparator(HMENU hMenu);
318 BOOL WINAPI FileMenu_EnableItemByCmd(
319 HMENU hMenu,
320 UINT uID,
321 BOOL bEnable);
323 DWORD WINAPI FileMenu_GetItemExtent(
324 HMENU hMenu,
325 UINT uPos);
327 int WINAPI FileMenu_AppendFilesForPidl(
328 HMENU hMenu,
329 LPCITEMIDLIST pidl,
330 BOOL bAddSeparator);
332 int WINAPI FileMenu_AddFilesForPidl(
333 HMENU hMenu,
334 UINT uReserved,
335 UINT uID,
336 LPCITEMIDLIST pidl,
337 UINT uFlags,
338 UINT uEnumFlags,
339 LPFNFMCALLBACK lpfnCallback);
341 /****************************************************************************
342 * Drag And Drop Routines
345 HRESULT WINAPI SHRegisterDragDrop(
346 HWND hWnd,
347 LPDROPTARGET lpDropTarget);
349 HRESULT WINAPI SHRevokeDragDrop(HWND hWnd);
351 BOOL WINAPI DAD_DragEnter(HWND hWnd);
353 BOOL WINAPI DAD_SetDragImageFromListView(
354 HWND hWnd,
355 POINT pt);
357 BOOL WINAPI DAD_ShowDragImage(BOOL bShow);
359 HRESULT WINAPI CIDLData_CreateFromIDArray(
360 LPCITEMIDLIST pidlFolder,
361 DWORD cpidlFiles,
362 LPCITEMIDLIST *lppidlFiles,
363 LPDATAOBJECT *ppdataObject);
365 /****************************************************************************
366 * Path Manipulation Routines
369 BOOL WINAPI PathAppendAW(LPVOID lpszPath1, LPCVOID lpszPath2);
371 LPVOID WINAPI PathCombineAW(LPVOID szDest, LPCVOID lpszDir, LPCVOID lpszFile);
373 LPVOID WINAPI PathAddBackslashAW(LPVOID path);
375 LPVOID WINAPI PathBuildRootAW(LPVOID lpszPath, int drive);
377 LPVOID WINAPI PathFindExtensionAW(LPCVOID path);
379 LPVOID WINAPI PathFindFileNameAW(LPCVOID path);
381 LPVOID WINAPI PathGetExtensionAW(LPCVOID lpszPath, DWORD void1, DWORD void2);
383 LPVOID WINAPI PathGetArgsAW(LPVOID lpszPath);
385 BOOL WINAPI PathRemoveFileSpecAW(LPVOID lpszPath);
387 void WINAPI PathRemoveBlanksAW(LPVOID lpszPath);
389 VOID WINAPI PathQuoteSpacesAW(LPVOID path);
391 void WINAPI PathUnquoteSpacesAW(LPVOID lpszPath);
393 BOOL WINAPI PathIsUNCAW(LPCVOID lpszPath);
395 BOOL WINAPI PathIsRelativeAW(LPCVOID lpszPath);
397 BOOL WINAPI PathIsRootAW(LPCVOID x);
399 BOOL WINAPI PathIsExeAW(LPCVOID lpszPath);
401 BOOL WINAPI PathIsDirectoryAW(LPCVOID lpszPath);
403 BOOL WINAPI PathFileExistsAW(LPCVOID lpszPath);
405 BOOL WINAPI PathMatchSpecAW(LPVOID lpszPath, LPVOID lpszSpec);
407 BOOL WINAPI PathMakeUniqueNameAW(
408 LPVOID lpszBuffer,
409 DWORD dwBuffSize,
410 LPCVOID lpszShortName,
411 LPCVOID lpszLongName,
412 LPCVOID lpszPathName);
415 BOOL WINAPI PathQualifyA(LPCSTR path);
416 BOOL WINAPI PathQualifyW(LPCWSTR path);
417 #define PathQualify WINELIB_NAME_AW(PathQualify)
418 BOOL WINAPI PathQualifyAW(LPCVOID path);
421 BOOL WINAPI PathResolveAW(LPVOID lpszPath, LPCVOID *alpszPaths, DWORD dwFlags);
423 VOID WINAPI PathSetDlgItemPathAW(HWND hDlg, int nIDDlgItem, LPCVOID lpszPath);
425 HRESULT WINAPI PathProcessCommandAW(LPCVOID lpszPath, LPVOID lpszBuff,
426 DWORD dwBuffSize, DWORD dwFlags);
428 void WINAPI PathStripPathAW(LPVOID lpszPath);
430 BOOL WINAPI PathStripToRootAW(LPVOID lpszPath);
432 void WINAPI PathRemoveArgsAW(LPVOID lpszPath);
434 void WINAPI PathRemoveExtensionAW(LPVOID lpszPath);
436 int WINAPI PathParseIconLocationAW(LPVOID lpszPath);
438 BOOL WINAPI PathIsSameRootAW(LPCVOID lpszPath1, LPCVOID lpszPath2);
440 BOOL WINAPI PathFindOnPathAW(LPVOID sFile, LPCVOID *sOtherDirs);
442 /****************************************************************************
443 * Shell Namespace Routines
446 /* Generic structure used by several messages */
447 typedef struct
449 DWORD dwReserved;
450 DWORD dwReserved2;
451 LPCITEMIDLIST pidl;
452 LPDWORD lpdwUser;
453 } SFVCBINFO, * LPSFVCBINFO;
454 typedef const SFVCBINFO * LPCSFVCBINFO;
456 /* SFVCB_SELECTIONCHANGED structure */
457 typedef struct
459 UINT uOldState;
460 UINT uNewState;
461 LPCITEMIDLIST pidl;
462 LPDWORD lpdwUser;
463 } SFVSELECTSTATE, * LPSFVSELECTSTATE;
464 typedef const SFVSELECTSTATE * LPCSFVSELECTSTATE;
466 /* SFVCB_COPYHOOKCALLBACK structure */
467 typedef struct
469 HWND hwnd;
470 UINT wFunc;
471 UINT wFlags;
472 LPCSTR pszSrcFile;
473 DWORD dwSrcAttribs;
474 LPCSTR pszDestFile;
475 DWORD dwDestAttribs;
476 } SFVCOPYHOOKINFO, * LPSFVCOPYHOOKINFO;
477 typedef const SFVCOPYHOOKINFO * LPCSFVCOPYHOOKINFO;
479 /* SFVCB_GETDETAILSOF structure */
480 typedef struct
482 LPCITEMIDLIST pidl;
483 int fmt;
484 int cx;
485 STRRET lpText;
486 } SFVCOLUMNINFO, * LPSFVCOLUMNINFO;
488 /****************************************************************************
489 * Misc Stuff
492 /* SHWaitForFileToOpen flags */
493 #define SHWFF_ADD 0x01
494 #define SHWFF_REMOVE 0x02
495 #define SHWFF_WAIT 0x04
497 BOOL WINAPI SHWaitForFileToOpen(
498 LPCITEMIDLIST pidl,
499 DWORD dwFlags,
500 DWORD dwTimeout);
502 WORD WINAPI ArrangeWindows(
503 HWND hwndParent,
504 DWORD dwReserved,
505 LPCRECT lpRect,
506 WORD cKids,
507 CONST HWND * lpKids);
509 /* RegisterShellHook types */
510 #define RSH_DEREGISTER 0
511 #define RSH_REGISTER 1
512 #define RSH_REGISTER_PROGMAN 2
513 #define RSH_REGISTER_TASKMAN 3
515 BOOL WINAPI RegisterShellHook(
516 HWND hWnd,
517 DWORD dwType);
519 /* SHCreateDefClassObject callback function */
520 typedef HRESULT (CALLBACK *LPFNCDCOCALLBACK)(
521 LPUNKNOWN pUnkOuter,
522 REFIID riidObject,
523 LPVOID *ppvObject);
525 HRESULT WINAPI SHCreateDefClassObject(
526 REFIID riidFactory,
527 LPVOID *ppvFactory,
528 LPFNCDCOCALLBACK lpfnCallback,
529 LPDWORD lpdwUsage,
530 REFIID riidObject);
532 void WINAPI SHFreeUnusedLibraries(void);
534 /* SHCreateLinks flags */
535 #define SHCLF_PREFIXNAME 0x01
536 #define SHCLF_CREATEONDESKTOP 0x02
538 HRESULT WINAPI SHCreateLinks(
539 HWND hWnd,
540 LPCSTR lpszDir,
541 LPDATAOBJECT lpDataObject,
542 UINT uFlags,
543 LPITEMIDLIST *lppidlLinks);
545 DWORD WINAPI CheckEscapesA(LPSTR string, DWORD len);
546 DWORD WINAPI CheckEscapesW(LPWSTR string, DWORD len);
548 /* policy functions */
549 BOOL WINAPI SHInitRestricted(LPCVOID unused, LPCVOID inpRegKey);
551 #ifdef __cplusplus
552 } /* extern "C" */
553 #endif /* defined(__cplusplus) */
555 #endif /* __WINE_UNDOCSHELL_H */