kernel32: Forward RtlRaiseException to ntdll on ARM.
[wine] / include / 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] LPITEMIDLIST *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] LPCITEMIDLIST pidl,
228         [in] LPBC pbcReserved,
229         [in] REFIID riid,
230         [out, iid_is(riid)] void **ppvOut);
231
232     HRESULT BindToStorage(
233         [in] LPCITEMIDLIST 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] LPCITEMIDLIST pidl1,
241         [in] LPCITEMIDLIST 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)] LPCITEMIDLIST *apidl,
251         [in, out] SFGAOF *rgfInOut);
252
253     HRESULT GetUIObjectOf(
254         [in] HWND hwndOwner,
255         [in] UINT cidl,
256         [in, size_is(cidl)] LPCITEMIDLIST *apidl,
257         [in] REFIID riid,
258         [in, out, unique] UINT *prgfInOut,
259         [out, iid_is(riid)] void **ppvOut);
260
261     HRESULT GetDisplayNameOf(
262         [in] LPCITEMIDLIST pidl,
263         [in] SHGDNF uFlags,
264         [out] STRRET *lpName);
265
266     HRESULT SetNameOf(
267         [in] HWND hwnd,
268         [in] LPCITEMIDLIST pidl,
269         [in, string] LPCOLESTR lpszName,
270         [in] SHGDNF uFlags,
271         [out] LPITEMIDLIST *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] LPCITEMIDLIST pidl, [in] const SHCOLUMNID *pscid, [out] VARIANT *pv);
336     HRESULT GetDetailsOf( [in] LPCITEMIDLIST pidl, [in] UINT iColumn, [out] SHELLDETAILS *psd);
337     HRESULT MapColumnToSCID( [in] UINT iColumn, [in] SHCOLUMNID *pscid );
338 }
339
340 /*****************************************************************************
341  * IShellItem interface
342  */
343 [
344     object,
345     uuid(43826d1e-e718-42ee-bc55-a1e261c37bfe),
346     pointer_default(unique)
347 ]
348 interface IShellItem : IUnknown
349 {
350     typedef [v1_enum] enum {
351         SIGDN_NORMALDISPLAY                = 0,
352         SIGDN_PARENTRELATIVEPARSING        = 0x80018001,
353         SIGDN_DESKTOPABSOLUTEPARSING       = 0x80028000,
354         SIGDN_PARENTRELATIVEEDITING        = 0x80031001,
355         SIGDN_DESKTOPABSOLUTEEDITING       = 0x8004c000,
356         SIGDN_FILESYSPATH                  = 0x80058000,
357         SIGDN_URL                          = 0x80068000,
358         SIGDN_PARENTRELATIVEFORADDRESSBAR  = 0x8007c001,
359         SIGDN_PARENTRELATIVE               = 0x80080001
360     } SIGDN; /* & 0xFFFF => SHGDN */
361
362     [v1_enum] enum _SICHINTF
363     {
364         SICHINT_DISPLAY                       = 0x00000000,
365         SICHINT_CANONICAL                     = 0x10000000,
366         SICHINT_TEST_FILESYSPATH_IF_NOT_EQUAL = 0x20000000,
367         SICHINT_ALLFIELDS                     = 0x80000000
368     };
369     typedef DWORD SICHINTF;
370
371     HRESULT BindToHandler(
372         [in] IBindCtx *pbc,
373         [in] REFGUID rbhid,
374         [in] REFIID riid,
375         [out, iid_is(riid)] void **ppvOut);
376
377     HRESULT GetParent( [out] IShellItem **ppsi );
378
379     HRESULT GetDisplayName(
380         [in] SIGDN sigdnName,
381         [out] LPWSTR *ppszName);
382
383     HRESULT GetAttributes(
384         [in] SFGAOF sfgaoMask,
385         [out] SFGAOF *psfgaoAttribs);
386
387     HRESULT Compare(
388         [in] IShellItem *psi,
389         [in] SICHINTF hint,
390         [out] int *piOrder);
391 }
392
393 /*****************************************************************************
394  * IShellItem2 interface
395  */
396 [
397     object,
398     uuid(7E9FB0D3-919F-4307-AB2E-9B1860310C93),
399     pointer_default(unique)
400 ]
401 interface IShellItem2 : IShellItem
402 {
403     HRESULT GetPropertyStore(
404         [in] GETPROPERTYSTOREFLAGS flags,
405         [in] REFIID riid,
406         [out, iid_is(riid)] void **ppv);
407
408     HRESULT GetPropertyStoreWithCreateObject(
409         [in] GETPROPERTYSTOREFLAGS flags,
410         [in] IUnknown *punkCreateObject,
411         [in] REFIID riid,
412         [out, iid_is(riid)] void **ppv);
413
414     HRESULT GetPropertyStoreForKeys(
415         [in, size_is(cKeys)] const PROPERTYKEY *rgKeys,
416         [in] UINT cKeys,
417         [in] GETPROPERTYSTOREFLAGS flags,
418         [in] REFIID riid,
419         [out, iid_is(riid)] void **ppv);
420
421     HRESULT GetPropertyDescriptionList(
422         [in] REFPROPERTYKEY keyType,
423         [in] REFIID riid,
424         [out, iid_is(riid)] void **ppv);
425
426     HRESULT Update(
427         [in, unique] IBindCtx *pbc);
428
429     HRESULT GetProperty(
430         [in] REFPROPERTYKEY key,
431         [out] PROPVARIANT *ppropvar);
432
433     HRESULT GetCLSID(
434         [in] REFPROPERTYKEY key,
435         [out] CLSID *pclsid);
436
437     HRESULT GetFileTime (
438         [in] REFPROPERTYKEY key,
439         [out] FILETIME *pft);
440
441     HRESULT GetInt32(
442         [in] REFPROPERTYKEY key,
443         [out] int *pi);
444
445     HRESULT GetString(
446         [in] REFPROPERTYKEY key,
447         [out, string] LPWSTR *ppsz);
448
449     HRESULT GetUInt32(
450         [in] REFPROPERTYKEY key,
451         [out] ULONG *pui);
452
453     HRESULT GetUInt64(
454         [in] REFPROPERTYKEY key,
455         [out] ULONGLONG *pull);
456
457     HRESULT GetBool(
458         [in] REFPROPERTYKEY key,
459         [out] BOOL *pf);
460 }
461
462 typedef enum tagNWMF {
463     NWMF_UNLOADING        = 0x0001,
464     NWMF_USERINITED       = 0x0002,
465     NWMF_FIRST            = 0x0004,
466     NWMF_OVERRIDEKEY      = 0x0008,
467     NWMF_SHOWHELP         = 0x0010,
468     NWMF_HTMLDIALOG       = 0x0020,
469     NWMF_FROMDIALOGCHILD  = 0x0040,
470     NWMF_USERREQUESTED    = 0x0080,
471     NWMF_USERALLOWED      = 0x0100
472 } NWMF;
473
474 [
475     uuid(d2bc4c84-3f72-4a52-a604-7bcbf3982cbb),
476     object,
477     pointer_default(unique)
478 ]
479 interface INewWindowManager : IUnknown
480 {
481     HRESULT EvaluateNewWindow(
482         [in, string] LPCWSTR pszUrl,
483         [in, string] LPCWSTR pszName,
484         [in, string] LPCWSTR pszUrlContext,
485         [in, string] LPCWSTR pszFeatures,
486         [in]         BOOL fReplace,
487         [in]         DWORD dwFlags,
488         [in]         DWORD dwUserActionTime);
489 }
490
491 cpp_quote("#define SID_SNewWindowManager IID_INewWindowManager")
492
493 /*****************************************************************************
494  * IEnumShellItems interface
495  */
496 [
497  object,
498  uuid(70629033-E363-4A28-A567-0DB78006E6D7),
499  pointer_default(unique)
500 ]
501 interface IEnumShellItems : IUnknown
502 {
503     [local] HRESULT Next(
504         [in] ULONG celt,
505         [out, size_is(celt), length_is(*pceltFetched)] IShellItem **rgelt,
506         [out] ULONG *pceltFetched);
507
508     [call_as(Next)] HRESULT RemoteNext(
509         [in] ULONG celt,
510         [out, size_is(celt), length_is(*pceltFetched)] IShellItem **rgelt,
511         [out] ULONG *pceltFetched);
512
513     HRESULT Skip(
514         [in] ULONG celt);
515
516     HRESULT Reset();
517
518     HRESULT Clone(
519         [out] IEnumShellItems **ppenum);
520 }
521
522 /*****************************************************************************
523  * IShellItemArray interface
524  */
525 [
526  object,
527  uuid(B63EA76D-1F85-456F-A19C-48159EFA858B),
528  pointer_default(unique)
529 ]
530 interface IShellItemArray : IUnknown
531 {
532     typedef [v1_enum] enum SIATTRIBFLAGS {
533         SIATTRIBFLAGS_AND            = 0x0001,
534         SIATTRIBFLAGS_OR             = 0x0002,
535         SIATTRIBFLAGS_APPCOMPAT      = 0x0003,
536         SIATTRIBFLAGS_MASK           = 0x0003,
537         SIATTRIBFLAGS_ALLITEMS       = 0x4000
538     } SIATTRIBFLAGS;
539     cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(SIATTRIBFLAGS)")
540
541     HRESULT BindToHandler(
542         [in, unique] IBindCtx *pbc,
543         [in] REFGUID bhid,
544         [in] REFIID riid,
545         [out, iid_is(riid)] void **ppvOut);
546
547     HRESULT GetPropertyStore(
548         [in] GETPROPERTYSTOREFLAGS flags,
549         [in] REFIID riid,
550         [out, iid_is(riid)] void **ppv);
551
552     HRESULT GetPropertyDescriptionList(
553         [in] REFPROPERTYKEY keyType,
554         [in] REFIID riid,
555         [out, iid_is(riid)] void **ppv);
556
557     HRESULT GetAttributes(
558         [in] SIATTRIBFLAGS AttribFlags,
559         [in] SFGAOF sfgaoMask,
560         [out] SFGAOF *psfgaoAttribs);
561
562     HRESULT GetCount(
563         [out] DWORD *pdwNumItems);
564
565     HRESULT GetItemAt(
566         [in] DWORD dwIndex,
567         [out] IShellItem **ppsi);
568
569     HRESULT EnumItems(
570         [out] IEnumShellItems **ppenumShellItems);
571
572 }
573
574 typedef [v1_enum] enum DATAOBJ_GET_ITEM_FLAGS
575 {
576     DOGIF_DEFAULT       = 0x0,
577     DOGIF_TRAVERSE_LINK = 0x1,
578     DOGIF_NO_HDROP      = 0x2,
579     DOGIF_NO_URL        = 0x4,
580     DOGIF_ONLY_IF_ONE   = 0x8
581 } DATAOBJ_GET_ITEM_FLAGS;
582 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(DATAOBJ_GET_ITEM_FLAGS)")
583
584 cpp_quote("HRESULT WINAPI SHGetNameFromIDList(PCIDLIST_ABSOLUTE pidl, SIGDN sigdnName, PWSTR *ppszName);")
585 cpp_quote("HRESULT WINAPI SHCreateItemFromParsingName(PCWSTR pszPath, IBindCtx *pbc, REFIID riid, void **ppv);")
586 cpp_quote("HRESULT WINAPI SHCreateItemFromIDList(PCIDLIST_ABSOLUTE pidl, REFIID riid, void **ppv);")
587 cpp_quote("HRESULT WINAPI SHGetItemFromDataObject(IDataObject *pdtobj, DATAOBJ_GET_ITEM_FLAGS dwFlags, REFIID riid, void **ppv);")
588 cpp_quote("HRESULT WINAPI SHGetIDListFromObject(IUnknown *punk, PIDLIST_ABSOLUTE *ppidl);")
589 cpp_quote("HRESULT WINAPI SHGetItemFromObject(IUnknown *punk, REFIID riid, void **ppv);")
590 cpp_quote("HRESULT WINAPI SHCreateShellItemArray(PCIDLIST_ABSOLUTE pidlParent, IShellFolder* psf, UINT cidl, PCUITEMID_CHILD_ARRAY ppidl, IShellItemArray **ppsiItemArray);")
591 cpp_quote("HRESULT WINAPI SHCreateShellItemArrayFromShellItem(IShellItem *psi, REFIID riid, void **ppv);")
592 cpp_quote("HRESULT WINAPI SHCreateShellItemArrayFromDataObject(IDataObject *pdo, REFIID riid, void **ppv);")
593
594 /*****************************************************************************
595  * IShellItemFilter interface
596  */
597 [
598  object,
599  uuid(2659B475-EEB8-48B7-8F07-B378810F48CF),
600  pointer_default(unique)
601 ]
602 interface IShellItemFilter : IUnknown
603 {
604     HRESULT IncludeItem(
605         [in] IShellItem *psi);
606
607     HRESULT GetEnumFlagsForItem(
608         [in] IShellItem *psi,
609         [out] SHCONTF *pgrfFlags);
610 }
611
612 /*****************************************************************************
613  * FOLDERSETTINGS
614  */
615 typedef char *LPVIEWSETTINGS;
616
617 typedef enum
618 {
619     FWF_AUTOARRANGE         = 0x00000001,
620     FWF_ABBREVIATEDNAMES    = 0x00000002,
621     FWF_SNAPTOGRID          = 0x00000004,
622     FWF_OWNERDATA           = 0x00000008,
623     FWF_BESTFITWINDOW       = 0x00000010,
624     FWF_DESKTOP             = 0x00000020,
625     FWF_SINGLESEL           = 0x00000040,
626     FWF_NOSUBFOLDERS        = 0x00000080,
627     FWF_TRANSPARENT         = 0x00000100,
628     FWF_NOCLIENTEDGE        = 0x00000200,
629     FWF_NOSCROLL            = 0x00000400,
630     FWF_ALIGNLEFT           = 0x00000800,
631     FWF_NOICONS             = 0x00001000,
632     FWF_SHOWSELALWAYS       = 0x00002000,
633     FWF_NOVISIBLE           = 0x00004000,
634     FWF_SINGLECLICKACTIVATE = 0x00008000,
635     FWF_NOWEBVIEW           = 0x00010000,
636     FWF_HIDEFILENAMES       = 0x00020000,
637     FWF_CHECKSELECT         = 0x00040000,
638     FWF_NOENUMREFRESH       = 0x00080000,
639     FWF_NOGROUPING          = 0x00100000,
640     FWF_FULLROWSELECT       = 0x00200000,
641     FWF_NOFILTERS           = 0x00400000,
642     FWF_NOCOLUMNHEADER      = 0x00800000,
643     FWF_NOHEADERINALLVIEWS  = 0x01000000,
644     FWF_EXTENDEDTILES       = 0x02000000,
645     FWF_TRICHECKSELECT      = 0x04000000,
646     FWF_AUTOCHECKSELECT     = 0x08000000,
647     FWF_NOBROWSERVIEWSTATE  = 0x10000000,
648     FWF_SUBSETGROUPS        = 0x20000000,
649     FWF_USESEARCHFOLDER     = 0x40000000,
650     FWF_ALLOWRTLREADING     = 0x80000000
651 } FOLDERFLAGS;
652
653 typedef enum
654 {
655     FVM_AUTO       =-1,
656     FVM_ICON       = 1,
657     FVM_FIRST      = FVM_ICON,
658     FVM_SMALLICON  = 2,
659     FVM_LIST       = 3,
660     FVM_DETAILS    = 4,
661     FVM_THUMBNAIL  = 5,
662     FVM_TILE       = 6,
663     FVM_THUMBSTRIP = 7,
664     FVM_CONTENT    = 8,
665     FVM_LAST       = FVM_CONTENT
666 } FOLDERVIEWMODE;
667
668 typedef struct
669 {
670     UINT ViewMode;
671     UINT fFlags;
672 } FOLDERSETTINGS, *PFOLDERSETTINGS, *LPFOLDERSETTINGS;
673 typedef const FOLDERSETTINGS *LPCFOLDERSETTINGS;
674
675 /*****************************************************************************
676  * IShellIcon interface
677  */
678 [
679     uuid(000214e5-0000-0000-c000-000000000046),
680     object,
681     pointer_default(unique)
682 ]
683 interface IShellIcon : IUnknown
684 {
685     HRESULT GetIconOf(
686         [in] PCUITEMID_CHILD pidl,
687         [in] UINT flags,
688         [out] int *pIconIndex);
689 }
690
691 /*****************************************************************************
692  * IShellView interface
693  */
694 interface IShellBrowser;  /* forward declaration */
695 [
696     object,
697     uuid(000214e3-0000-0000-c000-000000000046),
698     pointer_default(unique)
699 ]
700 interface IShellView : IOleWindow
701 {
702     typedef IShellView *LPSHELLVIEW;
703
704     cpp_quote("#define SVSI_DESELECT       0x00000000")
705     cpp_quote("#define SVSI_SELECT         0x00000001")
706     cpp_quote("#define SVSI_EDIT           0x00000003")
707     cpp_quote("#define SVSI_DESELECTOTHERS 0x00000004")
708     cpp_quote("#define SVSI_ENSUREVISIBLE  0x00000008")
709     cpp_quote("#define SVSI_FOCUSED        0x00000010")
710     cpp_quote("#define SVSI_TRANSLATEPT    0x00000020")
711     cpp_quote("#define SVSI_SELECTIONMARK  0x00000040")
712     cpp_quote("#define SVSI_POSITIONITEM   0x00000080")
713     cpp_quote("#define SVSI_CHECK          0x00000100")
714     cpp_quote("#define SVSI_NOSTATECHANGE  0x80000000")
715
716     typedef UINT SVSIF;
717
718     typedef enum
719     {
720         SVGIO_BACKGROUND     = 0x00000000,
721         SVGIO_SELECTION      = 0x00000001,
722         SVGIO_ALLVIEW        = 0x00000002,
723         SVGIO_CHECKED        = 0x00000003,
724         SVGIO_TYPE_MASK      = 0x0000000f,
725         SVGIO_FLAG_VIEWORDER = 0x80000000,
726     } SVGIO;
727
728     typedef enum
729     {
730         SVUIA_DEACTIVATE       = 0,
731         SVUIA_ACTIVATE_NOFOCUS = 1,
732         SVUIA_ACTIVATE_FOCUS   = 2,
733         SVUIA_INPLACEACTIVATE  = 3
734     } SVUIA_STATUS;
735
736     HRESULT TranslateAccelerator( [in] MSG *pmsg );
737     HRESULT EnableModeless( [in] BOOL fEnable );
738     HRESULT UIActivate( [in] UINT uState );
739     HRESULT Refresh();
740     HRESULT CreateViewWindow(
741         [in] IShellView *psvPrevious,
742         [in] LPCFOLDERSETTINGS lpfs,
743         [in] IShellBrowser *psb,
744         [out] RECT *prcView,
745         [out] HWND *phWnd);
746
747     HRESULT DestroyViewWindow();
748     HRESULT GetCurrentInfo( [out] LPFOLDERSETTINGS lpfs );
749
750     [local] HRESULT AddPropertySheetPages(
751         [in] DWORD dwReserved,
752         [in] LPFNSVADDPROPSHEETPAGE pfn,
753         [in] LPARAM lparam);
754
755     HRESULT SaveViewState();
756     HRESULT SelectItem(
757         [in] LPCITEMIDLIST pidlItem,
758         [in] SVSIF uFlags);
759     HRESULT GetItemObject(
760         [in] UINT uItem,
761         [in] REFIID riid,
762         [out, iid_is(riid)] void **ppv);
763 }
764
765 [
766     object,
767     uuid(88e39e80-3578-11cf-ae69-08002b2e1262),
768     pointer_default(unique)
769 ]
770 interface IShellView2 : IShellView
771 {
772     typedef GUID SHELLVIEWID;
773 cpp_quote("#include <pshpack8.h>")
774     typedef struct _SV2CVW2_PARAMS
775     {
776         DWORD cbSize;
777         IShellView *psvPrev;
778         LPCFOLDERSETTINGS pfs;
779         IShellBrowser *psbOwner;
780         RECT *prcView;
781         SHELLVIEWID const *pvid;
782         HWND hwndView;
783     } SV2CVW2_PARAMS, *LPSV2CVW2_PARAMS;
784 cpp_quote("#include <poppack.h>")
785
786     HRESULT GetView(
787         [in, out] SHELLVIEWID *view_guid,
788         [in] ULONG view_type
789     );
790     HRESULT CreateViewWindow2(
791         [in] LPSV2CVW2_PARAMS view_params
792     );
793     HRESULT HandleRename(
794         [in] LPCITEMIDLIST new_pidl
795     );
796     HRESULT SelectAndPositionItem(
797         [in] LPCITEMIDLIST item,
798         [in] UINT flags,
799         [in] POINT *point
800     );
801 }
802
803 /*****************************************************************************
804  * IFolderView interface
805  */
806 [
807     uuid(cde725b0-ccc9-4519-917e-325d72fab4ce),
808     object,
809     pointer_default(unique)
810 ]
811 interface IFolderView : IUnknown
812 {
813     HRESULT GetCurrentViewMode( [out] UINT *mode );
814     HRESULT SetCurrentViewMode( [in] UINT mode );
815     HRESULT GetFolder( [in] REFIID riid, [out, iid_is(riid)] void **ppv );
816     HRESULT Item(
817         [in] int index,
818         [out] PITEMID_CHILD *ppidl
819     );
820     HRESULT ItemCount(
821         [in] UINT flags,
822         [out] int *items
823     );
824     HRESULT Items(
825         [in] UINT flags,
826         [in] REFIID riid,
827         [out, iid_is(riid)] void **ppv
828     );
829     HRESULT GetSelectionMarkedItem( [out] int *item );
830     HRESULT GetFocusedItem( [out] int *item );
831     HRESULT GetItemPosition(
832         [in] PCUITEMID_CHILD pidl,
833         [out] POINT* ppt
834     );
835     HRESULT GetSpacing( [in, out, unique] POINT* pt );
836     HRESULT GetDefaultSpacing( [out] POINT* pt );
837     HRESULT GetAutoArrange();
838     HRESULT SelectItem(
839         [in] int item,
840         [in] DWORD flags
841     );
842     HRESULT SelectAndPositionItems(
843         [in] UINT cidl,
844         [in, size_is(cidl)] PCUITEMID_CHILD_ARRAY apidl,
845         [in, unique, size_is(cidl)] POINT* apt,
846         [in] DWORD flags
847     );
848 }
849
850 /*****************************************************************************
851  * IShellBrowser interface
852  */
853 [
854     object,
855     uuid(000214e2-0000-0000-c000-000000000046),
856     pointer_default(unique)
857 ]
858 interface IShellBrowser : IOleWindow
859 {
860     typedef IShellBrowser *LPSHELLBROWSER;
861
862 cpp_quote("#define SBSP_DEFBROWSER            0x00000000")
863 cpp_quote("#define SBSP_SAMEBROWSER           0x00000001")
864 cpp_quote("#define SBSP_NEWBROWSER            0x00000002")
865 cpp_quote("#define SBSP_DEFMODE               0x00000000")
866 cpp_quote("#define SBSP_OPENMODE              0x00000010")
867 cpp_quote("#define SBSP_EXPLOREMODE           0x00000020")
868 cpp_quote("#define SBSP_HELPMODE              0x00000040")
869 cpp_quote("#define SBSP_NOTRANSFERHIST        0x00000080")
870 cpp_quote("#define SBSP_ABSOLUTE              0x00000000")
871 cpp_quote("#define SBSP_RELATIVE              0x00001000")
872 cpp_quote("#define SBSP_PARENT                0x00002000")
873 cpp_quote("#define SBSP_NAVIGATEBACK          0x00004000")
874 cpp_quote("#define SBSP_NAVIGATEFORWARD       0x00008000")
875 cpp_quote("#define SBSP_ALLOW_AUTONAVIGATE    0x00010000")
876 cpp_quote("#define SBSP_KEEPSAMETEMPLATE      0x00020000")
877 cpp_quote("#define SBSP_KEEPWORDWHEELTEXT     0x00040000")
878 cpp_quote("#define SBSP_ACTIVATE_NOFOCUS      0x00080000")
879 cpp_quote("#define SBSP_CREATENOHISTORY       0x00100000")
880 cpp_quote("#define SBSP_PLAYNOSOUND           0x00200000")
881 cpp_quote("#define SBSP_CALLERUNTURUSTED      0x00800000")
882 cpp_quote("#define SBSP_TRUSTFIRSTDOWNLOAD    0x01000000")
883 cpp_quote("#define SBSP_UNTRUSTEDFORDOWNLOAD  0x02000000")
884 cpp_quote("#define SBSP_NOAUTOSELECT          0x04000000")
885 cpp_quote("#define SBSP_WRITENOHISTORY        0x08000000")
886 cpp_quote("#define SBSP_TRUSTEDFORACTIVEX     0x10000000")
887 cpp_quote("#define SBSP_FEEDNAVIGATION        0x20000000")
888 cpp_quote("#define SBSP_REDIRECT              0x40000000")
889 cpp_quote("#define SBSP_INITIATEDBYHLINKFRAME 0x80000000")
890
891 cpp_quote("#define FCW_STATUS      0x0001")
892 cpp_quote("#define FCW_TOOLBAR     0x0002")
893 cpp_quote("#define FCW_TREE        0x0003")
894 cpp_quote("#define FCW_INTERNETBAR 0x0006")
895 cpp_quote("#define FCW_PROGRESS    0x0008")
896
897 cpp_quote("#define FCT_MERGE       0x0001")
898 cpp_quote("#define FCT_CONFIGABLE  0x0002")
899 cpp_quote("#define FCT_ADDTOEND    0x0004")
900
901 cpp_quote("#if 0")
902     typedef LPARAM LPTBBUTTONSB;
903 cpp_quote("#else")
904 cpp_quote("#include <commctrl.h>")
905 cpp_quote("typedef LPTBBUTTON LPTBBUTTONSB;")
906 cpp_quote("#endif")
907
908     HRESULT InsertMenusSB(
909         [in] HMENU hmenuShared,
910         [in, out] LPOLEMENUGROUPWIDTHS lpMenuWidths);
911
912     HRESULT SetMenuSB(
913         [in] HMENU hmenuShared,
914         [in] HOLEMENU holemenuReserved,
915         [in] HWND hwndActiveObject);
916
917     HRESULT RemoveMenusSB( [in] HMENU hmenuShared );
918     HRESULT SetStatusTextSB( [in, unique] LPCOLESTR pszStatusText );
919     HRESULT EnableModelessSB( [in] BOOL fEnable );
920     HRESULT TranslateAcceleratorSB( [in] MSG *pmsg, [in] WORD wID );
921
922     HRESULT BrowseObject(
923         [in] LPCITEMIDLIST pidl,
924         [in] UINT wFlags);
925
926     HRESULT GetViewStateStream(
927         [in] DWORD grfMode,
928         [out] IStream **ppStrm);
929
930     HRESULT GetControlWindow(
931         [in] UINT id,
932         [out] HWND *phwnd);
933
934     [local] HRESULT SendControlMsg(
935         [in] UINT id,
936         [in] UINT uMsg,
937         [in] WPARAM wParam,
938         [in] LPARAM lParam,
939         [in] LRESULT *pret);
940
941     HRESULT QueryActiveShellView( [out] IShellView **ppshv );
942     HRESULT OnViewWindowActive( [in] IShellView *pshv );
943
944     [local]
945     HRESULT SetToolbarItems(
946         [in] LPTBBUTTONSB lpButtons,
947         [in] UINT nButtons,
948         [in] UINT uFlags);
949 }
950
951
952 /*****************************************************************************
953  * IShellLinkA interface
954  */
955 [
956     object,
957     uuid(000214ee-0000-0000-c000-000000000046),
958     pointer_default(unique)
959 ]
960 interface IShellLinkA : IUnknown
961 {
962     typedef enum
963     {
964         SLR_NO_UI               = 0x0001,
965         SLR_ANY_MATCH           = 0x0002,
966         SLR_UPDATE              = 0x0004,
967         SLR_NOUPDATE            = 0x0008,
968         SLR_NOSEARCH            = 0x0010,
969         SLR_NOTRACK             = 0x0020,
970         SLR_NOLINKINFO          = 0x0040,
971         SLR_INVOKE_MSI          = 0x0080,
972         SLR_NO_UI_WITH_MSG_PUMP = 0x0101,
973     } SLR_FLAGS;
974
975     typedef enum
976     {
977         SLGP_SHORTPATH   = 0x0001,
978         SLGP_UNCPRIORITY = 0x0002,
979         SLGP_RAWPATH     = 0x0004,
980     } SLGP_FLAGS;
981
982     HRESULT GetPath(
983         [out, size_is(cch)] LPSTR pszFile,
984         [in] int cch,
985         [in, out, unique] WIN32_FIND_DATAA *pfd,
986         [in] DWORD fFlags);
987
988     HRESULT GetIDList( [out] LPITEMIDLIST * ppidl );
989
990     HRESULT SetIDList( [in] LPCITEMIDLIST pidl );
991
992     HRESULT GetDescription(
993         [out, size_is(cch)] LPSTR pszName,
994         [in] int cch);
995
996     HRESULT SetDescription( [in] LPCSTR pszName );
997
998     HRESULT GetWorkingDirectory(
999         [out, size_is(cch)] LPSTR pszDir,
1000         [in] int cch);
1001
1002     HRESULT SetWorkingDirectory( [in] LPCSTR pszDir );
1003
1004     HRESULT GetArguments(
1005         [out, size_is(cch)] LPSTR pszArgs,
1006         [in] int cch);
1007
1008     HRESULT SetArguments( [in] LPCSTR pszArgs );
1009
1010     HRESULT GetHotkey( [out] WORD *pwHotkey );
1011
1012     HRESULT SetHotkey( [in] WORD wHotkey );
1013
1014     HRESULT GetShowCmd( [out] int *piShowCmd );
1015
1016     HRESULT SetShowCmd( [in] int iShowCmd );
1017
1018     HRESULT GetIconLocation(
1019         [out, size_is(cch)] LPSTR pszIconPath,
1020         [in] int cch,
1021         [out] int *piIcon);
1022
1023     HRESULT SetIconLocation(
1024         [in] LPCSTR pszIconPath,
1025         [in] int iIcon);
1026
1027     HRESULT SetRelativePath(
1028         [in] LPCSTR pszPathRel,
1029         [in] DWORD dwReserved);
1030
1031     HRESULT Resolve(
1032         [in] HWND hwnd,
1033         [in] DWORD fFlags);
1034
1035     HRESULT SetPath( [in] LPCSTR pszFile );
1036 }
1037
1038
1039 /*****************************************************************************
1040  * IShellLinkW interface
1041  */
1042 [
1043     object,
1044     uuid(000214f9-0000-0000-c000-000000000046),
1045     pointer_default(unique)
1046 ]
1047 interface IShellLinkW : IUnknown
1048 {
1049     HRESULT GetPath(
1050         [out, size_is(cch)] LPWSTR pszFile,
1051         [in] int cch,
1052         [in, out] WIN32_FIND_DATAW *pfd,
1053         [in] DWORD fFlags);
1054
1055     HRESULT GetIDList( [out] LPITEMIDLIST * ppidl );
1056
1057     HRESULT SetIDList( [in] LPCITEMIDLIST pidl );
1058
1059     HRESULT GetDescription(
1060         [out, size_is(cch)] LPWSTR pszName,
1061         [in] int cch);
1062
1063     HRESULT SetDescription( [in] LPCWSTR pszName );
1064
1065     HRESULT GetWorkingDirectory(
1066         [out, size_is(cch)] LPWSTR pszDir,
1067         [in] int cch);
1068
1069     HRESULT SetWorkingDirectory( [in] LPCWSTR pszDir );
1070
1071     HRESULT GetArguments(
1072         [out, size_is(cch)] LPWSTR pszArgs,
1073         [in] int cch);
1074
1075     HRESULT SetArguments( [in] LPCWSTR pszArgs );
1076
1077     HRESULT GetHotkey( [out] WORD *pwHotkey );
1078
1079     HRESULT SetHotkey( [in] WORD wHotkey );
1080
1081     HRESULT GetShowCmd( [out] int *piShowCmd );
1082
1083     HRESULT SetShowCmd( [in] int iShowCmd );
1084
1085     HRESULT GetIconLocation(
1086         [out, size_is(cch)] LPWSTR pszIconPath,
1087         [in] int cch,
1088         [out] int *piIcon);
1089
1090     HRESULT SetIconLocation(
1091         [in] LPCWSTR pszIconPath,
1092         [in] int iIcon);
1093
1094     HRESULT SetRelativePath(
1095         [in] LPCWSTR pszPathRel,
1096         [in] DWORD dwReserved);
1097
1098     HRESULT Resolve(
1099         [in] HWND hwnd,
1100         [in] DWORD fFlags);
1101
1102     HRESULT SetPath( [in] LPCWSTR pszFile );
1103 }
1104
1105 cpp_quote("#define IShellLink WINELIB_NAME_AW(IShellLink)")
1106
1107
1108 /*****************************************************************************
1109  * IShellExtInit interface
1110  */
1111 [
1112     object,
1113     uuid(000214e8-0000-0000-c000-000000000046),
1114     pointer_default(unique),
1115     local
1116 ]
1117 interface IShellExtInit : IUnknown
1118 {
1119     typedef IShellExtInit *LPSHELLEXTINIT;
1120
1121     HRESULT Initialize(
1122         [in] LPCITEMIDLIST pidlFolder,
1123         [in] IDataObject *pdtobj,
1124         [in] HKEY hkeyProgID);
1125 }
1126
1127
1128 /*******************************************************************************/
1129 /* Note: the following interfaces are not in shobjidl.idl under Windows, they  */
1130 /* are declared directly in shlobj.h. It hopefully won't break anything to put */
1131 /* them here anyway.                                                           */
1132 /*******************************************************************************/
1133
1134 #ifndef MAX_PATH
1135 #define MAX_PATH 260
1136 #endif
1137
1138
1139 /*****************************************************************************
1140  * IPersistFolder3 interface
1141  */
1142 [
1143     object,
1144     uuid(cef04fdf-fe72-11d2-87a5-00c04f6837cf),
1145     pointer_default(unique)
1146 ]
1147 interface IPersistFolder3 : IPersistFolder2
1148 {
1149     typedef struct
1150     {
1151         LPITEMIDLIST    pidlTargetFolder;
1152         WCHAR           szTargetParsingName[MAX_PATH];
1153         WCHAR           szNetworkProvider[MAX_PATH];
1154         DWORD           dwAttributes;
1155         int             csidl;
1156     } PERSIST_FOLDER_TARGET_INFO;
1157
1158     HRESULT InitializeEx(
1159         [in] IBindCtx *pbc,
1160         [in] LPCITEMIDLIST pidlRoot,
1161         [in] const PERSIST_FOLDER_TARGET_INFO *ppfti);
1162
1163     HRESULT GetFolderTargetInfo( [out] PERSIST_FOLDER_TARGET_INFO *ppfti );
1164 }
1165
1166
1167 /*****************************************************************************
1168  * IExtractIconA interface
1169  */
1170 [
1171     object,
1172     uuid(000214eb-0000-0000-c000-000000000046),
1173     pointer_default(unique),
1174     local
1175 ]
1176 interface IExtractIconA : IUnknown
1177 {
1178 cpp_quote("#define GIL_OPENICON     0x0001")
1179 cpp_quote("#define GIL_FORSHELL     0x0002")
1180 cpp_quote("#define GIL_ASYNC        0x0020")
1181 cpp_quote("#define GIL_DEFAULTICON  0x0040")
1182 cpp_quote("#define GIL_FORSHORTCUT  0x0080")
1183
1184 cpp_quote("#define GIL_SIMULATEDOC  0x0001")
1185 cpp_quote("#define GIL_PERINSTANCE  0x0002")
1186 cpp_quote("#define GIL_PERCLASS     0x0004")
1187 cpp_quote("#define GIL_NOTFILENAME  0x0008")
1188 cpp_quote("#define GIL_DONTCACHE    0x0010")
1189
1190     typedef IExtractIconA *LPEXTRACTICONA;
1191
1192     HRESULT GetIconLocation(
1193         [in] UINT uFlags,
1194         [out, size_is(cchMax)] LPSTR szIconFile,
1195         [in] UINT cchMax,
1196         [out] INT *piIndex,
1197         [out] UINT *pwFlags);
1198
1199     HRESULT Extract(
1200         [in] LPCSTR pszFile,
1201         [in] UINT nIconIndex,
1202         [out] HICON *phiconLarge,
1203         [out] HICON *phiconSmall,
1204         [in] UINT nIconSize );
1205 }
1206
1207
1208 /*****************************************************************************
1209  * IExtractIconW interface
1210  */
1211 [
1212     object,
1213     uuid(000214fa-0000-0000-c000-000000000046),
1214     pointer_default(unique),
1215     local
1216 ]
1217 interface IExtractIconW : IUnknown
1218 {
1219     typedef IExtractIconW *LPEXTRACTICONW;
1220
1221     HRESULT GetIconLocation(
1222         [in] UINT uFlags,
1223         [out, size_is(cchMax)] LPWSTR szIconFile,
1224         [in] UINT cchMax,
1225         [out] INT *piIndex,
1226         [out] UINT *pwFlags);
1227
1228     HRESULT Extract(
1229         [in] LPCWSTR pszFile,
1230         [in] UINT nIconIndex,
1231         [out] HICON *phiconLarge,
1232         [out] HICON *phiconSmall,
1233         [in] UINT nIconSize );
1234 }
1235
1236 cpp_quote("#define LPEXTRACTICON WINELIB_NAME_AW(LPEXTRACTICON)")
1237 cpp_quote("#define IExtractIcon WINELIB_NAME_AW(IExtractIcon)")
1238
1239
1240 /*****************************************************************************
1241  * ICommDlgBrowser interface
1242  */
1243 [
1244     object,
1245     uuid(000214f1-0000-0000-c000-000000000046),
1246     pointer_default(unique)
1247 ]
1248 interface ICommDlgBrowser : IUnknown
1249 {
1250 cpp_quote("#define CDBOSC_SETFOCUS     0x00000000")
1251 cpp_quote("#define CDBOSC_KILLFOCUS    0x00000001")
1252 cpp_quote("#define CDBOSC_SELCHANGE    0x00000002")
1253 cpp_quote("#define CDBOSC_RENAME       0x00000003")
1254 cpp_quote("#define CDBOSC_STATECHANGE  0x00000004")
1255
1256     typedef ICommDlgBrowser *LPCOMMDLGBROWSER;
1257
1258     HRESULT OnDefaultCommand( [in] IShellView *shv );
1259     HRESULT OnStateChange( [in] IShellView *shv, [in] ULONG uChange );
1260     HRESULT IncludeObject( [in] IShellView *shv, [in] LPCITEMIDLIST pidl );
1261 }
1262
1263
1264 /*****************************************************************************
1265  * ICommDlgBrowser2 interface
1266  */
1267 [
1268  object,
1269  uuid(10339516-2894-11D2-9039-00C04F8EEB3E),
1270  pointer_default(unique)
1271 ]
1272 interface ICommDlgBrowser2 : ICommDlgBrowser
1273 {
1274
1275     HRESULT Notify(
1276         [in] IShellView *ppshv,
1277         [in] DWORD dwNotifyType);
1278
1279     HRESULT GetDefaultMenuText(
1280         [in] IShellView *ppshv,
1281         [out, string, size_is(cchMax)] LPWSTR pszText,
1282         [in] int cchMax);
1283
1284     HRESULT GetViewFlags(
1285         [out] DWORD *pdwFlags);
1286 }
1287
1288
1289 /*****************************************************************************
1290  * ICommDlgBrowser3 interface
1291  */
1292 [
1293  object,
1294  uuid(C8AD25A1-3294-41EE-8165-71174BD01C57),
1295  pointer_default(unique)
1296 ]
1297 interface ICommDlgBrowser3 : ICommDlgBrowser2
1298 {
1299
1300     HRESULT OnColumnClicked(
1301         [in] IShellView *ppshv,
1302         [in] int iColumn);
1303
1304     HRESULT GetCurrentFilter(
1305         [out, string, size_is(cchFileSpec)] LPWSTR pszFileSpec,
1306         [in] int cchFileSpec);
1307
1308     HRESULT OnPreviewCreated(
1309         [in] IShellView *ppshv);
1310 }
1311
1312 /*****************************************************************************
1313  * IDockingWindow interface
1314  */
1315 [
1316     object,
1317     uuid(012dd920-7b26-11d0-8ca9-00a0c92dbfe8)
1318 ]
1319 interface IDockingWindow : IOleWindow
1320 {
1321     HRESULT ShowDW(
1322         [in] BOOL fShow);
1323
1324     HRESULT CloseDW(
1325         [in] DWORD dwReserved);
1326
1327     HRESULT ResizeBorderDW(
1328         [in] LPCRECT prcBorder,
1329         [in] IUnknown *punkToolbarSite,
1330         [in] BOOL fReserved);
1331 };
1332
1333
1334 /*****************************************************************************
1335  * IDockingWindowFrame interface
1336  */
1337 [
1338     object,
1339     uuid(47d2657a-7b27-11d0-8ca9-00a0c92dbfe8),
1340     pointer_default(unique),
1341     local
1342 ]
1343 interface IDockingWindowFrame : IOleWindow
1344 {
1345 cpp_quote("#define DWFRF_NORMAL           0x0000")
1346 cpp_quote("#define DWFRF_DELETECONFIGDATA 0x0001")
1347 cpp_quote("#define DWFAF_HIDDEN           0x0001")
1348
1349     HRESULT AddToolbar(
1350         [in] IUnknown *punkSrc,
1351         [in] LPCWSTR pwszItem,
1352         [in] DWORD dwAddFlags);
1353
1354     HRESULT RemoveToolbar(
1355         [in] IUnknown *punkSrc,
1356         [in] DWORD dwRemoveFlags);
1357
1358     HRESULT FindToolbar(
1359         [in] LPCWSTR pwszItem,
1360         [in] REFIID riid,
1361         [out] LPVOID *ppvObj);
1362 }
1363
1364
1365 /*****************************************************************************
1366  * IDragSourceHelper interface
1367  */
1368 [
1369     object,
1370     uuid(de5bf786-477a-11d2-839d-00c04fd918d0),
1371     pointer_default(unique),
1372     local
1373 ]
1374 interface IDragSourceHelper : IUnknown
1375 {
1376     typedef struct
1377     {
1378         SIZE     sizeDragImage;
1379         POINT    ptOffset;
1380         HBITMAP  hbmpDragImage;
1381         COLORREF crColorKey;
1382     } SHDRAGIMAGE, *LPSHDRAGIMAGE;
1383
1384   HRESULT InitializeFromBitmap(
1385       [in] LPSHDRAGIMAGE pshdi,
1386       [in] IDataObject *pDataObject);
1387
1388   HRESULT InitializeFromWindow(
1389       [in] HWND hwnd,
1390       [in] POINT *ppt,
1391       [in] IDataObject *pDataObject);
1392 }
1393
1394
1395 /*****************************************************************************
1396  * IDropTargetHelper interface
1397  */
1398 [
1399     object,
1400     uuid(4657278b-411b-11d2-839a-00c04fd918d0),
1401     pointer_default(unique),
1402     local
1403 ]
1404 interface IDropTargetHelper : IUnknown
1405 {
1406     HRESULT DragEnter(
1407         [in] HWND hwndTarget,
1408         [in] IDataObject *pDataObject,
1409         [in] POINT *ppt,
1410         [in] DWORD dwEffect);
1411
1412     HRESULT DragLeave();
1413
1414     HRESULT DragOver(
1415         [in] POINT *ppt,
1416         [in] DWORD dwEffect);
1417
1418     HRESULT Drop(
1419         [in] IDataObject *pDataObject,
1420         [in] POINT *ppt,
1421         [in] DWORD dwEffect);
1422
1423     HRESULT Show( [in] BOOL fShow );
1424 }
1425
1426
1427 /*****************************************************************************
1428  * IContextMenu interface
1429  */
1430 [
1431     object,
1432     uuid(000214e4-0000-0000-c000-000000000046),
1433     pointer_default(unique),
1434     local
1435 ]
1436 interface IContextMenu : IUnknown
1437 {
1438 cpp_quote("#define CMF_NORMAL        0x00000000")
1439 cpp_quote("#define CMF_DEFAULTONLY   0x00000001")
1440 cpp_quote("#define CMF_VERBSONLY     0x00000002")
1441 cpp_quote("#define CMF_EXPLORE       0x00000004")
1442 cpp_quote("#define CMF_NOVERBS       0x00000008")
1443 cpp_quote("#define CMF_CANRENAME     0x00000010")
1444 cpp_quote("#define CMF_NODEFAULT     0x00000020")
1445 cpp_quote("#define CMF_INCLUDESTATIC 0x00000040")
1446 cpp_quote("#define CMF_EXTENDEDVERBS 0x00000100")
1447 cpp_quote("#define CMF_RESERVED      0xffff0000")
1448
1449 cpp_quote("#define GCS_VERBA         0x00000000")
1450 cpp_quote("#define GCS_HELPTEXTA     0x00000001")
1451 cpp_quote("#define GCS_VALIDATEA     0x00000002")
1452 cpp_quote("#define GCS_VERBW         0x00000004")
1453 cpp_quote("#define GCS_HELPTEXTW     0x00000005")
1454 cpp_quote("#define GCS_VALIDATEW     0x00000006")
1455 cpp_quote("#define GCS_UNICODE       0x00000004")
1456 cpp_quote("#define GCS_VERB          WINELIB_NAME_AW(GCS_VERB)")
1457 cpp_quote("#define GCS_HELPTEXT      WINELIB_NAME_AW(GCS_HELPTEXT)")
1458 cpp_quote("#define GCS_VALIDATE      WINELIB_NAME_AW(GCS_VALIDATE)")
1459
1460 cpp_quote("#define CMDSTR_NEWFOLDERA   \"NewFolder\"")
1461 cpp_quote("#define CMDSTR_VIEWLISTA    \"ViewList\"")
1462 cpp_quote("#define CMDSTR_VIEWDETAILSA \"ViewDetails\"")
1463 cpp_quote("#if defined(__GNUC__)")
1464 cpp_quote("# define CMDSTR_NEWFOLDERW (const WCHAR []){ 'N','e','w','F','o','l','d','e','r',0 }")
1465 cpp_quote("# define CMDSTR_VIEWLISTW (const WCHAR []){ 'V','i','e','w','L','i','s','t',0 }")
1466 cpp_quote("# define CMDSTR_VIEWDETAILSW (const WCHAR []){ 'V','i','e','w','D','e','t','a','i','l','s',0 }")
1467 cpp_quote("#elif defined(_MSC_VER)")
1468 cpp_quote("# define CMDSTR_NEWFOLDERW   L\"NewFolder\"")
1469 cpp_quote("# define CMDSTR_VIEWLISTW    L\"ViewList\"")
1470 cpp_quote("# define CMDSTR_VIEWDETAILSW L\"ViewDetails\"")
1471 cpp_quote("#else")
1472 cpp_quote("static const WCHAR CMDSTR_NEWFOLDERW[] = {'N','e','w','F','o','l','d','e','r',0};")
1473 cpp_quote("static const WCHAR CMDSTR_VIEWLISTW [] = {'V','i','e','w','L','i','s','t',0};")
1474 cpp_quote("static const WCHAR CMDSTR_VIEWDETAILSW[] = {'V','i','e','w','D','e','t','a','i','l','s',0};")
1475 cpp_quote("#endif")
1476 cpp_quote("#define CMDSTR_NEWFOLDER    WINELIB_NAME_AW(CMDSTR_NEWFOLDER)")
1477 cpp_quote("#define CMDSTR_VIEWLIST     WINELIB_NAME_AW(CMDSTR_VIEWLIST)")
1478 cpp_quote("#define CMDSTR_VIEWDETAILS  WINELIB_NAME_AW(CMDSTR_VIEWDETAILS)")
1479
1480 cpp_quote("#define CMIC_MASK_HOTKEY         SEE_MASK_HOTKEY")
1481 cpp_quote("#define CMIC_MASK_ICON           SEE_MASK_ICON")
1482 cpp_quote("#define CMIC_MASK_FLAG_NO_UI     SEE_MASK_FLAG_NO_UI")
1483 cpp_quote("#define CMIC_MASK_UNICODE        SEE_MASK_UNICODE")
1484 cpp_quote("#define CMIC_MASK_NO_CONSOLE     SEE_MASK_NO_CONSOLE")
1485 cpp_quote("#define CMIC_MASK_HASLINKNAME    SEE_MASK_HASLINKNAME")
1486 cpp_quote("#define CMIC_MASK_FLAG_SEP_VDM   SEE_MASK_FLAG_SEPVDM")
1487 cpp_quote("#define CMIC_MASK_HASTITLE       SEE_MASK_HASTITLE")
1488 cpp_quote("#define CMIC_MASK_ASYNCOK        SEE_MASK_ASYNCOK")
1489 cpp_quote("#define CMIC_MASK_NOASYNC        SEE_MASK_NOASYNC")
1490 cpp_quote("#define CMIC_MASK_SHIFT_DOWN     0x10000000")
1491 cpp_quote("#define CMIC_MASK_PTINVOKE       0x20000000")
1492 cpp_quote("#define CMIC_MASK_CONTROL_DOWN   0x40000000")
1493 cpp_quote("#define CMIC_MASK_FLAG_LOG_USAGE SEE_MASK_FLAG_LOG_USAGE")
1494 cpp_quote("#define CMIC_MASK_NOZONECHECKS   SEE_MASK_NOZONECHECKS")
1495
1496     typedef IContextMenu *LPCONTEXTMENU;
1497
1498     typedef struct tagCMINVOKECOMMANDINFO
1499     {
1500         DWORD cbSize;
1501         DWORD fMask;
1502         HWND hwnd;
1503         LPCSTR lpVerb;
1504         LPCSTR lpParameters;
1505         LPCSTR lpDirectory;
1506         INT nShow;
1507         DWORD dwHotKey;
1508         HANDLE hIcon;
1509     } CMINVOKECOMMANDINFO, *LPCMINVOKECOMMANDINFO;
1510
1511     typedef struct tagCMInvokeCommandInfoEx
1512     {
1513         DWORD cbSize;
1514         DWORD fMask;
1515         HWND hwnd;
1516         LPCSTR lpVerb;
1517         LPCSTR lpParameters;
1518         LPCSTR lpDirectory;
1519         INT nShow;
1520         DWORD dwHotKey;
1521         HANDLE hIcon;
1522         LPCSTR lpTitle;
1523         LPCWSTR lpVerbW;
1524         LPCWSTR lpParametersW;
1525         LPCWSTR lpDirectoryW;
1526         LPCWSTR lpTitleW;
1527         POINT ptInvoke;
1528     } CMINVOKECOMMANDINFOEX, *LPCMINVOKECOMMANDINFOEX;
1529
1530     HRESULT QueryContextMenu(
1531         [in] HMENU hmenu,
1532         [in] UINT indexMenu,
1533         [in] UINT idCmdFirst,
1534         [in] UINT idCmdLast,
1535         [in] UINT uFlags);
1536
1537     HRESULT InvokeCommand( [in] LPCMINVOKECOMMANDINFO lpici );
1538
1539     HRESULT GetCommandString(
1540         [in] UINT_PTR idCmd,
1541         [in] UINT uType,
1542         [out] UINT *pwReserved,
1543         [out, size_is(cchMax)] LPSTR pszName,
1544         [in] UINT cchMax);
1545 }
1546
1547
1548 /*****************************************************************************
1549  * IContextMenu2 interface
1550  */
1551 [
1552     object,
1553     uuid(000214f4-0000-0000-c000-000000000046),
1554     pointer_default(unique),
1555     local
1556 ]
1557 interface IContextMenu2 : IContextMenu
1558 {
1559     typedef IContextMenu2 *LPCONTEXTMENU2;
1560
1561     HRESULT HandleMenuMsg(
1562         [in] UINT uMsg,
1563         [in] WPARAM wParam,
1564         [in] LPARAM lParam);
1565 }
1566
1567
1568 /*****************************************************************************
1569  * IContextMenu3 interface
1570  */
1571 [
1572     object,
1573     uuid(bcfce0a0-ec17-11d0-8d10-00a0c90f2719),
1574     pointer_default(unique),
1575     local
1576 ]
1577 interface IContextMenu3 : IContextMenu2
1578 {
1579     typedef IContextMenu3 *LPCONTEXTMENU3;
1580
1581     HRESULT HandleMenuMsg2(
1582         [in] UINT uMsg,
1583         [in] WPARAM wParam,
1584         [in] LPARAM lParam,
1585         [out] LRESULT *plResult);
1586 }
1587
1588
1589 [
1590     object,
1591     uuid(3409e930-5a39-11d1-83fa-00a0c90dc849),
1592     pointer_default(unique),
1593     local
1594 ]
1595 interface IContextMenuCB : IUnknown
1596 {
1597     HRESULT CallBack(
1598         [in] IShellFolder *psf,
1599         [in] HWND hwndOwner,
1600         [in] IDataObject *pdtobj,
1601         [in] UINT uMsg,
1602         [in] WPARAM wParam,
1603         [in] LPARAM lParam);
1604 }
1605
1606 /*****************************************************************************
1607  * IShellExecuteHookA interface
1608  */
1609 [
1610     object,
1611     uuid(000214f5-0000-0000-c000-000000000046),
1612     pointer_default(unique),
1613     local
1614 ]
1615 interface IShellExecuteHookA : IUnknown
1616 {
1617     cpp_quote("struct _SHELLEXECUTEINFOA;")
1618     HRESULT Execute(
1619         [in, out] struct _SHELLEXECUTEINFOA* pei);
1620 }
1621
1622
1623 /*****************************************************************************
1624  * IShellExecuteHookW interface
1625  */
1626 [
1627     object,
1628     uuid(000214fb-0000-0000-c000-000000000046),
1629     pointer_default(unique),
1630     local
1631 ]
1632 interface IShellExecuteHookW : IUnknown
1633 {
1634     cpp_quote("struct _SHELLEXECUTEINFOW;")
1635     HRESULT Execute(
1636                 [in, out] struct _SHELLEXECUTEINFOW* pei);
1637 }
1638
1639 /*****************************************************************************
1640  * IShellLinkDataList interface
1641  */
1642 [
1643     object,
1644     uuid(45e2b4ae-b1c3-11d0-b92f-00a0c90312e1),
1645     pointer_default(unique)
1646 ]
1647 interface IShellLinkDataList : IUnknown
1648 {
1649     [local] HRESULT AddDataBlock(
1650                 [in] void *pDataBlock);
1651     [local] HRESULT CopyDataBlock(
1652                 [in] DWORD dwSig,
1653                 [out] void **ppDataBlock);
1654     HRESULT RemoveDataBlock(
1655                 [in] DWORD dwSig);
1656     HRESULT GetFlags(
1657                 [out] DWORD *pdwFlags);
1658     HRESULT SetFlags(
1659                 [in] DWORD dwFlags);
1660 }
1661
1662
1663 /*****************************************************************************
1664  * IResolveShellLink interface
1665  */
1666 [
1667     object,
1668     uuid(5cd52983-9449-11d2-963a-00c04f79adf0),
1669     pointer_default(unique)
1670 ]
1671 interface IResolveShellLink : IUnknown
1672 {
1673     HRESULT ResolveShellLink(
1674                 [in] IUnknown *punk,
1675                 [in] HWND hwnd,
1676                 [in] DWORD fFlags);
1677 }
1678
1679
1680 /*****************************************************************************
1681  * IURLSearchHook interface
1682  */
1683 [
1684     object,
1685     uuid(ac60f6a0-0fd9-11d0-99cb-00c04fd64497),
1686     pointer_default(unique),
1687     local
1688 ]
1689 interface IURLSearchHook : IUnknown
1690 {
1691     HRESULT Translate(
1692                 [in, out] LPWSTR lpwszSearchURL,
1693                 [in] DWORD cchBufferSize);
1694 }
1695
1696
1697 /*****************************************************************************
1698  * ISearchContext interface
1699  */
1700 [
1701     object,
1702     uuid(09f656a2-41af-480c-88f7-16cc0d164615),
1703     pointer_default(unique),
1704     local
1705 ]
1706 interface ISearchContext : IUnknown
1707 {
1708     HRESULT GetSearchUrl(
1709                 [in] BSTR *pbstrSearchUrl);
1710     HRESULT GetSearchText(
1711                 [in] BSTR *pbstrSearchText);
1712     HRESULT GetSearchStyle(
1713                 [in] BSTR *pdwSearchStyle);
1714 }
1715
1716
1717 /*****************************************************************************
1718  * IURLSearchHook2 interface
1719  */
1720 [
1721     object,
1722     uuid(5ee44da4-6d32-46e3-86bc-07540dedd0e0),
1723     pointer_default(unique),
1724     local
1725 ]
1726 interface IURLSearchHook2 : IURLSearchHook
1727 {
1728     HRESULT TranslateWithSearchContext(
1729                 [in, out] LPWSTR lpwszSearchURL,
1730                 [in] DWORD cchBufferSize,
1731                 [in] ISearchContext *pSearchContext);
1732 }
1733
1734
1735 cpp_quote("#define INewShortcutHook WINELIB_NAME_AW(INewShortcutHook)")
1736
1737 /*****************************************************************************
1738  * INewShortcutHookA interface
1739  */
1740 [
1741     object,
1742     uuid(000214e1-0000-0000-c000-000000000046),
1743     pointer_default(unique),
1744     local
1745 ]
1746 interface INewShortcutHookA : IUnknown
1747 {
1748     HRESULT SetReferent(
1749                 [in] LPCSTR pcszReferent,
1750                 [in] HWND hwnd);
1751     HRESULT GetReferent(
1752                 [out] LPSTR pcszReferent,
1753                 [in] int cchReferent);
1754     HRESULT SetFolder(
1755                 [in] LPCSTR pcszReferent);
1756     HRESULT GetFolder(
1757                 [out] LPSTR pcszReferent,
1758                 [in] int cchFolder);
1759     HRESULT GetName(
1760                 [out] LPSTR pszName,
1761                 [in] int cchName);
1762     HRESULT GetExtension(
1763                 [out] LPSTR pszExtension,
1764                 [in] int cchExtension);
1765
1766
1767
1768 /*****************************************************************************
1769  * INewShortcutHookW interface
1770  */
1771 [
1772     object,
1773     uuid(000214f7-0000-0000-c000-000000000046),
1774     pointer_default(unique),
1775     local
1776 ]
1777 interface INewShortcutHookW : IUnknown
1778 {
1779     HRESULT SetReferent(
1780                 [in] LPCWSTR pcszReferent,
1781                 [in] HWND hwnd);
1782     HRESULT GetReferent(
1783                 [out] LPWSTR pcszReferent,
1784                 [in] int cchReferent);
1785     HRESULT SetFolder(
1786                 [in] LPCWSTR pcszReferent);
1787     HRESULT GetFolder(
1788                 [out] LPWSTR pcszReferent,
1789                 [in] int cchFolder);
1790     HRESULT GetName(
1791                 [out] LPWSTR pszName,
1792                 [in] int cchName);
1793     HRESULT GetExtension(
1794                 [out] LPWSTR pszExtension,
1795                 [in] int cchExtension);
1796
1797
1798 /*****************************************************************************
1799  * IRunnableTask interface
1800  */
1801 [
1802     object,
1803     uuid(85788d00-6807-11d0-b810-00c04fd706ec),
1804     pointer_default(unique),
1805     local
1806 ]
1807 interface IRunnableTask : IUnknown
1808 {
1809     HRESULT Run();
1810     HRESULT Kill([in] BOOL fWait);
1811     HRESULT Suspend();
1812     HRESULT Resume();
1813     ULONG IsRunning();
1814 }
1815
1816 /*****************************************************************************
1817  * IShellChangeNotify interface
1818  */
1819 [
1820     object,
1821     uuid(d82be2b1-5764-11d0-a96e-00c04fd705a2),
1822     pointer_default(unique),
1823     local
1824 ]
1825 interface IShellChangeNotify : IUnknown
1826 {
1827     HRESULT OnChange(
1828                 [in] LONG lEvent,
1829                 [in] LPCITEMIDLIST pidl1,
1830                 [in] LPCITEMIDLIST pidl2);
1831 }
1832
1833 /*****************************************************************************
1834  * IFileSystemBindData interface
1835  */
1836 [
1837     object,
1838     uuid(01e18d10-4d8b-11d2-855d-006008059367),
1839     pointer_default(unique),
1840     local
1841 ]
1842 interface IFileSystemBindData : IUnknown
1843 {
1844     HRESULT SetFindData(
1845                 [in] const WIN32_FIND_DATAW *pfd);
1846     HRESULT GetFindData(
1847                 [out] WIN32_FIND_DATAW *pfd);
1848 }
1849
1850 /*****************************************************************************
1851  *    ITaskbarList interface
1852  */
1853 [
1854     object,
1855     uuid(56FDF342-FD6D-11d0-958A-006097C9A090),
1856     pointer_default(unique)
1857 ]
1858 interface ITaskbarList : IUnknown
1859 {
1860     HRESULT HrInit();
1861
1862     HRESULT AddTab(
1863         [in] HWND hwnd);
1864
1865     HRESULT DeleteTab(
1866         [in] HWND hwnd);
1867
1868     HRESULT ActivateTab(
1869         [in] HWND hwnd);
1870
1871     HRESULT SetActiveAlt(
1872         [in] HWND hwnd);
1873 }
1874
1875 /*****************************************************************************
1876  *    ITaskbarList2 interface
1877  */
1878 [
1879     object,
1880     uuid(602D4995-B13A-429B-A66E-1935E44F4317),
1881     pointer_default(unique)
1882 ]
1883 interface ITaskbarList2 : ITaskbarList
1884 {
1885     HRESULT MarkFullscreenWindow(
1886         [in] HWND hwnd,
1887         [in] BOOL fullscreen);
1888 }
1889
1890 cpp_quote("#ifdef MIDL_PASS")
1891 typedef IUnknown* HIMAGELIST;
1892 cpp_quote("#endif")
1893
1894 typedef [v1_enum] enum THUMBBUTTONFLAGS {
1895     THBF_ENABLED         = 0x0000,
1896     THBF_DISABLED        = 0x0001,
1897     THBF_DISMISSONCLICK  = 0x0002,
1898     THBF_NOBACKGROUND    = 0x0004,
1899     THBF_HIDDEN          = 0x0008,
1900     THBF_NONINTERACTIVE  = 0x0010
1901 } THUMBBUTTONFLAGS;
1902
1903 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(THUMBBUTTONFLAGS)")
1904
1905 typedef [v1_enum] enum THUMBBUTTONMASK {
1906     THB_BITMAP   = 0x0001,
1907     THB_ICON     = 0x0002,
1908     THB_TOOLTIP  = 0x0004,
1909     THB_FLAGS    = 0x0008
1910 } THUMBBUTTONMASK;
1911
1912 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(THUMBBUTTONMASK)")
1913
1914 cpp_quote("#include <pshpack8.h>")
1915 typedef struct THUMBBUTTON {
1916     THUMBBUTTONMASK dwMask;
1917     UINT iId;
1918     UINT iBitmap;
1919     HICON hIcon;
1920     WCHAR szTip[260];
1921     THUMBBUTTONFLAGS dwFlags;
1922 } THUMBBUTTON, *LPTHUMBBUTTON;
1923 cpp_quote("#include <poppack.h>")
1924
1925 [
1926     uuid(ea1afb91-9e28-4b86-90e9-9e9f8a5eefaf),
1927     object
1928 ]
1929 interface ITaskbarList3 : ITaskbarList2
1930 {
1931     typedef [v1_enum] enum TBPFLAG {
1932         TBPF_NOPROGRESS     = 0x0000,
1933         TBPF_INDETERMINATE  = 0x0001,
1934         TBPF_NORMAL         = 0x0002,
1935         TBPF_ERROR          = 0x0004,
1936         TBPF_PAUSED         = 0x0008
1937     } TBPFLAG;
1938
1939     cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(TBPFLAG)")
1940
1941     HRESULT SetProgressValue(
1942             [in] HWND hwnd,
1943             [in] ULONGLONG ullCompleted,
1944             [in] ULONGLONG ullTotal);
1945
1946     HRESULT SetProgressState(
1947             [in] HWND hwnd,
1948             [in] TBPFLAG tbpFlags);
1949
1950     HRESULT RegisterTab(
1951             [in] HWND hwndTab,
1952             [in] HWND hwndMDI);
1953
1954     HRESULT UnregisterTab([in] HWND hwndTab);
1955
1956     HRESULT SetTabOrder(
1957             [in] HWND hwndTab,
1958             [in] HWND hwndInsertBefore);
1959
1960     HRESULT SetTabActive(
1961             [in] HWND hwndTab,
1962             [in] HWND hwndMDI,
1963             [in] DWORD dwReserved);
1964
1965     HRESULT ThumbBarAddButtons(
1966             [in] HWND hwnd,
1967             [in] UINT cButtons,
1968             [in, size_is(cButtons)] LPTHUMBBUTTON pButton);
1969
1970     HRESULT ThumbBarUpdateButtons(
1971             [in] HWND hwnd,
1972             [in] UINT cButtons,
1973             [in, size_is(cButtons)] LPTHUMBBUTTON pButton);
1974
1975     HRESULT ThumbBarSetImageList(
1976             [in] HWND hwnd,
1977             [in] HIMAGELIST himl);
1978
1979     HRESULT SetOverlayIcon(
1980             [in] HWND hwnd,
1981             [in] HICON hIcon,
1982             [in, unique, string] LPCWSTR pszDescription);
1983
1984     HRESULT SetThumbnailTooltip(
1985             [in] HWND hwnd,
1986             [in, unique, string] LPCWSTR pszTip);
1987
1988     HRESULT SetThumbnailClip(
1989             [in] HWND hwnd,
1990             [in] RECT *prcClip);
1991 }
1992
1993 [
1994     uuid(c43dc798-95d1-4bea-9030-bb99e2983a1a),
1995     object
1996 ]
1997 interface ITaskbarList4 : ITaskbarList3
1998 {
1999     typedef [v1_enum] enum STPFLAG {
2000         STPF_NONE                       = 0x0000,
2001         STPF_USEAPPTHUMBNAILALWAYS      = 0x0001,
2002         STPF_USEAPPTHUMBNAILWHENACTIVE  = 0x0002,
2003         STPF_USEAPPPEEKALWAYS           = 0x0004,
2004         STPF_USEAPPPEEKWHENACTIVE       = 0x0008
2005     } STPFLAG;
2006
2007     cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(STPFLAG)")
2008
2009     HRESULT SetTabProperties(
2010             [in] HWND hwndTab,
2011             [in] STPFLAG stpFlags);
2012 }
2013
2014 /*****************************************************************************
2015  *    IAutoCompleteDropDown interface
2016  */
2017 [
2018     object,
2019     uuid(3CD141F4-3C6A-11d2-BCAA-00C04FD929DB),
2020     pointer_default(unique)
2021 ]
2022 interface IAutoCompleteDropDown : IUnknown
2023 {
2024 cpp_quote("#define ACDD_VISIBLE   0x0001")
2025
2026     HRESULT GetDropDownStatus(
2027         [out] DWORD *pdwFlags,
2028         [out, string] LPWSTR *ppwszString);
2029
2030     HRESULT ResetEnumerator();
2031 }
2032
2033 [
2034     object,
2035     uuid(cb728b20-f786-11ce-92ad-00aa00a74cd0),
2036     pointer_default(unique)
2037 ]
2038 interface IProfferService : IUnknown
2039 {
2040     HRESULT ProfferService(
2041         [in] REFGUID service,
2042         [in] IServiceProvider *pService,
2043         [out] DWORD *pCookie);
2044
2045     HRESULT RevokeService([in] DWORD cookie);
2046 }
2047
2048 /*****************************************************************************
2049  * IExplorerBrowserEvents interface
2050  */
2051 [
2052  object,
2053  uuid(361BBDC7-E6EE-4E13-BE58-58E2240C810F)
2054 ]
2055 interface IExplorerBrowserEvents : IUnknown
2056 {
2057     HRESULT OnNavigationPending(
2058         [in] PCIDLIST_ABSOLUTE pidlFolder);
2059
2060     HRESULT OnViewCreated(
2061         [in] IShellView *psv);
2062
2063     HRESULT OnNavigationComplete(
2064         [in] PCIDLIST_ABSOLUTE pidlFolder);
2065
2066     HRESULT OnNavigationFailed(
2067         [in] PCIDLIST_ABSOLUTE pidlFolder);
2068 }
2069
2070 typedef GUID EXPLORERPANE;
2071 typedef EXPLORERPANE *REFEXPLORERPANE;
2072
2073 cpp_quote("#define SID_ExplorerPaneVisibility IID_IExplorerPaneVisibility")
2074
2075 /*****************************************************************************
2076  * IExplorerPaneVisibility interface
2077  */
2078 [
2079  object,
2080  uuid(E07010EC-BC17-44C0-97B0-46C7C95B9EDC)
2081 ]
2082 interface IExplorerPaneVisibility : IUnknown
2083 {
2084     typedef enum tagEXPLORERPANESTATE {
2085         EPS_DONTCARE     = 0x0,
2086         EPS_DEFAULT_ON   = 0x1,
2087         EPS_DEFAULT_OFF  = 0x2,
2088         EPS_STATE_MASK   = 0xffff,
2089         EPS_INITIALSTATE = 0x10000,
2090         EPS_FORCE        = 0x20000
2091     } EXPLORERPANESTATE;
2092
2093     HRESULT GetPaneState(
2094         [in] REFEXPLORERPANE ep,
2095         [out] EXPLORERPANESTATE *peps);
2096 }
2097
2098 typedef [v1_enum] enum tagEXPLORER_BROWSER_FILL_FLAGS {
2099     EBF_NONE                     = 0,
2100     EBF_SELECTFROMDATAOBJECT     = 0x100,
2101     EBF_NODROPTARGET             = 0x200
2102 } EXPLORER_BROWSER_FILL_FLAGS;
2103
2104 typedef [v1_enum] enum tagEXPLORER_BROWSER_OPTIONS {
2105     EBO_NONE               = 0x00,
2106     EBO_NAVIGATEONCE       = 0x01,
2107     EBO_SHOWFRAMES         = 0x02,
2108     EBO_ALWAYSNAVIGATE     = 0x04,
2109     EBO_NOTRAVELLOG        = 0x08,
2110     EBO_NOWRAPPERWINDOW    = 0x10,
2111     EBO_HTMLSHAREPOINTVIEW = 0x20
2112 } EXPLORER_BROWSER_OPTIONS;
2113
2114 cpp_quote("#define SID_SExplorerBrowserFrame IID_ICommDlgBrowser")
2115
2116 /*****************************************************************************
2117  * IExplorerBrowser interface
2118  */
2119 [
2120  object,
2121  uuid(DFD3B6B5-C10C-4BE9-85F6-A66969F402F6),
2122  pointer_default(unique)
2123 ]
2124 interface IExplorerBrowser : IUnknown
2125 {
2126
2127     [local] HRESULT Initialize(
2128         [in] HWND hwndParent,
2129         [in] const RECT *prc,
2130         [in, unique] const FOLDERSETTINGS *pfs);
2131
2132     HRESULT Destroy();
2133
2134     [local] HRESULT SetRect(
2135         [in,out,unique] HDWP *phdwp,
2136         [in] RECT rcBrowser);
2137
2138     HRESULT SetPropertyBag(
2139         [in, string] LPCWSTR pszPropertyBag);
2140
2141     HRESULT SetEmptyText(
2142         [in, string] LPCWSTR pszEmptyText);
2143
2144     HRESULT SetFolderSettings(
2145         [in] const FOLDERSETTINGS *pfs);
2146
2147     HRESULT Advise(
2148         [in] IExplorerBrowserEvents *psbe,
2149         [out] DWORD *pdwCookie);
2150
2151     HRESULT Unadvise(
2152         [in] DWORD dwCookie);
2153
2154     HRESULT SetOptions(
2155         [in] EXPLORER_BROWSER_OPTIONS dwFlag);
2156
2157     HRESULT GetOptions(
2158         [out] EXPLORER_BROWSER_OPTIONS *pdwFlag);
2159
2160     HRESULT BrowseToIDList(
2161         [in] PCUIDLIST_RELATIVE pidl,
2162         [in] UINT uFlags);
2163
2164     HRESULT BrowseToObject(
2165         [in] IUnknown *punk,
2166         [in] UINT uFlags);
2167
2168     HRESULT FillFromObject(
2169         [in] IUnknown *punk,
2170         [in] EXPLORER_BROWSER_FILL_FLAGS dwFlags);
2171
2172     HRESULT RemoveAll();
2173
2174     HRESULT GetCurrentView(
2175         [in] REFIID riid,
2176         [out, iid_is(riid)] void **ppv);
2177 }
2178
2179 /*****************************************************************************
2180  * INameSpaceTreeControl interface
2181  */
2182 [
2183  object,
2184  uuid(028212A3-B627-47E9-8856-C14265554E4F)
2185 ]
2186 interface INameSpaceTreeControl : IUnknown
2187 {
2188     [v1_enum] enum _NSTCSTYLE {
2189         NSTCS_HASEXPANDOS                 = 0x00000001,
2190         NSTCS_HASLINES                    = 0x00000002,
2191         NSTCS_SINGLECLICKEXPAND           = 0x00000004,
2192         NSTCS_FULLROWSELECT               = 0x00000008,
2193         NSTCS_SPRINGEXPAND                = 0x00000010,
2194         NSTCS_HORIZONTALSCROLL            = 0x00000020,
2195         NSTCS_ROOTHASEXPANDO              = 0x00000040,
2196         NSTCS_SHOWSELECTIONALWAYS         = 0x00000080,
2197         NSTCS_NOINFOTIP                   = 0x00000200,
2198         NSTCS_EVENHEIGHT                  = 0x00000400,
2199         NSTCS_NOREPLACEOPEN               = 0x00000800,
2200         NSTCS_DISABLEDRAGDROP             = 0x00001000,
2201         NSTCS_NOORDERSTREAM               = 0x00002000,
2202         NSTCS_RICHTOOLTIP                 = 0x00004000,
2203         NSTCS_BORDER                      = 0x00008000,
2204         NSTCS_NOEDITLABELS                = 0x00010000,
2205         NSTCS_TABSTOP                     = 0x00020000,
2206         NSTCS_FAVORITESMODE               = 0x00080000,
2207         NSTCS_AUTOHSCROLL                 = 0x00100000,
2208         NSTCS_FADEINOUTEXPANDOS           = 0x00200000,
2209         NSTCS_EMPTYTEXT                   = 0x00400000,
2210         NSTCS_CHECKBOXES                  = 0x00800000,
2211         NSTCS_PARTIALCHECKBOXES           = 0x01000000,
2212         NSTCS_EXCLUSIONCHECKBOXES         = 0x02000000,
2213         NSTCS_DIMMEDCHECKBOXES            = 0x04000000,
2214         NSTCS_NOINDENTCHECKS              = 0x08000000,
2215         NSTCS_ALLOWJUNCTIONS              = 0x10000000,
2216         NSTCS_SHOWTABSBUTTON              = 0x20000000,
2217         NSTCS_SHOWDELETEBUTTON            = 0x40000000,
2218         NSTCS_SHOWREFRESHBUTTON      = (int)0x80000000
2219     };
2220     typedef DWORD NSTCSTYLE;
2221
2222     [v1_enum] enum _NSTCROOTSTYLE {
2223         NSTCRS_VISIBLE                    = 0x0000,
2224         NSTCRS_HIDDEN                     = 0x0001,
2225         NSTCRS_EXPANDED                   = 0x0002
2226     };
2227     typedef DWORD NSTCROOTSTYLE;
2228
2229     [v1_enum] enum _NSTCITEMSTATE {
2230         NSTCIS_NONE                       = 0x0000,
2231         NSTCIS_SELECTED                   = 0x0001,
2232         NSTCIS_EXPANDED                   = 0x0002,
2233         NSTCIS_BOLD                       = 0x0004,
2234         NSTCIS_DISABLED                   = 0x0008,
2235         NSTCIS_SELECTEDNOEXPAND           = 0x0010
2236     };
2237     typedef DWORD NSTCITEMSTATE;
2238
2239     typedef [v1_enum] enum NSTCGNI {
2240         NSTCGNI_NEXT                      = 0,
2241         NSTCGNI_NEXTVISIBLE               = 1,
2242         NSTCGNI_PREV                      = 2,
2243         NSTCGNI_PREVVISIBLE               = 3,
2244         NSTCGNI_PARENT                    = 4,
2245         NSTCGNI_CHILD                     = 5,
2246         NSTCGNI_FIRSTVISIBLE              = 6,
2247         NSTCGNI_LASTVISIBLE               = 7
2248     } NSTCGNI;
2249
2250     HRESULT Initialize(
2251         [in] HWND hwndParent,
2252         [in, unique] RECT *prc,
2253         [in] NSTCSTYLE nstcsFlags);
2254
2255     HRESULT TreeAdvise(
2256         [in] IUnknown *punk,
2257         [out] DWORD *pdwCookie);
2258
2259     HRESULT TreeUnadvise(
2260         [in] DWORD dwCookie);
2261
2262     HRESULT AppendRoot(
2263         [in] IShellItem *psiRoot,
2264         [in] SHCONTF grfEnumFlags,
2265         [in] NSTCROOTSTYLE grfRootStyle,
2266         [in, unique] IShellItemFilter *pif);
2267
2268     HRESULT InsertRoot(
2269         [in] int iIndex,
2270         [in] IShellItem *psiRoot,
2271         [in] SHCONTF grfEnumFlags,
2272         [in] NSTCROOTSTYLE grfRootStyle,
2273         [in, unique] IShellItemFilter *pif);
2274
2275     HRESULT RemoveRoot(
2276         [in] IShellItem *psiRoot);
2277
2278     HRESULT RemoveAllRoots();
2279
2280     HRESULT GetRootItems(
2281         [out] IShellItemArray **ppsiaRootItems);
2282
2283     HRESULT SetItemState(
2284         [in] IShellItem *psi,
2285         [in] NSTCITEMSTATE nstcisMask,
2286         [in] NSTCITEMSTATE nstcisFlags);
2287
2288     HRESULT GetItemState(
2289         [in] IShellItem *psi,
2290         [in] NSTCITEMSTATE nstcismask,
2291         [out] NSTCITEMSTATE *pnstcisFlags);
2292
2293     HRESULT GetSelectedItems(
2294         [out] IShellItemArray **psiaItems);
2295
2296     HRESULT GetItemCustomState(
2297         [in] IShellItem *psi,
2298         [out] int *piStateNumber);
2299
2300     HRESULT SetItemCustomState(
2301         [in] IShellItem *psi,
2302         [in] int iStateNumber);
2303
2304     HRESULT EnsureItemVisible(
2305         [in] IShellItem *psi);
2306
2307     HRESULT SetTheme(
2308         [in, string] LPCWSTR pszTheme);
2309
2310     HRESULT GetNextItem(
2311         [in, unique] IShellItem *psi,
2312         [in] NSTCGNI nstcgi,
2313         [out] IShellItem **ppsiNext);
2314
2315     HRESULT HitTest(
2316         [in] POINT *ppt,
2317         [out] IShellItem **ppsiOut);
2318
2319     HRESULT GetItemRect(
2320         [in] IShellItem *psi,
2321         [out] RECT *prect);
2322
2323     HRESULT CollapseAll();
2324 }
2325
2326 /*****************************************************************************
2327  * INameSpaceTreeControl2 interface
2328  */
2329 [
2330  object,
2331  uuid(7CC7AED8-290E-49BC-8945-C1401CC9306C)
2332 ]
2333 interface INameSpaceTreeControl2 : INameSpaceTreeControl
2334 {
2335     typedef [v1_enum] enum NSTCSTYLE2 {
2336         NSTCS2_DEFAULT                     = 0x00,
2337         NSTCS2_INTERRUPTNOTIFICATIONS      = 0x01,
2338         NSTCS2_SHOWNULLSPACEMENU           = 0x02,
2339         NSTCS2_DISPLAYPADDING              = 0x04,
2340         NSTCS2_DISPLAYPINNEDONLY           = 0x08,
2341         NTSCS2_NOSINGLETONAUTOEXPAND       = 0x10,  /* The apparent typo here is   */
2342         NTSCS2_NEVERINSERTNONENUMERATED    = 0x20   /* present also in the Win SDK */
2343     } NSTCSTYLE2;
2344     cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(NSTCSTYLE2)")
2345
2346     HRESULT SetControlStyle(
2347         [in] NSTCSTYLE nstcsMask,
2348         [in] NSTCSTYLE nstcsStyle);
2349
2350     HRESULT GetControlStyle(
2351         [in] NSTCSTYLE nstcsMask,
2352         [out] NSTCSTYLE *pnstcsStyle);
2353
2354     HRESULT SetControlStyle2(
2355         [in] NSTCSTYLE2 nstcsMask,
2356         [in] NSTCSTYLE2 nstcsStyle);
2357
2358     HRESULT GetControlStyle2(
2359         [in] NSTCSTYLE2 nstcsMask,
2360         [out] NSTCSTYLE2 *pnstcsStyle);
2361 }
2362
2363 /*****************************************************************************
2364  * INameSpaceTreeControlEvents interface
2365  */
2366
2367 [
2368  object,
2369  uuid(93D77985-B3D8-4484-8318-672CDDA002CE),
2370  local
2371 ]
2372 interface INameSpaceTreeControlEvents : IUnknown
2373 {
2374     [v1_enum] enum _NSTCEHITTEST {
2375         NSTCEHT_NOWHERE                    = 0x0001,
2376         NSTCEHT_ONITEMICON                 = 0x0002,
2377         NSTCEHT_ONITEMLABEL                = 0x0004,
2378         NSTCEHT_ONITEMIDENT                = 0x0008,
2379         NSTCEHT_ONITEMBUTTON               = 0x0010,
2380         NSTCEHT_ONITEMRIGHT                = 0x0020,
2381         NSTCEHT_ONITEMSTATEICON            = 0x0040,
2382         NSTCEHT_ONITEM                     = 0x0046,
2383         NSTCEHT_ONITEMTABBUTTON            = 0x1000
2384     };
2385     typedef DWORD NSTCEHITTEST;
2386
2387     [v1_enum] enum _NSTCECLICKTYPE {
2388         NSTCECT_LBUTTON                    = 0x1,
2389         NSTCECT_MBUTTON                    = 0x2,
2390         NSTCECT_RBUTTON                    = 0x3,
2391         NSTCECT_BUTTON                     = 0x3,
2392         NSTCECT_DBLCLICK                   = 0x4
2393     };
2394     typedef DWORD NSTCECLICKTYPE;
2395
2396     HRESULT OnItemClick(
2397         [in] IShellItem *psi,
2398         [in] NSTCEHITTEST nstceHitTest,
2399         [in] NSTCECLICKTYPE nstceClickType);
2400
2401     HRESULT OnPropertyItemCommit(
2402         [in] IShellItem *psi);
2403
2404     HRESULT OnItemStateChanging(
2405         [in] IShellItem *psi,
2406         [in] NSTCITEMSTATE nstcisMask,
2407         [in] NSTCITEMSTATE nstcisState);
2408
2409     HRESULT OnItemStateChanged(
2410         [in] IShellItem *psi,
2411         [in] NSTCITEMSTATE nstcisMask,
2412         [in] NSTCITEMSTATE nstcisState);
2413
2414     HRESULT OnSelectionChanged(
2415         [in] IShellItemArray *psiaSelection);
2416
2417     HRESULT OnKeyboardInput(
2418         [in] UINT uMsg,
2419         [in] WPARAM wParam,
2420         [in] LPARAM lParam);
2421
2422     HRESULT OnBeforeExpand(
2423         [in] IShellItem *psi);
2424
2425     HRESULT OnAfterExpand(
2426         [in] IShellItem *psi);
2427
2428     HRESULT OnBeginLabelEdit(
2429         [in] IShellItem *psi);
2430
2431     HRESULT OnEndLabelEdit(
2432         [in] IShellItem *psi);
2433
2434     HRESULT OnGetToolTip(
2435         [in] IShellItem *psi,
2436         [out, string, size_is(cchTip)] LPWSTR pszTip,
2437         [in] int cchTip);
2438
2439     HRESULT OnBeforeItemDelete(
2440         [in] IShellItem *psi);
2441
2442     HRESULT OnItemAdded(
2443         [in] IShellItem *psi,
2444         [in] BOOL fIsRoot);
2445
2446     HRESULT OnItemDeleted(
2447         [in] IShellItem *psi,
2448         [in] BOOL fIsRoot);
2449
2450     HRESULT OnBeforeContextMenu(
2451         [in, unique] IShellItem *psi,
2452         [in] REFIID riid,
2453         [out, iid_is(riid)] void **ppv);
2454
2455     HRESULT OnAfterContextMenu(
2456         [in] IShellItem *psi,
2457         [in] IContextMenu *pcmIn,
2458         [in] REFIID riid,
2459         [out, iid_is(riid)] void **ppv);
2460
2461     HRESULT OnBeforeStateImageChange(
2462         [in] IShellItem *psi);
2463
2464     HRESULT OnGetDefaultIconIndex(
2465         [in] IShellItem *psi,
2466         [out] int *piDefaultIcon,
2467         [out] int *piOpenIcon);
2468 }
2469
2470 /*****************************************************************************
2471  * INameSpaceTreeControlCustomDraw interface
2472  */
2473 [
2474  object,
2475  uuid(2D3BA758-33EE-42D5-BB7B-5F3431D86C78),
2476  local
2477 ]
2478
2479 interface INameSpaceTreeControlCustomDraw : IUnknown
2480 {
2481     typedef struct NSTCCUSTOMDRAW
2482     {
2483         IShellItem *psi;
2484         UINT uItemState;
2485         NSTCITEMSTATE nstcis;
2486         LPCWSTR pszText;
2487         int iImage;
2488         HIMAGELIST himl;
2489         int iLevel;
2490         int iIndent;
2491     } NSTCCUSTOMDRAW;
2492
2493     HRESULT PrePaint(
2494         [in] HDC hdc,
2495         [in] RECT *prc,
2496         [out] LRESULT *plres);
2497
2498     HRESULT PostPaint(
2499         [in] HDC hdc,
2500         [in] RECT *prc);
2501
2502     HRESULT ItemPrePaint(
2503         [in] HDC hdc,
2504         [in] RECT *prc,
2505         [in, out] COLORREF *pclrText,
2506         [in, out] COLORREF *pclrTextBk,
2507         [out] LRESULT *plres);
2508
2509     HRESULT ItemPostPaint(
2510         [in] HDC hdc,
2511         [in] RECT *prc,
2512         [in] NSTCCUSTOMDRAW *pnstccdItem);
2513 }
2514
2515 /*****************************************************************************
2516  * INameSpaceTreeControlDropHandler interface
2517  */
2518 [
2519  object,
2520  uuid(F9C665D6-C2F2-4C19-BF33-8322D7352F51),
2521  local
2522 ]
2523 interface INameSpaceTreeControlDropHandler : IUnknown
2524 {
2525     HRESULT OnDragEnter(
2526         [in, unique] IShellItem *psiOver,
2527         [in] IShellItemArray *psiaData,
2528         [in] BOOL fOutsideSource,
2529         [in] DWORD grfKeyState,
2530         [in, out] DWORD *pdwEffect);
2531
2532     HRESULT OnDragOver(
2533         [in, unique] IShellItem *psiOver,
2534         [in] IShellItemArray *psiaData,
2535         [in] DWORD grfKeyState,
2536         [in, out] DWORD *pdwEffect);
2537
2538     HRESULT OnDragPosition(
2539         [in, unique] IShellItem *psiOver,
2540         [in] IShellItemArray *psiaData,
2541         [in] int iNewPosition,
2542         [in] int iOldPosition);
2543
2544     HRESULT OnDrop(
2545         [in, unique] IShellItem *psiOver,
2546         [in] IShellItemArray *psiaData,
2547         [in] int iPosition,
2548         [in] DWORD grfKeyState,
2549         [in, out] DWORD *pdwEffect);
2550
2551     HRESULT OnDropPosition(
2552         [in, unique] IShellItem *psiOver,
2553         [in] IShellItemArray *psiaData,
2554         [in] int iNewPosition,
2555         [in] int iOldPosition);
2556
2557     HRESULT OnDragLeave(
2558         [in, unique] IShellItem *psiOver);
2559 }
2560 cpp_quote("#define NSTCDHPOS_ONTOP -1")
2561
2562 interface IFileDialog;
2563
2564 typedef [v1_enum] enum FDE_OVERWRITE_RESPONSE
2565 {
2566     FDEOR_DEFAULT  = 0,
2567     FDEOR_ACCCEP   = 1,
2568     FDEOR_REFUSE   = 2
2569 } FDE_OVERWRITE_RESPONSE;
2570
2571 typedef [v1_enum] enum FDE_SHAREVIOLATION_RESPONSE
2572 {
2573     FDESVR_DEFAULT = 0,
2574     FDESVR_ACCEPT  = 1,
2575     FDESVR_REFUSE  = 2
2576 } FDE_SHAREVIOLATION_RESPONSE;
2577
2578 /*****************************************************************************
2579  * IFileDialogEvents interface
2580  */
2581 [
2582  object,
2583  uuid(973510DB-7D7F-452B-8975-74A85828D354),
2584  pointer_default(unique)
2585 ]
2586 interface IFileDialogEvents : IUnknown
2587 {
2588     HRESULT OnFileOk(
2589         [in] IFileDialog *pfd);
2590
2591     HRESULT OnFolderChanging(
2592         [in] IFileDialog *pfd,
2593         [in] IShellItem *psiFolder);
2594
2595     HRESULT OnFolderChange(
2596         [in] IFileDialog *pfd);
2597
2598     HRESULT OnSelectionChange(
2599         [in] IFileDialog *pfd);
2600
2601     HRESULT OnShareViolation(
2602         [in] IFileDialog *pfd,
2603         [in] IShellItem *psi,
2604         [out] FDE_SHAREVIOLATION_RESPONSE *pResponse);
2605
2606     HRESULT OnTypeChange(
2607         [in] IFileDialog *pfd);
2608
2609     HRESULT OnOverwrite(
2610         [in] IFileDialog *pfd,
2611         [in] IShellItem *psi,
2612         [out] FDE_OVERWRITE_RESPONSE *pResponse);
2613 }
2614
2615 /*****************************************************************************
2616  * IModalWindow interface
2617  */
2618 [
2619  object,
2620  uuid(B4DB1657-70D7-485E-8E3E-6FCB5A5C1802),
2621  pointer_default(unique)
2622 ]
2623 interface IModalWindow : IUnknown
2624 {
2625     [local]
2626     HRESULT Show(
2627         [in, unique, annotation("__in_opt")] HWND hwndOwner);
2628
2629     [call_as(Show)]
2630     HRESULT RemoteShow(
2631         [in, unique] HWND hwndOwner);
2632 }
2633
2634 typedef [v1_enum] enum FDAP
2635 {
2636     FDAP_BOTTOM    = 0,
2637     FDAP_TOP       = 1
2638 } FDAP;
2639
2640 /*****************************************************************************
2641  * IFileDialog interface
2642  */
2643 [
2644  object,
2645  uuid(42F85136-DB7E-439C-85F1-E4075D135FC8),
2646  pointer_default(unique)
2647 ]
2648 interface IFileDialog : IModalWindow
2649 {
2650     [v1_enum] enum _FILEOPENDIALOGOPTIONS
2651     {
2652         FOS_OVERWRITEPROMPT     = 0x00000002,
2653         FOS_STRICTFILETYPES     = 0x00000004,
2654         FOS_NOCHANGEDIR         = 0x00000008,
2655         FOS_PICKFOLDERS         = 0x00000020,
2656         FOS_FORCEFILESYSTEM     = 0x00000040,
2657         FOS_ALLNONSTORAGEITEMS  = 0x00000080,
2658         FOS_NOVALIDATE          = 0x00000100,
2659         FOS_ALLOWMULTISELECT    = 0x00000200,
2660         FOS_PATHMUSTEXIST       = 0x00000800,
2661         FOS_FILEMUSTEXIST       = 0x00001000,
2662         FOS_CREATEPROMPT        = 0x00002000,
2663         FOS_SHAREAWARE          = 0x00004000,
2664         FOS_NOREADONLYRETURN    = 0x00008000,
2665         FOS_NOTESTFILECREATE    = 0x00010000,
2666         FOS_HIDEMRUPLACES       = 0x00020000,
2667         FOS_HIDEPINNEDPLACES    = 0x00040000,
2668         FOS_NODEREFERENCELINKS  = 0x00100000,
2669         FOS_DONTADDTORECENT     = 0x02000000,
2670         FOS_FORCESHOWHIDDEN     = 0x10000000,
2671         FOS_DEFAULTNOMINIMODE   = 0x20000000,
2672         FOS_FORCEPREVIEWPANEON  = 0x40000000
2673     };
2674     typedef DWORD FILEOPENDIALOGOPTIONS;
2675
2676     HRESULT SetFileTypes(
2677         [in] UINT cFileTypes,
2678         [in, size_is(cFileTypes)] const COMDLG_FILTERSPEC *rgFilterSpec);
2679
2680     HRESULT SetFileTypeIndex(
2681         [in] UINT iFileType);
2682
2683     HRESULT GetFileTypeIndex(
2684         [out] UINT *piFileType);
2685
2686     HRESULT Advise(
2687         [in] IFileDialogEvents *pfde,
2688         [out] DWORD *pdwCookie);
2689
2690     HRESULT Unadvise(
2691         [in] DWORD dwCookie);
2692
2693     HRESULT SetOptions(
2694         [in] FILEOPENDIALOGOPTIONS fos);
2695
2696     HRESULT GetOptions(
2697         [in] FILEOPENDIALOGOPTIONS *pfos);
2698
2699     HRESULT SetDefaultFolder(
2700         [in] IShellItem *psi);
2701
2702     HRESULT SetFolder(
2703         [in] IShellItem *psi);
2704
2705     HRESULT GetFolder(
2706         [out] IShellItem **ppsi);
2707
2708     HRESULT GetCurrentSelection(
2709         [out] IShellItem **ppsi);
2710
2711     HRESULT SetFileName(
2712         [in, string] LPCWSTR pszName);
2713
2714     HRESULT GetFileName(
2715         [out, string] LPWSTR *pszName);
2716
2717     HRESULT SetTitle(
2718         [in, string] LPCWSTR pszTitle);
2719
2720     HRESULT SetOkButtonLabel(
2721         [in, string] LPCWSTR pszText);
2722
2723     HRESULT SetFileNameLabel(
2724         [in, string] LPCWSTR pszLabel);
2725
2726     HRESULT GetResult(
2727         [out] IShellItem **ppsi);
2728
2729     HRESULT AddPlace(
2730         [in] IShellItem *psi,
2731         [in] FDAP fdap);
2732
2733     HRESULT SetDefaultExtension(
2734         [in, string] LPCWSTR pszDefaultExtension);
2735
2736     HRESULT Close(
2737         [in] HRESULT hr);
2738
2739     HRESULT SetClientGuid(
2740         [in] REFGUID guid);
2741
2742     HRESULT ClearClientData();
2743
2744     HRESULT SetFilter(
2745         [in] IShellItemFilter *pFilter);
2746 }
2747
2748 /*****************************************************************************
2749  * IFileDialog2 interface
2750  */
2751 [
2752  object,
2753  uuid(61744FC7-85B5-4791-A9B0-272276309B13),
2754  pointer_default(unique)
2755 ]
2756 interface IFileDialog2 : IFileDialog
2757 {
2758     HRESULT SetCancelButtonLabel(
2759         [in] LPCWSTR pszLabel);
2760
2761     HRESULT SetNavigationRoot(
2762         [in] IShellItem *psi);
2763 }
2764
2765 /*****************************************************************************
2766  * IFileOperationProgressSink interface
2767  */
2768 [
2769  object,
2770  uuid(04B0F1A7-9490-44BC-96E1-4296A31252E2),
2771  pointer_default(unique)
2772 ]
2773 interface IFileOperationProgressSink : IUnknown
2774 {
2775     HRESULT StartOperations();
2776
2777     HRESULT FinishOperations(
2778         [in] HRESULT hrResult);
2779
2780     HRESULT PreRenameItem(
2781         [in] DWORD dwFlags,
2782         [in] IShellItem *psiItem,
2783         [in, unique, string] LPCWSTR pszNewName);
2784
2785     HRESULT PostRenameItem(
2786         [in] DWORD dwFlags,
2787         [in] IShellItem *psiItem,
2788         [in, string] LPCWSTR pszNewName,
2789         [in] HRESULT hrRename,
2790         [in] IShellItem *psiNewlyCreated);
2791
2792     HRESULT PreMoveItem(
2793         [in] DWORD dwFlags,
2794         [in] IShellItem *psiItem,
2795         [in] IShellItem *psiDestinationFolder,
2796         [in, unique, string] LPCWSTR pszNewName);
2797
2798     HRESULT PostMoveItem(
2799         [in] DWORD dwFlags,
2800         [in] IShellItem *psiItem,
2801         [in] IShellItem *psiDestinationFolder,
2802         [in, unique, string] LPCWSTR pszNewName,
2803         [in] HRESULT hrMove,
2804         [in] IShellItem *psiNewlyCreated);
2805
2806     HRESULT PreCopyItem(
2807         [in] DWORD dwFlags,
2808         [in] IShellItem *psiItem,
2809         [in] IShellItem *psiDestinationFolder,
2810         [in, unique, string] LPCWSTR pszNewName);
2811
2812     HRESULT PostCopyItem(
2813         [in] DWORD dwFlags,
2814         [in] IShellItem *psiItem,
2815         [in] IShellItem *psiDestinationFolder,
2816         [in, unique, string] LPCWSTR pszNewName,
2817         [in] HRESULT hrCopy,
2818         [in] IShellItem *psiNewlyCreated);
2819
2820     HRESULT PreDeleteItem(
2821         [in] DWORD dwFlags,
2822         [in] IShellItem *psiItem);
2823
2824     HRESULT PostDeleteItem(
2825         [in] DWORD dwFlags,
2826         [in] IShellItem *psiItem,
2827         [in] HRESULT hrDelete,
2828         [in] IShellItem *psiNewlyCreated);
2829
2830     HRESULT PreNewItem(
2831         [in] DWORD dwFlags,
2832         [in] IShellItem *psiDestinationFolder,
2833         [in, unique, string] LPCWSTR pszNewName);
2834
2835     HRESULT PostNewItem(
2836         [in] DWORD dwFlags,
2837         [in] IShellItem *psiDestinationFolder,
2838         [in, unique, string] LPCWSTR pszNewName,
2839         [in, unique, string] LPCWSTR pszTemplateName,
2840         [in] DWORD dwFileAttributes,
2841         [in] HRESULT hrNew,
2842         [in] IShellItem *psiNewItem);
2843
2844     HRESULT UpdateProgress(
2845         [in] UINT iWorkTotal,
2846         [in] UINT iWorkSoFar);
2847
2848     HRESULT ResetTimer();
2849
2850     HRESULT PauseTimer();
2851
2852     HRESULT ResumeTimer();
2853 }
2854
2855 /*****************************************************************************
2856  * IFileSaveDialog interface
2857  */
2858 [
2859  object,
2860  uuid(84BCCD23-5FDE-4CDB-AEA4-AF64B83D78AB),
2861  pointer_default(unique)
2862 ]
2863 interface IFileSaveDialog : IFileDialog
2864 {
2865     HRESULT SetSaveAsItem(
2866         [in] IShellItem *psi);
2867
2868     HRESULT SetProperties(
2869         [in] IPropertyStore *pStore);
2870
2871     HRESULT SetCollectedProperties(
2872         [in] IPropertyDescriptionList *pList,
2873         [in] BOOL fAppendDefault);
2874
2875     HRESULT GetProperties(
2876         [in] IPropertyStore **ppStore);
2877
2878     HRESULT ApplyProperties(
2879         [in] IShellItem *psi,
2880         [in] IPropertyStore *pStore,
2881         [in, unique] HWND hwnd,
2882         [in, unique] IFileOperationProgressSink *pSink);
2883 }
2884
2885
2886 /*****************************************************************************
2887  * IFileOpenDialog interface
2888  */
2889 [
2890  object,
2891  uuid(D57C7288-D4AD-4768-BE02-9D969532D960),
2892  pointer_default(unique)
2893 ]
2894 interface IFileOpenDialog : IFileDialog
2895 {
2896     HRESULT GetResults(
2897         [out] IShellItemArray **ppenum);
2898
2899     HRESULT GetSelectedItems(
2900         [out] IShellItemArray **ppsai);
2901 }
2902
2903 typedef [v1_enum] enum CDCONTROLSTATEF
2904 {
2905     CDCS_INACTIVE       = 0x0,
2906     CDCS_ENABLED        = 0x1,
2907     CDCS_VISIBLE        = 0x2,
2908     CDCS_ENABLEDVISIBLE = 0x3
2909 } CDCONTROLSTATEF;
2910 cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(CDCONTROLSTATEF)")
2911 /*****************************************************************************
2912  * IFileDialogCustomize interface
2913  */
2914 [
2915  object,
2916  uuid(E6FDD21A-163F-4975-9C8C-A69F1BA37034),
2917  pointer_default(unique)
2918 ]
2919 interface IFileDialogCustomize : IUnknown
2920 {
2921     HRESULT EnableOpenDropDown(
2922         [in] DWORD dwIDCtl);
2923
2924     HRESULT AddMenu(
2925         [in] DWORD dwIDCtl,
2926         [in, string] LPCWSTR pszLabel);
2927
2928     HRESULT AddPushButton(
2929         [in] DWORD dwIDCtl,
2930         [in, string] LPCWSTR pszLabel);
2931
2932     HRESULT AddComboBox(
2933         [in] DWORD dwIDCtl);
2934
2935     HRESULT AddRadioButtonList(
2936         [in] DWORD dwIDCtl);
2937
2938     HRESULT AddCheckButton(
2939         [in] DWORD dwIDCtl,
2940         [in, string] LPCWSTR pszLabel,
2941         [in] BOOL bChecked);
2942
2943     HRESULT AddEditBox(
2944         [in] DWORD dwIDCtl,
2945         [in, string] LPCWSTR pszText);
2946
2947     HRESULT AddSeparator(
2948         [in] DWORD dwIDCtl);
2949
2950     HRESULT AddText(
2951         [in] DWORD dwIDCtl,
2952         [in, string] LPCWSTR pszText);
2953
2954     HRESULT SetControlLabel(
2955         [in] DWORD dwIDCtl,
2956         [in, string] LPCWSTR pszLabel);
2957
2958     HRESULT GetControlState(
2959         [in] DWORD dwIDCtl,
2960         [out] CDCONTROLSTATEF *pdwState);
2961
2962     HRESULT SetControlState(
2963         [in] DWORD dwIDCtl,
2964         [in] CDCONTROLSTATEF dwState);
2965
2966     HRESULT GetEditBoxText(
2967         [in] DWORD dwIDCtl,
2968         [out, string] WCHAR **ppszText);
2969
2970     HRESULT SetEditBoxText(
2971         [in] DWORD dwIDCtl,
2972         [in, string] LPCWSTR pszText);
2973
2974     HRESULT GetCheckButtonState(
2975         [in] DWORD dwIDCtl,
2976         [out] BOOL *pbChecked);
2977
2978     HRESULT SetCheckButtonState(
2979         [in] DWORD dwIDCtl,
2980         [in] BOOL bChecked);
2981
2982     HRESULT AddControlItem(
2983         [in] DWORD dwIDCtl,
2984         [in] DWORD dwIDItem,
2985         [in] LPCWSTR pszLabel);
2986
2987     HRESULT RemoveControlItem(
2988         [in] DWORD dwIDCtl,
2989         [in] DWORD dwIDItem);
2990
2991     HRESULT RemoveAllControlItems(
2992         [in] DWORD dwIDCtl);
2993
2994     HRESULT GetControlItemState(
2995         [in] DWORD dwIDCtl,
2996         [in] DWORD dwIDItem,
2997         [out] CDCONTROLSTATEF *pdwState);
2998
2999     HRESULT SetControlItemState(
3000         [in] DWORD dwIDCtl,
3001         [in] DWORD dwIDItem,
3002         [in] CDCONTROLSTATEF dwState);
3003
3004     HRESULT GetSelectedControlItem(
3005         [in] DWORD dwIDCtl,
3006         [out] DWORD *pdwIDItem);
3007
3008     HRESULT SetSelectedControlItem(
3009         [in] DWORD dwIDCtl,
3010         [in] DWORD dwIDItem);
3011
3012     HRESULT StartVisualGroup(
3013         [in] DWORD dwIDCtl,
3014         [in, string] LPCWSTR pszLabel);
3015
3016     HRESULT EndVisualGroup();
3017
3018     HRESULT MakeProminent(
3019         [in] DWORD dwIDCtl);
3020
3021     HRESULT SetControlItemText(
3022         [in] DWORD dwIDCtl,
3023         [in] DWORD dwIDItem,
3024         [in, string] LPCWSTR pszLabel);
3025 }
3026
3027 /*****************************************************************************
3028  * IFileDialogControlEvents interface
3029  */
3030 [
3031  object,
3032  uuid(36116642-D713-4B97-9B83-7484A9D00433),
3033  pointer_default(unique)
3034 ]
3035 interface IFileDialogControlEvents : IUnknown
3036 {
3037     HRESULT OnItemSelected(
3038         [in] IFileDialogCustomize *pfdc,
3039         [in] DWORD dwIDCtl,
3040         [in] DWORD dwIDItem);
3041
3042     HRESULT OnButtonClicked(
3043         [in] IFileDialogCustomize *pfdc,
3044         [in] DWORD dwIDCtl);
3045
3046     HRESULT OnCheckButtonToggled(
3047         [in] IFileDialogCustomize *pfdc,
3048         [in] BOOL dwIDCtl,
3049         [in] BOOL bChecked);
3050
3051     HRESULT OnControlActivating(
3052         [in] IFileDialogCustomize *pfdc,
3053         [in] DWORD dwIDCtl);
3054 }
3055
3056 typedef [v1_enum] enum tagKF_CATEGORY
3057 {
3058     KF_CATEGORY_VIRTUAL = 0x00000001,
3059     KF_CATEGORY_FIXED   = 0x00000002,
3060     KF_CATEGORY_COMMON  = 0x00000003,
3061     KF_CATEGORY_PERUSER = 0x00000004
3062 } KF_CATEGORY;
3063
3064 typedef [v1_enum] enum tagKF_REDIRECTION_CAPABILITIES
3065 {
3066     KF_REDIRECTION_CAPABILITIES_ALLOW_ALL               = 0x000000ff,
3067     KF_REDIRECTION_CAPABILITIES_REDIRECTABLE            = 0x00000001,
3068     KF_REDIRECTION_CAPABILITIES_DENY_ALL                = 0x000fff00,
3069     KF_REDIRECTION_CAPABILITIES_DENY_POLICY_REDIRECTED  = 0x00000100,
3070     KF_REDIRECTION_CAPABILITIES_DENY_POLICY             = 0x00000200,
3071     KF_REDIRECTION_CAPABILITIES_DENY_PERMISSIONS        = 0x00000400
3072 } KF_REDIRECTION_CAPABILITIES;
3073
3074 typedef [v1_enum] enum tagKF_DEFINITION_FLAGS
3075 {
3076     KFDF_LOCAL_REDIRECT_ONLY    = 0x00000002,
3077     KFDF_ROAMABLE               = 0x00000004,
3078     KFDF_PRECREATE              = 0x00000008,
3079     KFDF_STREAM                 = 0x00000010,
3080     KFDF_PUBLISHEXPANDEDPATH    = 0x00000020
3081 } KF_DEFINITION_FLAGS;
3082
3083 typedef struct tagKNOWNFOLDER_DEFINITION
3084 {
3085     KF_CATEGORY         category;
3086     LPWSTR              pszName;
3087     LPWSTR              pszDescription;
3088     KNOWNFOLDERID       fidParent;
3089     LPWSTR              pszRelativePath;
3090     LPWSTR              pszParsingName;
3091     LPWSTR              pszTooltip;
3092     LPWSTR              pszLocalizedName;
3093     LPWSTR              pszIcon;
3094     LPWSTR              pszSecurity;
3095     DWORD               dwAttributes;
3096     KF_DEFINITION_FLAGS kfdFlags;
3097     FOLDERTYPEID        ftidType;
3098 } KNOWNFOLDER_DEFINITION;
3099
3100 [
3101  object,
3102  uuid(3aa7af7e-9b36-420C-a8e3-f77d4674a488),
3103  pointer_default(ref)
3104 ]
3105 interface IKnownFolder : IUnknown
3106 {
3107     HRESULT GetId(
3108         [out] KNOWNFOLDERID *pkfid);
3109
3110     HRESULT GetCategory(
3111         [out] KF_CATEGORY *pCategory);
3112
3113     HRESULT GetShellItem(
3114         [in] DWORD dwFlags,
3115         [in] REFIID riid,
3116         [out, iid_is(riid)] void **ppv);
3117
3118     HRESULT GetPath(
3119         [in] DWORD dwFlags,
3120         [out, string] LPWSTR *ppszPath);
3121
3122     HRESULT SetPath(
3123         [in] DWORD dwFlags,
3124         [in, string] LPCWSTR pszPath);
3125
3126     HRESULT GetIDList(
3127         [in] DWORD dwFlags,
3128         [out] PIDLIST_ABSOLUTE *ppidl);
3129
3130     HRESULT GetFolderType(
3131         [out] FOLDERTYPEID *pftid);
3132
3133     HRESULT GetRedirectionCapabilities(
3134         [out] KF_REDIRECTION_CAPABILITIES *pCapabilities);
3135
3136     HRESULT GetFolderDefinition(
3137         [out] KNOWNFOLDER_DEFINITION *pKFD);
3138 }
3139
3140 typedef [v1_enum] enum tagKF_REDIRECT_FLAGS
3141 {
3142     KF_REDIRECT_USER_EXCLUSIVE      = 0x00000001,
3143     KF_REDIRECT_COPY_SOURCE_DACL    = 0x00000002,
3144     KF_REDIRECT_OWNER_USER          = 0x00000004,
3145     KF_REDIRECT_SET_OWNER_EXPLICIT  = 0x00000008,
3146     KF_REDIRECT_CHECK_ONLY          = 0x00000010,
3147     KF_REDIRECT_WITH_UI             = 0x00000020,
3148     KF_REDIRECT_UNPIN               = 0x00000040,
3149     KF_REDIRECT_PIN                 = 0x00000080,
3150     KF_REDIRECT_COPY_CONTENTS       = 0x00000200,
3151     KF_REDIRECT_DEL_SOURCE_CONTENTS = 0x00000400,
3152     KF_REDIRECT_EXCLUDE_ALL_KNOWN_SUBFOLDERS = 0x00000800
3153 } KF_REDIRECT_FLAGS;
3154
3155 [
3156     object,
3157     uuid(8BE2D872-86AA-4d47-B776-32CCA40C7018),
3158     pointer_default(ref)
3159 ]
3160 interface IKnownFolderManager : IUnknown
3161 {
3162     typedef [v1_enum] enum tagFFFP_MODE
3163     {
3164         FFFP_EXACTMATCH,
3165         FFFP_NEARESTPARENTMATCH
3166     } FFFP_MODE;
3167
3168     HRESULT FolderIdFromCsidl(
3169         [in] int nCsidl,
3170         [out] KNOWNFOLDERID *pfid);
3171
3172     HRESULT FolderIdToCsidl(
3173         [in] REFKNOWNFOLDERID rfid,
3174         [out] int *pnCsidl);
3175
3176     HRESULT GetFolderIds(
3177         [out, size_is(, *pCount)] KNOWNFOLDERID **ppKFId,
3178         [in, out] UINT *pCount);
3179
3180     HRESULT GetFolder(
3181         [in] REFKNOWNFOLDERID rfid,
3182         [out] IKnownFolder **ppkf);
3183
3184     HRESULT GetFolderByName(
3185         [in, string] LPCWSTR pszCanonicalName,
3186         [out] IKnownFolder **ppkf);
3187
3188     HRESULT RegisterFolder(
3189         [in] REFKNOWNFOLDERID rfid,
3190         [in] KNOWNFOLDER_DEFINITION const *pKFD);
3191
3192     HRESULT UnregisterFolder(
3193         [in] REFKNOWNFOLDERID rfid);
3194
3195     HRESULT FindFolderFromPath(
3196         [in, string] LPCWSTR pszPath,
3197         [in] FFFP_MODE mode,
3198         [out] IKnownFolder **ppkf);
3199
3200     HRESULT FindFolderFromIDList(
3201         [in] PCIDLIST_ABSOLUTE pidl,
3202         [out] IKnownFolder **ppkf);
3203
3204     HRESULT Redirect(
3205         [in] REFKNOWNFOLDERID rfid,
3206         [in, unique] HWND hwnd,
3207         [in] KF_REDIRECT_FLAGS flags,
3208         [in, unique, string] LPCWSTR pszTargetPath,
3209         [in] UINT cFolders,
3210         [in, size_is(cFolders), unique] KNOWNFOLDERID const *pExclusion,
3211         [out, string] LPWSTR *ppszError);
3212 }
3213
3214 /* function for releasing structure returned from IKnownFolder::GetFolderDefinition */
3215 cpp_quote("static inline void FreeKnownFolderDefinitionFields(KNOWNFOLDER_DEFINITION *pKFD)")
3216 cpp_quote("{")
3217 cpp_quote("    CoTaskMemFree(pKFD->pszName);")
3218 cpp_quote("    CoTaskMemFree(pKFD->pszDescription);")
3219 cpp_quote("    CoTaskMemFree(pKFD->pszRelativePath);")
3220 cpp_quote("    CoTaskMemFree(pKFD->pszParsingName);")
3221 cpp_quote("    CoTaskMemFree(pKFD->pszTooltip);")
3222 cpp_quote("    CoTaskMemFree(pKFD->pszLocalizedName);")
3223 cpp_quote("    CoTaskMemFree(pKFD->pszIcon);")
3224 cpp_quote("    CoTaskMemFree(pKFD->pszSecurity);")
3225 cpp_quote("}")
3226
3227 typedef [v1_enum] enum ASSOCIATIONLEVEL {
3228     AL_MACHINE,
3229     AL_EFFECTIVE,
3230     AL_USER
3231 } ASSOCIATIONLEVEL;
3232
3233 typedef [v1_enum] enum ASSOCIATIONTYPE {
3234     AT_FILEEXTENSION,
3235     AT_URLPROTOCOL,
3236     AT_STARTMENUCLIENT,
3237     AT_MIMETYPE
3238 } ASSOCIATIONTYPE;
3239
3240 [
3241     object,
3242     uuid(4e530b0a-e611-4c77-a3ac-9031d022281b),
3243     pointer_default(unique)
3244 ]
3245 interface IApplicationAssociationRegistration : IUnknown
3246 {
3247     HRESULT QueryCurrentDefault(
3248         [in, string] LPCWSTR pszQuery,
3249         [in] ASSOCIATIONTYPE atQueryType,
3250         [in] ASSOCIATIONLEVEL alQueryLevel,
3251         [out, string] LPWSTR *ppszAssociation);
3252
3253     HRESULT QueryAppIsDefault(
3254         [in, string] LPCWSTR pszQuery,
3255         [in] ASSOCIATIONTYPE atQueryType,
3256         [in] ASSOCIATIONLEVEL alQueryLevel,
3257         [in, string] LPCWSTR pszAppRegistryName,
3258         [out] BOOL *pfDefault);
3259
3260     HRESULT QueryAppIsDefaultAll(
3261         [in] ASSOCIATIONLEVEL alQueryLevel,
3262         [in, string] LPCWSTR pszAppRegistryName,
3263         [out] BOOL* pfDefault);
3264
3265     HRESULT SetAppAsDefault(
3266         [in, string] LPCWSTR pszAppRegistryName,
3267         [in, string] LPCWSTR pszSet,
3268         [in] ASSOCIATIONTYPE atSetType);
3269
3270     HRESULT SetAppAsDefaultAll(
3271         [in, string] LPCWSTR pszAppRegistryName);
3272
3273     HRESULT ClearUserAssociations();
3274 }
3275
3276 [
3277     uuid(6332debf-87b5-4670-90c0-5e57b408a49e),
3278     object,
3279     pointer_default(unique)
3280 ]
3281 interface ICustomDestinationList : IUnknown
3282 {
3283     typedef [v1_enum] enum KNOWNDESTCATEGORY {
3284         KDC_FREQUENT = 1,
3285         KDC_RECENT
3286     } KNOWNDESTCATEGORY;
3287
3288     HRESULT SetAppID([in, string] LPCWSTR pszAppID);
3289
3290     HRESULT BeginList(
3291             [out] UINT *pcMinSlots,
3292             [in] REFIID riid,
3293             [out, iid_is(riid)] void **ppv);
3294
3295     HRESULT AppendCategory(
3296             [in, string] LPCWSTR pszCategory,
3297             [in] IObjectArray *poa);
3298
3299     HRESULT AppendKnownCategory([in] KNOWNDESTCATEGORY category);
3300     HRESULT AddUserTasks([in] IObjectArray *poa);
3301     HRESULT CommitList();
3302
3303     HRESULT GetRemovedDestinations(
3304             [in] REFIID riid,
3305             [out, iid_is(riid)] void **ppv);
3306
3307     HRESULT DeleteList([in, unique, string] LPCWSTR pszAppID);
3308     HRESULT AbortList();
3309 }
3310
3311 /*****************************************************************************
3312  * ShellObjects typelibrary
3313  */
3314 [
3315  uuid(50A7E9B1-70EF-11D1-B75A-00A0C90564FE),
3316  lcid(0x0000),
3317  version(1.0)
3318 ]
3319 library ShellObjects
3320 {
3321     [
3322         uuid(71F96385-DDD6-48D3-A0C1-AE06E8B055FB)
3323     ]
3324     coclass ExplorerBrowser
3325     {
3326         interface IExplorerBrowser;
3327     }
3328
3329     [
3330         uuid(DC1C5A9C-E88A-4DDE-A5A1-60F82A20AEF7)
3331     ]
3332     coclass FileOpenDialog
3333     {
3334         interface IFileOpenDialog;
3335     }
3336
3337     [
3338         uuid(C0B4E2F3-BA21-4773-8DBA-335EC946EB8B)
3339     ]
3340     coclass FileSaveDialog
3341     {
3342         interface IFileSaveDialog;
3343     }
3344
3345     [
3346         uuid(AE054212-3535-4430-83ED-D501AA6680E6)
3347     ]
3348     coclass NamespaceTreeControl
3349     {
3350         interface INameSpaceTreeControl2;
3351     }
3352
3353     [
3354         uuid(4df0c730-df9d-4ae3-9153-aa6b82e9795a)
3355     ]
3356     coclass KnownFolderManager
3357     {
3358         interface IKnownFolderManager;
3359     }
3360
3361     [
3362         uuid(591209c7-767b-42b2-9fba-44ee4615f2c7)
3363     ]
3364     coclass ApplicationAssociationRegistration
3365     {
3366         interface IApplicationAssociationRegistration;
3367     }
3368
3369     [
3370          uuid(00021401-0000-0000-c000-000000000046)
3371     ]
3372     coclass ShellLink
3373     {
3374         interface IShellLinkW;
3375     }
3376
3377     [
3378         uuid(56fdf344-fd6d-11d0-958a-006097c9a090)
3379     ]
3380     coclass TaskbarList
3381     {
3382         interface ITaskbarList4;
3383     }
3384
3385     [
3386         uuid(77f10cf0-3db5-4966-b520-b7c54fd35ed6)
3387     ]
3388     coclass DestinationList {
3389         interface ICustomDestinationList;
3390     }
3391
3392     [
3393         uuid(2d3468c1-36a7-43b6-ac24-d3f02fd9607a)
3394     ]
3395     coclass EnumerableObjectCollection
3396     {
3397         interface IEnumObjects;
3398     }
3399 }