gdi32: Consider whether the logical font face is vertical when selecting.
[wine/multimedia.git] / dlls / shell32 / undocshell.h
blobfa0ac054b4dfb0468d82010c8218900f7488f5fc
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 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 HICON WINAPI SHGetFileIcon(
195 DWORD dwReserved,
196 LPCSTR lpszPath,
197 DWORD dwFileAttributes,
198 UINT uFlags);
200 BOOL WINAPI FileIconInit(BOOL bFullInit);
202 /****************************************************************************
203 * File Menu Routines
205 /* FileMenu_Create nSelHeight constants */
206 #define FM_DEFAULT_SELHEIGHT -1
207 #define FM_FULL_SELHEIGHT 0
209 /* FileMenu_Create flags */
210 #define FMF_SMALL_ICONS 0x00
211 #define FMF_LARGE_ICONS 0x08
212 #define FMF_NO_COLUMN_BREAK 0x10
214 HMENU WINAPI FileMenu_Create(
215 COLORREF crBorderColor,
216 int nBorderWidth,
217 HBITMAP hBorderBmp,
218 int nSelHeight,
219 UINT uFlags);
221 void WINAPI FileMenu_Destroy(HMENU hMenu);
223 /* FileMenu_AppendItem constants */
224 #define FM_SEPARATOR (LPCSTR)1
225 #define FM_BLANK_ICON -1
226 #define FM_DEFAULT_HEIGHT 0
228 BOOL WINAPI FileMenu_AppendItem(
229 HMENU hMenu,
230 LPCSTR lpszText,
231 UINT uID,
232 int iIcon,
233 HMENU hMenuPopup,
234 int nItemHeight);
236 /* FileMenu_InsertUsingPidl flags */
237 #define FMF_NO_EMPTY_ITEM 0x01
238 #define FMF_NO_PROGRAM_GROUPS 0x04
240 /* FileMenu_InsertUsingPidl callback function */
241 typedef void (CALLBACK *LPFNFMCALLBACK)(LPCITEMIDLIST pidlFolder, LPCITEMIDLIST pidlFile);
243 int WINAPI FileMenu_InsertUsingPidl(
244 HMENU hMenu,
245 UINT uID,
246 LPCITEMIDLIST pidl,
247 UINT uFlags,
248 UINT uEnumFlags,
249 LPFNFMCALLBACK lpfnCallback);
251 int WINAPI FileMenu_ReplaceUsingPidl(
252 HMENU hMenu,
253 UINT uID,
254 LPCITEMIDLIST pidl,
255 UINT uEnumFlags,
256 LPFNFMCALLBACK lpfnCallback);
258 void WINAPI FileMenu_Invalidate(HMENU hMenu);
260 HMENU WINAPI FileMenu_FindSubMenuByPidl(
261 HMENU hMenu,
262 LPCITEMIDLIST pidl);
264 BOOL WINAPI FileMenu_TrackPopupMenuEx(
265 HMENU hMenu,
266 UINT uFlags,
267 int x,
268 int y,
269 HWND hWnd,
270 LPTPMPARAMS lptpm);
272 BOOL WINAPI FileMenu_GetLastSelectedItemPidls(
273 UINT uReserved,
274 LPCITEMIDLIST *ppidlFolder,
275 LPCITEMIDLIST *ppidlItem);
277 LRESULT WINAPI FileMenu_MeasureItem(
278 HWND hWnd,
279 LPMEASUREITEMSTRUCT lpmis);
281 LRESULT WINAPI FileMenu_DrawItem(
282 HWND hWnd,
283 LPDRAWITEMSTRUCT lpdis);
285 BOOL WINAPI FileMenu_InitMenuPopup(HMENU hMenu);
287 void WINAPI FileMenu_AbortInitMenu(void);
289 LRESULT WINAPI FileMenu_HandleMenuChar(
290 HMENU hMenu,
291 WPARAM wParam);
293 BOOL WINAPI FileMenu_DeleteAllItems(HMENU hMenu);
295 BOOL WINAPI FileMenu_DeleteItemByCmd(
296 HMENU hMenu,
297 UINT uID);
299 BOOL WINAPI FileMenu_DeleteItemByIndex(
300 HMENU hMenu,
301 UINT uPos);
303 BOOL WINAPI FileMenu_DeleteMenuItemByFirstID(
304 HMENU hMenu,
305 UINT uID);
307 BOOL WINAPI FileMenu_DeleteSeparator(HMENU hMenu);
309 BOOL WINAPI FileMenu_EnableItemByCmd(
310 HMENU hMenu,
311 UINT uID,
312 BOOL bEnable);
314 DWORD WINAPI FileMenu_GetItemExtent(
315 HMENU hMenu,
316 UINT uPos);
318 int WINAPI FileMenu_AppendFilesForPidl(
319 HMENU hMenu,
320 LPCITEMIDLIST pidl,
321 BOOL bAddSeparator);
323 int WINAPI FileMenu_AddFilesForPidl(
324 HMENU hMenu,
325 UINT uReserved,
326 UINT uID,
327 LPCITEMIDLIST pidl,
328 UINT uFlags,
329 UINT uEnumFlags,
330 LPFNFMCALLBACK lpfnCallback);
332 /****************************************************************************
333 * Drag And Drop Routines
336 HRESULT WINAPI SHRegisterDragDrop(
337 HWND hWnd,
338 LPDROPTARGET lpDropTarget);
340 HRESULT WINAPI SHRevokeDragDrop(HWND hWnd);
342 BOOL WINAPI DAD_DragEnter(HWND hWnd);
344 BOOL WINAPI DAD_SetDragImageFromListView(
345 HWND hWnd,
346 POINT pt);
348 BOOL WINAPI DAD_ShowDragImage(BOOL bShow);
350 HRESULT WINAPI CIDLData_CreateFromIDArray(
351 LPCITEMIDLIST pidlFolder,
352 DWORD cpidlFiles,
353 LPCITEMIDLIST *lppidlFiles,
354 LPDATAOBJECT *ppdataObject);
356 /****************************************************************************
357 * Path Manipulation Routines
360 BOOL WINAPI PathAppendAW(LPVOID lpszPath1, LPCVOID lpszPath2);
362 LPVOID WINAPI PathCombineAW(LPVOID szDest, LPCVOID lpszDir, LPCVOID lpszFile);
364 LPVOID WINAPI PathAddBackslashAW(LPVOID path);
366 LPVOID WINAPI PathBuildRootAW(LPVOID lpszPath, int drive);
368 LPVOID WINAPI PathFindExtensionAW(LPCVOID path);
370 LPVOID WINAPI PathFindFileNameAW(LPCVOID path);
372 LPVOID WINAPI PathGetExtensionAW(LPCVOID lpszPath, DWORD void1, DWORD void2);
374 LPVOID WINAPI PathGetArgsAW(LPVOID lpszPath);
376 BOOL WINAPI PathRemoveFileSpecAW(LPVOID lpszPath);
378 void WINAPI PathRemoveBlanksAW(LPVOID lpszPath);
380 VOID WINAPI PathQuoteSpacesAW(LPVOID path);
382 void WINAPI PathUnquoteSpacesAW(LPVOID lpszPath);
384 BOOL WINAPI PathIsUNCAW(LPCVOID lpszPath);
386 BOOL WINAPI PathIsRelativeAW(LPCVOID lpszPath);
388 BOOL WINAPI PathIsRootAW(LPCVOID x);
390 BOOL WINAPI PathIsExeAW(LPCVOID lpszPath);
392 BOOL WINAPI PathIsDirectoryAW(LPCVOID lpszPath);
394 BOOL WINAPI PathFileExistsAW(LPCVOID lpszPath);
396 BOOL WINAPI PathMatchSpecAW(LPVOID lpszPath, LPVOID lpszSpec);
398 BOOL WINAPI PathMakeUniqueNameAW(
399 LPVOID lpszBuffer,
400 DWORD dwBuffSize,
401 LPCVOID lpszShortName,
402 LPCVOID lpszLongName,
403 LPCVOID lpszPathName);
406 BOOL WINAPI PathQualifyAW(LPCVOID path);
408 BOOL WINAPI PathResolveAW(LPVOID lpszPath, LPCVOID *alpszPaths, DWORD dwFlags);
410 VOID WINAPI PathSetDlgItemPathAW(HWND hDlg, int nIDDlgItem, LPCVOID lpszPath);
412 HRESULT WINAPI PathProcessCommandAW(LPCVOID lpszPath, LPVOID lpszBuff,
413 DWORD dwBuffSize, DWORD dwFlags);
415 void WINAPI PathStripPathAW(LPVOID lpszPath);
417 BOOL WINAPI PathStripToRootAW(LPVOID lpszPath);
419 void WINAPI PathRemoveArgsAW(LPVOID lpszPath);
421 void WINAPI PathRemoveExtensionAW(LPVOID lpszPath);
423 int WINAPI PathParseIconLocationAW(LPVOID lpszPath);
425 BOOL WINAPI PathIsSameRootAW(LPCVOID lpszPath1, LPCVOID lpszPath2);
427 BOOL WINAPI PathFindOnPathAW(LPVOID sFile, LPCVOID *sOtherDirs);
429 /****************************************************************************
430 * Shell Namespace Routines
433 /* Generic structure used by several messages */
434 typedef struct
436 DWORD dwReserved;
437 DWORD dwReserved2;
438 LPCITEMIDLIST pidl;
439 LPDWORD lpdwUser;
440 } SFVCBINFO, * LPSFVCBINFO;
441 typedef const SFVCBINFO * LPCSFVCBINFO;
443 /* SFVCB_SELECTIONCHANGED structure */
444 typedef struct
446 UINT uOldState;
447 UINT uNewState;
448 LPCITEMIDLIST pidl;
449 LPDWORD lpdwUser;
450 } SFVSELECTSTATE, * LPSFVSELECTSTATE;
451 typedef const SFVSELECTSTATE * LPCSFVSELECTSTATE;
453 /* SFVCB_COPYHOOKCALLBACK structure */
454 typedef struct
456 HWND hwnd;
457 UINT wFunc;
458 UINT wFlags;
459 LPCSTR pszSrcFile;
460 DWORD dwSrcAttribs;
461 LPCSTR pszDestFile;
462 DWORD dwDestAttribs;
463 } SFVCOPYHOOKINFO, * LPSFVCOPYHOOKINFO;
464 typedef const SFVCOPYHOOKINFO * LPCSFVCOPYHOOKINFO;
466 /* SFVCB_GETDETAILSOF structure */
467 typedef struct
469 LPCITEMIDLIST pidl;
470 int fmt;
471 int cx;
472 STRRET lpText;
473 } SFVCOLUMNINFO, * LPSFVCOLUMNINFO;
475 /****************************************************************************
476 * Misc Stuff
479 /* SHWaitForFileToOpen flags */
480 #define SHWFF_ADD 0x01
481 #define SHWFF_REMOVE 0x02
482 #define SHWFF_WAIT 0x04
484 BOOL WINAPI SHWaitForFileToOpen(
485 LPCITEMIDLIST pidl,
486 DWORD dwFlags,
487 DWORD dwTimeout);
489 WORD WINAPI ArrangeWindows(
490 HWND hwndParent,
491 DWORD dwReserved,
492 LPCRECT lpRect,
493 WORD cKids,
494 CONST HWND * lpKids);
496 /* RegisterShellHook types */
497 #define RSH_DEREGISTER 0
498 #define RSH_REGISTER 1
499 #define RSH_REGISTER_PROGMAN 2
500 #define RSH_REGISTER_TASKMAN 3
502 BOOL WINAPI RegisterShellHook(
503 HWND hWnd,
504 DWORD dwType);
506 /* SHCreateDefClassObject callback function */
507 typedef HRESULT (CALLBACK *LPFNCDCOCALLBACK)(
508 LPUNKNOWN pUnkOuter,
509 REFIID riidObject,
510 LPVOID *ppvObject);
512 HRESULT WINAPI SHCreateDefClassObject(
513 REFIID riidFactory,
514 LPVOID *ppvFactory,
515 LPFNCDCOCALLBACK lpfnCallback,
516 LPDWORD lpdwUsage,
517 REFIID riidObject);
519 void WINAPI SHFreeUnusedLibraries(void);
521 /* SHCreateLinks flags */
522 #define SHCLF_PREFIXNAME 0x01
523 #define SHCLF_CREATEONDESKTOP 0x02
525 HRESULT WINAPI SHCreateLinks(
526 HWND hWnd,
527 LPCSTR lpszDir,
528 LPDATAOBJECT lpDataObject,
529 UINT uFlags,
530 LPITEMIDLIST *lppidlLinks);
532 DWORD WINAPI CheckEscapesA(LPSTR string, DWORD len);
533 DWORD WINAPI CheckEscapesW(LPWSTR string, DWORD len);
535 /* policy functions */
536 BOOL WINAPI SHInitRestricted(LPCVOID unused, LPCVOID inpRegKey);
538 #ifdef __cplusplus
539 } /* extern "C" */
540 #endif /* defined(__cplusplus) */
542 #endif /* __WINE_UNDOCSHELL_H */