d3d9: Initialize the test rectangle correctly.
[wine/multimedia.git] / dlls / shell32 / undocshell.h
blob5bba7da83d821c00cdf1bd1cdad1f1281ecadda5
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);
414 BOOL WINAPI PathYetAnotherMakeUniqueName(
415 LPWSTR lpszBuffer,
416 LPCWSTR lpszPathName,
417 LPCWSTR lpszShortName,
418 LPCWSTR lpszLongName);
420 BOOL WINAPI PathQualifyA(LPCSTR path);
421 BOOL WINAPI PathQualifyW(LPCWSTR path);
422 #define PathQualify WINELIB_NAME_AW(PathQualify)
423 BOOL WINAPI PathQualifyAW(LPCVOID path);
426 /* PathResolve flags */
427 #define PRF_CHECKEXISTANCE 0x01
428 #define PRF_EXECUTABLE 0x02
429 #define PRF_QUALIFYONPATH 0x04
430 #define PRF_WINDOWS31 0x08
432 BOOL WINAPI PathResolveAW(LPVOID lpszPath, LPCVOID *alpszPaths, DWORD dwFlags);
434 VOID WINAPI PathSetDlgItemPathAW(HWND hDlg, int nIDDlgItem, LPCVOID lpszPath);
436 /* PathProcessCommand flags */
437 #define PPCF_QUOTEPATH 0x01 /* implies PPCF_INCLUDEARGS */
438 #define PPCF_INCLUDEARGS 0x02
439 #define PPCF_NODIRECTORIES 0x10
440 #define PPCF_DONTRESOLVE 0x20
441 #define PPCF_PATHISRELATIVE 0x40
443 HRESULT WINAPI PathProcessCommandAW(LPCVOID lpszPath, LPVOID lpszBuff,
444 DWORD dwBuffSize, DWORD dwFlags);
446 void WINAPI PathStripPathAW(LPVOID lpszPath);
448 BOOL WINAPI PathStripToRootAW(LPVOID lpszPath);
450 void WINAPI PathRemoveArgsAW(LPVOID lpszPath);
452 void WINAPI PathRemoveExtensionAW(LPVOID lpszPath);
454 int WINAPI PathParseIconLocationAW(LPVOID lpszPath);
456 BOOL WINAPI PathIsSameRootAW(LPCVOID lpszPath1, LPCVOID lpszPath2);
458 BOOL WINAPI PathFindOnPathAW(LPVOID sFile, LPCVOID *sOtherDirs);
460 /****************************************************************************
461 * Shell Namespace Routines
464 /* Generic structure used by several messages */
465 typedef struct
467 DWORD dwReserved;
468 DWORD dwReserved2;
469 LPCITEMIDLIST pidl;
470 LPDWORD lpdwUser;
471 } SFVCBINFO, * LPSFVCBINFO;
472 typedef const SFVCBINFO * LPCSFVCBINFO;
474 /* SFVCB_SELECTIONCHANGED structure */
475 typedef struct
477 UINT uOldState;
478 UINT uNewState;
479 LPCITEMIDLIST pidl;
480 LPDWORD lpdwUser;
481 } SFVSELECTSTATE, * LPSFVSELECTSTATE;
482 typedef const SFVSELECTSTATE * LPCSFVSELECTSTATE;
484 /* SFVCB_COPYHOOKCALLBACK structure */
485 typedef struct
487 HWND hwnd;
488 UINT wFunc;
489 UINT wFlags;
490 LPCSTR pszSrcFile;
491 DWORD dwSrcAttribs;
492 LPCSTR pszDestFile;
493 DWORD dwDestAttribs;
494 } SFVCOPYHOOKINFO, * LPSFVCOPYHOOKINFO;
495 typedef const SFVCOPYHOOKINFO * LPCSFVCOPYHOOKINFO;
497 /* SFVCB_GETDETAILSOF structure */
498 typedef struct
500 LPCITEMIDLIST pidl;
501 int fmt;
502 int cx;
503 STRRET lpText;
504 } SFVCOLUMNINFO, * LPSFVCOLUMNINFO;
506 /****************************************************************************
507 * Misc Stuff
510 /* SHWaitForFileToOpen flags */
511 #define SHWFF_ADD 0x01
512 #define SHWFF_REMOVE 0x02
513 #define SHWFF_WAIT 0x04
515 BOOL WINAPI SHWaitForFileToOpen(
516 LPCITEMIDLIST pidl,
517 DWORD dwFlags,
518 DWORD dwTimeout);
520 WORD WINAPI ArrangeWindows(
521 HWND hwndParent,
522 DWORD dwReserved,
523 LPCRECT lpRect,
524 WORD cKids,
525 CONST HWND * lpKids);
527 /* RegisterShellHook types */
528 #define RSH_DEREGISTER 0
529 #define RSH_REGISTER 1
530 #define RSH_REGISTER_PROGMAN 2
531 #define RSH_REGISTER_TASKMAN 3
533 BOOL WINAPI RegisterShellHook(
534 HWND hWnd,
535 DWORD dwType);
537 /* SHCreateDefClassObject callback function */
538 typedef HRESULT (CALLBACK *LPFNCDCOCALLBACK)(
539 LPUNKNOWN pUnkOuter,
540 REFIID riidObject,
541 LPVOID *ppvObject);
543 HRESULT WINAPI SHCreateDefClassObject(
544 REFIID riidFactory,
545 LPVOID *ppvFactory,
546 LPFNCDCOCALLBACK lpfnCallback,
547 LPDWORD lpdwUsage,
548 REFIID riidObject);
550 void WINAPI SHFreeUnusedLibraries(void);
552 /* SHCreateLinks flags */
553 #define SHCLF_PREFIXNAME 0x01
554 #define SHCLF_CREATEONDESKTOP 0x02
556 HRESULT WINAPI SHCreateLinks(
557 HWND hWnd,
558 LPCSTR lpszDir,
559 LPDATAOBJECT lpDataObject,
560 UINT uFlags,
561 LPITEMIDLIST *lppidlLinks);
563 DWORD WINAPI CheckEscapesA(LPSTR string, DWORD len);
564 DWORD WINAPI CheckEscapesW(LPWSTR string, DWORD len);
566 /* policy functions */
567 BOOL WINAPI SHInitRestricted(LPCVOID unused, LPCVOID inpRegKey);
569 #ifdef __cplusplus
570 } /* extern "C" */
571 #endif /* defined(__cplusplus) */
573 #endif /* __WINE_UNDOCSHELL_H */