[PSDK] Add missing EBO_NOBORDER and EBO_NO.
[reactos.git] / reactos / include / psdk / shobjidl.idl
1 /*
2 * COM interfaces for shell objects
3 *
4 * Copyright (C) 1999 Juergen Schmied
5 * Copyright (C) 2003 Alexandre Julliard
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 */
21
22 import "objidl.idl";
23 import "oleidl.idl";
24 import "oaidl.idl";
25 import "docobj.idl";
26 import "shtypes.idl";
27 import "servprov.idl";
28 import "comcat.idl";
29 import "propidl.idl";
30 /* FIXME: import "prsht.idl";*/
31 import "msxml.idl";
32 import "wtypes.idl";
33 import "propsys.idl";
34 import "objectarray.idl";
35 /* FIXME: import "structuredquery.idl"; */
36
37 cpp_quote("/* FIXME: #include <sherrors.h> */")
38
39
40 /*****************************************************************************
41 * IPersistFolder interface
42 */
43 [
44 object,
45 uuid(000214ea-0000-0000-c000-000000000046),
46 pointer_default(unique)
47 ]
48 interface IPersistFolder : IPersist
49 {
50 typedef IPersistFolder *LPPERSISTFOLDER;
51
52 HRESULT Initialize( [in] LPCITEMIDLIST pidl );
53 }
54
55
56 /*****************************************************************************
57 * IPersistFolder2 interface
58 */
59 [
60 object,
61 uuid(1ac3d9f0-175c-11d1-95be-00609797ea4f),
62 pointer_default(unique)
63 ]
64 interface IPersistFolder2 : IPersistFolder
65 {
66 typedef IPersistFolder2 *LPPERSISTFOLDER2;
67
68 HRESULT GetCurFolder( [out] LPITEMIDLIST *ppidl );
69 }
70
71
72 /*****************************************************************************
73 * IPersistIDList interface
74 */
75 [
76 object,
77 uuid(1079acfc-29bd-11d3-8e0d-00c04f6837d5),
78 pointer_default(unique)
79 ]
80 interface IPersistIDList : IPersist
81 {
82 HRESULT SetIDList( [in] LPCITEMIDLIST pidl );
83 HRESULT GetIDList( [out] LPITEMIDLIST *ppidl );
84 }
85
86
87 /*****************************************************************************
88 * IEnumIDList interface
89 */
90 [
91 object,
92 uuid(000214f2-0000-0000-c000-000000000046),
93 pointer_default(unique)
94 ]
95 interface IEnumIDList : IUnknown
96 {
97 typedef IEnumIDList *LPENUMIDLIST;
98
99 HRESULT Next(
100 [in] ULONG celt,
101 [out, size_is(celt), length_is(*pceltFetched)] LPITEMIDLIST *rgelt,
102 [out] ULONG *pceltFetched);
103
104 HRESULT Skip( [in] ULONG celt );
105 HRESULT Reset();
106 HRESULT Clone( [out] IEnumIDList **ppenum );
107 }
108
109 /*****************************************************************************
110 * IShellPropSheetExt interface
111 */
112 cpp_quote("#if 0")
113 typedef LPARAM LPFNSVADDPROPSHEETPAGE;
114 cpp_quote("#else")
115 cpp_quote("#include <prsht.h>")
116 cpp_quote("typedef LPFNADDPROPSHEETPAGE LPFNSVADDPROPSHEETPAGE;")
117 cpp_quote("#endif")
118
119 [
120 object,
121 uuid(000214E9-0000-0000-C000-000000000046),
122 pointer_default(unique),
123 local
124 ]
125 interface IShellPropSheetExt : IUnknown
126 {
127 enum tagSHELLPROPSHEETEXTPAGEID {
128 EXPPS_FILETYPES = 0x1
129 };
130
131 typedef UINT EXPPS;
132
133 HRESULT AddPages(
134 [in] LPFNSVADDPROPSHEETPAGE pfnAddPage,
135 [in] LPARAM lParam);
136 HRESULT ReplacePage(
137 [in] EXPPS uPageID,
138 [in] LPFNSVADDPROPSHEETPAGE pfnReplaceWith,
139 [in] LPARAM lParam);
140 }
141 typedef IShellPropSheetExt *LPSHELLPROPSHEETEXT;
142
143 /*****************************************************************************
144 * IShellFolder interface
145 */
146 [
147 object,
148 uuid(000214e6-0000-0000-c000-000000000046),
149 pointer_default(unique)
150 ]
151 interface IShellFolder : IUnknown
152 {
153 typedef IShellFolder * LPSHELLFOLDER;
154
155 typedef enum tagSHGDN
156 {
157 SHGDN_NORMAL = 0,
158 SHGDN_INFOLDER = 1,
159 SHGDN_FOREDITING = 0x1000,
160 SHGDN_INCLUDE_NONFILESYS = 0x2000,
161 SHGDN_FORADDRESSBAR = 0x4000,
162 SHGDN_FORPARSING = 0x8000
163 } SHGNO;
164
165 typedef DWORD SHGDNF;
166
167 enum tagSHCONTF
168 {
169 SHCONTF_FOLDERS = 32,
170 SHCONTF_NONFOLDERS = 64,
171 SHCONTF_INCLUDEHIDDEN = 128,
172 SHCONTF_INIT_ON_FIRST_NEXT = 256,
173 SHCONTF_NETPRINTERSRCH = 512,
174 SHCONTF_SHAREABLE = 1024,
175 SHCONTF_STORAGE = 2048
176 };
177
178 typedef DWORD SHCONTF;
179
180 cpp_quote("#define SFGAO_CANCOPY DROPEFFECT_COPY")
181 cpp_quote("#define SFGAO_CANMOVE DROPEFFECT_MOVE")
182 cpp_quote("#define SFGAO_CANLINK DROPEFFECT_LINK")
183 cpp_quote("#define SFGAO_STORAGE 0x00000008L")
184 cpp_quote("#define SFGAO_CANRENAME 0x00000010L")
185 cpp_quote("#define SFGAO_CANDELETE 0x00000020L")
186 cpp_quote("#define SFGAO_HASPROPSHEET 0x00000040L")
187 cpp_quote("#define SFGAO_DROPTARGET 0x00000100L")
188 cpp_quote("#define SFGAO_CAPABILITYMASK 0x00000177L")
189 cpp_quote("#define SFGAO_ENCRYPTED 0x00002000L")
190 cpp_quote("#define SFGAO_ISSLOW 0x00004000L")
191 cpp_quote("#define SFGAO_GHOSTED 0x00008000L")
192 cpp_quote("#define SFGAO_LINK 0x00010000L")
193 cpp_quote("#define SFGAO_SHARE 0x00020000L")
194 cpp_quote("#define SFGAO_READONLY 0x00040000L")
195 cpp_quote("#define SFGAO_HIDDEN 0x00080000L")
196 cpp_quote("#define SFGAO_DISPLAYATTRMASK 0x000FC000L")
197 cpp_quote("#define SFGAO_FILESYSANCESTOR 0x10000000L")
198 cpp_quote("#define SFGAO_FOLDER 0x20000000L")
199 cpp_quote("#define SFGAO_FILESYSTEM 0x40000000L")
200 cpp_quote("#define SFGAO_HASSUBFOLDER 0x80000000L")
201 cpp_quote("#define SFGAO_CONTENTSMASK 0x80000000L")
202 cpp_quote("#define SFGAO_VALIDATE 0x01000000L")
203 cpp_quote("#define SFGAO_REMOVABLE 0x02000000L")
204 cpp_quote("#define SFGAO_COMPRESSED 0x04000000L")
205 cpp_quote("#define SFGAO_BROWSABLE 0x08000000L")
206 cpp_quote("#define SFGAO_NONENUMERATED 0x00100000L")
207 cpp_quote("#define SFGAO_NEWCONTENT 0x00200000L")
208 cpp_quote("#define SFGAO_STREAM 0x00400000L")
209 cpp_quote("#define SFGAO_STORAGEANCESTOR 0x00800000L")
210
211 typedef ULONG SFGAOF;
212
213 HRESULT ParseDisplayName(
214 [in] HWND hwndOwner,
215 [in] LPBC pbcReserved,
216 [in, string] LPOLESTR lpszDisplayName,
217 [out] ULONG *pchEaten,
218 [out] PIDLIST_RELATIVE *ppidl,
219 [in, out, unique] ULONG *pdwAttributes);
220
221 HRESULT EnumObjects(
222 [in] HWND hwndOwner,
223 [in] SHCONTF grfFlags,
224 [out] IEnumIDList **ppenumIDList);
225
226 HRESULT BindToObject(
227 [in] PCUIDLIST_RELATIVE pidl,
228 [in] LPBC pbcReserved,
229 [in] REFIID riid,
230 [out, iid_is(riid)] void **ppvOut);
231
232 HRESULT BindToStorage(
233 [in] PCUIDLIST_RELATIVE pidl,
234 [in] LPBC pbcReserved,
235 [in] REFIID riid,
236 [out, iid_is(riid)] void **ppvObj);
237
238 HRESULT CompareIDs(
239 [in] LPARAM lParam,
240 [in] PCUIDLIST_RELATIVE pidl1,
241 [in] PCUIDLIST_RELATIVE pidl2);
242
243 HRESULT CreateViewObject(
244 [in] HWND hwndOwner,
245 [in] REFIID riid,
246 [out, iid_is(riid)] void **ppvOut);
247
248 HRESULT GetAttributesOf(
249 [in] UINT cidl,
250 [in, size_is(cidl)] PCUITEMID_CHILD_ARRAY apidl,
251 [in, out] SFGAOF *rgfInOut);
252
253 HRESULT GetUIObjectOf(
254 [in] HWND hwndOwner,
255 [in] UINT cidl,
256 [in, size_is(cidl)] PCUITEMID_CHILD_ARRAY apidl,
257 [in] REFIID riid,
258 [in, out, unique] UINT *prgfInOut,
259 [out, iid_is(riid)] void **ppvOut);
260
261 HRESULT GetDisplayNameOf(
262 [in] PCUITEMID_CHILD pidl,
263 [in] SHGDNF uFlags,
264 [out] STRRET *lpName);
265
266 HRESULT SetNameOf(
267 [in] HWND hwnd,
268 [in] PCUITEMID_CHILD pidl,
269 [in, string] LPCOLESTR lpszName,
270 [in] SHGDNF uFlags,
271 [out] PITEMID_CHILD *ppidlOut);
272 }
273
274
275 /*****************************************************************************
276 * IEnumExtraSearch interface
277 */
278 [
279 object,
280 uuid(0e700be1-9db6-11d1-a1ce-00c04fd75d13),
281 pointer_default(unique)
282 ]
283 interface IEnumExtraSearch : IUnknown
284 {
285 typedef IEnumExtraSearch *LPENUMEXTRASEARCH;
286
287 typedef struct
288 {
289 GUID guidSearch;
290 WCHAR wszFriendlyName[80];
291 /*
292 *WCHAR wszMenuText[80];
293 *WCHAR wszHelpText[MAX_PATH];
294 */
295 WCHAR wszUrl[2084];
296 /*
297 *WCHAR wszIcon[MAX_PATH+10];
298 *WCHAR wszGreyIcon[MAX_PATH+10];
299 *WCHAR wszClrIcon[MAX_PATH+10];
300 */
301 } EXTRASEARCH, *LPEXTRASEARCH;
302
303 HRESULT Next(
304 [in] ULONG celt,
305 [out, size_is(celt), length_is(*pceltFetched)] EXTRASEARCH *rgelt,
306 [out] ULONG *pceltFetched);
307
308 HRESULT Skip( [in] ULONG celt );
309 HRESULT Reset();
310 HRESULT Clone( [out] IEnumExtraSearch **ppenum );
311 }
312
313
314 /*****************************************************************************
315 * IShellFolder2 interface
316 */
317 [
318 object,
319 uuid(93f2f68c-1d1b-11d3-a30e-00c04f79abd1),
320 pointer_default(unique)
321 ]
322 interface IShellFolder2 : IShellFolder
323 {
324 typedef struct
325 {
326 GUID fmtid;
327 DWORD pid;
328 } SHCOLUMNID, *LPSHCOLUMNID;
329 typedef const SHCOLUMNID *LPCSHCOLUMNID;
330
331 HRESULT GetDefaultSearchGUID( [out] GUID *lpguid );
332 HRESULT EnumSearches( [out] IEnumExtraSearch **ppenum );
333 HRESULT GetDefaultColumn( [in] DWORD dwReserved, [out] ULONG *pSort, [out] ULONG *pDisplay );
334 HRESULT GetDefaultColumnState( [in] UINT iColumn, [out] SHCOLSTATEF *pcsFlags );
335 HRESULT GetDetailsEx( [in] PCUITEMID_CHILD pidl, [in] const SHCOLUMNID *pscid, [out] VARIANT *pv);
336 HRESULT GetDetailsOf( [in] PCUITEMID_CHILD pidl, [in] UINT iColumn, [out] SHELLDETAILS *psd);
337 HRESULT MapColumnToSCID( [in] UINT iColumn, [in] SHCOLUMNID *pscid );
338 }
339
340 /*****************************************************************************
341 * IShellItem interface
342 */
343 [
344 object,
345 uuid(43826d1e-e718-42ee-bc55-a1e261c37bfe),
346 pointer_default(unique)
347 ]
348 interface IShellItem : IUnknown
349 {
350 typedef [v1_enum] enum {
351 SIGDN_NORMALDISPLAY = 0,
352 SIGDN_PARENTRELATIVEPARSING = 0x80018001,
353 SIGDN_DESKTOPABSOLUTEPARSING = 0x80028000,
354 SIGDN_PARENTRELATIVEEDITING = 0x80031001,
355 SIGDN_DESKTOPABSOLUTEEDITING = 0x8004c000,
356 SIGDN_FILESYSPATH = 0x80058000,
357 SIGDN_URL = 0x80068000,
358 SIGDN_PARENTRELATIVEFORADDRESSBAR = 0x8007c001,
359 SIGDN_PARENTRELATIVE = 0x80080001
360 } SIGDN; /* & 0xFFFF => SHGDN */
361
362 [v1_enum] enum _SICHINTF
363 {
364 SICHINT_DISPLAY = 0x00000000,
365 SICHINT_CANONICAL = 0x10000000,
366 SICHINT_TEST_FILESYSPATH_IF_NOT_EQUAL = 0x20000000,
367 SICHINT_ALLFIELDS = 0x80000000
368 };
369 typedef DWORD SICHINTF;
370
371 HRESULT BindToHandler(
372 [in] IBindCtx *pbc,
373 [in] REFGUID rbhid,
374 [in] REFIID riid,
375 [out, iid_is(riid)] void **ppvOut);
376
377 HRESULT GetParent( [out] IShellItem **ppsi );
378
379 HRESULT GetDisplayName(
380 [in] SIGDN sigdnName,
381 [out] LPWSTR *ppszName);
382
383 HRESULT GetAttributes(
384 [in] SFGAOF sfgaoMask,
385 [out] SFGAOF *psfgaoAttribs);
386
387 HRESULT Compare(
388 [in] IShellItem *psi,
389 [in] SICHINTF hint,
390 [out] int *piOrder);
391 }
392
393 /*****************************************************************************
394 * IShellItem2 interface
395 */
396 [
397 object,
398 uuid(7E9FB0D3-919F-4307-AB2E-9B1860310C93),
399 pointer_default(unique)
400 ]
401 interface IShellItem2 : IShellItem
402 {
403 HRESULT GetPropertyStore(
404 [in] GETPROPERTYSTOREFLAGS flags,
405 [in] REFIID riid,
406 [out, iid_is(riid)] void **ppv);
407
408 HRESULT GetPropertyStoreWithCreateObject(
409 [in] GETPROPERTYSTOREFLAGS flags,
410 [in] IUnknown *punkCreateObject,
411 [in] REFIID riid,
412 [out, iid_is(riid)] void **ppv);
413
414 HRESULT GetPropertyStoreForKeys(
415 [in, size_is(cKeys)] const PROPERTYKEY *rgKeys,
416 [in] UINT cKeys,
417 [in] GETPROPERTYSTOREFLAGS flags,
418 [in] REFIID riid,
419 [out, iid_is(riid)] void **ppv);
420
421 HRESULT GetPropertyDescriptionList(
422 [in] REFPROPERTYKEY keyType,
423 [in] REFIID riid,
424 [out, iid_is(riid)] void **ppv);
425
426 HRESULT Update(
427 [in, unique] IBindCtx *pbc);
428
429 HRESULT GetProperty(
430 [in] REFPROPERTYKEY key,
431 [out] PROPVARIANT *ppropvar);
432
433 HRESULT GetCLSID(
434 [in] REFPROPERTYKEY key,
435 [out] CLSID *pclsid);
436
437 HRESULT GetFileTime (
438 [in] REFPROPERTYKEY key,
439 [out] FILETIME *pft);
440
441 HRESULT GetInt32(
442 [in] REFPROPERTYKEY key,
443 [out] int *pi);
444
445 HRESULT GetString(
446 [in] REFPROPERTYKEY key,
447 [out, string] LPWSTR *ppsz);
448
449 HRESULT GetUInt32(
450 [in] REFPROPERTYKEY key,
451 [out] ULONG *pui);
452
453 HRESULT GetUInt64(
454 [in] REFPROPERTYKEY key,
455 [out] ULONGLONG *pull);
456
457 HRESULT GetBool(
458 [in] REFPROPERTYKEY key,
459 [out] BOOL *pf);
460 }
461
462 typedef enum tagNWMF {
463 NWMF_UNLOADING = 0x0001,
464 NWMF_USERINITED = 0x0002,
465 NWMF_FIRST = 0x0004,
466 NWMF_OVERRIDEKEY = 0x0008,
467 NWMF_SHOWHELP = 0x0010,
468 NWMF_HTMLDIALOG = 0x0020,
469 NWMF_FROMDIALOGCHILD = 0x0040,
470 NWMF_USERREQUESTED = 0x0080,
471 NWMF_USERALLOWED = 0x0100
472 } NWMF;
473
474 [
475 uuid(d2bc4c84-3f72-4a52-a604-7bcbf3982cbb),
476 object,
477 pointer_default(unique)
478 ]
479 interface INewWindowManager : IUnknown
480 {
481 HRESULT EvaluateNewWindow(
482 [in, string] LPCWSTR pszUrl,
483 [in, string] LPCWSTR pszName,
484 [in, string] LPCWSTR pszUrlContext,
485 [in, string] LPCWSTR pszFeatures,
486 [in] BOOL fReplace,
487 [in] DWORD dwFlags,
488 [in] DWORD dwUserActionTime);
489 }
490
491 cpp_quote("#define SID_SNewWindowManager IID_INewWindowManager")
492
493 /*****************************************************************************
494 * IEnumShellItems interface
495 */
496 [
497 object,
498 uuid(70629033-E363-4A28-A567-0DB78006E6D7),
499 pointer_default(unique)
500 ]
501 interface IEnumShellItems : IUnknown
502 {
503 [local] HRESULT Next(
504 [in] ULONG celt,
505 [out, size_is(celt), length_is(*pceltFetched)] IShellItem **rgelt,
506 [out] ULONG *pceltFetched);
507
508 [call_as(Next)] HRESULT RemoteNext(
509 [in] ULONG celt,
510 [out, size_is(celt), length_is(*pceltFetched)] IShellItem **rgelt,
511 [out] ULONG *pceltFetched);
512
513 HRESULT Skip(
514 [in] ULONG celt);
515
516 HRESULT Reset();
517
518 HRESULT Clone(
519 [out] IEnumShellItems **ppenum);
520 }
521
522 /*****************************************************************************
523 * IShellItemArray interface
524 */
525 [
526 object,
527 uuid(B63EA76D-1F85-456F-A19C-48159EFA858B),
528 pointer_default(unique)
529 ]
530 interface IShellItemArray : IUnknown
531 {
532 typedef [v1_enum] enum SIATTRIBFLAGS {
533 SIATTRIBFLAGS_AND = 0x0001,
534 SIATTRIBFLAGS_OR = 0x0002,
535 SIATTRIBFLAGS_APPCOMPAT = 0x0003,
536 SIATTRIBFLAGS_MASK = 0x0003,
537 SIATTRIBFLAGS_ALLITEMS = 0x4000
538 } SIATTRIBFLAGS;
539 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(SIATTRIBFLAGS)")
540
541 HRESULT BindToHandler(
542 [in, unique] IBindCtx *pbc,
543 [in] REFGUID bhid,
544 [in] REFIID riid,
545 [out, iid_is(riid)] void **ppvOut);
546
547 HRESULT GetPropertyStore(
548 [in] GETPROPERTYSTOREFLAGS flags,
549 [in] REFIID riid,
550 [out, iid_is(riid)] void **ppv);
551
552 HRESULT GetPropertyDescriptionList(
553 [in] REFPROPERTYKEY keyType,
554 [in] REFIID riid,
555 [out, iid_is(riid)] void **ppv);
556
557 HRESULT GetAttributes(
558 [in] SIATTRIBFLAGS AttribFlags,
559 [in] SFGAOF sfgaoMask,
560 [out] SFGAOF *psfgaoAttribs);
561
562 HRESULT GetCount(
563 [out] DWORD *pdwNumItems);
564
565 HRESULT GetItemAt(
566 [in] DWORD dwIndex,
567 [out] IShellItem **ppsi);
568
569 HRESULT EnumItems(
570 [out] IEnumShellItems **ppenumShellItems);
571
572 }
573
574 typedef [v1_enum] enum DATAOBJ_GET_ITEM_FLAGS
575 {
576 DOGIF_DEFAULT = 0x0,
577 DOGIF_TRAVERSE_LINK = 0x1,
578 DOGIF_NO_HDROP = 0x2,
579 DOGIF_NO_URL = 0x4,
580 DOGIF_ONLY_IF_ONE = 0x8
581 } DATAOBJ_GET_ITEM_FLAGS;
582 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(DATAOBJ_GET_ITEM_FLAGS)")
583
584 cpp_quote("HRESULT WINAPI SHGetNameFromIDList(PCIDLIST_ABSOLUTE pidl, SIGDN sigdnName, PWSTR *ppszName);")
585 cpp_quote("HRESULT WINAPI SHCreateItemFromParsingName(PCWSTR pszPath, IBindCtx *pbc, REFIID riid, void **ppv);")
586 cpp_quote("HRESULT WINAPI SHCreateItemFromIDList(PCIDLIST_ABSOLUTE pidl, REFIID riid, void **ppv);")
587 cpp_quote("HRESULT WINAPI SHGetItemFromDataObject(IDataObject *pdtobj, DATAOBJ_GET_ITEM_FLAGS dwFlags, REFIID riid, void **ppv);")
588 cpp_quote("HRESULT WINAPI SHGetIDListFromObject(IUnknown *punk, PIDLIST_ABSOLUTE *ppidl);")
589 cpp_quote("HRESULT WINAPI SHGetItemFromObject(IUnknown *punk, REFIID riid, void **ppv);")
590 cpp_quote("HRESULT WINAPI SHCreateShellItemArray(PCIDLIST_ABSOLUTE pidlParent, IShellFolder* psf, UINT cidl, PCUITEMID_CHILD_ARRAY ppidl, IShellItemArray **ppsiItemArray);")
591 cpp_quote("HRESULT WINAPI SHCreateShellItemArrayFromShellItem(IShellItem *psi, REFIID riid, void **ppv);")
592 cpp_quote("HRESULT WINAPI SHCreateShellItemArrayFromDataObject(IDataObject *pdo, REFIID riid, void **ppv);")
593
594 /*****************************************************************************
595 * IShellItemFilter interface
596 */
597 [
598 object,
599 uuid(2659B475-EEB8-48B7-8F07-B378810F48CF),
600 pointer_default(unique)
601 ]
602 interface IShellItemFilter : IUnknown
603 {
604 HRESULT IncludeItem(
605 [in] IShellItem *psi);
606
607 HRESULT GetEnumFlagsForItem(
608 [in] IShellItem *psi,
609 [out] SHCONTF *pgrfFlags);
610 }
611
612 /*****************************************************************************
613 * FOLDERSETTINGS
614 */
615 typedef char *LPVIEWSETTINGS;
616
617 typedef enum
618 {
619 FWF_AUTOARRANGE = 0x00000001,
620 FWF_ABBREVIATEDNAMES = 0x00000002,
621 FWF_SNAPTOGRID = 0x00000004,
622 FWF_OWNERDATA = 0x00000008,
623 FWF_BESTFITWINDOW = 0x00000010,
624 FWF_DESKTOP = 0x00000020,
625 FWF_SINGLESEL = 0x00000040,
626 FWF_NOSUBFOLDERS = 0x00000080,
627 FWF_TRANSPARENT = 0x00000100,
628 FWF_NOCLIENTEDGE = 0x00000200,
629 FWF_NOSCROLL = 0x00000400,
630 FWF_ALIGNLEFT = 0x00000800,
631 FWF_NOICONS = 0x00001000,
632 FWF_SHOWSELALWAYS = 0x00002000,
633 FWF_NOVISIBLE = 0x00004000,
634 FWF_SINGLECLICKACTIVATE = 0x00008000,
635 FWF_NOWEBVIEW = 0x00010000,
636 FWF_HIDEFILENAMES = 0x00020000,
637 FWF_CHECKSELECT = 0x00040000,
638 FWF_NOENUMREFRESH = 0x00080000,
639 FWF_NOGROUPING = 0x00100000,
640 FWF_FULLROWSELECT = 0x00200000,
641 FWF_NOFILTERS = 0x00400000,
642 FWF_NOCOLUMNHEADER = 0x00800000,
643 FWF_NOHEADERINALLVIEWS = 0x01000000,
644 FWF_EXTENDEDTILES = 0x02000000,
645 FWF_TRICHECKSELECT = 0x04000000,
646 FWF_AUTOCHECKSELECT = 0x08000000,
647 FWF_NOBROWSERVIEWSTATE = 0x10000000,
648 FWF_SUBSETGROUPS = 0x20000000,
649 FWF_USESEARCHFOLDER = 0x40000000,
650 FWF_ALLOWRTLREADING = 0x80000000
651 } FOLDERFLAGS;
652
653 typedef enum
654 {
655 FVM_AUTO =-1,
656 FVM_ICON = 1,
657 FVM_FIRST = FVM_ICON,
658 FVM_SMALLICON = 2,
659 FVM_LIST = 3,
660 FVM_DETAILS = 4,
661 FVM_THUMBNAIL = 5,
662 FVM_TILE = 6,
663 FVM_THUMBSTRIP = 7,
664 FVM_CONTENT = 8,
665 FVM_LAST = FVM_CONTENT
666 } FOLDERVIEWMODE;
667
668 typedef struct
669 {
670 UINT ViewMode;
671 UINT fFlags;
672 } FOLDERSETTINGS, *PFOLDERSETTINGS, *LPFOLDERSETTINGS;
673 typedef const FOLDERSETTINGS *LPCFOLDERSETTINGS;
674
675 /*****************************************************************************
676 * IShellIcon interface
677 */
678 [
679 uuid(000214e5-0000-0000-c000-000000000046),
680 object,
681 pointer_default(unique)
682 ]
683 interface IShellIcon : IUnknown
684 {
685 HRESULT GetIconOf(
686 [in] PCUITEMID_CHILD pidl,
687 [in] UINT flags,
688 [out] int *pIconIndex);
689 }
690
691 /*****************************************************************************
692 * IShellView interface
693 */
694 interface IShellBrowser; /* forward declaration */
695 [
696 object,
697 uuid(000214e3-0000-0000-c000-000000000046),
698 pointer_default(unique)
699 ]
700 interface IShellView : IOleWindow
701 {
702 typedef IShellView *LPSHELLVIEW;
703
704 cpp_quote("#define SVSI_DESELECT 0x00000000")
705 cpp_quote("#define SVSI_SELECT 0x00000001")
706 cpp_quote("#define SVSI_EDIT 0x00000003")
707 cpp_quote("#define SVSI_DESELECTOTHERS 0x00000004")
708 cpp_quote("#define SVSI_ENSUREVISIBLE 0x00000008")
709 cpp_quote("#define SVSI_FOCUSED 0x00000010")
710 cpp_quote("#define SVSI_TRANSLATEPT 0x00000020")
711 cpp_quote("#define SVSI_SELECTIONMARK 0x00000040")
712 cpp_quote("#define SVSI_POSITIONITEM 0x00000080")
713 cpp_quote("#define SVSI_CHECK 0x00000100")
714 cpp_quote("#define SVSI_NOSTATECHANGE 0x80000000")
715
716 typedef UINT SVSIF;
717
718 typedef enum
719 {
720 SVGIO_BACKGROUND = 0x00000000,
721 SVGIO_SELECTION = 0x00000001,
722 SVGIO_ALLVIEW = 0x00000002,
723 SVGIO_CHECKED = 0x00000003,
724 SVGIO_TYPE_MASK = 0x0000000f,
725 SVGIO_FLAG_VIEWORDER = 0x80000000,
726 } SVGIO;
727
728 typedef enum
729 {
730 SVUIA_DEACTIVATE = 0,
731 SVUIA_ACTIVATE_NOFOCUS = 1,
732 SVUIA_ACTIVATE_FOCUS = 2,
733 SVUIA_INPLACEACTIVATE = 3
734 } SVUIA_STATUS;
735
736 HRESULT TranslateAccelerator( [in] MSG *pmsg );
737 HRESULT EnableModeless( [in] BOOL fEnable );
738 HRESULT UIActivate( [in] UINT uState );
739 HRESULT Refresh();
740 HRESULT CreateViewWindow(
741 [in] IShellView *psvPrevious,
742 [in] LPCFOLDERSETTINGS lpfs,
743 [in] IShellBrowser *psb,
744 [out] RECT *prcView,
745 [out] HWND *phWnd);
746
747 HRESULT DestroyViewWindow();
748 HRESULT GetCurrentInfo( [out] LPFOLDERSETTINGS lpfs );
749
750 [local] HRESULT AddPropertySheetPages(
751 [in] DWORD dwReserved,
752 [in] LPFNSVADDPROPSHEETPAGE pfn,
753 [in] LPARAM lparam);
754
755 HRESULT SaveViewState();
756 HRESULT SelectItem(
757 [in] LPCITEMIDLIST pidlItem,
758 [in] SVSIF uFlags);
759 HRESULT GetItemObject(
760 [in] UINT uItem,
761 [in] REFIID riid,
762 [out, iid_is(riid)] void **ppv);
763 }
764
765 [
766 object,
767 uuid(88e39e80-3578-11cf-ae69-08002b2e1262),
768 pointer_default(unique)
769 ]
770 interface IShellView2 : IShellView
771 {
772 typedef GUID SHELLVIEWID;
773 cpp_quote("#include <pshpack8.h>")
774 typedef struct _SV2CVW2_PARAMS
775 {
776 DWORD cbSize;
777 IShellView *psvPrev;
778 LPCFOLDERSETTINGS pfs;
779 IShellBrowser *psbOwner;
780 RECT *prcView;
781 SHELLVIEWID const *pvid;
782 HWND hwndView;
783 } SV2CVW2_PARAMS, *LPSV2CVW2_PARAMS;
784 cpp_quote("#include <poppack.h>")
785
786 HRESULT GetView(
787 [in, out] SHELLVIEWID *view_guid,
788 [in] ULONG view_type
789 );
790 HRESULT CreateViewWindow2(
791 [in] LPSV2CVW2_PARAMS view_params
792 );
793 HRESULT HandleRename(
794 [in] LPCITEMIDLIST new_pidl
795 );
796 HRESULT SelectAndPositionItem(
797 [in] LPCITEMIDLIST item,
798 [in] UINT flags,
799 [in] POINT *point
800 );
801 }
802
803 /*****************************************************************************
804 * IFolderView interface
805 */
806 [
807 uuid(cde725b0-ccc9-4519-917e-325d72fab4ce),
808 object,
809 pointer_default(unique)
810 ]
811 interface IFolderView : IUnknown
812 {
813 HRESULT GetCurrentViewMode( [out] UINT *mode );
814 HRESULT SetCurrentViewMode( [in] UINT mode );
815 HRESULT GetFolder( [in] REFIID riid, [out, iid_is(riid)] void **ppv );
816 HRESULT Item(
817 [in] int index,
818 [out] PITEMID_CHILD *ppidl
819 );
820 HRESULT ItemCount(
821 [in] UINT flags,
822 [out] int *items
823 );
824 HRESULT Items(
825 [in] UINT flags,
826 [in] REFIID riid,
827 [out, iid_is(riid)] void **ppv
828 );
829 HRESULT GetSelectionMarkedItem( [out] int *item );
830 HRESULT GetFocusedItem( [out] int *item );
831 HRESULT GetItemPosition(
832 [in] PCUITEMID_CHILD pidl,
833 [out] POINT* ppt
834 );
835 HRESULT GetSpacing( [in, out, unique] POINT* pt );
836 HRESULT GetDefaultSpacing( [out] POINT* pt );
837 HRESULT GetAutoArrange();
838 HRESULT SelectItem(
839 [in] int item,
840 [in] DWORD flags
841 );
842 HRESULT SelectAndPositionItems(
843 [in] UINT cidl,
844 [in, size_is(cidl)] PCUITEMID_CHILD_ARRAY apidl,
845 [in, unique, size_is(cidl)] POINT* apt,
846 [in] DWORD flags
847 );
848 }
849
850 [v1_enum] enum tagSORTDIRECTION
851 {
852 SORT_DESCENDING = -1,
853 SORT_ASCENDING = 1
854 };
855 typedef int SORTDIRECTION;
856
857 typedef struct SORTCOLUMN
858 {
859 PROPERTYKEY propkey;
860 SORTDIRECTION direction;
861 } SORTCOLUMN;
862
863 typedef [v1_enum] enum FVTEXTTYPE
864 {
865 FVST_EMPTYTEXT = 0
866 } FVTEXTTYPE;
867
868 [
869 uuid(1af3a467-214f-4298-908e-06b03e0b39f9),
870 object,
871 pointer_default(unique)
872 ]
873 interface IFolderView2 : IFolderView
874 {
875 HRESULT SetGroupBy(
876 [in] REFPROPERTYKEY key,
877 [in] BOOL ascending);
878
879 [local]
880 HRESULT GetGroupBy(
881 [out] PROPERTYKEY *pkey,
882 [out] BOOL *ascending);
883
884 [call_as(GetGroupBy)]
885 HRESULT RemoteGetGroupBy(
886 [out] PROPERTYKEY *pkey,
887 [out] BOOL *ascending);
888
889 HRESULT SetViewProperty(
890 [in] PCUITEMID_CHILD pidl,
891 [in] REFPROPERTYKEY propkey,
892 [in] REFPROPVARIANT propvar);
893
894 HRESULT GetViewProperty(
895 [in] PCUITEMID_CHILD pidl,
896 [in] REFPROPERTYKEY propkey,
897 [out] PROPVARIANT *propvar);
898
899 HRESULT SetTileViewProperties(
900 [in] PCUITEMID_CHILD pidl,
901 [in, string] LPCWSTR prop_list);
902
903 HRESULT SetExtendedTileViewProperties(
904 [in] PCUITEMID_CHILD pidl,
905 [in, string] LPCWSTR prop_list);
906
907 HRESULT SetText(
908 [in] FVTEXTTYPE type,
909 [in] LPCWSTR text);
910
911 HRESULT SetCurrentFolderFlags(
912 [in] DWORD mask,
913 [in] DWORD flags);
914
915 HRESULT GetCurrentFolderFlags([out] DWORD *flags);
916
917 HRESULT GetSortColumnCount([out] int *columns);
918
919 HRESULT SetSortColumns(
920 [in, size_is(count)] const SORTCOLUMN *columns,
921 [in] int count);
922
923 HRESULT GetSortColumns(
924 [out, size_is(count)] SORTCOLUMN *columns,
925 [in] int count);
926
927 HRESULT GetItem(
928 [in] int ittem,
929 [in] REFIID riid,
930 [out, iid_is(riid)] void **ppv);
931
932 HRESULT GetVisibleItem(
933 [in] int start,
934 [in] BOOL previous,
935 [out] int *item);
936
937 HRESULT GetSelectedItem(
938 [in] int start,
939 [out] int *item);
940
941 HRESULT GetSelection(
942 [in] BOOL none_implies_folder,
943 [out] IShellItemArray **array);
944
945 HRESULT GetSelectionState(
946 [in] PCUITEMID_CHILD pidl,
947 [out] DWORD *flags);
948
949 HRESULT InvokeVerbOnSelection([in, unique, string] LPCSTR verb);
950
951 HRESULT SetViewModeAndIconSize(
952 [in] FOLDERVIEWMODE mode,
953 [in] int size);
954
955 HRESULT GetViewModeAndIconSize(
956 [out] FOLDERVIEWMODE *mode,
957 [out] int *size);
958
959 HRESULT SetGroupSubsetCount([in] UINT visible_rows);
960
961 HRESULT GetGroupSubsetCount([out] UINT *visible_rows);
962
963 HRESULT SetRedraw([in] BOOL redraw);
964
965 HRESULT IsMoveInSameFolder();
966
967 HRESULT DoRename();
968 }
969
970 /*****************************************************************************
971 * IShellBrowser interface
972 */
973 [
974 object,
975 uuid(000214e2-0000-0000-c000-000000000046),
976 pointer_default(unique)
977 ]
978 interface IShellBrowser : IOleWindow
979 {
980 typedef IShellBrowser *LPSHELLBROWSER;
981
982 cpp_quote("#define SBSP_DEFBROWSER 0x00000000")
983 cpp_quote("#define SBSP_SAMEBROWSER 0x00000001")
984 cpp_quote("#define SBSP_NEWBROWSER 0x00000002")
985 cpp_quote("#define SBSP_DEFMODE 0x00000000")
986 cpp_quote("#define SBSP_OPENMODE 0x00000010")
987 cpp_quote("#define SBSP_EXPLOREMODE 0x00000020")
988 cpp_quote("#define SBSP_HELPMODE 0x00000040")
989 cpp_quote("#define SBSP_NOTRANSFERHIST 0x00000080")
990 cpp_quote("#define SBSP_ABSOLUTE 0x00000000")
991 cpp_quote("#define SBSP_RELATIVE 0x00001000")
992 cpp_quote("#define SBSP_PARENT 0x00002000")
993 cpp_quote("#define SBSP_NAVIGATEBACK 0x00004000")
994 cpp_quote("#define SBSP_NAVIGATEFORWARD 0x00008000")
995 cpp_quote("#define SBSP_ALLOW_AUTONAVIGATE 0x00010000")
996 cpp_quote("#define SBSP_KEEPSAMETEMPLATE 0x00020000")
997 cpp_quote("#define SBSP_KEEPWORDWHEELTEXT 0x00040000")
998 cpp_quote("#define SBSP_ACTIVATE_NOFOCUS 0x00080000")
999 cpp_quote("#define SBSP_CREATENOHISTORY 0x00100000")
1000 cpp_quote("#define SBSP_PLAYNOSOUND 0x00200000")
1001 cpp_quote("#define SBSP_CALLERUNTURUSTED 0x00800000")
1002 cpp_quote("#define SBSP_TRUSTFIRSTDOWNLOAD 0x01000000")
1003 cpp_quote("#define SBSP_UNTRUSTEDFORDOWNLOAD 0x02000000")
1004 cpp_quote("#define SBSP_NOAUTOSELECT 0x04000000")
1005 cpp_quote("#define SBSP_WRITENOHISTORY 0x08000000")
1006 cpp_quote("#define SBSP_TRUSTEDFORACTIVEX 0x10000000")
1007 cpp_quote("#define SBSP_FEEDNAVIGATION 0x20000000")
1008 cpp_quote("#define SBSP_REDIRECT 0x40000000")
1009 cpp_quote("#define SBSP_INITIATEDBYHLINKFRAME 0x80000000")
1010
1011 cpp_quote("#define FCW_STATUS 0x0001")
1012 cpp_quote("#define FCW_TOOLBAR 0x0002")
1013 cpp_quote("#define FCW_TREE 0x0003")
1014 cpp_quote("#define FCW_INTERNETBAR 0x0006")
1015 cpp_quote("#define FCW_PROGRESS 0x0008")
1016
1017 cpp_quote("#define FCT_MERGE 0x0001")
1018 cpp_quote("#define FCT_CONFIGABLE 0x0002")
1019 cpp_quote("#define FCT_ADDTOEND 0x0004")
1020
1021 cpp_quote("#if 0")
1022 typedef LPARAM LPTBBUTTONSB;
1023 cpp_quote("#else")
1024 cpp_quote("#include <commctrl.h>")
1025 cpp_quote("typedef LPTBBUTTON LPTBBUTTONSB;")
1026 cpp_quote("#endif")
1027
1028 HRESULT InsertMenusSB(
1029 [in] HMENU hmenuShared,
1030 [in, out] LPOLEMENUGROUPWIDTHS lpMenuWidths);
1031
1032 HRESULT SetMenuSB(
1033 [in] HMENU hmenuShared,
1034 [in] HOLEMENU holemenuReserved,
1035 [in] HWND hwndActiveObject);
1036
1037 HRESULT RemoveMenusSB( [in] HMENU hmenuShared );
1038 HRESULT SetStatusTextSB( [in, unique] LPCOLESTR pszStatusText );
1039 HRESULT EnableModelessSB( [in] BOOL fEnable );
1040 HRESULT TranslateAcceleratorSB( [in] MSG *pmsg, [in] WORD wID );
1041
1042 HRESULT BrowseObject(
1043 [in] LPCITEMIDLIST pidl,
1044 [in] UINT wFlags);
1045
1046 HRESULT GetViewStateStream(
1047 [in] DWORD grfMode,
1048 [out] IStream **ppStrm);
1049
1050 HRESULT GetControlWindow(
1051 [in] UINT id,
1052 [out] HWND *phwnd);
1053
1054 [local] HRESULT SendControlMsg(
1055 [in] UINT id,
1056 [in] UINT uMsg,
1057 [in] WPARAM wParam,
1058 [in] LPARAM lParam,
1059 [in] LRESULT *pret);
1060
1061 HRESULT QueryActiveShellView( [out] IShellView **ppshv );
1062 HRESULT OnViewWindowActive( [in] IShellView *pshv );
1063
1064 [local]
1065 HRESULT SetToolbarItems(
1066 [in] LPTBBUTTONSB lpButtons,
1067 [in] UINT nButtons,
1068 [in] UINT uFlags);
1069 }
1070
1071
1072 /*****************************************************************************
1073 * IShellLinkA interface
1074 */
1075 [
1076 object,
1077 uuid(000214ee-0000-0000-c000-000000000046),
1078 pointer_default(unique)
1079 ]
1080 interface IShellLinkA : IUnknown
1081 {
1082 typedef enum
1083 {
1084 SLR_NO_UI = 0x0001,
1085 SLR_ANY_MATCH = 0x0002,
1086 SLR_UPDATE = 0x0004,
1087 SLR_NOUPDATE = 0x0008,
1088 SLR_NOSEARCH = 0x0010,
1089 SLR_NOTRACK = 0x0020,
1090 SLR_NOLINKINFO = 0x0040,
1091 SLR_INVOKE_MSI = 0x0080,
1092 SLR_NO_UI_WITH_MSG_PUMP = 0x0101,
1093 } SLR_FLAGS;
1094
1095 typedef enum
1096 {
1097 SLGP_SHORTPATH = 0x0001,
1098 SLGP_UNCPRIORITY = 0x0002,
1099 SLGP_RAWPATH = 0x0004,
1100 } SLGP_FLAGS;
1101
1102 HRESULT GetPath(
1103 [out, size_is(cch)] LPSTR pszFile,
1104 [in] int cch,
1105 [in, out, unique] WIN32_FIND_DATAA *pfd,
1106 [in] DWORD fFlags);
1107
1108 HRESULT GetIDList( [out] LPITEMIDLIST * ppidl );
1109
1110 HRESULT SetIDList( [in] LPCITEMIDLIST pidl );
1111
1112 HRESULT GetDescription(
1113 [out, size_is(cch)] LPSTR pszName,
1114 [in] int cch);
1115
1116 HRESULT SetDescription( [in] LPCSTR pszName );
1117
1118 HRESULT GetWorkingDirectory(
1119 [out, size_is(cch)] LPSTR pszDir,
1120 [in] int cch);
1121
1122 HRESULT SetWorkingDirectory( [in] LPCSTR pszDir );
1123
1124 HRESULT GetArguments(
1125 [out, size_is(cch)] LPSTR pszArgs,
1126 [in] int cch);
1127
1128 HRESULT SetArguments( [in] LPCSTR pszArgs );
1129
1130 HRESULT GetHotkey( [out] WORD *pwHotkey );
1131
1132 HRESULT SetHotkey( [in] WORD wHotkey );
1133
1134 HRESULT GetShowCmd( [out] int *piShowCmd );
1135
1136 HRESULT SetShowCmd( [in] int iShowCmd );
1137
1138 HRESULT GetIconLocation(
1139 [out, size_is(cch)] LPSTR pszIconPath,
1140 [in] int cch,
1141 [out] int *piIcon);
1142
1143 HRESULT SetIconLocation(
1144 [in] LPCSTR pszIconPath,
1145 [in] int iIcon);
1146
1147 HRESULT SetRelativePath(
1148 [in] LPCSTR pszPathRel,
1149 [in] DWORD dwReserved);
1150
1151 HRESULT Resolve(
1152 [in] HWND hwnd,
1153 [in] DWORD fFlags);
1154
1155 HRESULT SetPath( [in] LPCSTR pszFile );
1156 }
1157
1158
1159 /*****************************************************************************
1160 * IShellLinkW interface
1161 */
1162 [
1163 object,
1164 uuid(000214f9-0000-0000-c000-000000000046),
1165 pointer_default(unique)
1166 ]
1167 interface IShellLinkW : IUnknown
1168 {
1169 HRESULT GetPath(
1170 [out, size_is(cch)] LPWSTR pszFile,
1171 [in] int cch,
1172 [in, out] WIN32_FIND_DATAW *pfd,
1173 [in] DWORD fFlags);
1174
1175 HRESULT GetIDList( [out] LPITEMIDLIST * ppidl );
1176
1177 HRESULT SetIDList( [in] LPCITEMIDLIST pidl );
1178
1179 HRESULT GetDescription(
1180 [out, size_is(cch)] LPWSTR pszName,
1181 [in] int cch);
1182
1183 HRESULT SetDescription( [in] LPCWSTR pszName );
1184
1185 HRESULT GetWorkingDirectory(
1186 [out, size_is(cch)] LPWSTR pszDir,
1187 [in] int cch);
1188
1189 HRESULT SetWorkingDirectory( [in] LPCWSTR pszDir );
1190
1191 HRESULT GetArguments(
1192 [out, size_is(cch)] LPWSTR pszArgs,
1193 [in] int cch);
1194
1195 HRESULT SetArguments( [in] LPCWSTR pszArgs );
1196
1197 HRESULT GetHotkey( [out] WORD *pwHotkey );
1198
1199 HRESULT SetHotkey( [in] WORD wHotkey );
1200
1201 HRESULT GetShowCmd( [out] int *piShowCmd );
1202
1203 HRESULT SetShowCmd( [in] int iShowCmd );
1204
1205 HRESULT GetIconLocation(
1206 [out, size_is(cch)] LPWSTR pszIconPath,
1207 [in] int cch,
1208 [out] int *piIcon);
1209
1210 HRESULT SetIconLocation(
1211 [in] LPCWSTR pszIconPath,
1212 [in] int iIcon);
1213
1214 HRESULT SetRelativePath(
1215 [in] LPCWSTR pszPathRel,
1216 [in] DWORD dwReserved);
1217
1218 HRESULT Resolve(
1219 [in] HWND hwnd,
1220 [in] DWORD fFlags);
1221
1222 HRESULT SetPath( [in] LPCWSTR pszFile );
1223 }
1224
1225 cpp_quote("#define IShellLink WINELIB_NAME_AW(IShellLink)")
1226
1227
1228 /*****************************************************************************
1229 * IShellExtInit interface
1230 */
1231 [
1232 object,
1233 uuid(000214e8-0000-0000-c000-000000000046),
1234 pointer_default(unique),
1235 local
1236 ]
1237 interface IShellExtInit : IUnknown
1238 {
1239 typedef IShellExtInit *LPSHELLEXTINIT;
1240
1241 HRESULT Initialize(
1242 [in] LPCITEMIDLIST pidlFolder,
1243 [in] IDataObject *pdtobj,
1244 [in] HKEY hkeyProgID);
1245 }
1246
1247
1248 /*******************************************************************************/
1249 /* Note: the following interfaces are not in shobjidl.idl under Windows, they */
1250 /* are declared directly in shlobj.h. It hopefully won't break anything to put */
1251 /* them here anyway. */
1252 /*******************************************************************************/
1253
1254 #ifndef MAX_PATH
1255 #define MAX_PATH 260
1256 #endif
1257
1258
1259 /*****************************************************************************
1260 * IPersistFolder3 interface
1261 */
1262 [
1263 object,
1264 uuid(cef04fdf-fe72-11d2-87a5-00c04f6837cf),
1265 pointer_default(unique)
1266 ]
1267 interface IPersistFolder3 : IPersistFolder2
1268 {
1269 typedef struct
1270 {
1271 LPITEMIDLIST pidlTargetFolder;
1272 WCHAR szTargetParsingName[MAX_PATH];
1273 WCHAR szNetworkProvider[MAX_PATH];
1274 DWORD dwAttributes;
1275 int csidl;
1276 } PERSIST_FOLDER_TARGET_INFO;
1277
1278 HRESULT InitializeEx(
1279 [in] IBindCtx *pbc,
1280 [in] LPCITEMIDLIST pidlRoot,
1281 [in] const PERSIST_FOLDER_TARGET_INFO *ppfti);
1282
1283 HRESULT GetFolderTargetInfo( [out] PERSIST_FOLDER_TARGET_INFO *ppfti );
1284 }
1285
1286
1287 /*****************************************************************************
1288 * IExtractIconA interface
1289 */
1290 [
1291 object,
1292 uuid(000214eb-0000-0000-c000-000000000046),
1293 pointer_default(unique),
1294 local
1295 ]
1296 interface IExtractIconA : IUnknown
1297 {
1298 cpp_quote("#define GIL_OPENICON 0x0001")
1299 cpp_quote("#define GIL_FORSHELL 0x0002")
1300 cpp_quote("#define GIL_ASYNC 0x0020")
1301 cpp_quote("#define GIL_DEFAULTICON 0x0040")
1302 cpp_quote("#define GIL_FORSHORTCUT 0x0080")
1303
1304 cpp_quote("#define GIL_SIMULATEDOC 0x0001")
1305 cpp_quote("#define GIL_PERINSTANCE 0x0002")
1306 cpp_quote("#define GIL_PERCLASS 0x0004")
1307 cpp_quote("#define GIL_NOTFILENAME 0x0008")
1308 cpp_quote("#define GIL_DONTCACHE 0x0010")
1309
1310 typedef IExtractIconA *LPEXTRACTICONA;
1311
1312 HRESULT GetIconLocation(
1313 [in] UINT uFlags,
1314 [out, size_is(cchMax)] LPSTR szIconFile,
1315 [in] UINT cchMax,
1316 [out] INT *piIndex,
1317 [out] UINT *pwFlags);
1318
1319 HRESULT Extract(
1320 [in] LPCSTR pszFile,
1321 [in] UINT nIconIndex,
1322 [out] HICON *phiconLarge,
1323 [out] HICON *phiconSmall,
1324 [in] UINT nIconSize );
1325 }
1326
1327
1328 /*****************************************************************************
1329 * IExtractIconW interface
1330 */
1331 [
1332 object,
1333 uuid(000214fa-0000-0000-c000-000000000046),
1334 pointer_default(unique),
1335 local
1336 ]
1337 interface IExtractIconW : IUnknown
1338 {
1339 typedef IExtractIconW *LPEXTRACTICONW;
1340
1341 HRESULT GetIconLocation(
1342 [in] UINT uFlags,
1343 [out, size_is(cchMax)] LPWSTR szIconFile,
1344 [in] UINT cchMax,
1345 [out] INT *piIndex,
1346 [out] UINT *pwFlags);
1347
1348 HRESULT Extract(
1349 [in] LPCWSTR pszFile,
1350 [in] UINT nIconIndex,
1351 [out] HICON *phiconLarge,
1352 [out] HICON *phiconSmall,
1353 [in] UINT nIconSize );
1354 }
1355
1356 cpp_quote("#define LPEXTRACTICON WINELIB_NAME_AW(LPEXTRACTICON)")
1357 cpp_quote("#define IExtractIcon WINELIB_NAME_AW(IExtractIcon)")
1358
1359
1360 /*****************************************************************************
1361 * ICommDlgBrowser interface
1362 */
1363 [
1364 object,
1365 uuid(000214f1-0000-0000-c000-000000000046),
1366 pointer_default(unique)
1367 ]
1368 interface ICommDlgBrowser : IUnknown
1369 {
1370 cpp_quote("#define CDBOSC_SETFOCUS 0x00000000")
1371 cpp_quote("#define CDBOSC_KILLFOCUS 0x00000001")
1372 cpp_quote("#define CDBOSC_SELCHANGE 0x00000002")
1373 cpp_quote("#define CDBOSC_RENAME 0x00000003")
1374 cpp_quote("#define CDBOSC_STATECHANGE 0x00000004")
1375
1376 typedef ICommDlgBrowser *LPCOMMDLGBROWSER;
1377
1378 HRESULT OnDefaultCommand( [in] IShellView *shv );
1379 HRESULT OnStateChange( [in] IShellView *shv, [in] ULONG uChange );
1380 HRESULT IncludeObject( [in] IShellView *shv, [in] LPCITEMIDLIST pidl );
1381 }
1382
1383
1384 /*****************************************************************************
1385 * ICommDlgBrowser2 interface
1386 */
1387 [
1388 object,
1389 uuid(10339516-2894-11D2-9039-00C04F8EEB3E),
1390 pointer_default(unique)
1391 ]
1392 interface ICommDlgBrowser2 : ICommDlgBrowser
1393 {
1394
1395 HRESULT Notify(
1396 [in] IShellView *ppshv,
1397 [in] DWORD dwNotifyType);
1398
1399 HRESULT GetDefaultMenuText(
1400 [in] IShellView *ppshv,
1401 [out, string, size_is(cchMax)] LPWSTR pszText,
1402 [in] int cchMax);
1403
1404 HRESULT GetViewFlags(
1405 [out] DWORD *pdwFlags);
1406 }
1407
1408
1409 /*****************************************************************************
1410 * ICommDlgBrowser3 interface
1411 */
1412 [
1413 object,
1414 uuid(C8AD25A1-3294-41EE-8165-71174BD01C57),
1415 pointer_default(unique)
1416 ]
1417 interface ICommDlgBrowser3 : ICommDlgBrowser2
1418 {
1419
1420 HRESULT OnColumnClicked(
1421 [in] IShellView *ppshv,
1422 [in] int iColumn);
1423
1424 HRESULT GetCurrentFilter(
1425 [out, string, size_is(cchFileSpec)] LPWSTR pszFileSpec,
1426 [in] int cchFileSpec);
1427
1428 HRESULT OnPreviewCreated(
1429 [in] IShellView *ppshv);
1430 }
1431
1432 /*****************************************************************************
1433 * IDockingWindow interface
1434 */
1435 [
1436 object,
1437 uuid(012dd920-7b26-11d0-8ca9-00a0c92dbfe8)
1438 ]
1439 interface IDockingWindow : IOleWindow
1440 {
1441 HRESULT ShowDW(
1442 [in] BOOL fShow);
1443
1444 HRESULT CloseDW(
1445 [in] DWORD dwReserved);
1446
1447 HRESULT ResizeBorderDW(
1448 [in] LPCRECT prcBorder,
1449 [in] IUnknown *punkToolbarSite,
1450 [in] BOOL fReserved);
1451 };
1452
1453
1454 /*****************************************************************************
1455 * IDockingWindowFrame interface
1456 */
1457 [
1458 object,
1459 uuid(47d2657a-7b27-11d0-8ca9-00a0c92dbfe8),
1460 pointer_default(unique),
1461 local
1462 ]
1463 interface IDockingWindowFrame : IOleWindow
1464 {
1465 cpp_quote("#define DWFRF_NORMAL 0x0000")
1466 cpp_quote("#define DWFRF_DELETECONFIGDATA 0x0001")
1467 cpp_quote("#define DWFAF_HIDDEN 0x0001")
1468
1469 HRESULT AddToolbar(
1470 [in] IUnknown *punkSrc,
1471 [in] LPCWSTR pwszItem,
1472 [in] DWORD dwAddFlags);
1473
1474 HRESULT RemoveToolbar(
1475 [in] IUnknown *punkSrc,
1476 [in] DWORD dwRemoveFlags);
1477
1478 HRESULT FindToolbar(
1479 [in] LPCWSTR pwszItem,
1480 [in] REFIID riid,
1481 [out] LPVOID *ppvObj);
1482 }
1483
1484
1485 /*****************************************************************************
1486 * IDragSourceHelper interface
1487 */
1488 [
1489 object,
1490 uuid(de5bf786-477a-11d2-839d-00c04fd918d0),
1491 pointer_default(unique),
1492 local
1493 ]
1494 interface IDragSourceHelper : IUnknown
1495 {
1496 typedef struct
1497 {
1498 SIZE sizeDragImage;
1499 POINT ptOffset;
1500 HBITMAP hbmpDragImage;
1501 COLORREF crColorKey;
1502 } SHDRAGIMAGE, *LPSHDRAGIMAGE;
1503
1504 HRESULT InitializeFromBitmap(
1505 [in] LPSHDRAGIMAGE pshdi,
1506 [in] IDataObject *pDataObject);
1507
1508 HRESULT InitializeFromWindow(
1509 [in] HWND hwnd,
1510 [in] POINT *ppt,
1511 [in] IDataObject *pDataObject);
1512 }
1513
1514
1515 /*****************************************************************************
1516 * IDropTargetHelper interface
1517 */
1518 [
1519 object,
1520 uuid(4657278b-411b-11d2-839a-00c04fd918d0),
1521 pointer_default(unique),
1522 local
1523 ]
1524 interface IDropTargetHelper : IUnknown
1525 {
1526 HRESULT DragEnter(
1527 [in] HWND hwndTarget,
1528 [in] IDataObject *pDataObject,
1529 [in] POINT *ppt,
1530 [in] DWORD dwEffect);
1531
1532 HRESULT DragLeave();
1533
1534 HRESULT DragOver(
1535 [in] POINT *ppt,
1536 [in] DWORD dwEffect);
1537
1538 HRESULT Drop(
1539 [in] IDataObject *pDataObject,
1540 [in] POINT *ppt,
1541 [in] DWORD dwEffect);
1542
1543 HRESULT Show( [in] BOOL fShow );
1544 }
1545
1546
1547 /*****************************************************************************
1548 * IContextMenu interface
1549 */
1550 [
1551 object,
1552 uuid(000214e4-0000-0000-c000-000000000046),
1553 pointer_default(unique),
1554 local
1555 ]
1556 interface IContextMenu : IUnknown
1557 {
1558 cpp_quote("#define CMF_NORMAL 0x00000000")
1559 cpp_quote("#define CMF_DEFAULTONLY 0x00000001")
1560 cpp_quote("#define CMF_VERBSONLY 0x00000002")
1561 cpp_quote("#define CMF_EXPLORE 0x00000004")
1562 cpp_quote("#define CMF_NOVERBS 0x00000008")
1563 cpp_quote("#define CMF_CANRENAME 0x00000010")
1564 cpp_quote("#define CMF_NODEFAULT 0x00000020")
1565 cpp_quote("#define CMF_INCLUDESTATIC 0x00000040")
1566 cpp_quote("#define CMF_EXTENDEDVERBS 0x00000100")
1567 cpp_quote("#define CMF_RESERVED 0xffff0000")
1568
1569 cpp_quote("#define GCS_VERBA 0x00000000")
1570 cpp_quote("#define GCS_HELPTEXTA 0x00000001")
1571 cpp_quote("#define GCS_VALIDATEA 0x00000002")
1572 cpp_quote("#define GCS_VERBW 0x00000004")
1573 cpp_quote("#define GCS_HELPTEXTW 0x00000005")
1574 cpp_quote("#define GCS_VALIDATEW 0x00000006")
1575 cpp_quote("#define GCS_UNICODE 0x00000004")
1576 cpp_quote("#define GCS_VERB WINELIB_NAME_AW(GCS_VERB)")
1577 cpp_quote("#define GCS_HELPTEXT WINELIB_NAME_AW(GCS_HELPTEXT)")
1578 cpp_quote("#define GCS_VALIDATE WINELIB_NAME_AW(GCS_VALIDATE)")
1579
1580 cpp_quote("#define CMDSTR_NEWFOLDERA \"NewFolder\"")
1581 cpp_quote("#define CMDSTR_VIEWLISTA \"ViewList\"")
1582 cpp_quote("#define CMDSTR_VIEWDETAILSA \"ViewDetails\"")
1583 cpp_quote("#if defined(__GNUC__)")
1584 cpp_quote("# define CMDSTR_NEWFOLDERW (const WCHAR []){ 'N','e','w','F','o','l','d','e','r',0 }")
1585 cpp_quote("# define CMDSTR_VIEWLISTW (const WCHAR []){ 'V','i','e','w','L','i','s','t',0 }")
1586 cpp_quote("# define CMDSTR_VIEWDETAILSW (const WCHAR []){ 'V','i','e','w','D','e','t','a','i','l','s',0 }")
1587 cpp_quote("#elif defined(_MSC_VER)")
1588 cpp_quote("# define CMDSTR_NEWFOLDERW L\"NewFolder\"")
1589 cpp_quote("# define CMDSTR_VIEWLISTW L\"ViewList\"")
1590 cpp_quote("# define CMDSTR_VIEWDETAILSW L\"ViewDetails\"")
1591 cpp_quote("#else")
1592 cpp_quote("static const WCHAR CMDSTR_NEWFOLDERW[] = {'N','e','w','F','o','l','d','e','r',0};")
1593 cpp_quote("static const WCHAR CMDSTR_VIEWLISTW [] = {'V','i','e','w','L','i','s','t',0};")
1594 cpp_quote("static const WCHAR CMDSTR_VIEWDETAILSW[] = {'V','i','e','w','D','e','t','a','i','l','s',0};")
1595 cpp_quote("#endif")
1596 cpp_quote("#define CMDSTR_NEWFOLDER WINELIB_NAME_AW(CMDSTR_NEWFOLDER)")
1597 cpp_quote("#define CMDSTR_VIEWLIST WINELIB_NAME_AW(CMDSTR_VIEWLIST)")
1598 cpp_quote("#define CMDSTR_VIEWDETAILS WINELIB_NAME_AW(CMDSTR_VIEWDETAILS)")
1599
1600 cpp_quote("#define CMIC_MASK_HOTKEY SEE_MASK_HOTKEY")
1601 cpp_quote("#define CMIC_MASK_ICON SEE_MASK_ICON")
1602 cpp_quote("#define CMIC_MASK_FLAG_NO_UI SEE_MASK_FLAG_NO_UI")
1603 cpp_quote("#define CMIC_MASK_UNICODE SEE_MASK_UNICODE")
1604 cpp_quote("#define CMIC_MASK_NO_CONSOLE SEE_MASK_NO_CONSOLE")
1605 cpp_quote("#define CMIC_MASK_HASLINKNAME SEE_MASK_HASLINKNAME")
1606 cpp_quote("#define CMIC_MASK_FLAG_SEP_VDM SEE_MASK_FLAG_SEPVDM")
1607 cpp_quote("#define CMIC_MASK_HASTITLE SEE_MASK_HASTITLE")
1608 cpp_quote("#define CMIC_MASK_ASYNCOK SEE_MASK_ASYNCOK")
1609 cpp_quote("#define CMIC_MASK_NOASYNC SEE_MASK_NOASYNC")
1610 cpp_quote("#define CMIC_MASK_SHIFT_DOWN 0x10000000")
1611 cpp_quote("#define CMIC_MASK_PTINVOKE 0x20000000")
1612 cpp_quote("#define CMIC_MASK_CONTROL_DOWN 0x40000000")
1613 cpp_quote("#define CMIC_MASK_FLAG_LOG_USAGE SEE_MASK_FLAG_LOG_USAGE")
1614 cpp_quote("#define CMIC_MASK_NOZONECHECKS SEE_MASK_NOZONECHECKS")
1615
1616 typedef IContextMenu *LPCONTEXTMENU;
1617
1618 typedef struct tagCMINVOKECOMMANDINFO
1619 {
1620 DWORD cbSize;
1621 DWORD fMask;
1622 HWND hwnd;
1623 LPCSTR lpVerb;
1624 LPCSTR lpParameters;
1625 LPCSTR lpDirectory;
1626 INT nShow;
1627 DWORD dwHotKey;
1628 HANDLE hIcon;
1629 } CMINVOKECOMMANDINFO, *LPCMINVOKECOMMANDINFO;
1630
1631 typedef struct tagCMInvokeCommandInfoEx
1632 {
1633 DWORD cbSize;
1634 DWORD fMask;
1635 HWND hwnd;
1636 LPCSTR lpVerb;
1637 LPCSTR lpParameters;
1638 LPCSTR lpDirectory;
1639 INT nShow;
1640 DWORD dwHotKey;
1641 HANDLE hIcon;
1642 LPCSTR lpTitle;
1643 LPCWSTR lpVerbW;
1644 LPCWSTR lpParametersW;
1645 LPCWSTR lpDirectoryW;
1646 LPCWSTR lpTitleW;
1647 POINT ptInvoke;
1648 } CMINVOKECOMMANDINFOEX, *LPCMINVOKECOMMANDINFOEX;
1649
1650 HRESULT QueryContextMenu(
1651 [in] HMENU hmenu,
1652 [in] UINT indexMenu,
1653 [in] UINT idCmdFirst,
1654 [in] UINT idCmdLast,
1655 [in] UINT uFlags);
1656
1657 HRESULT InvokeCommand( [in] LPCMINVOKECOMMANDINFO lpici );
1658
1659 HRESULT GetCommandString(
1660 [in] UINT_PTR idCmd,
1661 [in] UINT uType,
1662 [out] UINT *pwReserved,
1663 [out, size_is(cchMax)] LPSTR pszName,
1664 [in] UINT cchMax);
1665 }
1666
1667
1668 /*****************************************************************************
1669 * IContextMenu2 interface
1670 */
1671 [
1672 object,
1673 uuid(000214f4-0000-0000-c000-000000000046),
1674 pointer_default(unique),
1675 local
1676 ]
1677 interface IContextMenu2 : IContextMenu
1678 {
1679 typedef IContextMenu2 *LPCONTEXTMENU2;
1680
1681 HRESULT HandleMenuMsg(
1682 [in] UINT uMsg,
1683 [in] WPARAM wParam,
1684 [in] LPARAM lParam);
1685 }
1686
1687
1688 /*****************************************************************************
1689 * IContextMenu3 interface
1690 */
1691 [
1692 object,
1693 uuid(bcfce0a0-ec17-11d0-8d10-00a0c90f2719),
1694 pointer_default(unique),
1695 local
1696 ]
1697 interface IContextMenu3 : IContextMenu2
1698 {
1699 typedef IContextMenu3 *LPCONTEXTMENU3;
1700
1701 HRESULT HandleMenuMsg2(
1702 [in] UINT uMsg,
1703 [in] WPARAM wParam,
1704 [in] LPARAM lParam,
1705 [out] LRESULT *plResult);
1706 }
1707
1708 /*****************************************************************************
1709 * IContextMenuCB interface
1710 */
1711
1712 [
1713 object,
1714 uuid(3409e930-5a39-11d1-83fa-00a0c90dc849),
1715 pointer_default(unique),
1716 local
1717 ]
1718 interface IContextMenuCB : IUnknown
1719 {
1720 HRESULT CallBack(
1721 [in] IShellFolder *psf,
1722 [in] HWND hwndOwner,
1723 [in] IDataObject *pdtobj,
1724 [in] UINT uMsg,
1725 [in] WPARAM wParam,
1726 [in] LPARAM lParam);
1727 }
1728
1729 /*****************************************************************************
1730 * IShellExecuteHookA interface
1731 */
1732 [
1733 object,
1734 uuid(000214f5-0000-0000-c000-000000000046),
1735 pointer_default(unique),
1736 local
1737 ]
1738 interface IShellExecuteHookA : IUnknown
1739 {
1740 cpp_quote("struct _SHELLEXECUTEINFOA;")
1741 HRESULT Execute(
1742 [in, out] struct _SHELLEXECUTEINFOA* pei);
1743 }
1744
1745
1746 /*****************************************************************************
1747 * IShellExecuteHookW interface
1748 */
1749 [
1750 object,
1751 uuid(000214fb-0000-0000-c000-000000000046),
1752 pointer_default(unique),
1753 local
1754 ]
1755 interface IShellExecuteHookW : IUnknown
1756 {
1757 cpp_quote("struct _SHELLEXECUTEINFOW;")
1758 HRESULT Execute(
1759 [in, out] struct _SHELLEXECUTEINFOW* pei);
1760 }
1761
1762 /*****************************************************************************
1763 * IShellLinkDataList interface
1764 */
1765 [
1766 object,
1767 uuid(45e2b4ae-b1c3-11d0-b92f-00a0c90312e1),
1768 pointer_default(unique)
1769 ]
1770 interface IShellLinkDataList : IUnknown
1771 {
1772 [local] HRESULT AddDataBlock(
1773 [in] void *pDataBlock);
1774 [local] HRESULT CopyDataBlock(
1775 [in] DWORD dwSig,
1776 [out] void **ppDataBlock);
1777 HRESULT RemoveDataBlock(
1778 [in] DWORD dwSig);
1779 HRESULT GetFlags(
1780 [out] DWORD *pdwFlags);
1781 HRESULT SetFlags(
1782 [in] DWORD dwFlags);
1783 }
1784
1785
1786 /*****************************************************************************
1787 * IResolveShellLink interface
1788 */
1789 [
1790 object,
1791 uuid(5cd52983-9449-11d2-963a-00c04f79adf0),
1792 pointer_default(unique)
1793 ]
1794 interface IResolveShellLink : IUnknown
1795 {
1796 HRESULT ResolveShellLink(
1797 [in] IUnknown *punk,
1798 [in] HWND hwnd,
1799 [in] DWORD fFlags);
1800 }
1801
1802
1803 /*****************************************************************************
1804 * IURLSearchHook interface
1805 */
1806 [
1807 object,
1808 uuid(ac60f6a0-0fd9-11d0-99cb-00c04fd64497),
1809 pointer_default(unique),
1810 local
1811 ]
1812 interface IURLSearchHook : IUnknown
1813 {
1814 HRESULT Translate(
1815 [in, out] LPWSTR lpwszSearchURL,
1816 [in] DWORD cchBufferSize);
1817 }
1818
1819
1820 /*****************************************************************************
1821 * ISearchContext interface
1822 */
1823 [
1824 object,
1825 uuid(09f656a2-41af-480c-88f7-16cc0d164615),
1826 pointer_default(unique),
1827 local
1828 ]
1829 interface ISearchContext : IUnknown
1830 {
1831 HRESULT GetSearchUrl(
1832 [in] BSTR *pbstrSearchUrl);
1833 HRESULT GetSearchText(
1834 [in] BSTR *pbstrSearchText);
1835 HRESULT GetSearchStyle(
1836 [in] BSTR *pdwSearchStyle);
1837 }
1838
1839
1840 /*****************************************************************************
1841 * IURLSearchHook2 interface
1842 */
1843 [
1844 object,
1845 uuid(5ee44da4-6d32-46e3-86bc-07540dedd0e0),
1846 pointer_default(unique),
1847 local
1848 ]
1849 interface IURLSearchHook2 : IURLSearchHook
1850 {
1851 HRESULT TranslateWithSearchContext(
1852 [in, out] LPWSTR lpwszSearchURL,
1853 [in] DWORD cchBufferSize,
1854 [in] ISearchContext *pSearchContext);
1855 }
1856
1857
1858 cpp_quote("#define INewShortcutHook WINELIB_NAME_AW(INewShortcutHook)")
1859
1860 /*****************************************************************************
1861 * INewShortcutHookA interface
1862 */
1863 [
1864 object,
1865 uuid(000214e1-0000-0000-c000-000000000046),
1866 pointer_default(unique),
1867 local
1868 ]
1869 interface INewShortcutHookA : IUnknown
1870 {
1871 HRESULT SetReferent(
1872 [in] LPCSTR pcszReferent,
1873 [in] HWND hwnd);
1874 HRESULT GetReferent(
1875 [out] LPSTR pcszReferent,
1876 [in] int cchReferent);
1877 HRESULT SetFolder(
1878 [in] LPCSTR pcszReferent);
1879 HRESULT GetFolder(
1880 [out] LPSTR pcszReferent,
1881 [in] int cchFolder);
1882 HRESULT GetName(
1883 [out] LPSTR pszName,
1884 [in] int cchName);
1885 HRESULT GetExtension(
1886 [out] LPSTR pszExtension,
1887 [in] int cchExtension);
1888 }
1889
1890
1891 /*****************************************************************************
1892 * INewShortcutHookW interface
1893 */
1894 [
1895 object,
1896 uuid(000214f7-0000-0000-c000-000000000046),
1897 pointer_default(unique),
1898 local
1899 ]
1900 interface INewShortcutHookW : IUnknown
1901 {
1902 HRESULT SetReferent(
1903 [in] LPCWSTR pcszReferent,
1904 [in] HWND hwnd);
1905 HRESULT GetReferent(
1906 [out] LPWSTR pcszReferent,
1907 [in] int cchReferent);
1908 HRESULT SetFolder(
1909 [in] LPCWSTR pcszReferent);
1910 HRESULT GetFolder(
1911 [out] LPWSTR pcszReferent,
1912 [in] int cchFolder);
1913 HRESULT GetName(
1914 [out] LPWSTR pszName,
1915 [in] int cchName);
1916 HRESULT GetExtension(
1917 [out] LPWSTR pszExtension,
1918 [in] int cchExtension);
1919 }
1920
1921 /*****************************************************************************
1922 * IRunnableTask interface
1923 */
1924 [
1925 object,
1926 uuid(85788d00-6807-11d0-b810-00c04fd706ec),
1927 pointer_default(unique),
1928 local
1929 ]
1930 interface IRunnableTask : IUnknown
1931 {
1932 HRESULT Run();
1933 HRESULT Kill([in] BOOL fWait);
1934 HRESULT Suspend();
1935 HRESULT Resume();
1936 ULONG IsRunning();
1937 }
1938
1939 /*****************************************************************************
1940 * IShellChangeNotify interface
1941 */
1942 [
1943 object,
1944 uuid(d82be2b1-5764-11d0-a96e-00c04fd705a2),
1945 pointer_default(unique),
1946 local
1947 ]
1948 interface IShellChangeNotify : IUnknown
1949 {
1950 HRESULT OnChange(
1951 [in] LONG lEvent,
1952 [in] LPCITEMIDLIST pidl1,
1953 [in] LPCITEMIDLIST pidl2);
1954 }
1955
1956 cpp_quote("#define STR_FILE_SYS_BIND_DATA L\"File System Bind Data\"")
1957
1958 /*****************************************************************************
1959 * IFileSystemBindData interface
1960 */
1961 [
1962 object,
1963 uuid(01e18d10-4d8b-11d2-855d-006008059367),
1964 pointer_default(unique),
1965 local
1966 ]
1967 interface IFileSystemBindData : IUnknown
1968 {
1969 HRESULT SetFindData(
1970 [in] const WIN32_FIND_DATAW *pfd);
1971 HRESULT GetFindData(
1972 [out] WIN32_FIND_DATAW *pfd);
1973 }
1974
1975 /*****************************************************************************
1976 * ITaskbarList interface
1977 */
1978 [
1979 object,
1980 uuid(56FDF342-FD6D-11d0-958A-006097C9A090),
1981 pointer_default(unique)
1982 ]
1983 interface ITaskbarList : IUnknown
1984 {
1985 HRESULT HrInit();
1986
1987 HRESULT AddTab(
1988 [in] HWND hwnd);
1989
1990 HRESULT DeleteTab(
1991 [in] HWND hwnd);
1992
1993 HRESULT ActivateTab(
1994 [in] HWND hwnd);
1995
1996 HRESULT SetActiveAlt(
1997 [in] HWND hwnd);
1998 }
1999
2000 /*****************************************************************************
2001 * IDefaultExtractIconInit interface
2002 */
2003
2004 [
2005 object,
2006 uuid(800AB0B8-F5FA-4e72-8FF3-B1A243B87BD9), /* FIXME: wrong value! */
2007 pointer_default(unique),
2008 local
2009 ]
2010 interface IDefaultExtractIconInit : IUnknown
2011 {
2012 HRESULT SetDefaultIcon(
2013 [in] LPCWSTR pszFile,
2014 [in] int iIcon);
2015 HRESULT SetFlags(
2016 [in] UINT uFlags);
2017 HRESULT SetKey(
2018 [in] HKEY hkey);
2019 HRESULT SetNormalIcon(
2020 [in] LPCWSTR pszFile,
2021 [in] int iIcon);
2022 HRESULT SetOpenIcon(
2023 [in] LPCWSTR pszFile,
2024 [in] int iIcon);
2025 HRESULT SetShortcutIcon(
2026 [in] LPCWSTR pszFile,
2027 [in] int iIcon);
2028 }
2029
2030 /*****************************************************************************
2031 * IDeskBand interface
2032 */
2033 cpp_quote("#define DBIM_MINSIZE 0x0001")
2034 cpp_quote("#define DBIM_MAXSIZE 0x0002")
2035 cpp_quote("#define DBIM_INTEGRAL 0x0004")
2036 cpp_quote("#define DBIM_ACTUAL 0x0008")
2037 cpp_quote("#define DBIM_TITLE 0x0010")
2038 cpp_quote("#define DBIM_MODEFLAGS 0x0020")
2039 cpp_quote("#define DBIM_BKCOLOR 0x0040")
2040
2041 cpp_quote("#include <pshpack8.h>")
2042
2043 typedef struct tagDESKBANDINFO
2044 {
2045 DWORD dwMask;
2046 POINTL ptMinSize;
2047 POINTL ptMaxSize;
2048 POINTL ptIntegral;
2049 POINTL ptActual;
2050 WCHAR wszTitle[256];
2051 DWORD dwModeFlags;
2052 COLORREF crBkgnd;
2053 } DESKBANDINFO;
2054
2055 cpp_quote("#include <poppack.h>")
2056
2057 cpp_quote("#define DBIMF_NORMAL 0x0000")
2058 cpp_quote("#define DBIMF_FIXED 0x0001")
2059 cpp_quote("#define DBIMF_FIXEDBMP 0x0004 // a fixed background bitmap (if supported)")
2060 cpp_quote("#define DBIMF_VARIABLEHEIGHT 0x0008")
2061 cpp_quote("#define DBIMF_UNDELETEABLE 0x0010")
2062 cpp_quote("#define DBIMF_DEBOSSED 0x0020")
2063 cpp_quote("#define DBIMF_BKCOLOR 0x0040")
2064 cpp_quote("#define DBIMF_USECHEVRON 0x0080")
2065 cpp_quote("#define DBIMF_BREAK 0x0100")
2066 cpp_quote("#define DBIMF_ADDTOFRONT 0x0200")
2067 cpp_quote("#define DBIMF_TOPALIGN 0x0400")
2068 cpp_quote("#if (NTDDI_VERSION >= NTDDI_LONGHORN)")
2069 cpp_quote("#define DBIMF_NOGRIPPER 0x0800")
2070 cpp_quote("#define DBIMF_ALWAYSGRIPPER 0x1000")
2071 cpp_quote("#define DBIMF_NOMARGINS 0x2000")
2072 cpp_quote("#endif // NTDDI_LONGHORN")
2073
2074 cpp_quote("#define DBIF_VIEWMODE_NORMAL 0x0000")
2075 cpp_quote("#define DBIF_VIEWMODE_VERTICAL 0x0001")
2076 cpp_quote("#define DBIF_VIEWMODE_FLOATING 0x0002")
2077 cpp_quote("#define DBIF_VIEWMODE_TRANSPARENT 0x0004")
2078
2079 enum tagDESKBANDCID {
2080 DBID_BANDINFOCHANGED = 0,
2081 DBID_SHOWONLY = 1,
2082 DBID_MAXIMIZEBAND = 2,
2083 DBID_PUSHCHEVRON = 3,
2084 DBID_DELAYINIT = 4,
2085 DBID_FINISHINIT = 5,
2086 DBID_SETWINDOWTHEME = 6,
2087 DBID_PERMITAUTOHIDE = 7,
2088 };
2089
2090 cpp_quote("#define DBPC_SELECTFIRST (DWORD)-1")
2091 cpp_quote("#define DBPC_SELECTLAST (DWORD)-2")
2092
2093 cpp_quote("#define CGID_DeskBand IID_IDeskBand")
2094
2095 [
2096 uuid(EB0FE172-1A3A-11D0-89B3-00A0C90A90AC),
2097 object,
2098 ]
2099 interface IDeskBand : IDockingWindow
2100 {
2101 HRESULT GetBandInfo(
2102 [in] DWORD dwBandID,
2103 [in] DWORD dwViewMode,
2104 [in, out] DESKBANDINFO* pdbi);
2105 }
2106
2107 cpp_quote("#if (_WIN32_IE >= _WIN32_IE_IE60)")
2108
2109 [
2110 uuid(EB0FE173-1A3A-11D0-89B3-00A0C90A90AC),
2111 object,
2112 pointer_default(unique),
2113 local
2114 ]
2115 interface IDeskBar : IOleWindow
2116 {
2117 HRESULT SetClient([in] IUnknown* punkClient);
2118
2119 HRESULT GetClient([out] IUnknown** ppunkClient);
2120
2121 HRESULT OnPosRectChangeDB([in] RECT *prc);
2122 }
2123
2124
2125 /*****************************************************************************
2126 * IMenuPopup interface
2127 */
2128 [
2129 uuid(D1E7AFEB-6A2E-11d0-8C78-00C04FD918B4),
2130 object,
2131 pointer_default(unique),
2132 local
2133 ]
2134 interface IMenuPopup : IDeskBar
2135 {
2136 enum tagMENUPOPUPSELECT
2137 {
2138 MPOS_EXECUTE = 0,
2139 MPOS_FULLCANCEL,
2140 MPOS_CANCELLEVEL,
2141 MPOS_SELECTLEFT,
2142 MPOS_SELECTRIGHT,
2143 MPOS_CHILDTRACKING
2144 };
2145
2146 enum tagMENUPOPUPPOPUPFLAGS
2147 {
2148 MPPF_SETFOCUS = 0x00000001,
2149 MPPF_INITIALSELECT = 0x00000002,
2150 MPPF_NOANIMATE = 0x00000004,
2151 MPPF_KEYBOARD = 0x00000010,
2152 MPPF_REPOSITION = 0x00000020,
2153 MPPF_FORCEZORDER = 0x00000040,
2154 MPPF_FINALSELECT = 0x00000080,
2155 MPPF_TOP = 0x20000000,
2156 MPPF_LEFT = 0x40000000,
2157 MPPF_RIGHT = 0x60000000,
2158 MPPF_BOTTOM = 0x80000000,
2159 MPPF_POS_MASK = 0xE0000000,
2160 MPPF_ALIGN_LEFT = 0x02000000,
2161 MPPF_ALIGN_RIGHT = 0x04000000
2162 };
2163 typedef int MP_POPUPFLAGS;
2164
2165 HRESULT Popup(
2166 [in] POINTL *ppt,
2167 [in] RECTL *prcExclude,
2168 [in] MP_POPUPFLAGS dwFlags);
2169
2170 HRESULT OnSelect([in] DWORD dwSelectType);
2171
2172 HRESULT SetSubMenu(
2173 [in] IMenuPopup* pmp,
2174 [in] BOOL fSet);
2175 }
2176
2177 cpp_quote("#endif /* _WIN32_IE_IE60 */")
2178
2179 cpp_quote("#if (_WIN32_IE >= _WIN32_IE_IE40)")
2180
2181 /*****************************************************************************
2182 * IBandSite interface
2183 */
2184 cpp_quote("#include <pshpack8.h>")
2185
2186 typedef struct tagBANDSITEINFO
2187 {
2188 DWORD dwMask;
2189 DWORD dwState;
2190 DWORD dwStyle;
2191 } BANDSITEINFO;
2192
2193 cpp_quote("#include <poppack.h>")
2194
2195
2196 enum tagBANDSITECID {
2197 BSID_BANDADDED,
2198 BSID_BANDREMOVED,
2199 };
2200
2201 cpp_quote("#define BSIM_STATE 0x00000001")
2202 cpp_quote("#define BSIM_STYLE 0x00000002")
2203
2204 cpp_quote("#define BSSF_VISIBLE 0x00000001")
2205 cpp_quote("#define BSSF_NOTITLE 0x00000002")
2206 cpp_quote("#define BSSF_UNDELETEABLE 0x00001000")
2207
2208 cpp_quote("#define BSIS_AUTOGRIPPER 0x00000000")
2209 cpp_quote("#define BSIS_NOGRIPPER 0x00000001")
2210 cpp_quote("#define BSIS_ALWAYSGRIPPER 0x00000002")
2211 cpp_quote("#define BSIS_LEFTALIGN 0x00000004")
2212 cpp_quote("#define BSIS_SINGLECLICK 0x00000008")
2213 cpp_quote("#define BSIS_NOCONTEXTMENU 0x00000010")
2214 cpp_quote("#define BSIS_NODROPTARGET 0x00000020")
2215 cpp_quote("#define BSIS_NOCAPTION 0x00000040")
2216 cpp_quote("#define BSIS_PREFERNOLINEBREAK 0x00000080")
2217 cpp_quote("#define BSIS_LOCKED 0x00000100")
2218 cpp_quote("#if (_WIN32_IE >= _WIN32_IE_IE70)")
2219 cpp_quote("#define BSIS_PRESERVEORDERDURINGLAYOUT 0x00000200")
2220 cpp_quote("#endif /* _WIN32_IE_IE70 */")
2221
2222 cpp_quote("#define SID_SBandSite IID_IBandSite")
2223 cpp_quote("#define CGID_BandSite IID_IBandSite")
2224
2225 [
2226 object,
2227 uuid(4CF504B0-DE96-11D0-8B3F-00A0C911E8E5)
2228 ]
2229 interface IBandSite : IUnknown
2230 {
2231 HRESULT AddBand([in] IUnknown* punk);
2232
2233 HRESULT EnumBands(
2234 [in] UINT uBand,
2235 [out] DWORD* pdwBandID);
2236
2237 HRESULT QueryBand(
2238 [in] DWORD dwBandID,
2239 [out] IDeskBand** ppstb,
2240 [out] DWORD* pdwState,
2241 [out, string, size_is(cchName)] LPWSTR pszName,
2242 [in] int cchName);
2243
2244 HRESULT SetBandState(
2245 [in] DWORD dwBandID,
2246 [in] DWORD dwMask,
2247 [in] DWORD dwState);
2248
2249 HRESULT RemoveBand([in] DWORD dwBandID);
2250
2251 HRESULT GetBandObject(
2252 [in] DWORD dwBandID,
2253 [in] REFIID riid,
2254 [out, iid_is(riid)] void **ppv);
2255
2256 HRESULT SetBandSiteInfo([in] const BANDSITEINFO *pbsinfo);
2257
2258 HRESULT GetBandSiteInfo([in, out] BANDSITEINFO *pbsinfo);
2259 }
2260
2261 cpp_quote("#endif /* _WIN32_IE_IE40 */")
2262
2263 /*****************************************************************************
2264 * IMenuBand interface
2265 */
2266 [
2267 uuid(568804CD-CBD7-11d0-9816-00C04FD91972),
2268 object,
2269 pointer_default(unique),
2270 local
2271 ]
2272 interface IMenuBand : IUnknown
2273 {
2274 enum tagMENUBANDHANDLERCID {
2275 MBHANDCID_PIDLSELECT = 0,
2276 };
2277
2278 HRESULT IsMenuMessage([in] MSG* pmsg);
2279
2280 HRESULT TranslateMenuMessage(
2281 [in, out] MSG* pmsg,
2282 [out] LRESULT* plRet);
2283 }
2284
2285 /*****************************************************************************
2286 * IProfferService interface
2287 */
2288 [
2289 uuid(cb728b20-f786-11ce-92ad-00aa00a74cd0),
2290 object,
2291 pointer_default(unique),
2292 local
2293 ]
2294 interface IProfferService : IUnknown
2295 {
2296 HRESULT ProfferService(
2297 [in] REFGUID service,
2298 [in] IServiceProvider *pService,
2299 [out] DWORD *pCookie);
2300
2301 HRESULT RevokeService([in] DWORD cookie);
2302 }
2303
2304 /*****************************************************************************
2305 * IShellMenuCallback interface
2306 */
2307 cpp_quote("#include <pshpack8.h>")
2308
2309 typedef struct tagSMDATA
2310 {
2311 DWORD dwMask;
2312 DWORD dwFlags;
2313 HMENU hmenu;
2314 HWND hwnd;
2315 UINT uId;
2316 UINT uIdParent;
2317 UINT uIdAncestor;
2318 IUnknown *punk;
2319 LPITEMIDLIST pidlFolder;
2320 LPITEMIDLIST pidlItem;
2321 IShellFolder *psf;
2322 void *pvUserData;
2323 } SMDATA, *LPSMDATA;
2324
2325 cpp_quote("#define SMDM_SHELLFOLDER 0x00000001")
2326 cpp_quote("#define SMDM_HMENU 0x00000002")
2327 cpp_quote("#define SMDM_TOOLBAR 0x00000004")
2328
2329 typedef struct tagSMINFO
2330 {
2331 DWORD dwMask;
2332 DWORD dwType;
2333 DWORD dwFlags;
2334 int iIcon;
2335 } SMINFO, *PSMINFO;
2336
2337 typedef struct tagSHCSCHANGENOTIFYSTRUCT
2338 {
2339 LONG lEvent;
2340 LPCITEMIDLIST pidl1;
2341 LPCITEMIDLIST pidl2;
2342 } SMCSHCHANGENOTIFYSTRUCT, *PSMCSHCHANGENOTIFYSTRUCT;
2343
2344 cpp_quote("#include <poppack.h>")
2345
2346 enum
2347 {
2348 SMIM_TYPE = 0x00000001,
2349 SMIM_FLAGS = 0x00000002,
2350 SMIM_ICON = 0x00000004
2351 };
2352
2353 enum
2354 {
2355 SMIT_SEPARATOR = 0x00000001,
2356 SMIT_STRING = 0x00000002
2357 };
2358
2359 enum
2360 {
2361 SMIF_ICON = 0x00000001,
2362 SMIF_ACCELERATOR = 0x00000002,
2363 SMIF_DROPTARGET = 0x00000004,
2364 SMIF_SUBMENU = 0x00000008,
2365 SMIF_CHECKED = 0x00000020,
2366 SMIF_DROPCASCADE = 0x00000040,
2367 SMIF_HIDDEN = 0x00000080,
2368 SMIF_DISABLED = 0x00000100,
2369 SMIF_TRACKPOPUP = 0x00000200,
2370 SMIF_DEMOTED = 0x00000400,
2371 SMIF_ALTSTATE = 0x00000800,
2372 SMIF_DRAGNDROP = 0x00001000,
2373 SMIF_NEW = 0x00002000,
2374 };
2375
2376
2377 cpp_quote("#define SMC_INITMENU 0x00000001")
2378 cpp_quote("#define SMC_CREATE 0x00000002")
2379 cpp_quote("#define SMC_EXITMENU 0x00000003")
2380 cpp_quote("#define SMC_GETINFO 0x00000005")
2381 cpp_quote("#define SMC_GETSFINFO 0x00000006")
2382 cpp_quote("#define SMC_GETOBJECT 0x00000007")
2383 cpp_quote("#define SMC_GETSFOBJECT 0x00000008")
2384 cpp_quote("#define SMC_SFEXEC 0x00000009")
2385 cpp_quote("#define SMC_SFSELECTITEM 0x0000000A")
2386 cpp_quote("#define SMC_REFRESH 0x00000010")
2387 cpp_quote("#define SMC_DEMOTE 0x00000011")
2388 cpp_quote("#define SMC_PROMOTE 0x00000012")
2389 cpp_quote("#define SMC_DEFAULTICON 0x00000016")
2390 cpp_quote("#define SMC_NEWITEM 0x00000017")
2391 cpp_quote("#define SMC_CHEVRONEXPAND 0x00000019")
2392 cpp_quote("#define SMC_DISPLAYCHEVRONTIP 0x0000002A")
2393 cpp_quote("#define SMC_SETSFOBJECT 0x0000002D")
2394 cpp_quote("#define SMC_SHCHANGENOTIFY 0x0000002E")
2395 cpp_quote("#define SMC_CHEVRONGETTIP 0x0000002F")
2396 cpp_quote("#define SMC_SFDDRESTRICTED 0x00000030")
2397
2398 [
2399 uuid(4CA300A1-9B8D-11d1-8B22-00C04FD918D0),
2400 object,
2401 pointer_default(unique),
2402 local
2403 ]
2404 interface IShellMenuCallback : IUnknown
2405 {
2406 HRESULT CallbackSM(
2407 [in, out] LPSMDATA psmd,
2408 [in] UINT uMsg,
2409 [in] WPARAM wParam,
2410 [in] LPARAM lParam);
2411 }
2412
2413
2414 /*****************************************************************************
2415 * IShellMenu interface
2416 */
2417
2418 cpp_quote("#define SMINIT_DEFAULT 0x00000000")
2419 cpp_quote("#define SMINIT_RESTRICT_DRAGDROP 0x00000002")
2420 cpp_quote("#define SMINIT_TOPLEVEL 0x00000004")
2421 cpp_quote("#define SMINIT_CACHED 0x00000010")
2422 cpp_quote("#define SMINIT_VERTICAL 0x10000000")
2423 cpp_quote("#define SMINIT_HORIZONTAL 0x20000000")
2424 cpp_quote("")
2425 cpp_quote("#define ANCESTORDEFAULT (UINT)-1")
2426 cpp_quote("")
2427 cpp_quote("#define SMSET_TOP 0x10000000")
2428 cpp_quote("#define SMSET_BOTTOM 0x20000000")
2429 cpp_quote("#define SMSET_DONTOWN 0x00000001")
2430 cpp_quote("")
2431 cpp_quote("#define SMINV_REFRESH 0x00000001")
2432 cpp_quote("#define SMINV_ID 0x00000008")
2433
2434 [
2435 uuid(EE1F7637-E138-11d1-8379-00C04FD918D0),
2436 object,
2437 pointer_default(unique),
2438 local
2439 ]
2440 interface IShellMenu : IUnknown
2441 {
2442 HRESULT Initialize(
2443 [in] IShellMenuCallback *psmc,
2444 [in] UINT uId,
2445 [in] UINT uIdAncestor,
2446 [in] DWORD dwFlags);
2447
2448 HRESULT GetMenuInfo(
2449 [out] IShellMenuCallback **ppsmc,
2450 [out] UINT *puId,
2451 [out] UINT *puIdAncestor,
2452 [out] DWORD *pdwFlags);
2453
2454 HRESULT SetShellFolder(
2455 [in] IShellFolder *psf,
2456 [in] LPCITEMIDLIST pidlFolder,
2457 [in] HKEY hKey,
2458 [in] DWORD dwFlags);
2459
2460 HRESULT GetShellFolder(
2461 [out] DWORD *pdwFlags,
2462 [out] LPITEMIDLIST *ppidl,
2463 [in] REFIID riid,
2464 [out] void **ppv);
2465
2466 HRESULT SetMenu(
2467 [in] HMENU hmenu,
2468 [in] HWND hwnd,
2469 [in] DWORD dwFlags);
2470
2471 HRESULT GetMenu(
2472 [out] HMENU *phmenu,
2473 [out] HWND *phwnd,
2474 [out] DWORD *pdwFlags);
2475
2476 HRESULT InvalidateItem(
2477 [in] LPSMDATA psmd,
2478 [in] DWORD dwFlags);
2479
2480 HRESULT GetState(
2481 [out] LPSMDATA psmd);
2482
2483 HRESULT SetMenuToolbar(
2484 [in] IUnknown *punk,
2485 [in] DWORD dwFlags);
2486 }
2487
2488 cpp_quote("#if (_WIN32_IE >= _WIN32_IE_IE60)")
2489
2490 /*****************************************************************************
2491 * ITrackShellMenu interface
2492 */
2493 [
2494 uuid(8278F932-2A3E-11d2-838F-00C04FD918D0),
2495 object,
2496 pointer_default(unique),
2497 local
2498 ]
2499 interface ITrackShellMenu : IShellMenu
2500 {
2501 HRESULT SetObscured(
2502 [in] HWND hwndTB,
2503 [in] IUnknown *punkBand,
2504 DWORD dwSMSetFlags);
2505
2506 HRESULT Popup(
2507 [in] HWND hwnd,
2508 [in] POINTL *ppt,
2509 [in] RECTL *prcExclude,
2510 MP_POPUPFLAGS dwFlags);
2511 };
2512
2513 cpp_quote("#endif /* _WIN32_IE_IE60 */")
2514
2515 cpp_quote("#ifdef MIDL_PASS")
2516 typedef IUnknown* HIMAGELIST;
2517 cpp_quote("#endif")
2518
2519 typedef [v1_enum] enum THUMBBUTTONFLAGS {
2520 THBF_ENABLED = 0x0000,
2521 THBF_DISABLED = 0x0001,
2522 THBF_DISMISSONCLICK = 0x0002,
2523 THBF_NOBACKGROUND = 0x0004,
2524 THBF_HIDDEN = 0x0008,
2525 THBF_NONINTERACTIVE = 0x0010
2526 } THUMBBUTTONFLAGS;
2527
2528 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(THUMBBUTTONFLAGS)")
2529
2530 typedef [v1_enum] enum THUMBBUTTONMASK {
2531 THB_BITMAP = 0x0001,
2532 THB_ICON = 0x0002,
2533 THB_TOOLTIP = 0x0004,
2534 THB_FLAGS = 0x0008
2535 } THUMBBUTTONMASK;
2536
2537 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(THUMBBUTTONMASK)")
2538
2539 cpp_quote("#include <pshpack8.h>")
2540 typedef struct THUMBBUTTON {
2541 THUMBBUTTONMASK dwMask;
2542 UINT iId;
2543 UINT iBitmap;
2544 HICON hIcon;
2545 WCHAR szTip[260];
2546 THUMBBUTTONFLAGS dwFlags;
2547 } THUMBBUTTON, *LPTHUMBBUTTON;
2548 cpp_quote("#include <poppack.h>")
2549
2550 /*****************************************************************************
2551 * ITaskbarList2 interface
2552 */
2553 [
2554 object,
2555 uuid(602D4995-B13A-429B-A66E-1935E44F4317),
2556 pointer_default(unique)
2557 ]
2558 interface ITaskbarList2 : ITaskbarList
2559 {
2560 HRESULT MarkFullscreenWindow(
2561 [in] HWND hwnd,
2562 [in] BOOL fullscreen);
2563 }
2564
2565 [
2566 uuid(ea1afb91-9e28-4b86-90e9-9e9f8a5eefaf),
2567 object
2568 ]
2569 interface ITaskbarList3 : ITaskbarList2
2570 {
2571 typedef [v1_enum] enum TBPFLAG {
2572 TBPF_NOPROGRESS = 0x0000,
2573 TBPF_INDETERMINATE = 0x0001,
2574 TBPF_NORMAL = 0x0002,
2575 TBPF_ERROR = 0x0004,
2576 TBPF_PAUSED = 0x0008
2577 } TBPFLAG;
2578
2579 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(TBPFLAG)")
2580
2581 HRESULT SetProgressValue(
2582 [in] HWND hwnd,
2583 [in] ULONGLONG ullCompleted,
2584 [in] ULONGLONG ullTotal);
2585
2586 HRESULT SetProgressState(
2587 [in] HWND hwnd,
2588 [in] TBPFLAG tbpFlags);
2589
2590 HRESULT RegisterTab(
2591 [in] HWND hwndTab,
2592 [in] HWND hwndMDI);
2593
2594 HRESULT UnregisterTab([in] HWND hwndTab);
2595
2596 HRESULT SetTabOrder(
2597 [in] HWND hwndTab,
2598 [in] HWND hwndInsertBefore);
2599
2600 HRESULT SetTabActive(
2601 [in] HWND hwndTab,
2602 [in] HWND hwndMDI,
2603 [in] DWORD dwReserved);
2604
2605 HRESULT ThumbBarAddButtons(
2606 [in] HWND hwnd,
2607 [in] UINT cButtons,
2608 [in, size_is(cButtons)] LPTHUMBBUTTON pButton);
2609
2610 HRESULT ThumbBarUpdateButtons(
2611 [in] HWND hwnd,
2612 [in] UINT cButtons,
2613 [in, size_is(cButtons)] LPTHUMBBUTTON pButton);
2614
2615 HRESULT ThumbBarSetImageList(
2616 [in] HWND hwnd,
2617 [in] HIMAGELIST himl);
2618
2619 HRESULT SetOverlayIcon(
2620 [in] HWND hwnd,
2621 [in] HICON hIcon,
2622 [in, unique, string] LPCWSTR pszDescription);
2623
2624 HRESULT SetThumbnailTooltip(
2625 [in] HWND hwnd,
2626 [in, unique, string] LPCWSTR pszTip);
2627
2628 HRESULT SetThumbnailClip(
2629 [in] HWND hwnd,
2630 [in] RECT *prcClip);
2631 }
2632
2633 [
2634 uuid(c43dc798-95d1-4bea-9030-bb99e2983a1a),
2635 object
2636 ]
2637 interface ITaskbarList4 : ITaskbarList3
2638 {
2639 typedef [v1_enum] enum STPFLAG {
2640 STPF_NONE = 0x0000,
2641 STPF_USEAPPTHUMBNAILALWAYS = 0x0001,
2642 STPF_USEAPPTHUMBNAILWHENACTIVE = 0x0002,
2643 STPF_USEAPPPEEKALWAYS = 0x0004,
2644 STPF_USEAPPPEEKWHENACTIVE = 0x0008
2645 } STPFLAG;
2646
2647 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(STPFLAG)")
2648
2649 HRESULT SetTabProperties(
2650 [in] HWND hwndTab,
2651 [in] STPFLAG stpFlags);
2652 }
2653
2654 /*****************************************************************************
2655 * IAutoCompleteDropDown interface
2656 */
2657 [
2658 object,
2659 uuid(3CD141F4-3C6A-11d2-BCAA-00C04FD929DB),
2660 pointer_default(unique)
2661 ]
2662 interface IAutoCompleteDropDown : IUnknown
2663 {
2664 cpp_quote("#define ACDD_VISIBLE 0x0001")
2665
2666 HRESULT GetDropDownStatus(
2667 [out] DWORD *pdwFlags,
2668 [out, string] LPWSTR *ppwszString);
2669
2670 HRESULT ResetEnumerator();
2671 }
2672
2673 /*****************************************************************************
2674 * IExplorerBrowserEvents interface
2675 */
2676 [
2677 object,
2678 uuid(361BBDC7-E6EE-4E13-BE58-58E2240C810F)
2679 ]
2680 interface IExplorerBrowserEvents : IUnknown
2681 {
2682 HRESULT OnNavigationPending(
2683 [in] PCIDLIST_ABSOLUTE pidlFolder);
2684
2685 HRESULT OnViewCreated(
2686 [in] IShellView *psv);
2687
2688 HRESULT OnNavigationComplete(
2689 [in] PCIDLIST_ABSOLUTE pidlFolder);
2690
2691 HRESULT OnNavigationFailed(
2692 [in] PCIDLIST_ABSOLUTE pidlFolder);
2693 }
2694
2695 typedef GUID EXPLORERPANE;
2696 typedef EXPLORERPANE *REFEXPLORERPANE;
2697
2698 cpp_quote("#define SID_ExplorerPaneVisibility IID_IExplorerPaneVisibility")
2699
2700 /*****************************************************************************
2701 * IExplorerPaneVisibility interface
2702 */
2703 [
2704 object,
2705 uuid(E07010EC-BC17-44C0-97B0-46C7C95B9EDC)
2706 ]
2707 interface IExplorerPaneVisibility : IUnknown
2708 {
2709 typedef enum tagEXPLORERPANESTATE {
2710 EPS_DONTCARE = 0x0,
2711 EPS_DEFAULT_ON = 0x1,
2712 EPS_DEFAULT_OFF = 0x2,
2713 EPS_STATE_MASK = 0xffff,
2714 EPS_INITIALSTATE = 0x10000,
2715 EPS_FORCE = 0x20000
2716 } EXPLORERPANESTATE;
2717
2718 HRESULT GetPaneState(
2719 [in] REFEXPLORERPANE ep,
2720 [out] EXPLORERPANESTATE *peps);
2721 }
2722
2723 typedef [v1_enum] enum tagEXPLORER_BROWSER_FILL_FLAGS {
2724 EBF_NONE = 0,
2725 EBF_SELECTFROMDATAOBJECT = 0x100,
2726 EBF_NODROPTARGET = 0x200
2727 } EXPLORER_BROWSER_FILL_FLAGS;
2728
2729 typedef [v1_enum] enum tagEXPLORER_BROWSER_OPTIONS {
2730 EBO_NONE = 0x00,
2731 EBO_NAVIGATEONCE = 0x01,
2732 EBO_SHOWFRAMES = 0x02,
2733 EBO_ALWAYSNAVIGATE = 0x04,
2734 EBO_NOTRAVELLOG = 0x08,
2735 EBO_NOWRAPPERWINDOW = 0x10,
2736 EBO_HTMLSHAREPOINTVIEW = 0x20,
2737 EBO_NOBORDER = 0x40,
2738 EBO_NOPERSISTVIEWSTATE = 0x80,
2739 } EXPLORER_BROWSER_OPTIONS;
2740
2741 cpp_quote("#define SID_SExplorerBrowserFrame IID_ICommDlgBrowser")
2742
2743 /*****************************************************************************
2744 * IExplorerBrowser interface
2745 */
2746 [
2747 object,
2748 uuid(DFD3B6B5-C10C-4BE9-85F6-A66969F402F6),
2749 pointer_default(unique)
2750 ]
2751 interface IExplorerBrowser : IUnknown
2752 {
2753
2754 [local] HRESULT Initialize(
2755 [in] HWND hwndParent,
2756 [in] const RECT *prc,
2757 [in, unique] const FOLDERSETTINGS *pfs);
2758
2759 HRESULT Destroy();
2760
2761 [local] HRESULT SetRect(
2762 [in,out,unique] HDWP *phdwp,
2763 [in] RECT rcBrowser);
2764
2765 HRESULT SetPropertyBag(
2766 [in, string] LPCWSTR pszPropertyBag);
2767
2768 HRESULT SetEmptyText(
2769 [in, string] LPCWSTR pszEmptyText);
2770
2771 HRESULT SetFolderSettings(
2772 [in] const FOLDERSETTINGS *pfs);
2773
2774 HRESULT Advise(
2775 [in] IExplorerBrowserEvents *psbe,
2776 [out] DWORD *pdwCookie);
2777
2778 HRESULT Unadvise(
2779 [in] DWORD dwCookie);
2780
2781 HRESULT SetOptions(
2782 [in] EXPLORER_BROWSER_OPTIONS dwFlag);
2783
2784 HRESULT GetOptions(
2785 [out] EXPLORER_BROWSER_OPTIONS *pdwFlag);
2786
2787 HRESULT BrowseToIDList(
2788 [in] PCUIDLIST_RELATIVE pidl,
2789 [in] UINT uFlags);
2790
2791 HRESULT BrowseToObject(
2792 [in] IUnknown *punk,
2793 [in] UINT uFlags);
2794
2795 HRESULT FillFromObject(
2796 [in] IUnknown *punk,
2797 [in] EXPLORER_BROWSER_FILL_FLAGS dwFlags);
2798
2799 HRESULT RemoveAll();
2800
2801 HRESULT GetCurrentView(
2802 [in] REFIID riid,
2803 [out, iid_is(riid)] void **ppv);
2804 }
2805
2806 /*****************************************************************************
2807 * INameSpaceTreeControl interface
2808 */
2809 [
2810 object,
2811 uuid(028212A3-B627-47E9-8856-C14265554E4F)
2812 ]
2813 interface INameSpaceTreeControl : IUnknown
2814 {
2815 [v1_enum] enum _NSTCSTYLE {
2816 NSTCS_HASEXPANDOS = 0x00000001,
2817 NSTCS_HASLINES = 0x00000002,
2818 NSTCS_SINGLECLICKEXPAND = 0x00000004,
2819 NSTCS_FULLROWSELECT = 0x00000008,
2820 NSTCS_SPRINGEXPAND = 0x00000010,
2821 NSTCS_HORIZONTALSCROLL = 0x00000020,
2822 NSTCS_ROOTHASEXPANDO = 0x00000040,
2823 NSTCS_SHOWSELECTIONALWAYS = 0x00000080,
2824 NSTCS_NOINFOTIP = 0x00000200,
2825 NSTCS_EVENHEIGHT = 0x00000400,
2826 NSTCS_NOREPLACEOPEN = 0x00000800,
2827 NSTCS_DISABLEDRAGDROP = 0x00001000,
2828 NSTCS_NOORDERSTREAM = 0x00002000,
2829 NSTCS_RICHTOOLTIP = 0x00004000,
2830 NSTCS_BORDER = 0x00008000,
2831 NSTCS_NOEDITLABELS = 0x00010000,
2832 NSTCS_TABSTOP = 0x00020000,
2833 NSTCS_FAVORITESMODE = 0x00080000,
2834 NSTCS_AUTOHSCROLL = 0x00100000,
2835 NSTCS_FADEINOUTEXPANDOS = 0x00200000,
2836 NSTCS_EMPTYTEXT = 0x00400000,
2837 NSTCS_CHECKBOXES = 0x00800000,
2838 NSTCS_PARTIALCHECKBOXES = 0x01000000,
2839 NSTCS_EXCLUSIONCHECKBOXES = 0x02000000,
2840 NSTCS_DIMMEDCHECKBOXES = 0x04000000,
2841 NSTCS_NOINDENTCHECKS = 0x08000000,
2842 NSTCS_ALLOWJUNCTIONS = 0x10000000,
2843 NSTCS_SHOWTABSBUTTON = 0x20000000,
2844 NSTCS_SHOWDELETEBUTTON = 0x40000000,
2845 NSTCS_SHOWREFRESHBUTTON = (int)0x80000000
2846 };
2847 typedef DWORD NSTCSTYLE;
2848
2849 [v1_enum] enum _NSTCROOTSTYLE {
2850 NSTCRS_VISIBLE = 0x0000,
2851 NSTCRS_HIDDEN = 0x0001,
2852 NSTCRS_EXPANDED = 0x0002
2853 };
2854 typedef DWORD NSTCROOTSTYLE;
2855
2856 [v1_enum] enum _NSTCITEMSTATE {
2857 NSTCIS_NONE = 0x0000,
2858 NSTCIS_SELECTED = 0x0001,
2859 NSTCIS_EXPANDED = 0x0002,
2860 NSTCIS_BOLD = 0x0004,
2861 NSTCIS_DISABLED = 0x0008,
2862 NSTCIS_SELECTEDNOEXPAND = 0x0010
2863 };
2864 typedef DWORD NSTCITEMSTATE;
2865
2866 typedef [v1_enum] enum NSTCGNI {
2867 NSTCGNI_NEXT = 0,
2868 NSTCGNI_NEXTVISIBLE = 1,
2869 NSTCGNI_PREV = 2,
2870 NSTCGNI_PREVVISIBLE = 3,
2871 NSTCGNI_PARENT = 4,
2872 NSTCGNI_CHILD = 5,
2873 NSTCGNI_FIRSTVISIBLE = 6,
2874 NSTCGNI_LASTVISIBLE = 7
2875 } NSTCGNI;
2876
2877 HRESULT Initialize(
2878 [in] HWND hwndParent,
2879 [in, unique] RECT *prc,
2880 [in] NSTCSTYLE nstcsFlags);
2881
2882 HRESULT TreeAdvise(
2883 [in] IUnknown *punk,
2884 [out] DWORD *pdwCookie);
2885
2886 HRESULT TreeUnadvise(
2887 [in] DWORD dwCookie);
2888
2889 HRESULT AppendRoot(
2890 [in] IShellItem *psiRoot,
2891 [in] SHCONTF grfEnumFlags,
2892 [in] NSTCROOTSTYLE grfRootStyle,
2893 [in, unique] IShellItemFilter *pif);
2894
2895 HRESULT InsertRoot(
2896 [in] int iIndex,
2897 [in] IShellItem *psiRoot,
2898 [in] SHCONTF grfEnumFlags,
2899 [in] NSTCROOTSTYLE grfRootStyle,
2900 [in, unique] IShellItemFilter *pif);
2901
2902 HRESULT RemoveRoot(
2903 [in] IShellItem *psiRoot);
2904
2905 HRESULT RemoveAllRoots();
2906
2907 HRESULT GetRootItems(
2908 [out] IShellItemArray **ppsiaRootItems);
2909
2910 HRESULT SetItemState(
2911 [in] IShellItem *psi,
2912 [in] NSTCITEMSTATE nstcisMask,
2913 [in] NSTCITEMSTATE nstcisFlags);
2914
2915 HRESULT GetItemState(
2916 [in] IShellItem *psi,
2917 [in] NSTCITEMSTATE nstcismask,
2918 [out] NSTCITEMSTATE *pnstcisFlags);
2919
2920 HRESULT GetSelectedItems(
2921 [out] IShellItemArray **psiaItems);
2922
2923 HRESULT GetItemCustomState(
2924 [in] IShellItem *psi,
2925 [out] int *piStateNumber);
2926
2927 HRESULT SetItemCustomState(
2928 [in] IShellItem *psi,
2929 [in] int iStateNumber);
2930
2931 HRESULT EnsureItemVisible(
2932 [in] IShellItem *psi);
2933
2934 HRESULT SetTheme(
2935 [in, string] LPCWSTR pszTheme);
2936
2937 HRESULT GetNextItem(
2938 [in, unique] IShellItem *psi,
2939 [in] NSTCGNI nstcgi,
2940 [out] IShellItem **ppsiNext);
2941
2942 HRESULT HitTest(
2943 [in] POINT *ppt,
2944 [out] IShellItem **ppsiOut);
2945
2946 HRESULT GetItemRect(
2947 [in] IShellItem *psi,
2948 [out] RECT *prect);
2949
2950 HRESULT CollapseAll();
2951 }
2952
2953 /*****************************************************************************
2954 * INameSpaceTreeControl2 interface
2955 */
2956 [
2957 object,
2958 uuid(7CC7AED8-290E-49BC-8945-C1401CC9306C)
2959 ]
2960 interface INameSpaceTreeControl2 : INameSpaceTreeControl
2961 {
2962 typedef [v1_enum] enum NSTCSTYLE2 {
2963 NSTCS2_DEFAULT = 0x00,
2964 NSTCS2_INTERRUPTNOTIFICATIONS = 0x01,
2965 NSTCS2_SHOWNULLSPACEMENU = 0x02,
2966 NSTCS2_DISPLAYPADDING = 0x04,
2967 NSTCS2_DISPLAYPINNEDONLY = 0x08,
2968 NTSCS2_NOSINGLETONAUTOEXPAND = 0x10, /* The apparent typo here is */
2969 NTSCS2_NEVERINSERTNONENUMERATED = 0x20 /* present also in the Win SDK */
2970 } NSTCSTYLE2;
2971 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(NSTCSTYLE2)")
2972
2973 HRESULT SetControlStyle(
2974 [in] NSTCSTYLE nstcsMask,
2975 [in] NSTCSTYLE nstcsStyle);
2976
2977 HRESULT GetControlStyle(
2978 [in] NSTCSTYLE nstcsMask,
2979 [out] NSTCSTYLE *pnstcsStyle);
2980
2981 HRESULT SetControlStyle2(
2982 [in] NSTCSTYLE2 nstcsMask,
2983 [in] NSTCSTYLE2 nstcsStyle);
2984
2985 HRESULT GetControlStyle2(
2986 [in] NSTCSTYLE2 nstcsMask,
2987 [out] NSTCSTYLE2 *pnstcsStyle);
2988 }
2989
2990 /*****************************************************************************
2991 * INameSpaceTreeControlEvents interface
2992 */
2993
2994 [
2995 object,
2996 uuid(93D77985-B3D8-4484-8318-672CDDA002CE),
2997 local
2998 ]
2999 interface INameSpaceTreeControlEvents : IUnknown
3000 {
3001 [v1_enum] enum _NSTCEHITTEST {
3002 NSTCEHT_NOWHERE = 0x0001,
3003 NSTCEHT_ONITEMICON = 0x0002,
3004 NSTCEHT_ONITEMLABEL = 0x0004,
3005 NSTCEHT_ONITEMIDENT = 0x0008,
3006 NSTCEHT_ONITEMBUTTON = 0x0010,
3007 NSTCEHT_ONITEMRIGHT = 0x0020,
3008 NSTCEHT_ONITEMSTATEICON = 0x0040,
3009 NSTCEHT_ONITEM = 0x0046,
3010 NSTCEHT_ONITEMTABBUTTON = 0x1000
3011 };
3012 typedef DWORD NSTCEHITTEST;
3013
3014 [v1_enum] enum _NSTCECLICKTYPE {
3015 NSTCECT_LBUTTON = 0x1,
3016 NSTCECT_MBUTTON = 0x2,
3017 NSTCECT_RBUTTON = 0x3,
3018 NSTCECT_BUTTON = 0x3,
3019 NSTCECT_DBLCLICK = 0x4
3020 };
3021 typedef DWORD NSTCECLICKTYPE;
3022
3023 HRESULT OnItemClick(
3024 [in] IShellItem *psi,
3025 [in] NSTCEHITTEST nstceHitTest,
3026 [in] NSTCECLICKTYPE nstceClickType);
3027
3028 HRESULT OnPropertyItemCommit(
3029 [in] IShellItem *psi);
3030
3031 HRESULT OnItemStateChanging(
3032 [in] IShellItem *psi,
3033 [in] NSTCITEMSTATE nstcisMask,
3034 [in] NSTCITEMSTATE nstcisState);
3035
3036 HRESULT OnItemStateChanged(
3037 [in] IShellItem *psi,
3038 [in] NSTCITEMSTATE nstcisMask,
3039 [in] NSTCITEMSTATE nstcisState);
3040
3041 HRESULT OnSelectionChanged(
3042 [in] IShellItemArray *psiaSelection);
3043
3044 HRESULT OnKeyboardInput(
3045 [in] UINT uMsg,
3046 [in] WPARAM wParam,
3047 [in] LPARAM lParam);
3048
3049 HRESULT OnBeforeExpand(
3050 [in] IShellItem *psi);
3051
3052 HRESULT OnAfterExpand(
3053 [in] IShellItem *psi);
3054
3055 HRESULT OnBeginLabelEdit(
3056 [in] IShellItem *psi);
3057
3058 HRESULT OnEndLabelEdit(
3059 [in] IShellItem *psi);
3060
3061 HRESULT OnGetToolTip(
3062 [in] IShellItem *psi,
3063 [out, string, size_is(cchTip)] LPWSTR pszTip,
3064 [in] int cchTip);
3065
3066 HRESULT OnBeforeItemDelete(
3067 [in] IShellItem *psi);
3068
3069 HRESULT OnItemAdded(
3070 [in] IShellItem *psi,
3071 [in] BOOL fIsRoot);
3072
3073 HRESULT OnItemDeleted(
3074 [in] IShellItem *psi,
3075 [in] BOOL fIsRoot);
3076
3077 HRESULT OnBeforeContextMenu(
3078 [in, unique] IShellItem *psi,
3079 [in] REFIID riid,
3080 [out, iid_is(riid)] void **ppv);
3081
3082 HRESULT OnAfterContextMenu(
3083 [in] IShellItem *psi,
3084 [in] IContextMenu *pcmIn,
3085 [in] REFIID riid,
3086 [out, iid_is(riid)] void **ppv);
3087
3088 HRESULT OnBeforeStateImageChange(
3089 [in] IShellItem *psi);
3090
3091 HRESULT OnGetDefaultIconIndex(
3092 [in] IShellItem *psi,
3093 [out] int *piDefaultIcon,
3094 [out] int *piOpenIcon);
3095 }
3096
3097 /*****************************************************************************
3098 * INameSpaceTreeControlCustomDraw interface
3099 */
3100 [
3101 object,
3102 uuid(2D3BA758-33EE-42D5-BB7B-5F3431D86C78),
3103 local
3104 ]
3105
3106 interface INameSpaceTreeControlCustomDraw : IUnknown
3107 {
3108 typedef struct NSTCCUSTOMDRAW
3109 {
3110 IShellItem *psi;
3111 UINT uItemState;
3112 NSTCITEMSTATE nstcis;
3113 LPCWSTR pszText;
3114 int iImage;
3115 HIMAGELIST himl;
3116 int iLevel;
3117 int iIndent;
3118 } NSTCCUSTOMDRAW;
3119
3120 HRESULT PrePaint(
3121 [in] HDC hdc,
3122 [in] RECT *prc,
3123 [out] LRESULT *plres);
3124
3125 HRESULT PostPaint(
3126 [in] HDC hdc,
3127 [in] RECT *prc);
3128
3129 HRESULT ItemPrePaint(
3130 [in] HDC hdc,
3131 [in] RECT *prc,
3132 [in, out] COLORREF *pclrText,
3133 [in, out] COLORREF *pclrTextBk,
3134 [out] LRESULT *plres);
3135
3136 HRESULT ItemPostPaint(
3137 [in] HDC hdc,
3138 [in] RECT *prc,
3139 [in] NSTCCUSTOMDRAW *pnstccdItem);
3140 }
3141
3142 /*****************************************************************************
3143 * INameSpaceTreeControlDropHandler interface
3144 */
3145 [
3146 object,
3147 uuid(F9C665D6-C2F2-4C19-BF33-8322D7352F51),
3148 local
3149 ]
3150 interface INameSpaceTreeControlDropHandler : IUnknown
3151 {
3152 HRESULT OnDragEnter(
3153 [in, unique] IShellItem *psiOver,
3154 [in] IShellItemArray *psiaData,
3155 [in] BOOL fOutsideSource,
3156 [in] DWORD grfKeyState,
3157 [in, out] DWORD *pdwEffect);
3158
3159 HRESULT OnDragOver(
3160 [in, unique] IShellItem *psiOver,
3161 [in] IShellItemArray *psiaData,
3162 [in] DWORD grfKeyState,
3163 [in, out] DWORD *pdwEffect);
3164
3165 HRESULT OnDragPosition(
3166 [in, unique] IShellItem *psiOver,
3167 [in] IShellItemArray *psiaData,
3168 [in] int iNewPosition,
3169 [in] int iOldPosition);
3170
3171 HRESULT OnDrop(
3172 [in, unique] IShellItem *psiOver,
3173 [in] IShellItemArray *psiaData,
3174 [in] int iPosition,
3175 [in] DWORD grfKeyState,
3176 [in, out] DWORD *pdwEffect);
3177
3178 HRESULT OnDropPosition(
3179 [in, unique] IShellItem *psiOver,
3180 [in] IShellItemArray *psiaData,
3181 [in] int iNewPosition,
3182 [in] int iOldPosition);
3183
3184 HRESULT OnDragLeave(
3185 [in, unique] IShellItem *psiOver);
3186 }
3187 cpp_quote("#define NSTCDHPOS_ONTOP -1")
3188
3189 interface IFileDialog;
3190
3191 typedef [v1_enum] enum FDE_OVERWRITE_RESPONSE
3192 {
3193 FDEOR_DEFAULT = 0,
3194 FDEOR_ACCEPT = 1,
3195 FDEOR_REFUSE = 2
3196 } FDE_OVERWRITE_RESPONSE;
3197
3198 typedef [v1_enum] enum FDE_SHAREVIOLATION_RESPONSE
3199 {
3200 FDESVR_DEFAULT = 0,
3201 FDESVR_ACCEPT = 1,
3202 FDESVR_REFUSE = 2
3203 } FDE_SHAREVIOLATION_RESPONSE;
3204
3205 /*****************************************************************************
3206 * IFileDialogEvents interface
3207 */
3208 [
3209 object,
3210 uuid(973510DB-7D7F-452B-8975-74A85828D354),
3211 pointer_default(unique)
3212 ]
3213 interface IFileDialogEvents : IUnknown
3214 {
3215 HRESULT OnFileOk(
3216 [in] IFileDialog *pfd);
3217
3218 HRESULT OnFolderChanging(
3219 [in] IFileDialog *pfd,
3220 [in] IShellItem *psiFolder);
3221
3222 HRESULT OnFolderChange(
3223 [in] IFileDialog *pfd);
3224
3225 HRESULT OnSelectionChange(
3226 [in] IFileDialog *pfd);
3227
3228 HRESULT OnShareViolation(
3229 [in] IFileDialog *pfd,
3230 [in] IShellItem *psi,
3231 [out] FDE_SHAREVIOLATION_RESPONSE *pResponse);
3232
3233 HRESULT OnTypeChange(
3234 [in] IFileDialog *pfd);
3235
3236 HRESULT OnOverwrite(
3237 [in] IFileDialog *pfd,
3238 [in] IShellItem *psi,
3239 [out] FDE_OVERWRITE_RESPONSE *pResponse);
3240 }
3241
3242 /*****************************************************************************
3243 * IModalWindow interface
3244 */
3245 [
3246 object,
3247 uuid(B4DB1657-70D7-485E-8E3E-6FCB5A5C1802),
3248 pointer_default(unique)
3249 ]
3250 interface IModalWindow : IUnknown
3251 {
3252 [local]
3253 HRESULT Show(
3254 [in, unique, annotation("__in_opt")] HWND hwndOwner);
3255
3256 [call_as(Show)]
3257 HRESULT RemoteShow(
3258 [in, unique] HWND hwndOwner);
3259 }
3260
3261 typedef [v1_enum] enum FDAP
3262 {
3263 FDAP_BOTTOM = 0,
3264 FDAP_TOP = 1
3265 } FDAP;
3266
3267 /*****************************************************************************
3268 * IFileDialog interface
3269 */
3270 [
3271 object,
3272 uuid(42F85136-DB7E-439C-85F1-E4075D135FC8),
3273 pointer_default(unique)
3274 ]
3275 interface IFileDialog : IModalWindow
3276 {
3277 [v1_enum] enum _FILEOPENDIALOGOPTIONS
3278 {
3279 FOS_OVERWRITEPROMPT = 0x00000002,
3280 FOS_STRICTFILETYPES = 0x00000004,
3281 FOS_NOCHANGEDIR = 0x00000008,
3282 FOS_PICKFOLDERS = 0x00000020,
3283 FOS_FORCEFILESYSTEM = 0x00000040,
3284 FOS_ALLNONSTORAGEITEMS = 0x00000080,
3285 FOS_NOVALIDATE = 0x00000100,
3286 FOS_ALLOWMULTISELECT = 0x00000200,
3287 FOS_PATHMUSTEXIST = 0x00000800,
3288 FOS_FILEMUSTEXIST = 0x00001000,
3289 FOS_CREATEPROMPT = 0x00002000,
3290 FOS_SHAREAWARE = 0x00004000,
3291 FOS_NOREADONLYRETURN = 0x00008000,
3292 FOS_NOTESTFILECREATE = 0x00010000,
3293 FOS_HIDEMRUPLACES = 0x00020000,
3294 FOS_HIDEPINNEDPLACES = 0x00040000,
3295 FOS_NODEREFERENCELINKS = 0x00100000,
3296 FOS_DONTADDTORECENT = 0x02000000,
3297 FOS_FORCESHOWHIDDEN = 0x10000000,
3298 FOS_DEFAULTNOMINIMODE = 0x20000000,
3299 FOS_FORCEPREVIEWPANEON = 0x40000000
3300 };
3301 typedef DWORD FILEOPENDIALOGOPTIONS;
3302
3303 HRESULT SetFileTypes(
3304 [in] UINT cFileTypes,
3305 [in, size_is(cFileTypes)] const COMDLG_FILTERSPEC *rgFilterSpec);
3306
3307 HRESULT SetFileTypeIndex(
3308 [in] UINT iFileType);
3309
3310 HRESULT GetFileTypeIndex(
3311 [out] UINT *piFileType);
3312
3313 HRESULT Advise(
3314 [in] IFileDialogEvents *pfde,
3315 [out] DWORD *pdwCookie);
3316
3317 HRESULT Unadvise(
3318 [in] DWORD dwCookie);
3319
3320 HRESULT SetOptions(
3321 [in] FILEOPENDIALOGOPTIONS fos);
3322
3323 HRESULT GetOptions(
3324 [in] FILEOPENDIALOGOPTIONS *pfos);
3325
3326 HRESULT SetDefaultFolder(
3327 [in] IShellItem *psi);
3328
3329 HRESULT SetFolder(
3330 [in] IShellItem *psi);
3331
3332 HRESULT GetFolder(
3333 [out] IShellItem **ppsi);
3334
3335 HRESULT GetCurrentSelection(
3336 [out] IShellItem **ppsi);
3337
3338 HRESULT SetFileName(
3339 [in, string] LPCWSTR pszName);
3340
3341 HRESULT GetFileName(
3342 [out, string] LPWSTR *pszName);
3343
3344 HRESULT SetTitle(
3345 [in, string] LPCWSTR pszTitle);
3346
3347 HRESULT SetOkButtonLabel(
3348 [in, string] LPCWSTR pszText);
3349
3350 HRESULT SetFileNameLabel(
3351 [in, string] LPCWSTR pszLabel);
3352
3353 HRESULT GetResult(
3354 [out] IShellItem **ppsi);
3355
3356 HRESULT AddPlace(
3357 [in] IShellItem *psi,
3358 [in] FDAP fdap);
3359
3360 HRESULT SetDefaultExtension(
3361 [in, string] LPCWSTR pszDefaultExtension);
3362
3363 HRESULT Close(
3364 [in] HRESULT hr);
3365
3366 HRESULT SetClientGuid(
3367 [in] REFGUID guid);
3368
3369 HRESULT ClearClientData();
3370
3371 HRESULT SetFilter(
3372 [in] IShellItemFilter *pFilter);
3373 }
3374
3375 /*****************************************************************************
3376 * IFileDialog2 interface
3377 */
3378 [
3379 object,
3380 uuid(61744FC7-85B5-4791-A9B0-272276309B13),
3381 pointer_default(unique)
3382 ]
3383 interface IFileDialog2 : IFileDialog
3384 {
3385 HRESULT SetCancelButtonLabel(
3386 [in] LPCWSTR pszLabel);
3387
3388 HRESULT SetNavigationRoot(
3389 [in] IShellItem *psi);
3390 }
3391
3392 /*****************************************************************************
3393 * IFileOperationProgressSink interface
3394 */
3395 [
3396 object,
3397 uuid(04B0F1A7-9490-44BC-96E1-4296A31252E2),
3398 pointer_default(unique)
3399 ]
3400 interface IFileOperationProgressSink : IUnknown
3401 {
3402 HRESULT StartOperations();
3403
3404 HRESULT FinishOperations(
3405 [in] HRESULT hrResult);
3406
3407 HRESULT PreRenameItem(
3408 [in] DWORD dwFlags,
3409 [in] IShellItem *psiItem,
3410 [in, unique, string] LPCWSTR pszNewName);
3411
3412 HRESULT PostRenameItem(
3413 [in] DWORD dwFlags,
3414 [in] IShellItem *psiItem,
3415 [in, string] LPCWSTR pszNewName,
3416 [in] HRESULT hrRename,
3417 [in] IShellItem *psiNewlyCreated);
3418
3419 HRESULT PreMoveItem(
3420 [in] DWORD dwFlags,
3421 [in] IShellItem *psiItem,
3422 [in] IShellItem *psiDestinationFolder,
3423 [in, unique, string] LPCWSTR pszNewName);
3424
3425 HRESULT PostMoveItem(
3426 [in] DWORD dwFlags,
3427 [in] IShellItem *psiItem,
3428 [in] IShellItem *psiDestinationFolder,
3429 [in, unique, string] LPCWSTR pszNewName,
3430 [in] HRESULT hrMove,
3431 [in] IShellItem *psiNewlyCreated);
3432
3433 HRESULT PreCopyItem(
3434 [in] DWORD dwFlags,
3435 [in] IShellItem *psiItem,
3436 [in] IShellItem *psiDestinationFolder,
3437 [in, unique, string] LPCWSTR pszNewName);
3438
3439 HRESULT PostCopyItem(
3440 [in] DWORD dwFlags,
3441 [in] IShellItem *psiItem,
3442 [in] IShellItem *psiDestinationFolder,
3443 [in, unique, string] LPCWSTR pszNewName,
3444 [in] HRESULT hrCopy,
3445 [in] IShellItem *psiNewlyCreated);
3446
3447 HRESULT PreDeleteItem(
3448 [in] DWORD dwFlags,
3449 [in] IShellItem *psiItem);
3450
3451 HRESULT PostDeleteItem(
3452 [in] DWORD dwFlags,
3453 [in] IShellItem *psiItem,
3454 [in] HRESULT hrDelete,
3455 [in] IShellItem *psiNewlyCreated);
3456
3457 HRESULT PreNewItem(
3458 [in] DWORD dwFlags,
3459 [in] IShellItem *psiDestinationFolder,
3460 [in, unique, string] LPCWSTR pszNewName);
3461
3462 HRESULT PostNewItem(
3463 [in] DWORD dwFlags,
3464 [in] IShellItem *psiDestinationFolder,
3465 [in, unique, string] LPCWSTR pszNewName,
3466 [in, unique, string] LPCWSTR pszTemplateName,
3467 [in] DWORD dwFileAttributes,
3468 [in] HRESULT hrNew,
3469 [in] IShellItem *psiNewItem);
3470
3471 HRESULT UpdateProgress(
3472 [in] UINT iWorkTotal,
3473 [in] UINT iWorkSoFar);
3474
3475 HRESULT ResetTimer();
3476
3477 HRESULT PauseTimer();
3478
3479 HRESULT ResumeTimer();
3480 }
3481
3482 /*****************************************************************************
3483 * IFileSaveDialog interface
3484 */
3485 [
3486 object,
3487 uuid(84BCCD23-5FDE-4CDB-AEA4-AF64B83D78AB),
3488 pointer_default(unique)
3489 ]
3490 interface IFileSaveDialog : IFileDialog
3491 {
3492 HRESULT SetSaveAsItem(
3493 [in] IShellItem *psi);
3494
3495 HRESULT SetProperties(
3496 [in] IPropertyStore *pStore);
3497
3498 HRESULT SetCollectedProperties(
3499 [in] IPropertyDescriptionList *pList,
3500 [in] BOOL fAppendDefault);
3501
3502 HRESULT GetProperties(
3503 [in] IPropertyStore **ppStore);
3504
3505 HRESULT ApplyProperties(
3506 [in] IShellItem *psi,
3507 [in] IPropertyStore *pStore,
3508 [in, unique] HWND hwnd,
3509 [in, unique] IFileOperationProgressSink *pSink);
3510 }
3511
3512
3513 /*****************************************************************************
3514 * IFileOpenDialog interface
3515 */
3516 [
3517 object,
3518 uuid(D57C7288-D4AD-4768-BE02-9D969532D960),
3519 pointer_default(unique)
3520 ]
3521 interface IFileOpenDialog : IFileDialog
3522 {
3523 HRESULT GetResults(
3524 [out] IShellItemArray **ppenum);
3525
3526 HRESULT GetSelectedItems(
3527 [out] IShellItemArray **ppsai);
3528 }
3529
3530 typedef [v1_enum] enum CDCONTROLSTATEF
3531 {
3532 CDCS_INACTIVE = 0x0,
3533 CDCS_ENABLED = 0x1,
3534 CDCS_VISIBLE = 0x2,
3535 CDCS_ENABLEDVISIBLE = 0x3
3536 } CDCONTROLSTATEF;
3537 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(CDCONTROLSTATEF)")
3538 /*****************************************************************************
3539 * IFileDialogCustomize interface
3540 */
3541 [
3542 object,
3543 uuid(E6FDD21A-163F-4975-9C8C-A69F1BA37034),
3544 pointer_default(unique)
3545 ]
3546 interface IFileDialogCustomize : IUnknown
3547 {
3548 HRESULT EnableOpenDropDown(
3549 [in] DWORD dwIDCtl);
3550
3551 HRESULT AddMenu(
3552 [in] DWORD dwIDCtl,
3553 [in, string] LPCWSTR pszLabel);
3554
3555 HRESULT AddPushButton(
3556 [in] DWORD dwIDCtl,
3557 [in, string] LPCWSTR pszLabel);
3558
3559 HRESULT AddComboBox(
3560 [in] DWORD dwIDCtl);
3561
3562 HRESULT AddRadioButtonList(
3563 [in] DWORD dwIDCtl);
3564
3565 HRESULT AddCheckButton(
3566 [in] DWORD dwIDCtl,
3567 [in, string] LPCWSTR pszLabel,
3568 [in] BOOL bChecked);
3569
3570 HRESULT AddEditBox(
3571 [in] DWORD dwIDCtl,
3572 [in, string] LPCWSTR pszText);
3573
3574 HRESULT AddSeparator(
3575 [in] DWORD dwIDCtl);
3576
3577 HRESULT AddText(
3578 [in] DWORD dwIDCtl,
3579 [in, string] LPCWSTR pszText);
3580
3581 HRESULT SetControlLabel(
3582 [in] DWORD dwIDCtl,
3583 [in, string] LPCWSTR pszLabel);
3584
3585 HRESULT GetControlState(
3586 [in] DWORD dwIDCtl,
3587 [out] CDCONTROLSTATEF *pdwState);
3588
3589 HRESULT SetControlState(
3590 [in] DWORD dwIDCtl,
3591 [in] CDCONTROLSTATEF dwState);
3592
3593 HRESULT GetEditBoxText(
3594 [in] DWORD dwIDCtl,
3595 [out, string] WCHAR **ppszText);
3596
3597 HRESULT SetEditBoxText(
3598 [in] DWORD dwIDCtl,
3599 [in, string] LPCWSTR pszText);
3600
3601 HRESULT GetCheckButtonState(
3602 [in] DWORD dwIDCtl,
3603 [out] BOOL *pbChecked);
3604
3605 HRESULT SetCheckButtonState(
3606 [in] DWORD dwIDCtl,
3607 [in] BOOL bChecked);
3608
3609 HRESULT AddControlItem(
3610 [in] DWORD dwIDCtl,
3611 [in] DWORD dwIDItem,
3612 [in] LPCWSTR pszLabel);
3613
3614 HRESULT RemoveControlItem(
3615 [in] DWORD dwIDCtl,
3616 [in] DWORD dwIDItem);
3617
3618 HRESULT RemoveAllControlItems(
3619 [in] DWORD dwIDCtl);
3620
3621 HRESULT GetControlItemState(
3622 [in] DWORD dwIDCtl,
3623 [in] DWORD dwIDItem,
3624 [out] CDCONTROLSTATEF *pdwState);
3625
3626 HRESULT SetControlItemState(
3627 [in] DWORD dwIDCtl,
3628 [in] DWORD dwIDItem,
3629 [in] CDCONTROLSTATEF dwState);
3630
3631 HRESULT GetSelectedControlItem(
3632 [in] DWORD dwIDCtl,
3633 [out] DWORD *pdwIDItem);
3634
3635 HRESULT SetSelectedControlItem(
3636 [in] DWORD dwIDCtl,
3637 [in] DWORD dwIDItem);
3638
3639 HRESULT StartVisualGroup(
3640 [in] DWORD dwIDCtl,
3641 [in, string] LPCWSTR pszLabel);
3642
3643 HRESULT EndVisualGroup();
3644
3645 HRESULT MakeProminent(
3646 [in] DWORD dwIDCtl);
3647
3648 HRESULT SetControlItemText(
3649 [in] DWORD dwIDCtl,
3650 [in] DWORD dwIDItem,
3651 [in, string] LPCWSTR pszLabel);
3652 }
3653
3654 /*****************************************************************************
3655 * IFileDialogControlEvents interface
3656 */
3657 [
3658 object,
3659 uuid(36116642-D713-4B97-9B83-7484A9D00433),
3660 pointer_default(unique)
3661 ]
3662 interface IFileDialogControlEvents : IUnknown
3663 {
3664 HRESULT OnItemSelected(
3665 [in] IFileDialogCustomize *pfdc,
3666 [in] DWORD dwIDCtl,
3667 [in] DWORD dwIDItem);
3668
3669 HRESULT OnButtonClicked(
3670 [in] IFileDialogCustomize *pfdc,
3671 [in] DWORD dwIDCtl);
3672
3673 HRESULT OnCheckButtonToggled(
3674 [in] IFileDialogCustomize *pfdc,
3675 [in] BOOL dwIDCtl,
3676 [in] BOOL bChecked);
3677
3678 HRESULT OnControlActivating(
3679 [in] IFileDialogCustomize *pfdc,
3680 [in] DWORD dwIDCtl);
3681 }
3682
3683 typedef [v1_enum] enum tagKF_CATEGORY
3684 {
3685 KF_CATEGORY_VIRTUAL = 0x00000001,
3686 KF_CATEGORY_FIXED = 0x00000002,
3687 KF_CATEGORY_COMMON = 0x00000003,
3688 KF_CATEGORY_PERUSER = 0x00000004
3689 } KF_CATEGORY;
3690
3691 typedef [v1_enum] enum tagKF_REDIRECTION_CAPABILITIES
3692 {
3693 KF_REDIRECTION_CAPABILITIES_ALLOW_ALL = 0x000000ff,
3694 KF_REDIRECTION_CAPABILITIES_REDIRECTABLE = 0x00000001,
3695 KF_REDIRECTION_CAPABILITIES_DENY_ALL = 0x000fff00,
3696 KF_REDIRECTION_CAPABILITIES_DENY_POLICY_REDIRECTED = 0x00000100,
3697 KF_REDIRECTION_CAPABILITIES_DENY_POLICY = 0x00000200,
3698 KF_REDIRECTION_CAPABILITIES_DENY_PERMISSIONS = 0x00000400
3699 } KF_REDIRECTION_CAPABILITIES;
3700
3701 typedef [v1_enum] enum tagKF_DEFINITION_FLAGS
3702 {
3703 KFDF_LOCAL_REDIRECT_ONLY = 0x00000002,
3704 KFDF_ROAMABLE = 0x00000004,
3705 KFDF_PRECREATE = 0x00000008,
3706 KFDF_STREAM = 0x00000010,
3707 KFDF_PUBLISHEXPANDEDPATH = 0x00000020
3708 } KF_DEFINITION_FLAGS;
3709
3710 typedef struct tagKNOWNFOLDER_DEFINITION
3711 {
3712 KF_CATEGORY category;
3713 LPWSTR pszName;
3714 LPWSTR pszDescription;
3715 KNOWNFOLDERID fidParent;
3716 LPWSTR pszRelativePath;
3717 LPWSTR pszParsingName;
3718 LPWSTR pszTooltip;
3719 LPWSTR pszLocalizedName;
3720 LPWSTR pszIcon;
3721 LPWSTR pszSecurity;
3722 DWORD dwAttributes;
3723 KF_DEFINITION_FLAGS kfdFlags;
3724 FOLDERTYPEID ftidType;
3725 } KNOWNFOLDER_DEFINITION;
3726
3727 [
3728 object,
3729 uuid(3aa7af7e-9b36-420C-a8e3-f77d4674a488),
3730 pointer_default(ref)
3731 ]
3732 interface IKnownFolder : IUnknown
3733 {
3734 HRESULT GetId(
3735 [out] KNOWNFOLDERID *pkfid);
3736
3737 HRESULT GetCategory(
3738 [out] KF_CATEGORY *pCategory);
3739
3740 HRESULT GetShellItem(
3741 [in] DWORD dwFlags,
3742 [in] REFIID riid,
3743 [out, iid_is(riid)] void **ppv);
3744
3745 HRESULT GetPath(
3746 [in] DWORD dwFlags,
3747 [out, string] LPWSTR *ppszPath);
3748
3749 HRESULT SetPath(
3750 [in] DWORD dwFlags,
3751 [in, string] LPCWSTR pszPath);
3752
3753 HRESULT GetIDList(
3754 [in] DWORD dwFlags,
3755 [out] PIDLIST_ABSOLUTE *ppidl);
3756
3757 HRESULT GetFolderType(
3758 [out] FOLDERTYPEID *pftid);
3759
3760 HRESULT GetRedirectionCapabilities(
3761 [out] KF_REDIRECTION_CAPABILITIES *pCapabilities);
3762
3763 HRESULT GetFolderDefinition(
3764 [out] KNOWNFOLDER_DEFINITION *pKFD);
3765 }
3766
3767 typedef [v1_enum] enum tagKF_REDIRECT_FLAGS
3768 {
3769 KF_REDIRECT_USER_EXCLUSIVE = 0x00000001,
3770 KF_REDIRECT_COPY_SOURCE_DACL = 0x00000002,
3771 KF_REDIRECT_OWNER_USER = 0x00000004,
3772 KF_REDIRECT_SET_OWNER_EXPLICIT = 0x00000008,
3773 KF_REDIRECT_CHECK_ONLY = 0x00000010,
3774 KF_REDIRECT_WITH_UI = 0x00000020,
3775 KF_REDIRECT_UNPIN = 0x00000040,
3776 KF_REDIRECT_PIN = 0x00000080,
3777 KF_REDIRECT_COPY_CONTENTS = 0x00000200,
3778 KF_REDIRECT_DEL_SOURCE_CONTENTS = 0x00000400,
3779 KF_REDIRECT_EXCLUDE_ALL_KNOWN_SUBFOLDERS = 0x00000800
3780 } KF_REDIRECT_FLAGS;
3781
3782 [
3783 object,
3784 uuid(8BE2D872-86AA-4d47-B776-32CCA40C7018),
3785 pointer_default(ref)
3786 ]
3787 interface IKnownFolderManager : IUnknown
3788 {
3789 typedef [v1_enum] enum tagFFFP_MODE
3790 {
3791 FFFP_EXACTMATCH,
3792 FFFP_NEARESTPARENTMATCH
3793 } FFFP_MODE;
3794
3795 HRESULT FolderIdFromCsidl(
3796 [in] int nCsidl,
3797 [out] KNOWNFOLDERID *pfid);
3798
3799 HRESULT FolderIdToCsidl(
3800 [in] REFKNOWNFOLDERID rfid,
3801 [out] int *pnCsidl);
3802
3803 HRESULT GetFolderIds(
3804 [out, size_is(, *pCount)] KNOWNFOLDERID **ppKFId,
3805 [in, out] UINT *pCount);
3806
3807 HRESULT GetFolder(
3808 [in] REFKNOWNFOLDERID rfid,
3809 [out] IKnownFolder **ppkf);
3810
3811 HRESULT GetFolderByName(
3812 [in, string] LPCWSTR pszCanonicalName,
3813 [out] IKnownFolder **ppkf);
3814
3815 HRESULT RegisterFolder(
3816 [in] REFKNOWNFOLDERID rfid,
3817 [in] KNOWNFOLDER_DEFINITION const *pKFD);
3818
3819 HRESULT UnregisterFolder(
3820 [in] REFKNOWNFOLDERID rfid);
3821
3822 HRESULT FindFolderFromPath(
3823 [in, string] LPCWSTR pszPath,
3824 [in] FFFP_MODE mode,
3825 [out] IKnownFolder **ppkf);
3826
3827 HRESULT FindFolderFromIDList(
3828 [in] PCIDLIST_ABSOLUTE pidl,
3829 [out] IKnownFolder **ppkf);
3830
3831 HRESULT Redirect(
3832 [in] REFKNOWNFOLDERID rfid,
3833 [in, unique] HWND hwnd,
3834 [in] KF_REDIRECT_FLAGS flags,
3835 [in, unique, string] LPCWSTR pszTargetPath,
3836 [in] UINT cFolders,
3837 [in, size_is(cFolders), unique] KNOWNFOLDERID const *pExclusion,
3838 [out, string] LPWSTR *ppszError);
3839 }
3840
3841 /* function for releasing structure returned from IKnownFolder::GetFolderDefinition */
3842 cpp_quote("static inline void FreeKnownFolderDefinitionFields(KNOWNFOLDER_DEFINITION *pKFD)")
3843 cpp_quote("{")
3844 cpp_quote(" CoTaskMemFree(pKFD->pszName);")
3845 cpp_quote(" CoTaskMemFree(pKFD->pszDescription);")
3846 cpp_quote(" CoTaskMemFree(pKFD->pszRelativePath);")
3847 cpp_quote(" CoTaskMemFree(pKFD->pszParsingName);")
3848 cpp_quote(" CoTaskMemFree(pKFD->pszTooltip);")
3849 cpp_quote(" CoTaskMemFree(pKFD->pszLocalizedName);")
3850 cpp_quote(" CoTaskMemFree(pKFD->pszIcon);")
3851 cpp_quote(" CoTaskMemFree(pKFD->pszSecurity);")
3852 cpp_quote("}")
3853
3854 typedef [v1_enum] enum ASSOCIATIONLEVEL {
3855 AL_MACHINE,
3856 AL_EFFECTIVE,
3857 AL_USER
3858 } ASSOCIATIONLEVEL;
3859
3860 typedef [v1_enum] enum ASSOCIATIONTYPE {
3861 AT_FILEEXTENSION,
3862 AT_URLPROTOCOL,
3863 AT_STARTMENUCLIENT,
3864 AT_MIMETYPE
3865 } ASSOCIATIONTYPE;
3866
3867 [
3868 object,
3869 uuid(4e530b0a-e611-4c77-a3ac-9031d022281b),
3870 pointer_default(unique)
3871 ]
3872 interface IApplicationAssociationRegistration : IUnknown
3873 {
3874 HRESULT QueryCurrentDefault(
3875 [in, string] LPCWSTR pszQuery,
3876 [in] ASSOCIATIONTYPE atQueryType,
3877 [in] ASSOCIATIONLEVEL alQueryLevel,
3878 [out, string] LPWSTR *ppszAssociation);
3879
3880 HRESULT QueryAppIsDefault(
3881 [in, string] LPCWSTR pszQuery,
3882 [in] ASSOCIATIONTYPE atQueryType,
3883 [in] ASSOCIATIONLEVEL alQueryLevel,
3884 [in, string] LPCWSTR pszAppRegistryName,
3885 [out] BOOL *pfDefault);
3886
3887 HRESULT QueryAppIsDefaultAll(
3888 [in] ASSOCIATIONLEVEL alQueryLevel,
3889 [in, string] LPCWSTR pszAppRegistryName,
3890 [out] BOOL* pfDefault);
3891
3892 HRESULT SetAppAsDefault(
3893 [in, string] LPCWSTR pszAppRegistryName,
3894 [in, string] LPCWSTR pszSet,
3895 [in] ASSOCIATIONTYPE atSetType);
3896
3897 HRESULT SetAppAsDefaultAll(
3898 [in, string] LPCWSTR pszAppRegistryName);
3899
3900 HRESULT ClearUserAssociations();
3901 }
3902
3903 [
3904 uuid(6332debf-87b5-4670-90c0-5e57b408a49e),
3905 object,
3906 pointer_default(unique)
3907 ]
3908 interface ICustomDestinationList : IUnknown
3909 {
3910 typedef [v1_enum] enum KNOWNDESTCATEGORY {
3911 KDC_FREQUENT = 1,
3912 KDC_RECENT
3913 } KNOWNDESTCATEGORY;
3914
3915 HRESULT SetAppID([in, string] LPCWSTR pszAppID);
3916
3917 HRESULT BeginList(
3918 [out] UINT *pcMinSlots,
3919 [in] REFIID riid,
3920 [out, iid_is(riid)] void **ppv);
3921
3922 HRESULT AppendCategory(
3923 [in, string] LPCWSTR pszCategory,
3924 [in] IObjectArray *poa);
3925
3926 HRESULT AppendKnownCategory([in] KNOWNDESTCATEGORY category);
3927 HRESULT AddUserTasks([in] IObjectArray *poa);
3928 HRESULT CommitList();
3929
3930 HRESULT GetRemovedDestinations(
3931 [in] REFIID riid,
3932 [out, iid_is(riid)] void **ppv);
3933
3934 HRESULT DeleteList([in, unique, string] LPCWSTR pszAppID);
3935 HRESULT AbortList();
3936 }
3937
3938 [
3939 uuid(ddefe873-6997-4e68-be26-39b633adbe12),
3940 object,
3941 pointer_default(unique)
3942 ]
3943 interface IQueryCancelAutoPlay : IUnknown
3944 {
3945 HRESULT AllowAutoPlay([in, string] LPCWSTR path,
3946 [in] DWORD content_type,
3947 [in, string] LPCWSTR label,
3948 [in] DWORD serial_number);
3949 }
3950
3951 [
3952 uuid(d594d0d8-8da7-457b-b3b4-ce5dbaac0b88),
3953 pointer_default(unique)
3954 ]
3955 interface ITransferAdviseSink : IUnknown
3956 {
3957 [v1_enum] enum _TRANSFER_ADVISE_STATE
3958 {
3959 TS_NONE = 0,
3960 TS_PERFORMING = 1,
3961 TS_PREPARING = 2,
3962 TS_INDETERMINATE = 4
3963 };
3964 typedef DWORD TRANSFER_ADVISE_STATE;
3965
3966 HRESULT UpdateProgress([in] ULONGLONG size_current,
3967 [in] ULONGLONG size_total,
3968 [in] INT files_current,
3969 [in] INT files_total,
3970 [in] INT folders_current,
3971 [in] INT folders_total);
3972 HRESULT UpdateTransferState([in] TRANSFER_ADVISE_STATE state);
3973 HRESULT ConfirmOverwrite([in] IShellItem *source,
3974 [in] IShellItem *dest_parent,
3975 [in, string] LPCWSTR name);
3976 HRESULT ConfirmEncryptLoss([in] IShellItem *source);
3977 HRESULT FileFailure([in] IShellItem *item,
3978 [in, unique, string] LPCWSTR itemname,
3979 [in] HRESULT hr,
3980 [in, out, unique, size_is(crename)] LPWSTR rename,
3981 [in] ULONG crename);
3982 HRESULT SubStreamFailure([in] IShellItem *item,
3983 [in, string] LPCWSTR stream,
3984 [in] HRESULT hr);
3985 HRESULT PropertyFailure([in] IShellItem *item,
3986 [in, unique] const PROPERTYKEY *key,
3987 [in] HRESULT hr);
3988 }
3989
3990 [v1_enum] enum _TRANSFER_SOURCE_FLAGS
3991 {
3992 TSF_NORMAL = 0,
3993 TSF_FAIL_EXIST = 0,
3994 TSF_RENAME_EXIST = 0x1,
3995 TSF_OVERWRITE_EXIST = 0x2,
3996 TSF_ALLOW_DECRYPTION = 0x4,
3997 TSF_NO_SECURITY = 0x8,
3998 TSF_COPY_CREATION_TIME = 0x10,
3999 TSF_COPY_WRITE_TIME = 0x20,
4000 TSF_USE_FULL_ACCESS = 0x40,
4001 TSF_DELETE_RECYCLE_IF_POSSIBLE = 0x80,
4002 TSF_COPY_HARD_LINK = 0x100,
4003 TSF_COPY_LOCALIZED_NAME = 0x200,
4004 TSF_MOVE_AS_COPY_DELETE = 0x400,
4005 TSF_SUSPEND_SHELLEVENTS = 0x800
4006 };
4007 typedef DWORD TRANSFER_SOURCE_FLAGS;
4008
4009 [
4010 uuid(00adb003-bde9-45c6-8e29-d09f9353e108),
4011 object,
4012 pointer_default(unique)
4013 ]
4014 interface ITransferSource : IUnknown
4015 {
4016 HRESULT Advise([in] ITransferAdviseSink *sink, [out] DWORD *cookie);
4017 HRESULT Unadvise([in] DWORD cookie);
4018 HRESULT SetProperties([in] IPropertyChangeArray *array);
4019 HRESULT OpenItem([in] IShellItem *item,
4020 [in] TRANSFER_SOURCE_FLAGS flags,
4021 [in] REFIID riid,
4022 [out, iid_is(riid)] void **ppv);
4023 HRESULT MoveItem([in] IShellItem *item,
4024 [in] IShellItem *parent_dest,
4025 [in, string] LPCWSTR name_dest,
4026 [in] TRANSFER_SOURCE_FLAGS flags,
4027 [out] IShellItem **newitem);
4028 HRESULT RecycleItem([in] IShellItem *source,
4029 [in] IShellItem *parent_dest,
4030 [in] TRANSFER_SOURCE_FLAGS flags,
4031 [out] IShellItem **new_dest);
4032 HRESULT RemoveItem([in] IShellItem *source, [in] TRANSFER_SOURCE_FLAGS flags);
4033 HRESULT RenameItem([in] IShellItem *source,
4034 [in, string] LPCWSTR newname,
4035 [in] TRANSFER_SOURCE_FLAGS flags,
4036 [out] IShellItem **new_dest);
4037 HRESULT LinkItem([in] IShellItem *source,
4038 [in] IShellItem *parent_dest,
4039 [in, unique, string] LPCWSTR new_name,
4040 [in] TRANSFER_SOURCE_FLAGS flags,
4041 [out] IShellItem **new_dest);
4042 HRESULT ApplyPropertiesToItem([in] IShellItem *source, [out] IShellItem **newitem);
4043 HRESULT GetDefaultDestinationName([in] IShellItem *source,
4044 [in] IShellItem *parent_dest,
4045 [out, string] LPWSTR *dest_name);
4046 HRESULT EnterFolder([in] IShellItem *child_folder);
4047 HRESULT LeaveFolder([in] IShellItem *child_folder);
4048 }
4049
4050 [
4051 uuid(48addd32-3ca5-4124-abe3-b5a72531b207),
4052 object,
4053 pointer_default(unique)
4054 ]
4055 interface ITransferDestination : IUnknown
4056 {
4057 HRESULT Advise([in] ITransferAdviseSink *sink, [out] DWORD *cookie);
4058 HRESULT Unadvise([in] DWORD cookie);
4059 HRESULT CreateItem([in, string] LPCWSTR name,
4060 [in] DWORD attr,
4061 [in] ULONGLONG size,
4062 [in] TRANSFER_SOURCE_FLAGS flags,
4063 [in] REFIID riid,
4064 [out, iid_is(riid)] void **ppv,
4065 [in] REFIID resources,
4066 [out, iid_is(riid)] void **presources);
4067 }
4068
4069 /*****************************************************************************
4070 * ShellObjects typelibrary
4071 */
4072 [
4073 uuid(50A7E9B1-70EF-11D1-B75A-00A0C90564FE),
4074 lcid(0x0000),
4075 version(1.0)
4076 ]
4077 library ShellObjects
4078 {
4079 [
4080 uuid(71F96385-DDD6-48D3-A0C1-AE06E8B055FB)
4081 ]
4082 coclass ExplorerBrowser
4083 {
4084 interface IExplorerBrowser;
4085 }
4086
4087 [
4088 uuid(DC1C5A9C-E88A-4DDE-A5A1-60F82A20AEF7)
4089 ]
4090 coclass FileOpenDialog
4091 {
4092 interface IFileOpenDialog;
4093 }
4094
4095 [
4096 uuid(C0B4E2F3-BA21-4773-8DBA-335EC946EB8B)
4097 ]
4098 coclass FileSaveDialog
4099 {
4100 interface IFileSaveDialog;
4101 }
4102
4103 [
4104 uuid(AE054212-3535-4430-83ED-D501AA6680E6)
4105 ]
4106 coclass NamespaceTreeControl
4107 {
4108 interface INameSpaceTreeControl2;
4109 }
4110
4111 [
4112 uuid(4df0c730-df9d-4ae3-9153-aa6b82e9795a)
4113 ]
4114 coclass KnownFolderManager
4115 {
4116 interface IKnownFolderManager;
4117 }
4118
4119 [
4120 uuid(591209c7-767b-42b2-9fba-44ee4615f2c7)
4121 ]
4122 coclass ApplicationAssociationRegistration
4123 {
4124 interface IApplicationAssociationRegistration;
4125 }
4126
4127 [
4128 uuid(00021401-0000-0000-c000-000000000046)
4129 ]
4130 coclass ShellLink
4131 {
4132 interface IShellLinkW;
4133 }
4134
4135 [
4136 uuid(56fdf344-fd6d-11d0-958a-006097c9a090)
4137 ]
4138 coclass TaskbarList
4139 {
4140 interface ITaskbarList4;
4141 }
4142
4143 [
4144 uuid(77f10cf0-3db5-4966-b520-b7c54fd35ed6)
4145 ]
4146 coclass DestinationList {
4147 interface ICustomDestinationList;
4148 }
4149
4150 [
4151 uuid(331f1768-05a9-4ddd-b86e-dae34ddc998a)
4152 ]
4153 coclass QueryCancelAutoPlay
4154 {
4155 interface IQueryCancelAutoPlay;
4156 }
4157
4158 [
4159 uuid(9ac9fbe1-e0a2-4ad6-b4ee-e212013ea917)
4160 ]
4161 coclass ShellItem {
4162 interface IShellItem2;
4163 }
4164 }
4165
4166 enum _OPPROGDLGF
4167 {
4168 OPPROGDLG_DEFAULT = 0,
4169 OPPROGDLG_ENABLEPAUSE = 0x80,
4170 OPPROGDLG_ALLOWUNDO = 0x100,
4171 OPPROGDLG_DONTDISPLAYSOURCEPATH = 0x200,
4172 OPPROGDLG_DONTDISPLAYDESTPATH = 0x400,
4173 OPPROGDLG_NOMULTIDAYESTIMATES = 0x800,
4174 OPPROGDLG_DONTDISPLAYLOCATIONS = 0x1000
4175 };
4176 typedef DWORD OPPROGDLGF;
4177
4178 enum _PDMODE
4179 {
4180 PDM_DEFAULT = 0,
4181 PDM_RUN = 0x1,
4182 PDM_PREFLIGHT = 0x2,
4183 PDM_UNDOING = 0x4,
4184 PDM_ERRORSBLOCKING = 0x8,
4185 PDM_INDETERMINATE = 0x10
4186 };
4187 typedef DWORD PDMODE;
4188
4189 typedef enum PDOPSTATUS
4190 {
4191 PDOPS_RUNNING = 1,
4192 PDOPS_PAUSED = 2,
4193 PDOPS_CANCELLED = 3,
4194 PDOPS_STOPPED = 4,
4195 PDOPS_ERRORS = 5
4196 } PDOPSTATUS;
4197
4198 typedef enum _SPACTION
4199 {
4200 SPACTION_NONE = 0,
4201 SPACTION_MOVING = 1,
4202 SPACTION_COPYING = 2,
4203 SPACTION_RECYCLING = 3,
4204 SPACTION_APPLYINGATTRIBS = 4,
4205 SPACTION_DOWNLOADING = 5,
4206 SPACTION_SEARCHING_INTERNET = 6,
4207 SPACTION_CALCULATING = 7,
4208 SPACTION_UPLOADING = 8,