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