include: Add INameSpaceTreeControl, INameSpaceTreeControl2 and INameSpaceTreeControlE...
[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 /* FIXME: import "structuredquery.idl"; */
35
36 cpp_quote("/* FIXME: #include <sherrors.h> */")
37
38
39 /*****************************************************************************
40  * IPersistFolder interface
41  */
42 [
43     object,
44     uuid(000214ea-0000-0000-c000-000000000046),
45     pointer_default(unique)
46 ]
47 interface IPersistFolder : IPersist
48 {
49     typedef IPersistFolder *LPPERSISTFOLDER;
50
51     HRESULT Initialize( [in] LPCITEMIDLIST pidl );
52 }
53
54
55 /*****************************************************************************
56  * IPersistFolder2 interface
57  */
58 [
59     object,
60     uuid(1ac3d9f0-175c-11d1-95be-00609797ea4f),
61     pointer_default(unique)
62 ]
63 interface IPersistFolder2 : IPersistFolder
64 {
65     typedef IPersistFolder2 *LPPERSISTFOLDER2;
66
67     HRESULT GetCurFolder( [out] LPITEMIDLIST *ppidl );
68 }
69
70
71 /*****************************************************************************
72  * IPersistIDList interface
73  */
74 [
75     object,
76     uuid(1079acfc-29bd-11d3-8e0d-00c04f6837d5),
77     pointer_default(unique)
78 ]
79 interface IPersistIDList : IPersist
80 {
81     HRESULT SetIDList( [in] LPCITEMIDLIST pidl );
82     HRESULT GetIDList( [out] LPITEMIDLIST *ppidl );
83 }
84
85
86 /*****************************************************************************
87  * IEnumIDList interface
88  */
89 [
90     object,
91     uuid(000214f2-0000-0000-c000-000000000046),
92     pointer_default(unique)
93 ]
94 interface IEnumIDList : IUnknown
95 {
96     typedef IEnumIDList *LPENUMIDLIST;
97
98     HRESULT Next(
99         [in] ULONG celt,
100         [out, size_is(celt), length_is(*pceltFetched)] LPITEMIDLIST *rgelt,
101         [out] ULONG *pceltFetched);
102
103     HRESULT Skip( [in] ULONG celt );
104     HRESULT Reset();
105     HRESULT Clone( [out] IEnumIDList **ppenum );
106 }
107
108 /*****************************************************************************
109  * IShellPropSheetExt interface
110  */
111 cpp_quote("#if 0")
112     typedef LPARAM LPFNSVADDPROPSHEETPAGE;
113 cpp_quote("#else")
114 cpp_quote("#include <prsht.h>")
115 cpp_quote("typedef LPFNADDPROPSHEETPAGE LPFNSVADDPROPSHEETPAGE;")
116 cpp_quote("#endif")
117
118 [
119     object,
120     uuid(000214E9-0000-0000-C000-000000000046),
121     pointer_default(unique),
122     local
123 ]
124 interface IShellPropSheetExt : IUnknown
125 {
126     enum tagSHELLPROPSHEETEXTPAGEID {
127         EXPPS_FILETYPES = 0x1
128     };
129
130     typedef UINT EXPPS;
131
132     HRESULT AddPages(
133         [in] LPFNSVADDPROPSHEETPAGE pfnAddPage,
134         [in] LPARAM lParam);
135     HRESULT ReplacePage(
136         [in] EXPPS uPageID,
137         [in] LPFNSVADDPROPSHEETPAGE pfnReplaceWith,
138         [in] LPARAM lParam);
139 }
140 typedef IShellPropSheetExt *LPSHELLPROPSHEETEXT;
141
142 /*****************************************************************************
143  * IShellFolder interface
144  */
145 [
146     object,
147     uuid(000214e6-0000-0000-c000-000000000046),
148     pointer_default(unique)
149 ]
150 interface IShellFolder : IUnknown
151 {
152     typedef IShellFolder * LPSHELLFOLDER;
153
154     typedef enum tagSHGDN
155     {
156         SHGDN_NORMAL = 0,
157         SHGDN_INFOLDER = 1,
158         SHGDN_FOREDITING = 0x1000,
159         SHGDN_INCLUDE_NONFILESYS = 0x2000,
160         SHGDN_FORADDRESSBAR = 0x4000,
161         SHGDN_FORPARSING = 0x8000
162     } SHGNO;
163
164     typedef DWORD SHGDNF;
165
166     enum tagSHCONTF
167     {
168         SHCONTF_FOLDERS = 32,
169         SHCONTF_NONFOLDERS = 64,
170         SHCONTF_INCLUDEHIDDEN = 128,
171         SHCONTF_INIT_ON_FIRST_NEXT = 256,
172         SHCONTF_NETPRINTERSRCH = 512,
173         SHCONTF_SHAREABLE = 1024,
174         SHCONTF_STORAGE = 2048
175     };
176
177     typedef DWORD SHCONTF;
178
179     cpp_quote("#define SFGAO_CANCOPY           DROPEFFECT_COPY")
180     cpp_quote("#define SFGAO_CANMOVE           DROPEFFECT_MOVE")
181     cpp_quote("#define SFGAO_CANLINK           DROPEFFECT_LINK")
182     cpp_quote("#define SFGAO_STORAGE           0x00000008L")
183     cpp_quote("#define SFGAO_CANRENAME         0x00000010L")
184     cpp_quote("#define SFGAO_CANDELETE         0x00000020L")
185     cpp_quote("#define SFGAO_HASPROPSHEET      0x00000040L")
186     cpp_quote("#define SFGAO_DROPTARGET        0x00000100L")
187     cpp_quote("#define SFGAO_CAPABILITYMASK    0x00000177L")
188     cpp_quote("#define SFGAO_ENCRYPTED         0x00002000L")
189     cpp_quote("#define SFGAO_ISSLOW            0x00004000L")
190     cpp_quote("#define SFGAO_GHOSTED           0x00008000L")
191     cpp_quote("#define SFGAO_LINK              0x00010000L")
192     cpp_quote("#define SFGAO_SHARE             0x00020000L")
193     cpp_quote("#define SFGAO_READONLY          0x00040000L")
194     cpp_quote("#define SFGAO_HIDDEN            0x00080000L")
195     cpp_quote("#define SFGAO_DISPLAYATTRMASK   0x000FC000L")
196     cpp_quote("#define SFGAO_FILESYSANCESTOR   0x10000000L")
197     cpp_quote("#define SFGAO_FOLDER            0x20000000L")
198     cpp_quote("#define SFGAO_FILESYSTEM        0x40000000L")
199     cpp_quote("#define SFGAO_HASSUBFOLDER      0x80000000L")
200     cpp_quote("#define SFGAO_CONTENTSMASK      0x80000000L")
201     cpp_quote("#define SFGAO_VALIDATE          0x01000000L")
202     cpp_quote("#define SFGAO_REMOVABLE         0x02000000L")
203     cpp_quote("#define SFGAO_COMPRESSED        0x04000000L")
204     cpp_quote("#define SFGAO_BROWSABLE         0x08000000L")
205     cpp_quote("#define SFGAO_NONENUMERATED     0x00100000L")
206     cpp_quote("#define SFGAO_NEWCONTENT        0x00200000L")
207     cpp_quote("#define SFGAO_STREAM            0x00400000L")
208     cpp_quote("#define SFGAO_STORAGEANCESTOR   0x00800000L")
209
210     typedef ULONG SFGAOF;
211
212     HRESULT ParseDisplayName(
213         [in] HWND hwndOwner,
214         [in] LPBC pbcReserved,
215         [in, string] LPOLESTR lpszDisplayName,
216         [out] ULONG *pchEaten,
217         [out] LPITEMIDLIST *ppidl,
218         [in, out, unique] ULONG *pdwAttributes);
219
220     HRESULT EnumObjects(
221         [in] HWND hwndOwner,
222         [in] SHCONTF grfFlags,
223         [out] IEnumIDList **ppenumIDList);
224
225     HRESULT BindToObject(
226         [in] LPCITEMIDLIST pidl,
227         [in] LPBC pbcReserved,
228         [in] REFIID riid,
229         [out, iid_is(riid)] void **ppvOut);
230
231     HRESULT BindToStorage(
232         [in] LPCITEMIDLIST pidl,
233         [in] LPBC pbcReserved,
234         [in] REFIID riid,
235         [out, iid_is(riid)] void **ppvObj);
236
237     HRESULT CompareIDs(
238         [in] LPARAM lParam,
239         [in] LPCITEMIDLIST pidl1,
240         [in] LPCITEMIDLIST pidl2);
241
242     HRESULT CreateViewObject(
243         [in] HWND hwndOwner,
244         [in] REFIID riid,
245         [out, iid_is(riid)] void **ppvOut);
246
247     HRESULT GetAttributesOf(
248         [in] UINT cidl,
249         [in, size_is(cidl)] LPCITEMIDLIST *apidl,
250         [in, out] SFGAOF *rgfInOut);
251
252     HRESULT GetUIObjectOf(
253         [in] HWND hwndOwner,
254         [in] UINT cidl,
255         [in, size_is(cidl)] LPCITEMIDLIST *apidl,
256         [in] REFIID riid,
257         [in, out, unique] UINT *prgfInOut,
258         [out, iid_is(riid)] void **ppvOut);
259
260     HRESULT GetDisplayNameOf(
261         [in] LPCITEMIDLIST pidl,
262         [in] SHGDNF uFlags,
263         [out] STRRET *lpName);
264
265     HRESULT SetNameOf(
266         [in] HWND hwnd,
267         [in] LPCITEMIDLIST pidl,
268         [in, string] LPCOLESTR lpszName,
269         [in] SHGDNF uFlags,
270         [out] LPITEMIDLIST *ppidlOut);
271 }
272
273
274 /*****************************************************************************
275  * IEnumExtraSearch interface
276  */
277 [
278     object,
279     uuid(0e700be1-9db6-11d1-a1ce-00c04fd75d13),
280     pointer_default(unique)
281 ]
282 interface IEnumExtraSearch : IUnknown
283 {
284     typedef IEnumExtraSearch *LPENUMEXTRASEARCH;
285
286     typedef struct
287     {
288         GUID guidSearch;
289         WCHAR wszFriendlyName[80];
290         /*
291          *WCHAR wszMenuText[80];
292          *WCHAR wszHelpText[MAX_PATH];
293          */
294         WCHAR wszUrl[2084];
295         /*
296          *WCHAR wszIcon[MAX_PATH+10];
297          *WCHAR wszGreyIcon[MAX_PATH+10];
298          *WCHAR wszClrIcon[MAX_PATH+10];
299          */
300     } EXTRASEARCH, *LPEXTRASEARCH;
301
302     HRESULT Next(
303         [in] ULONG celt,
304         [out, size_is(celt), length_is(*pceltFetched)] EXTRASEARCH *rgelt,
305         [out] ULONG *pceltFetched);
306
307     HRESULT Skip( [in] ULONG celt );
308     HRESULT Reset();
309     HRESULT Clone( [out] IEnumExtraSearch **ppenum );
310 }
311
312
313 /*****************************************************************************
314  * IShellFolder2 interface
315  */
316 [
317     object,
318     uuid(93f2f68c-1d1b-11d3-a30e-00c04f79abd1),
319     pointer_default(unique)
320 ]
321 interface IShellFolder2 : IShellFolder
322 {
323     typedef struct
324     {
325         GUID    fmtid;
326         DWORD   pid;
327     } SHCOLUMNID, *LPSHCOLUMNID;
328     typedef const SHCOLUMNID *LPCSHCOLUMNID;
329
330     HRESULT GetDefaultSearchGUID( [out] GUID *lpguid );
331     HRESULT EnumSearches( [out] IEnumExtraSearch **ppenum );
332     HRESULT GetDefaultColumn( [in] DWORD dwReserved, [out] ULONG *pSort, [out] ULONG *pDisplay );
333     HRESULT GetDefaultColumnState( [in] UINT iColumn, [out] SHCOLSTATEF *pcsFlags );
334     HRESULT GetDetailsEx( [in] LPCITEMIDLIST pidl, [in] const SHCOLUMNID *pscid, [out] VARIANT *pv);
335     HRESULT GetDetailsOf( [in] LPCITEMIDLIST pidl, [in] UINT iColumn, [out] SHELLDETAILS *psd);
336     HRESULT MapColumnToSCID( [in] UINT iColumn, [in] SHCOLUMNID *pscid );
337 }
338
339 /*****************************************************************************
340  * IShellItem interface
341  */
342 [
343     object,
344     uuid(43826d1e-e718-42ee-bc55-a1e261c37bfe),
345     pointer_default(unique)
346 ]
347 interface IShellItem : IUnknown
348 {
349     typedef [v1_enum] enum {
350         SIGDN_NORMALDISPLAY                = 0,
351         SIGDN_PARENTRELATIVEPARSING        = 0x80018001,
352         SIGDN_DESKTOPABSOLUTEPARSING       = 0x80028000,
353         SIGDN_PARENTRELATIVEEDITING        = 0x80031001,
354         SIGDN_DESKTOPABSOLUTEEDITING       = 0x8004c000,
355         SIGDN_FILESYSPATH                  = 0x80058000,
356         SIGDN_URL                          = 0x80068000,
357         SIGDN_PARENTRELATIVEFORADDRESSBAR  = 0x8007c001,
358         SIGDN_PARENTRELATIVE               = 0x80080001
359     } SIGDN; /* & 0xFFFF => SHGDN */
360
361     typedef DWORD SICHINTF;
362
363     HRESULT BindToHandler(
364         [in] IBindCtx *pbc,
365         [in] REFGUID rbhid,
366         [in] REFIID riid,
367         [out, iid_is(riid)] void **ppvOut);
368
369     HRESULT GetParent( [out] IShellItem **ppsi );
370
371     HRESULT GetDisplayName(
372         [in] SIGDN sigdnName,
373         [out] LPWSTR *ppszName);
374
375     HRESULT GetAttributes(
376         [in] SFGAOF sfgaoMask,
377         [out] SFGAOF *psfgaoAttribs);
378
379     HRESULT Compare(
380         [in] IShellItem *psi,
381         [in] SICHINTF hint,
382         [out] int *piOrder);
383 }
384
385 typedef enum tagNWMF {
386     NWMF_UNLOADING        = 0x0001,
387     NWMF_USERINITED       = 0x0002,
388     NWMF_FIRST            = 0x0004,
389     NWMF_OVERRIDEKEY      = 0x0008,
390     NWMF_SHOWHELP         = 0x0010,
391     NWMF_HTMLDIALOG       = 0x0020,
392     NWMF_FROMDIALOGCHILD  = 0x0040,
393     NWMF_USERREQUESTED    = 0x0080,
394     NWMF_USERALLOWED      = 0x0100
395 } NWMF;
396
397 [
398     uuid(d2bc4c84-3f72-4a52-a604-7bcbf3982cbb),
399     object,
400     pointer_default(unique)
401 ]
402 interface INewWindowManager : IUnknown
403 {
404     HRESULT EvaluateNewWindow(
405         [in, string] LPCWSTR pszUrl,
406         [in, string] LPCWSTR pszName,
407         [in, string] LPCWSTR pszUrlContext,
408         [in, string] LPCWSTR pszFeatures,
409         [in]         BOOL fReplace,
410         [in]         DWORD dwFlags,
411         [in]         DWORD dwUserActionTime);
412 }
413
414 cpp_quote("#define SID_SNewWindowManager IID_INewWindowManager")
415
416 /*****************************************************************************
417  * IEnumShellItems interface
418  */
419 [
420  object,
421  uuid(70629033-E363-4A28-A567-0DB78006E6D7),
422  pointer_default(unique)
423 ]
424 interface IEnumShellItems : IUnknown
425 {
426     [local] HRESULT Next(
427         [in] ULONG celt,
428         [out, size_is(celt), length_is(*pceltFetched)] IShellItem **rgelt,
429         [out] ULONG *pceltFetched);
430
431     [call_as(Next)] HRESULT RemoteNext(
432         [in] ULONG celt,
433         [out, size_is(celt), length_is(*pceltFetched)] IShellItem **rgelt,
434         [out] ULONG *pceltFetched);
435
436     HRESULT Skip(
437         [in] ULONG celt);
438
439     HRESULT Reset();
440
441     HRESULT Clone(
442         [out] IEnumShellItems **ppenum);
443 }
444
445 /*****************************************************************************
446  * IShellItemArray interface
447  */
448 [
449  object,
450  uuid(B63EA76D-1F85-456F-A19C-48159EFA858B),
451  pointer_default(unique)
452 ]
453 interface IShellItemArray : IUnknown
454 {
455     typedef [v1_enum] enum SIATTRIBFLAGS {
456         SIATTRIBFLAGS_AND            = 0x0001,
457         SIATTRIBFLAGS_OR             = 0x0002,
458         SIATTRIBFLAGS_APPCOMPAT      = 0x0003,
459         SIATTRIBFLAGS_MASK           = 0x0003,
460         SIATTRIBFLAGS_ALLITEMS       = 0x4000
461     } SIATTRIBFLAGS;
462     cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(SIATTRIBFLAGS)")
463
464     HRESULT BindToHandler(
465         [in, unique] IBindCtx *pbc,
466         [in] REFGUID bhid,
467         [in] REFIID riid,
468         [out, iid_is(riid)] void **ppvOut);
469
470     HRESULT GetPropertyStore(
471         [in] GETPROPERTYSTOREFLAGS flags,
472         [in] REFIID riid,
473         [out, iid_is(riid)] void **ppv);
474
475     HRESULT GetPropertyDescriptionList(
476         [in] REFPROPERTYKEY keyType,
477         [in] REFIID riid,
478         [out, iid_is(riid)] void **ppv);
479
480     HRESULT GetAttributes(
481         [in] SIATTRIBFLAGS AttribFlags,
482         [in] SFGAOF sfgaoMask,
483         [out] SFGAOF *psfgaoAttribs);
484
485     HRESULT GetCount(
486         [out] DWORD *pdwNumItems);
487
488     HRESULT GetItemAt(
489         [in] DWORD dwIndex,
490         [out] IShellItem **ppsi);
491
492     HRESULT EnumItems(
493         [out] IEnumShellItems **ppenumShellItems);
494
495 }
496
497 /*****************************************************************************
498  * IShellItemFilter interface
499  */
500 [
501  object,
502  uuid(2659B475-EEB8-48B7-8F07-B378810F48CF),
503  pointer_default(unique)
504 ]
505 interface IShellItemFilter : IUnknown
506 {
507     HRESULT IncludeItem(
508         [in] IShellItem *psi);
509
510     HRESULT GetEnumFlagsForItem(
511         [in] IShellItem *psi,
512         [out] SHCONTF *pgrfFlags);
513 }
514
515 /*****************************************************************************
516  * FOLDERSETTINGS
517  */
518 typedef char *LPVIEWSETTINGS;
519
520 typedef enum
521 {
522     FWF_AUTOARRANGE         = 0x00000001,
523     FWF_ABBREVIATEDNAMES    = 0x00000002,
524     FWF_SNAPTOGRID          = 0x00000004,
525     FWF_OWNERDATA           = 0x00000008,
526     FWF_BESTFITWINDOW       = 0x00000010,
527     FWF_DESKTOP             = 0x00000020,
528     FWF_SINGLESEL           = 0x00000040,
529     FWF_NOSUBFOLDERS        = 0x00000080,
530     FWF_TRANSPARENT         = 0x00000100,
531     FWF_NOCLIENTEDGE        = 0x00000200,
532     FWF_NOSCROLL            = 0x00000400,
533     FWF_ALIGNLEFT           = 0x00000800,
534     FWF_NOICONS             = 0x00001000,
535     FWF_SHOWSELALWAYS       = 0x00002000,
536     FWF_NOVISIBLE           = 0x00004000,
537     FWF_SINGLECLICKACTIVATE = 0x00008000,
538     FWF_NOWEBVIEW           = 0x00010000,
539     FWF_HIDEFILENAMES       = 0x00020000,
540     FWF_CHECKSELECT         = 0x00040000,
541     FWF_NOENUMREFRESH       = 0x00080000,
542     FWF_NOGROUPING          = 0x00100000,
543     FWF_FULLROWSELECT       = 0x00200000,
544     FWF_NOFILTERS           = 0x00400000,
545     FWF_NOCOLUMNHEADER      = 0x00800000,
546     FWF_NOHEADERINALLVIEWS  = 0x01000000,
547     FWF_EXTENDEDTILES       = 0x02000000,
548     FWF_TRICHECKSELECT      = 0x04000000,
549     FWF_AUTOCHECKSELECT     = 0x08000000,
550     FWF_NOBROWSERVIEWSTATE  = 0x10000000,
551     FWF_SUBSETGROUPS        = 0x20000000,
552     FWF_USESEARCHFOLDER     = 0x40000000,
553     FWF_ALLOWRTLREADING     = 0x80000000
554 } FOLDERFLAGS;
555
556 typedef enum
557 {
558     FVM_AUTO       =-1,
559     FVM_ICON       = 1,
560     FVM_FIRST      = FVM_ICON,
561     FVM_SMALLICON  = 2,
562     FVM_LIST       = 3,
563     FVM_DETAILS    = 4,
564     FVM_THUMBNAIL  = 5,
565     FVM_TILE       = 6,
566     FVM_THUMBSTRIP = 7,
567     FVM_CONTENT    = 8,
568     FVM_LAST       = FVM_CONTENT
569 } FOLDERVIEWMODE;
570
571 typedef struct
572 {
573     UINT ViewMode;
574     UINT fFlags;
575 } FOLDERSETTINGS, *PFOLDERSETTINGS, *LPFOLDERSETTINGS;
576 typedef const FOLDERSETTINGS *LPCFOLDERSETTINGS;
577
578 /*****************************************************************************
579  * IShellIcon interface
580  */
581 [
582     uuid(000214e5-0000-0000-c000-000000000046),
583     object,
584     pointer_default(unique)
585 ]
586 interface IShellIcon : IUnknown
587 {
588     HRESULT GetIconOf(
589         [in] PCUITEMID_CHILD pidl,
590         [in] UINT flags,
591         [out] int *pIconIndex);
592 }
593
594 /*****************************************************************************
595  * IShellView interface
596  */
597 interface IShellBrowser;  /* forward declaration */
598 [
599     object,
600     uuid(000214e3-0000-0000-c000-000000000046),
601     pointer_default(unique)
602 ]
603 interface IShellView : IOleWindow
604 {
605     typedef IShellView *LPSHELLVIEW;
606
607     cpp_quote("#define SVSI_DESELECT       0x00000000")
608     cpp_quote("#define SVSI_SELECT         0x00000001")
609     cpp_quote("#define SVSI_EDIT           0x00000003")
610     cpp_quote("#define SVSI_DESELECTOTHERS 0x00000004")
611     cpp_quote("#define SVSI_ENSUREVISIBLE  0x00000008")
612     cpp_quote("#define SVSI_FOCUSED        0x00000010")
613     cpp_quote("#define SVSI_TRANSLATEPT    0x00000020")
614     cpp_quote("#define SVSI_SELECTIONMARK  0x00000040")
615     cpp_quote("#define SVSI_POSITIONITEM   0x00000080")
616     cpp_quote("#define SVSI_CHECK          0x00000100")
617     cpp_quote("#define SVSI_NOSTATECHANGE  0x80000000")
618
619     typedef UINT SVSIF;
620
621     typedef enum
622     {
623         SVGIO_BACKGROUND     = 0x00000000,
624         SVGIO_SELECTION      = 0x00000001,
625         SVGIO_ALLVIEW        = 0x00000002,
626         SVGIO_CHECKED        = 0x00000003,
627         SVGIO_TYPE_MASK      = 0x0000000f,
628         SVGIO_FLAG_VIEWORDER = 0x80000000,
629     } SVGIO;
630
631     typedef enum
632     {
633         SVUIA_DEACTIVATE       = 0,
634         SVUIA_ACTIVATE_NOFOCUS = 1,
635         SVUIA_ACTIVATE_FOCUS   = 2,
636         SVUIA_INPLACEACTIVATE  = 3
637     } SVUIA_STATUS;
638
639     HRESULT TranslateAccelerator( [in] MSG *pmsg );
640     HRESULT EnableModeless( [in] BOOL fEnable );
641     HRESULT UIActivate( [in] UINT uState );
642     HRESULT Refresh();
643     HRESULT CreateViewWindow(
644         [in] IShellView *psvPrevious,
645         [in] LPCFOLDERSETTINGS lpfs,
646         [in] IShellBrowser *psb,
647         [out] RECT *prcView,
648         [out] HWND *phWnd);
649
650     HRESULT DestroyViewWindow();
651     HRESULT GetCurrentInfo( [out] LPFOLDERSETTINGS lpfs );
652
653     [local] HRESULT AddPropertySheetPages(
654         [in] DWORD dwReserved,
655         [in] LPFNSVADDPROPSHEETPAGE pfn,
656         [in] LPARAM lparam);
657
658     HRESULT SaveViewState();
659     HRESULT SelectItem(
660         [in] LPCITEMIDLIST pidlItem,
661         [in] SVSIF uFlags);
662     HRESULT GetItemObject(
663         [in] UINT uItem,
664         [in] REFIID riid,
665         [out, iid_is(riid)] void **ppv);
666 }
667
668 [
669     object,
670     uuid(88e39e80-3578-11cf-ae69-08002b2e1262),
671     pointer_default(unique)
672 ]
673 interface IShellView2 : IShellView
674 {
675     typedef GUID SHELLVIEWID;
676 cpp_quote("#include <pshpack8.h>")
677     typedef struct _SV2CVW2_PARAMS
678     {
679         DWORD cbSize;
680         IShellView *psvPrev;
681         LPCFOLDERSETTINGS pfs;
682         IShellBrowser *psbOwner;
683         RECT *prcView;
684         SHELLVIEWID const *pvid;
685         HWND hwndView;
686     } SV2CVW2_PARAMS, *LPSV2CVW2_PARAMS;
687 cpp_quote("#include <poppack.h>")
688
689     HRESULT GetView(
690         [in, out] SHELLVIEWID *view_guid,
691         [in] ULONG view_type
692     );
693     HRESULT CreateViewWindow2(
694         [in] LPSV2CVW2_PARAMS view_params
695     );
696     HRESULT HandleRename(
697         [in] LPCITEMIDLIST new_pidl
698     );
699     HRESULT SelectAndPositionItem(
700         [in] LPCITEMIDLIST item,
701         [in] UINT flags,
702         [in] POINT *point
703     );
704 }
705
706 /*****************************************************************************
707  * IFolderView interface
708  */
709 [
710     uuid(cde725b0-ccc9-4519-917e-325d72fab4ce),
711     object,
712     pointer_default(unique)
713 ]
714 interface IFolderView : IUnknown
715 {
716     HRESULT GetCurrentViewMode( [out] UINT *mode );
717     HRESULT SetCurrentViewMode( [in] UINT mode );
718     HRESULT GetFolder( [in] REFIID riid, [out, iid_is(riid)] void **ppv );
719     HRESULT Item(
720         [in] int index,
721         [out] PITEMID_CHILD *ppidl
722     );
723     HRESULT ItemCount(
724         [in] UINT flags,
725         [out] int *items
726     );
727     HRESULT Items(
728         [in] UINT flags,
729         [in] REFIID riid,
730         [out, iid_is(riid)] void **ppv
731     );
732     HRESULT GetSelectionMarkedItem( [out] int *item );
733     HRESULT GetFocusedItem( [out] int *item );
734     HRESULT GetItemPosition(
735         [in] PCUITEMID_CHILD pidl,
736         [out] POINT* ppt
737     );
738     HRESULT GetSpacing( [in, out, unique] POINT* pt );
739     HRESULT GetDefaultSpacing( [out] POINT* pt );
740     HRESULT GetAutoArrange();
741     HRESULT SelectItem(
742         [in] int item,
743         [in] DWORD flags
744     );
745     HRESULT SelectAndPositionItems(
746         [in] UINT cidl,
747         [in, size_is(cidl)] PCUITEMID_CHILD_ARRAY apidl,
748         [in, unique, size_is(cidl)] POINT* apt,
749         [in] DWORD flags
750     );
751 }
752
753 /*****************************************************************************
754  * IShellBrowser interface
755  */
756 [
757     object,
758     uuid(000214e2-0000-0000-c000-000000000046),
759     pointer_default(unique)
760 ]
761 interface IShellBrowser : IOleWindow
762 {
763     typedef IShellBrowser *LPSHELLBROWSER;
764
765 cpp_quote("#define SBSP_DEFBROWSER            0x00000000")
766 cpp_quote("#define SBSP_SAMEBROWSER           0x00000001")
767 cpp_quote("#define SBSP_NEWBROWSER            0x00000002")
768 cpp_quote("#define SBSP_DEFMODE               0x00000000")
769 cpp_quote("#define SBSP_OPENMODE              0x00000010")
770 cpp_quote("#define SBSP_EXPLOREMODE           0x00000020")
771 cpp_quote("#define SBSP_HELPMODE              0x00000040")
772 cpp_quote("#define SBSP_NOTRANSFERHIST        0x00000080")
773 cpp_quote("#define SBSP_ABSOLUTE              0x00000000")
774 cpp_quote("#define SBSP_RELATIVE              0x00001000")
775 cpp_quote("#define SBSP_PARENT                0x00002000")
776 cpp_quote("#define SBSP_NAVIGATEBACK          0x00004000")
777 cpp_quote("#define SBSP_NAVIGATEFORWARD       0x00008000")
778 cpp_quote("#define SBSP_ALLOW_AUTONAVIGATE    0x00010000")
779 cpp_quote("#define SBSP_KEEPSAMETEMPLATE      0x00020000")
780 cpp_quote("#define SBSP_KEEPWORDWHEELTEXT     0x00040000")
781 cpp_quote("#define SBSP_ACTIVATE_NOFOCUS      0x00080000")
782 cpp_quote("#define SBSP_CREATENOHISTORY       0x00100000")
783 cpp_quote("#define SBSP_PLAYNOSOUND           0x00200000")
784 cpp_quote("#define SBSP_CALLERUNTURUSTED      0x00800000")
785 cpp_quote("#define SBSP_TRUSTFIRSTDOWNLOAD    0x01000000")
786 cpp_quote("#define SBSP_UNTRUSTEDFORDOWNLOAD  0x02000000")
787 cpp_quote("#define SBSP_NOAUTOSELECT          0x04000000")
788 cpp_quote("#define SBSP_WRITENOHISTORY        0x08000000")
789 cpp_quote("#define SBSP_TRUSTEDFORACTIVEX     0x10000000")
790 cpp_quote("#define SBSP_FEEDNAVIGATION        0x20000000")
791 cpp_quote("#define SBSP_REDIRECT              0x40000000")
792 cpp_quote("#define SBSP_INITIATEDBYHLINKFRAME 0x80000000")
793
794 cpp_quote("#define FCW_STATUS      0x0001")
795 cpp_quote("#define FCW_TOOLBAR     0x0002")
796 cpp_quote("#define FCW_TREE        0x0003")
797 cpp_quote("#define FCW_INTERNETBAR 0x0006")
798 cpp_quote("#define FCW_PROGRESS    0x0008")
799
800 cpp_quote("#define FCT_MERGE       0x0001")
801 cpp_quote("#define FCT_CONFIGABLE  0x0002")
802 cpp_quote("#define FCT_ADDTOEND    0x0004")
803
804 cpp_quote("#if 0")
805     typedef LPARAM LPTBBUTTONSB;
806 cpp_quote("#else")
807 cpp_quote("#include <commctrl.h>")
808 cpp_quote("typedef LPTBBUTTON LPTBBUTTONSB;")
809 cpp_quote("#endif")
810
811     HRESULT InsertMenusSB(
812         [in] HMENU hmenuShared,
813         [in, out] LPOLEMENUGROUPWIDTHS lpMenuWidths);
814
815     HRESULT SetMenuSB(
816         [in] HMENU hmenuShared,
817         [in] HOLEMENU holemenuReserved,
818         [in] HWND hwndActiveObject);
819
820     HRESULT RemoveMenusSB( [in] HMENU hmenuShared );
821     HRESULT SetStatusTextSB( [in, unique] LPCOLESTR pszStatusText );
822     HRESULT EnableModelessSB( [in] BOOL fEnable );
823     HRESULT TranslateAcceleratorSB( [in] MSG *pmsg, [in] WORD wID );
824
825     HRESULT BrowseObject(
826         [in] LPCITEMIDLIST pidl,
827         [in] UINT wFlags);
828
829     HRESULT GetViewStateStream(
830         [in] DWORD grfMode,
831         [out] IStream **ppStrm);
832
833     HRESULT GetControlWindow(
834         [in] UINT id,
835         [out] HWND *phwnd);
836
837     [local] HRESULT SendControlMsg(
838         [in] UINT id,
839         [in] UINT uMsg,
840         [in] WPARAM wParam,
841         [in] LPARAM lParam,
842         [in] LRESULT *pret);
843
844     HRESULT QueryActiveShellView( [out] IShellView **ppshv );
845     HRESULT OnViewWindowActive( [in] IShellView *pshv );
846
847     [local]
848     HRESULT SetToolbarItems(
849         [in] LPTBBUTTONSB lpButtons,
850         [in] UINT nButtons,
851         [in] UINT uFlags);
852 }
853
854
855 /*****************************************************************************
856  * IShellLinkA interface
857  */
858 [
859     object,
860     uuid(000214ee-0000-0000-c000-000000000046),
861     pointer_default(unique)
862 ]
863 interface IShellLinkA : IUnknown
864 {
865     typedef enum
866     {
867         SLR_NO_UI               = 0x0001,
868         SLR_ANY_MATCH           = 0x0002,
869         SLR_UPDATE              = 0x0004,
870         SLR_NOUPDATE            = 0x0008,
871         SLR_NOSEARCH            = 0x0010,
872         SLR_NOTRACK             = 0x0020,
873         SLR_NOLINKINFO          = 0x0040,
874         SLR_INVOKE_MSI          = 0x0080,
875         SLR_NO_UI_WITH_MSG_PUMP = 0x0101,
876     } SLR_FLAGS;
877
878     typedef enum
879     {
880         SLGP_SHORTPATH   = 0x0001,
881         SLGP_UNCPRIORITY = 0x0002,
882         SLGP_RAWPATH     = 0x0004,
883     } SLGP_FLAGS;
884
885     HRESULT GetPath(
886         [out, size_is(cch)] LPSTR pszFile,
887         [in] int cch,
888         [in, out, unique] WIN32_FIND_DATAA *pfd,
889         [in] DWORD fFlags);
890
891     HRESULT GetIDList( [out] LPITEMIDLIST * ppidl );
892
893     HRESULT SetIDList( [in] LPCITEMIDLIST pidl );
894
895     HRESULT GetDescription(
896         [out, size_is(cch)] LPSTR pszName,
897         [in] int cch);
898
899     HRESULT SetDescription( [in] LPCSTR pszName );
900
901     HRESULT GetWorkingDirectory(
902         [out, size_is(cch)] LPSTR pszDir,
903         [in] int cch);
904
905     HRESULT SetWorkingDirectory( [in] LPCSTR pszDir );
906
907     HRESULT GetArguments(
908         [out, size_is(cch)] LPSTR pszArgs,
909         [in] int cch);
910
911     HRESULT SetArguments( [in] LPCSTR pszArgs );
912
913     HRESULT GetHotkey( [out] WORD *pwHotkey );
914
915     HRESULT SetHotkey( [in] WORD wHotkey );
916
917     HRESULT GetShowCmd( [out] int *piShowCmd );
918
919     HRESULT SetShowCmd( [in] int iShowCmd );
920
921     HRESULT GetIconLocation(
922         [out, size_is(cch)] LPSTR pszIconPath,
923         [in] int cch,
924         [out] int *piIcon);
925
926     HRESULT SetIconLocation(
927         [in] LPCSTR pszIconPath,
928         [in] int iIcon);
929
930     HRESULT SetRelativePath(
931         [in] LPCSTR pszPathRel,
932         [in] DWORD dwReserved);
933
934     HRESULT Resolve(
935         [in] HWND hwnd,
936         [in] DWORD fFlags);
937
938     HRESULT SetPath( [in] LPCSTR pszFile );
939 }
940
941
942 /*****************************************************************************
943  * IShellLinkW interface
944  */
945 [
946     object,
947     uuid(000214f9-0000-0000-c000-000000000046),
948     pointer_default(unique)
949 ]
950 interface IShellLinkW : IUnknown
951 {
952     HRESULT GetPath(
953         [out, size_is(cch)] LPWSTR pszFile,
954         [in] int cch,
955         [in, out] WIN32_FIND_DATAW *pfd,
956         [in] DWORD fFlags);
957
958     HRESULT GetIDList( [out] LPITEMIDLIST * ppidl );
959
960     HRESULT SetIDList( [in] LPCITEMIDLIST pidl );
961
962     HRESULT GetDescription(
963         [out, size_is(cch)] LPWSTR pszName,
964         [in] int cch);
965
966     HRESULT SetDescription( [in] LPCWSTR pszName );
967
968     HRESULT GetWorkingDirectory(
969         [out, size_is(cch)] LPWSTR pszDir,
970         [in] int cch);
971
972     HRESULT SetWorkingDirectory( [in] LPCWSTR pszDir );
973
974     HRESULT GetArguments(
975         [out, size_is(cch)] LPWSTR pszArgs,
976         [in] int cch);
977
978     HRESULT SetArguments( [in] LPCWSTR pszArgs );
979
980     HRESULT GetHotkey( [out] WORD *pwHotkey );
981
982     HRESULT SetHotkey( [in] WORD wHotkey );
983
984     HRESULT GetShowCmd( [out] int *piShowCmd );
985
986     HRESULT SetShowCmd( [in] int iShowCmd );
987
988     HRESULT GetIconLocation(
989         [out, size_is(cch)] LPWSTR pszIconPath,
990         [in] int cch,
991         [out] int *piIcon);
992
993     HRESULT SetIconLocation(
994         [in] LPCWSTR pszIconPath,
995         [in] int iIcon);
996
997     HRESULT SetRelativePath(
998         [in] LPCWSTR pszPathRel,
999         [in] DWORD dwReserved);
1000
1001     HRESULT Resolve(
1002         [in] HWND hwnd,
1003         [in] DWORD fFlags);
1004
1005     HRESULT SetPath( [in] LPCWSTR pszFile );
1006 }
1007
1008 cpp_quote("#define IShellLink WINELIB_NAME_AW(IShellLink)")
1009
1010
1011 /*****************************************************************************
1012  * IShellExtInit interface
1013  */
1014 [
1015     object,
1016     uuid(000214e8-0000-0000-c000-000000000046),
1017     pointer_default(unique),
1018     local
1019 ]
1020 interface IShellExtInit : IUnknown
1021 {
1022     typedef IShellExtInit *LPSHELLEXTINIT;
1023
1024     HRESULT Initialize(
1025         [in] LPCITEMIDLIST pidlFolder,
1026         [in] IDataObject *pdtobj,
1027         [in] HKEY hkeyProgID);
1028 }
1029
1030
1031 /*******************************************************************************/
1032 /* Note: the following interfaces are not in shobjidl.idl under Windows, they  */
1033 /* are declared directly in shlobj.h. It hopefully won't break anything to put */
1034 /* them here anyway.                                                           */
1035 /*******************************************************************************/
1036
1037 #ifndef MAX_PATH
1038 #define MAX_PATH 260
1039 #endif
1040
1041
1042 /*****************************************************************************
1043  * IPersistFolder3 interface
1044  */
1045 [
1046     object,
1047     uuid(cef04fdf-fe72-11d2-87a5-00c04f6837cf),
1048     pointer_default(unique)
1049 ]
1050 interface IPersistFolder3 : IPersistFolder2
1051 {
1052     typedef struct
1053     {
1054         LPITEMIDLIST    pidlTargetFolder;
1055         WCHAR           szTargetParsingName[MAX_PATH];
1056         WCHAR           szNetworkProvider[MAX_PATH];
1057         DWORD           dwAttributes;
1058         int             csidl;
1059     } PERSIST_FOLDER_TARGET_INFO;
1060
1061     HRESULT InitializeEx(
1062         [in] IBindCtx *pbc,
1063         [in] LPCITEMIDLIST pidlRoot,
1064         [in] const PERSIST_FOLDER_TARGET_INFO *ppfti);
1065
1066     HRESULT GetFolderTargetInfo( [out] PERSIST_FOLDER_TARGET_INFO *ppfti );
1067 }
1068
1069
1070 /*****************************************************************************
1071  * IExtractIconA interface
1072  */
1073 [
1074     object,
1075     uuid(000214eb-0000-0000-c000-000000000046),
1076     pointer_default(unique),
1077     local
1078 ]
1079 interface IExtractIconA : IUnknown
1080 {
1081 cpp_quote("#define GIL_OPENICON     0x0001")
1082 cpp_quote("#define GIL_FORSHELL     0x0002")
1083 cpp_quote("#define GIL_ASYNC        0x0020")
1084 cpp_quote("#define GIL_DEFAULTICON  0x0040")
1085 cpp_quote("#define GIL_FORSHORTCUT  0x0080")
1086
1087 cpp_quote("#define GIL_SIMULATEDOC  0x0001")
1088 cpp_quote("#define GIL_PERINSTANCE  0x0002")
1089 cpp_quote("#define GIL_PERCLASS     0x0004")
1090 cpp_quote("#define GIL_NOTFILENAME  0x0008")
1091 cpp_quote("#define GIL_DONTCACHE    0x0010")
1092
1093     typedef IExtractIconA *LPEXTRACTICONA;
1094
1095     HRESULT GetIconLocation(
1096         [in] UINT uFlags,
1097         [out, size_is(cchMax)] LPSTR szIconFile,
1098         [in] UINT cchMax,
1099         [out] INT *piIndex,
1100         [out] UINT *pwFlags);
1101
1102     HRESULT Extract(
1103         [in] LPCSTR pszFile,
1104         [in] UINT nIconIndex,
1105         [out] HICON *phiconLarge,
1106         [out] HICON *phiconSmall,
1107         [in] UINT nIconSize );
1108 }
1109
1110
1111 /*****************************************************************************
1112  * IExtractIconW interface
1113  */
1114 [
1115     object,
1116     uuid(000214fa-0000-0000-c000-000000000046),
1117     pointer_default(unique),
1118     local
1119 ]
1120 interface IExtractIconW : IUnknown
1121 {
1122     typedef IExtractIconW *LPEXTRACTICONW;
1123
1124     HRESULT GetIconLocation(
1125         [in] UINT uFlags,
1126         [out, size_is(cchMax)] LPWSTR szIconFile,
1127         [in] UINT cchMax,
1128         [out] INT *piIndex,
1129         [out] UINT *pwFlags);
1130
1131     HRESULT Extract(
1132         [in] LPCWSTR pszFile,
1133         [in] UINT nIconIndex,
1134         [out] HICON *phiconLarge,
1135         [out] HICON *phiconSmall,
1136         [in] UINT nIconSize );
1137 }
1138
1139 cpp_quote("#define LPEXTRACTICON WINELIB_NAME_AW(LPEXTRACTICON)")
1140 cpp_quote("#define IExtractIcon WINELIB_NAME_AW(IExtractIcon)")
1141
1142
1143 /*****************************************************************************
1144  * ICommDlgBrowser interface
1145  */
1146 [
1147     object,
1148     uuid(000214f1-0000-0000-c000-000000000046),
1149     pointer_default(unique)
1150 ]
1151 interface ICommDlgBrowser : IUnknown
1152 {
1153 cpp_quote("#define CDBOSC_SETFOCUS     0x00000000")
1154 cpp_quote("#define CDBOSC_KILLFOCUS    0x00000001")
1155 cpp_quote("#define CDBOSC_SELCHANGE    0x00000002")
1156 cpp_quote("#define CDBOSC_RENAME       0x00000003")
1157 cpp_quote("#define CDBOSC_STATECHANGE  0x00000004")
1158
1159     typedef ICommDlgBrowser *LPCOMMDLGBROWSER;
1160
1161     HRESULT OnDefaultCommand( [in] IShellView *shv );
1162     HRESULT OnStateChange( [in] IShellView *shv, [in] ULONG uChange );
1163     HRESULT IncludeObject( [in] IShellView *shv, [in] LPCITEMIDLIST pidl );
1164 }
1165
1166
1167 /*****************************************************************************
1168  * ICommDlgBrowser2 interface
1169  */
1170 [
1171  object,
1172  uuid(10339516-2894-11D2-9039-00C04F8EEB3E),
1173  pointer_default(unique)
1174 ]
1175 interface ICommDlgBrowser2 : ICommDlgBrowser
1176 {
1177
1178     HRESULT Notify(
1179         [in] IShellView *ppshv,
1180         [in] DWORD dwNotifyType);
1181
1182     HRESULT GetDefaultMenuText(
1183         [in] IShellView *ppshv,
1184         [out, string, size_is(cchMax)] LPWSTR pszText,
1185         [in] int cchMax);
1186
1187     HRESULT GetViewFlags(
1188         [out] DWORD *pdwFlags);
1189 }
1190
1191
1192 /*****************************************************************************
1193  * ICommDlgBrowser3 interface
1194  */
1195 [
1196  object,
1197  uuid(C8AD25A1-3294-41EE-8165-71174BD01C57),
1198  pointer_default(unique)
1199 ]
1200 interface ICommDlgBrowser3 : ICommDlgBrowser2
1201 {
1202
1203     HRESULT OnColumnClicked(
1204         [in] IShellView *ppshv,
1205         [in] int iColumn);
1206
1207     HRESULT GetCurrentFilter(
1208         [out, string, size_is(cchFileSpec)] LPWSTR pszFileSpec,
1209         [in] int cchFileSpec);
1210
1211     HRESULT OnPreviewCreated(
1212         [in] IShellView *ppshv);
1213 }
1214
1215
1216 /*****************************************************************************
1217  * IDockingWindowFrame interface
1218  */
1219 [
1220     object,
1221     uuid(47d2657a-7b27-11d0-8ca9-00a0c92dbfe8),
1222     pointer_default(unique),
1223     local
1224 ]
1225 interface IDockingWindowFrame : IOleWindow
1226 {
1227 cpp_quote("#define DWFRF_NORMAL           0x0000")
1228 cpp_quote("#define DWFRF_DELETECONFIGDATA 0x0001")
1229 cpp_quote("#define DWFAF_HIDDEN           0x0001")
1230
1231     HRESULT AddToolbar(
1232         [in] IUnknown *punkSrc,
1233         [in] LPCWSTR pwszItem,
1234         [in] DWORD dwAddFlags);
1235
1236     HRESULT RemoveToolbar(
1237         [in] IUnknown *punkSrc,
1238         [in] DWORD dwRemoveFlags);
1239
1240     HRESULT FindToolbar(
1241         [in] LPCWSTR pwszItem,
1242         [in] REFIID riid,
1243         [out] LPVOID *ppvObj);
1244 }
1245
1246
1247 /*****************************************************************************
1248  * IDragSourceHelper interface
1249  */
1250 [
1251     object,
1252     uuid(de5bf786-477a-11d2-839d-00c04fd918d0),
1253     pointer_default(unique),
1254     local
1255 ]
1256 interface IDragSourceHelper : IUnknown
1257 {
1258     typedef struct
1259     {
1260         SIZE     sizeDragImage;
1261         POINT    ptOffset;
1262         HBITMAP  hbmpDragImage;
1263         COLORREF crColorKey;
1264     } SHDRAGIMAGE, *LPSHDRAGIMAGE;
1265
1266   HRESULT InitializeFromBitmap(
1267       [in] LPSHDRAGIMAGE pshdi,
1268       [in] IDataObject *pDataObject);
1269
1270   HRESULT InitializeFromWindow(
1271       [in] HWND hwnd,
1272       [in] POINT *ppt,
1273       [in] IDataObject *pDataObject);
1274 }
1275
1276
1277 /*****************************************************************************
1278  * IDropTargetHelper interface
1279  */
1280 [
1281     object,
1282     uuid(4657278b-411b-11d2-839a-00c04fd918d0),
1283     pointer_default(unique),
1284     local
1285 ]
1286 interface IDropTargetHelper : IUnknown
1287 {
1288     HRESULT DragEnter(
1289         [in] HWND hwndTarget,
1290         [in] IDataObject *pDataObject,
1291         [in] POINT *ppt,
1292         [in] DWORD dwEffect);
1293
1294     HRESULT DragLeave();
1295
1296     HRESULT DragOver(
1297         [in] POINT *ppt,
1298         [in] DWORD dwEffect);
1299
1300     HRESULT Drop(
1301         [in] IDataObject *pDataObject,
1302         [in] POINT *ppt,
1303         [in] DWORD dwEffect);
1304
1305     HRESULT Show( [in] BOOL fShow );
1306 }
1307
1308
1309 /*****************************************************************************
1310  * IContextMenu interface
1311  */
1312 [
1313     object,
1314     uuid(000214e4-0000-0000-c000-000000000046),
1315     pointer_default(unique),
1316     local
1317 ]
1318 interface IContextMenu : IUnknown
1319 {
1320 cpp_quote("#define CMF_NORMAL        0x00000000")
1321 cpp_quote("#define CMF_DEFAULTONLY   0x00000001")
1322 cpp_quote("#define CMF_VERBSONLY     0x00000002")
1323 cpp_quote("#define CMF_EXPLORE       0x00000004")
1324 cpp_quote("#define CMF_NOVERBS       0x00000008")
1325 cpp_quote("#define CMF_CANRENAME     0x00000010")
1326 cpp_quote("#define CMF_NODEFAULT     0x00000020")
1327 cpp_quote("#define CMF_INCLUDESTATIC 0x00000040")
1328 cpp_quote("#define CMF_EXTENDEDVERBS 0x00000100")
1329 cpp_quote("#define CMF_RESERVED      0xffff0000")
1330
1331 cpp_quote("#define GCS_VERBA         0x00000000")
1332 cpp_quote("#define GCS_HELPTEXTA     0x00000001")
1333 cpp_quote("#define GCS_VALIDATEA     0x00000002")
1334 cpp_quote("#define GCS_VERBW         0x00000004")
1335 cpp_quote("#define GCS_HELPTEXTW     0x00000005")
1336 cpp_quote("#define GCS_VALIDATEW     0x00000006")
1337 cpp_quote("#define GCS_UNICODE       0x00000004")
1338 cpp_quote("#define GCS_VERB          WINELIB_NAME_AW(GCS_VERB)")
1339 cpp_quote("#define GCS_HELPTEXT      WINELIB_NAME_AW(GCS_HELPTEXT)")
1340 cpp_quote("#define GCS_VALIDATE      WINELIB_NAME_AW(GCS_VALIDATE)")
1341
1342 cpp_quote("#define CMDSTR_NEWFOLDERA   \"NewFolder\"")
1343 cpp_quote("#define CMDSTR_VIEWLISTA    \"ViewList\"")
1344 cpp_quote("#define CMDSTR_VIEWDETAILSA \"ViewDetails\"")
1345 cpp_quote("#if defined(__GNUC__)")
1346 cpp_quote("# define CMDSTR_NEWFOLDERW (const WCHAR []){ 'N','e','w','F','o','l','d','e','r',0 }")
1347 cpp_quote("# define CMDSTR_VIEWLISTW (const WCHAR []){ 'V','i','e','w','L','i','s','t',0 }")
1348 cpp_quote("# define CMDSTR_VIEWDETAILSW (const WCHAR []){ 'V','i','e','w','D','e','t','a','i','l','s',0 }")
1349 cpp_quote("#elif defined(_MSC_VER)")
1350 cpp_quote("# define CMDSTR_NEWFOLDERW   L\"NewFolder\"")
1351 cpp_quote("# define CMDSTR_VIEWLISTW    L\"ViewList\"")
1352 cpp_quote("# define CMDSTR_VIEWDETAILSW L\"ViewDetails\"")
1353 cpp_quote("#else")
1354 cpp_quote("static const WCHAR CMDSTR_NEWFOLDERW[] = {'N','e','w','F','o','l','d','e','r',0};")
1355 cpp_quote("static const WCHAR CMDSTR_VIEWLISTW [] = {'V','i','e','w','L','i','s','t',0};")
1356 cpp_quote("static const WCHAR CMDSTR_VIEWDETAILSW[] = {'V','i','e','w','D','e','t','a','i','l','s',0};")
1357 cpp_quote("#endif")
1358 cpp_quote("#define CMDSTR_NEWFOLDER    WINELIB_NAME_AW(CMDSTR_NEWFOLDER)")
1359 cpp_quote("#define CMDSTR_VIEWLIST     WINELIB_NAME_AW(CMDSTR_VIEWLIST)")
1360 cpp_quote("#define CMDSTR_VIEWDETAILS  WINELIB_NAME_AW(CMDSTR_VIEWDETAILS)")
1361
1362 cpp_quote("#define CMIC_MASK_HOTKEY         SEE_MASK_HOTKEY")
1363 cpp_quote("#define CMIC_MASK_ICON           SEE_MASK_ICON")
1364 cpp_quote("#define CMIC_MASK_FLAG_NO_UI     SEE_MASK_FLAG_NO_UI")
1365 cpp_quote("#define CMIC_MASK_UNICODE        SEE_MASK_UNICODE")
1366 cpp_quote("#define CMIC_MASK_NO_CONSOLE     SEE_MASK_NO_CONSOLE")
1367 cpp_quote("#define CMIC_MASK_HASLINKNAME    SEE_MASK_HASLINKNAME")
1368 cpp_quote("#define CMIC_MASK_FLAG_SEP_VDM   SEE_MASK_FLAG_SEPVDM")
1369 cpp_quote("#define CMIC_MASK_HASTITLE       SEE_MASK_HASTITLE")
1370 cpp_quote("#define CMIC_MASK_ASYNCOK        SEE_MASK_ASYNCOK")
1371 cpp_quote("#define CMIC_MASK_SHIFT_DOWN     0x10000000")
1372 cpp_quote("#define CMIC_MASK_PTINVOKE       0x20000000")
1373 cpp_quote("#define CMIC_MASK_CONTROL_DOWN   0x40000000")
1374 cpp_quote("#define CMIC_MASK_FLAG_LOG_USAGE SEE_MASK_FLAG_LOG_USAGE")
1375 cpp_quote("#define CMIC_MASK_NOZONECHECKS   SEE_MASK_NOZONECHECKS")
1376
1377     typedef IContextMenu *LPCONTEXTMENU;
1378
1379     typedef struct tagCMINVOKECOMMANDINFO
1380     {
1381         DWORD cbSize;
1382         DWORD fMask;
1383         HWND hwnd;
1384         LPCSTR lpVerb;
1385         LPCSTR lpParameters;
1386         LPCSTR lpDirectory;
1387         INT nShow;
1388         DWORD dwHotKey;
1389         HANDLE hIcon;
1390     } CMINVOKECOMMANDINFO, *LPCMINVOKECOMMANDINFO;
1391
1392     typedef struct tagCMInvokeCommandInfoEx
1393     {
1394         DWORD cbSize;
1395         DWORD fMask;
1396         HWND hwnd;
1397         LPCSTR lpVerb;
1398         LPCSTR lpParameters;
1399         LPCSTR lpDirectory;
1400         INT nShow;
1401         DWORD dwHotKey;
1402         HANDLE hIcon;
1403         LPCSTR lpTitle;
1404         LPCWSTR lpVerbW;
1405         LPCWSTR lpParametersW;
1406         LPCWSTR lpDirectoryW;
1407         LPCWSTR lpTitleW;
1408         POINT ptInvoke;
1409     } CMINVOKECOMMANDINFOEX, *LPCMINVOKECOMMANDINFOEX;
1410
1411     HRESULT QueryContextMenu(
1412         [in] HMENU hmenu,
1413         [in] UINT indexMenu,
1414         [in] UINT idCmdFirst,
1415         [in] UINT idCmdLast,
1416         [in] UINT uFlags);
1417
1418     HRESULT InvokeCommand( [in] LPCMINVOKECOMMANDINFO lpici );
1419
1420     HRESULT GetCommandString(
1421         [in] UINT_PTR idCmd,
1422         [in] UINT uType,
1423         [out] UINT *pwReserved,
1424         [out, size_is(cchMax)] LPSTR pszName,
1425         [in] UINT cchMax);
1426 }
1427
1428
1429 /*****************************************************************************
1430  * IContextMenu2 interface
1431  */
1432 [
1433     object,
1434     uuid(000214f4-0000-0000-c000-000000000046),
1435     pointer_default(unique),
1436     local
1437 ]
1438 interface IContextMenu2 : IContextMenu
1439 {
1440     typedef IContextMenu2 *LPCONTEXTMENU2;
1441
1442     HRESULT HandleMenuMsg(
1443         [in] UINT uMsg,
1444         [in] WPARAM wParam,
1445         [in] LPARAM lParam);
1446 }
1447
1448
1449 /*****************************************************************************
1450  * IContextMenu3 interface
1451  */
1452 [
1453     object,
1454     uuid(bcfce0a0-ec17-11d0-8d10-00a0c90f2719),
1455     pointer_default(unique),
1456     local
1457 ]
1458 interface IContextMenu3 : IContextMenu2
1459 {
1460     typedef IContextMenu3 *LPCONTEXTMENU3;
1461
1462     HRESULT HandleMenuMsg2(
1463         [in] UINT uMsg,
1464         [in] WPARAM wParam,
1465         [in] LPARAM lParam,
1466         [out] LRESULT *plResult);
1467 }
1468
1469
1470 /*****************************************************************************
1471  * IShellExecuteHookA interface
1472  */
1473 [
1474     object,
1475     uuid(000214f5-0000-0000-c000-000000000046),
1476     pointer_default(unique),
1477     local
1478 ]
1479 interface IShellExecuteHookA : IUnknown
1480 {
1481     cpp_quote("struct _SHELLEXECUTEINFOA;")
1482     HRESULT Execute(
1483         [in, out] struct _SHELLEXECUTEINFOA* pei);
1484 }
1485
1486
1487 /*****************************************************************************
1488  * IShellExecuteHookW interface
1489  */
1490 [
1491     object,
1492     uuid(000214fb-0000-0000-c000-000000000046),
1493     pointer_default(unique),
1494     local
1495 ]
1496 interface IShellExecuteHookW : IUnknown
1497 {
1498     cpp_quote("struct _SHELLEXECUTEINFOW;")
1499     HRESULT Execute(
1500                 [in, out] struct _SHELLEXECUTEINFOW* pei);
1501 }
1502
1503 /*****************************************************************************
1504  * IShellLinkDataList interface
1505  */
1506 [
1507     object,
1508     uuid(45e2b4ae-b1c3-11d0-b92f-00a0c90312e1),
1509     pointer_default(unique)
1510 ]
1511 interface IShellLinkDataList : IUnknown
1512 {
1513     [local] HRESULT AddDataBlock(
1514                 [in] void *pDataBlock);
1515     [local] HRESULT CopyDataBlock(
1516                 [in] DWORD dwSig,
1517                 [out] void **ppDataBlock);
1518     HRESULT RemoveDataBlock(
1519                 [in] DWORD dwSig);
1520     HRESULT GetFlags(
1521                 [out] DWORD *pdwFlags);
1522     HRESULT SetFlags(
1523                 [in] DWORD dwFlags);
1524 }
1525
1526
1527 /*****************************************************************************
1528  * IResolveShellLink interface
1529  */
1530 [
1531     object,
1532     uuid(5cd52983-9449-11d2-963a-00c04f79adf0),
1533     pointer_default(unique)
1534 ]
1535 interface IResolveShellLink : IUnknown
1536 {
1537     HRESULT ResolveShellLink(
1538                 [in] IUnknown *punk,
1539                 [in] HWND hwnd,
1540                 [in] DWORD fFlags);
1541 }
1542
1543
1544 /*****************************************************************************
1545  * IURLSearchHook interface
1546  */
1547 [
1548     object,
1549     uuid(ac60f6a0-0fd9-11d0-99cb-00c04fd64497),
1550     pointer_default(unique),
1551     local
1552 ]
1553 interface IURLSearchHook : IUnknown
1554 {
1555     HRESULT Translate(
1556                 [in, out] LPWSTR lpwszSearchURL,
1557                 [in] DWORD cchBufferSize);
1558 }
1559
1560
1561 /*****************************************************************************
1562  * ISearchContext interface
1563  */
1564 [
1565     object,
1566     uuid(09f656a2-41af-480c-88f7-16cc0d164615),
1567     pointer_default(unique),
1568     local
1569 ]
1570 interface ISearchContext : IUnknown
1571 {
1572     HRESULT GetSearchUrl(
1573                 [in] BSTR *pbstrSearchUrl);
1574     HRESULT GetSearchText(
1575                 [in] BSTR *pbstrSearchText);
1576     HRESULT GetSearchStyle(
1577                 [in] BSTR *pdwSearchStyle);
1578 }
1579
1580
1581 /*****************************************************************************
1582  * IURLSearchHook2 interface
1583  */
1584 [
1585     object,
1586     uuid(5ee44da4-6d32-46e3-86bc-07540dedd0e0),
1587     pointer_default(unique),
1588     local
1589 ]
1590 interface IURLSearchHook2 : IURLSearchHook
1591 {
1592     HRESULT TranslateWithSearchContext(
1593                 [in, out] LPWSTR lpwszSearchURL,
1594                 [in] DWORD cchBufferSize,
1595                 [in] ISearchContext *pSearchContext);
1596 }
1597
1598
1599 cpp_quote("#define INewShortcutHook WINELIB_NAME_AW(INewShortcutHook)")
1600
1601 /*****************************************************************************
1602  * INewShortcutHookA interface
1603  */
1604 [
1605     object,
1606     uuid(000214e1-0000-0000-c000-000000000046),
1607     pointer_default(unique),
1608     local
1609 ]
1610 interface INewShortcutHookA : IUnknown
1611 {
1612     HRESULT SetReferent(
1613                 [in] LPCSTR pcszReferent,
1614                 [in] HWND hwnd);
1615     HRESULT GetReferent(
1616                 [out] LPSTR pcszReferent,
1617                 [in] int cchReferent);
1618     HRESULT SetFolder(
1619                 [in] LPCSTR pcszReferent);
1620     HRESULT GetFolder(
1621                 [out] LPSTR pcszReferent,
1622                 [in] int cchFolder);
1623     HRESULT GetName(
1624                 [out] LPSTR pszName,
1625                 [in] int cchName);
1626     HRESULT GetExtension(
1627                 [out] LPSTR pszExtension,
1628                 [in] int cchExtension);
1629
1630
1631
1632 /*****************************************************************************
1633  * INewShortcutHookW interface
1634  */
1635 [
1636     object,
1637     uuid(000214f7-0000-0000-c000-000000000046),
1638     pointer_default(unique),
1639     local
1640 ]
1641 interface INewShortcutHookW : IUnknown
1642 {
1643     HRESULT SetReferent(
1644                 [in] LPCWSTR pcszReferent,
1645                 [in] HWND hwnd);
1646     HRESULT GetReferent(
1647                 [out] LPWSTR pcszReferent,
1648                 [in] int cchReferent);
1649     HRESULT SetFolder(
1650                 [in] LPCWSTR pcszReferent);
1651     HRESULT GetFolder(
1652                 [out] LPWSTR pcszReferent,
1653                 [in] int cchFolder);
1654     HRESULT GetName(
1655                 [out] LPWSTR pszName,
1656                 [in] int cchName);
1657     HRESULT GetExtension(
1658                 [out] LPWSTR pszExtension,
1659                 [in] int cchExtension);
1660
1661
1662 /*****************************************************************************
1663  * IRunnableTask interface
1664  */
1665 [
1666     object,
1667     uuid(85788d00-6807-11d0-b810-00c04fd706ec),
1668     pointer_default(unique),
1669     local
1670 ]
1671 interface IRunnableTask : IUnknown
1672 {
1673     HRESULT Run();
1674     HRESULT Kill([in] BOOL fWait);
1675     HRESULT Suspend();
1676     HRESULT Resume();
1677     ULONG IsRunning();
1678 }
1679
1680 /*****************************************************************************
1681  * IShellChangeNotify interface
1682  */
1683 [
1684     object,
1685     uuid(d82be2b1-5764-11d0-a96e-00c04fd705a2),
1686     pointer_default(unique),
1687     local
1688 ]
1689 interface IShellChangeNotify : IUnknown
1690 {
1691     HRESULT OnChange(
1692                 [in] LONG lEvent,
1693                 [in] LPCITEMIDLIST pidl1,
1694                 [in] LPCITEMIDLIST pidl2);
1695 }
1696
1697 /*****************************************************************************
1698  * IFileSystemBindData interface
1699  */
1700 [
1701     object,
1702     uuid(01e18d10-4d8b-11d2-855d-006008059367),
1703     pointer_default(unique),
1704     local
1705 ]
1706 interface IFileSystemBindData : IUnknown
1707 {
1708     HRESULT SetFindData(
1709                 [in] const WIN32_FIND_DATAW *pfd);
1710     HRESULT GetFindData(
1711                 [out] WIN32_FIND_DATAW *pfd);
1712 }
1713
1714 /*****************************************************************************
1715  *    ITaskbarList interface
1716  */
1717 [
1718     object,
1719     uuid(56FDF342-FD6D-11d0-958A-006097C9A090),
1720     pointer_default(unique)
1721 ]
1722 interface ITaskbarList : IUnknown
1723 {
1724     HRESULT HrInit();
1725
1726     HRESULT AddTab(
1727         [in] HWND hwnd);
1728
1729     HRESULT DeleteTab(
1730         [in] HWND hwnd);
1731
1732     HRESULT ActivateTab(
1733         [in] HWND hwnd);
1734
1735     HRESULT SetActiveAlt(
1736         [in] HWND hwnd);
1737 }
1738
1739 cpp_quote("EXTERN_C const CLSID CLSID_TaskbarList;")
1740
1741 /*****************************************************************************
1742  *    IAutoCompleteDropDown interface
1743  */
1744 [
1745     object,
1746     uuid(3CD141F4-3C6A-11d2-BCAA-00C04FD929DB),
1747     pointer_default(unique)
1748 ]
1749 interface IAutoCompleteDropDown : IUnknown
1750 {
1751 cpp_quote("#define ACDD_VISIBLE   0x0001")
1752
1753     HRESULT GetDropDownStatus(
1754         [out] DWORD *pdwFlags,
1755         [out, string] LPWSTR *ppwszString);
1756
1757     HRESULT ResetEnumerator();
1758 }
1759
1760 [
1761     object,
1762     uuid(cb728b20-f786-11ce-92ad-00aa00a74cd0),
1763     pointer_default(unique)
1764 ]
1765 interface IProfferService : IUnknown
1766 {
1767     HRESULT ProfferService(
1768         [in] REFGUID service,
1769         [in] IServiceProvider *pService,
1770         [out] DWORD *pCookie);
1771
1772     HRESULT RevokeService([in] DWORD cookie);
1773 }
1774
1775 /*****************************************************************************
1776  * IExplorerBrowserEvents interface
1777  */
1778 [
1779  object,
1780  uuid(361BBDC7-E6EE-4E13-BE58-58E2240C810F)
1781 ]
1782 interface IExplorerBrowserEvents : IUnknown
1783 {
1784     HRESULT OnNavigationPending(
1785         [in] PCIDLIST_ABSOLUTE pidlFolder);
1786
1787     HRESULT OnViewCreated(
1788         [in] IShellView *psv);
1789
1790     HRESULT OnNavigationComplete(
1791         [in] PCIDLIST_ABSOLUTE pidlFolder);
1792
1793     HRESULT OnNavigationFailed(
1794         [in] PCIDLIST_ABSOLUTE pidlFolder);
1795 }
1796
1797 typedef GUID EXPLORERPANE;
1798 typedef EXPLORERPANE *REFEXPLORERPANE;
1799
1800 cpp_quote("#define SID_ExplorerPaneVisibility IID_IExplorerPaneVisibility")
1801
1802 /*****************************************************************************
1803  * IExplorerPaneVisibility interface
1804  */
1805 [
1806  object,
1807  uuid(E07010EC-BC17-44C0-97B0-46C7C95B9EDC)
1808 ]
1809 interface IExplorerPaneVisibility : IUnknown
1810 {
1811     typedef enum tagEXPLORERPANESTATE {
1812         EPS_DONTCARE     = 0x0,
1813         EPS_DEFAULT_ON   = 0x1,
1814         EPS_DEFAULT_OFF  = 0x2,
1815         EPS_STATE_MASK   = 0xffff,
1816         EPS_INITIALSTATE = 0x10000,
1817         EPS_FORCE        = 0x20000
1818     } EXPLORERPANESTATE;
1819
1820     HRESULT GetPaneState(
1821         [in] REFEXPLORERPANE ep,
1822         [out] EXPLORERPANESTATE *peps);
1823 }
1824
1825 typedef [v1_enum] enum tagEXPLORER_BROWSER_FILL_FLAGS {
1826     EBF_NONE                     = 0,
1827     EBF_SELECTFROMDATAOBJECT     = 0x100,
1828     EBF_NODROPTARGET             = 0x200
1829 } EXPLORER_BROWSER_FILL_FLAGS;
1830
1831 typedef [v1_enum] enum tagEXPLORER_BROWSER_OPTIONS {
1832     EBO_NONE               = 0x00,
1833     EBO_NAVIGATEONCE       = 0x01,
1834     EBO_SHOWFRAMES         = 0x02,
1835     EBO_ALWAYSNAVIGATE     = 0x04,
1836     EBO_NOTRAVELLOG        = 0x08,
1837     EBO_NOWRAPPERWINDOW    = 0x10,
1838     EBO_HTMLSHAREPOINTVIEW = 0x20
1839 } EXPLORER_BROWSER_OPTIONS;
1840
1841 cpp_quote("#define SID_SExplorerBrowserFrame IID_ICommDlgBrowser")
1842
1843 /*****************************************************************************
1844  * IExplorerBrowser interface
1845  */
1846 [
1847  object,
1848  uuid(DFD3B6B5-C10C-4BE9-85F6-A66969F402F6),
1849  pointer_default(unique)
1850 ]
1851 interface IExplorerBrowser : IUnknown
1852 {
1853
1854     [local] HRESULT Initialize(
1855         [in] HWND hwndParent,
1856         [in] const RECT *prc,
1857         [in, unique] const FOLDERSETTINGS *pfs);
1858
1859     HRESULT Destroy();
1860
1861     [local] HRESULT SetRect(
1862         [in,out,unique] HDWP *phdwp,
1863         [in] RECT rcBrowser);
1864
1865     HRESULT SetPropertyBag(
1866         [in, string] LPCWSTR pszPropertyBag);
1867
1868     HRESULT SetEmptyText(
1869         [in, string] LPCWSTR pszEmptyText);
1870
1871     HRESULT SetFolderSettings(
1872         [in] const FOLDERSETTINGS *pfs);
1873
1874     HRESULT Advise(
1875         [in] IExplorerBrowserEvents *psbe,
1876         [out] DWORD *pdwCookie);
1877
1878     HRESULT Unadvise(
1879         [in] DWORD dwCookie);
1880
1881     HRESULT SetOptions(
1882         [in] EXPLORER_BROWSER_OPTIONS dwFlag);
1883
1884     HRESULT GetOptions(
1885         [out] EXPLORER_BROWSER_OPTIONS *pdwFlag);
1886
1887     HRESULT BrowseToIDList(
1888         [in] PCUIDLIST_RELATIVE pidl,
1889         [in] UINT uFlags);
1890
1891     HRESULT BrowseToObject(
1892         [in] IUnknown *punk,
1893         [in] UINT uFlags);
1894
1895     HRESULT FillFromObject(
1896         [in] IUnknown *punk,
1897         [in] EXPLORER_BROWSER_FILL_FLAGS dwFlags);
1898
1899     HRESULT RemoveAll();
1900
1901     HRESULT GetCurrentView(
1902         [in] REFIID riid,
1903         [out, iid_is(riid)] void **ppv);
1904 }
1905
1906 /*****************************************************************************
1907  * INameSpaceTreeControl interface
1908  */
1909 [
1910  object,
1911  uuid(028212A3-B627-47E9-8856-C14265554E4F)
1912 ]
1913 interface INameSpaceTreeControl : IUnknown
1914 {
1915     [v1_enum] enum _NSTCSTYLE {
1916         NSTCS_HASEXPANDOS                 = 0x00000001,
1917         NSTCS_HASLINES                    = 0x00000002,
1918         NSTCS_SINGLECLICKEXPAND           = 0x00000004,
1919         NSTCS_FULLROWSELECT               = 0x00000008,
1920         NSTCS_SPRINGEXPAND                = 0x00000010,
1921         NSTCS_HORIZONTALSCROLL            = 0x00000020,
1922         NSTCS_ROOTHASEXPANDO              = 0x00000040,
1923         NSTCS_SHOWSELECTIONALWAYS         = 0x00000080,
1924         NSTCS_NOINFOTIP                   = 0x00000200,
1925         NSTCS_EVENHEIGHT                  = 0x00000400,
1926         NSTCS_NOREPLACEOPEN               = 0x00000800,
1927         NSTCS_DISABLEDRAGDROP             = 0x00001000,
1928         NSTCS_NOORDERSTREAM               = 0x00002000,
1929         NSTCS_RICHTOOLTIP                 = 0x00004000,
1930         NSTCS_BORDER                      = 0x00008000,
1931         NSTCS_NOEDITLABELS                = 0x00010000,
1932         NSTCS_TABSTOP                     = 0x00020000,
1933         NSTCS_FAVORITESMODE               = 0x00080000,
1934         NSTCS_AUTOHSCROLL                 = 0x00100000,
1935         NSTCS_FADEINOUTEXPANDOS           = 0x00200000,
1936         NSTCS_EMPTYTEXT                   = 0x00400000,
1937         NSTCS_CHECKBOXES                  = 0x00800000,
1938         NSTCS_PARTIALCHECKBOXES           = 0x01000000,
1939         NSTCS_EXCLUSIONCHECKBOXES         = 0x02000000,
1940         NSTCS_DIMMEDCHECKBOXES            = 0x04000000,
1941         NSTCS_NOINDENTCHECKS              = 0x08000000,
1942         NSTCS_ALLOWJUNCTIONS              = 0x10000000,
1943         NSTCS_SHOWTABSBUTTON              = 0x20000000,
1944         NSTCS_SHOWDELETEBUTTON            = 0x40000000,
1945         NSTCS_SHOWREFRESHBUTTON      = (int)0x80000000
1946     };
1947     typedef DWORD NSTCSTYLE;
1948
1949     [v1_enum] enum _NSTCROOTSTYLE {
1950         NSTCRS_VISIBLE                    = 0x0000,
1951         NSTCRS_HIDDEN                     = 0x0001,
1952         NSTCRS_EXPANDED                   = 0x0002
1953     };
1954     typedef DWORD NSTCROOTSTYLE;
1955
1956     [v1_enum] enum _NSTCITEMSTATE {
1957         NSTCIS_NONE                       = 0x0000,
1958         NSTCIS_SELECTED                   = 0x0001,
1959         NSTCIS_EXPANDED                   = 0x0002,
1960         NSTCIS_BOLD                       = 0x0004,
1961         NSTCIS_DISABLED                   = 0x0008,
1962         NSTCIS_SELECTEDNOEXPAND           = 0x0010
1963     };
1964     typedef DWORD NSTCITEMSTATE;
1965
1966     typedef [v1_enum] enum NSTCGNI {
1967         NSTCGNI_NEXT                      = 0,
1968         NSTCGNI_NEXTVISIBLE               = 1,
1969         NSTCGNI_PREV                      = 2,
1970         NSTCGNI_PREVVISIBLE               = 3,
1971         NSTCGNI_PARENT                    = 4,
1972         NSTCGNI_CHILD                     = 5,
1973         NSTCGNI_FIRSTVISIBLE              = 6,
1974         NSTCGNI_LASTVISIBLE               = 7
1975     } NSTCGNI;
1976
1977     HRESULT Initialize(
1978         [in] HWND hwndParent,
1979         [in, unique] RECT *prc,
1980         [in] NSTCSTYLE nstcsFlags);
1981
1982     HRESULT TreeAdvise(
1983         [in] IUnknown *punk,
1984         [out] DWORD *pdwCookie);
1985
1986     HRESULT TreeUnadvise(
1987         [in] DWORD dwCookie);
1988
1989     HRESULT AppendRoot(
1990         [in] IShellItem *psiRoot,
1991         [in] SHCONTF grfEnumFlags,
1992         [in] NSTCROOTSTYLE grfRootStyle,
1993         [in, unique] IShellItemFilter *pif);
1994
1995     HRESULT InsertRoot(
1996         [in] int iIndex,
1997         [in] IShellItem *psiRoot,
1998         [in] SHCONTF grfEnumFlags,
1999         [in] NSTCROOTSTYLE grfRootStyle,
2000         [in, unique] IShellItemFilter *pif);
2001
2002     HRESULT RemoveRoot(
2003         [in] IShellItem *psiRoot);
2004
2005     HRESULT RemoveAllRoots();
2006
2007     HRESULT GetRootItems(
2008         [out] IShellItemArray **ppsiaRootItems);
2009
2010     HRESULT SetItemState(
2011         [in] IShellItem *psi,
2012         [in] NSTCITEMSTATE nstcisMask,
2013         [in] NSTCITEMSTATE nstcisFlags);
2014
2015     HRESULT GetItemState(
2016         [in] IShellItem *psi,
2017         [in] NSTCITEMSTATE nstcismask,
2018         [out] NSTCITEMSTATE *pnstcisFlags);
2019
2020     HRESULT GetSelectedItems(
2021         [out] IShellItemArray **psiaItems);
2022
2023     HRESULT GetItemCustomState(
2024         [in] IShellItem *psi,
2025         [out] int *piStateNumber);
2026
2027     HRESULT SetItemCustomState(
2028         [in] IShellItem *psi,
2029         [in] int iStateNumber);
2030
2031     HRESULT EnsureItemVisible(
2032         [in] IShellItem *psi);
2033
2034     HRESULT SetTheme(
2035         [in, string] LPCWSTR pszTheme);
2036
2037     HRESULT GetNextItem(
2038         [in, unique] IShellItem *psi,
2039         [in] NSTCGNI nstcgi,
2040         [out] IShellItem **ppsiNext);
2041
2042     HRESULT HitTest(
2043         [in] POINT *ppt,
2044         [out] IShellItem **ppsiOut);
2045
2046     HRESULT GetItemRect(
2047         [in] IShellItem *psi,
2048         [out] RECT *prect);
2049
2050     HRESULT CollapseAll();
2051 }
2052
2053 /*****************************************************************************
2054  * INameSpaceTreeControl2 interface
2055  */
2056 [
2057  object,
2058  uuid(7CC7AED8-290E-49BC-8945-C1401CC9306C)
2059 ]
2060 interface INameSpaceTreeControl2 : INameSpaceTreeControl
2061 {
2062     typedef [v1_enum] enum NSTCSTYLE2 {
2063         NSTCS2_DEFAULT                     = 0x00,
2064         NSTCS2_INTERRUPTNOTIFICATIONS      = 0x01,
2065         NSTCS2_SHOWNULLSPACEMENU           = 0x02,
2066         NSTCS2_DISPLAYPADDING              = 0x04,
2067         NSTCS2_DISPLAYPINNEDONLY           = 0x08,
2068         NTSCS2_NOSINGLETONAUTOEXPAND       = 0x10,  /* The apparent typo here is   */
2069         NTSCS2_NEVERINSERTNONENUMERATED    = 0x20   /* present also in the Win SDK */
2070     } NSTCSTYLE2;
2071     cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(NSTCSTYLE2)")
2072
2073     HRESULT SetControlStyle(
2074         [in] NSTCSTYLE nstcsMask,
2075         [in] NSTCSTYLE nstcsStyle);
2076
2077     HRESULT GetControlStyle(
2078         [in] NSTCSTYLE nstcsMask,
2079         [out] NSTCSTYLE *pnstcsStyle);
2080
2081     HRESULT SetControlStyle2(
2082         [in] NSTCSTYLE2 nstcsMask,
2083         [in] NSTCSTYLE2 nstcsStyle);
2084
2085     HRESULT GetControlStyle2(
2086         [in] NSTCSTYLE2 nstcsMask,
2087         [out] NSTCSTYLE2 *pnstcsStyle);
2088 }
2089
2090 /*****************************************************************************
2091  * INameSpaceTreeControlEvents interface
2092  */
2093
2094 [
2095  object,
2096  uuid(93D77985-B3D8-4484-8318-672CDDA002CE),
2097  local
2098 ]
2099 interface INameSpaceTreeControlEvents : IUnknown
2100 {
2101     [v1_enum] enum _NSTCEHITTEST {
2102         NSTCEHT_NOWHERE                    = 0x0001,
2103         NSTCEHT_ONITEMICON                 = 0x0002,
2104         NSTCEHT_ONITEMLABEL                = 0x0004,
2105         NSTCEHT_ONITEMIDENT                = 0x0008,
2106         NSTCEHT_ONITEMBUTTON               = 0x0010,
2107         NSTCEHT_ONITEMRIGHT                = 0x0020,
2108         NSTCEHT_ONITEMSTATEICON            = 0x0040,
2109         NSTCEHT_ONITEM                     = 0x0046,
2110         NSTCEHT_ONITEMTABBUTTON            = 0x1000
2111     };
2112     typedef DWORD NSTCEHITTEST;
2113
2114     [v1_enum] enum _NSTCECLICKTYPE {
2115         NSTCECT_LBUTTON                    = 0x1,
2116         NSTCECT_MBUTTON                    = 0x2,
2117         NSTCECT_RBUTTON                    = 0x3,
2118         NSTCECT_BUTTON                     = 0x3,
2119         NSTCECT_DBLCLICK                   = 0x4
2120     };
2121     typedef DWORD NSTCECLICKTYPE;
2122
2123     HRESULT OnItemClick(
2124         [in] IShellItem *psi,
2125         [in] NSTCEHITTEST nstceHitTest,
2126         [in] NSTCECLICKTYPE nstceClickType);
2127
2128     HRESULT OnPropertyItemCommit(
2129         [in] IShellItem *psi);
2130
2131     HRESULT OnItemStateChanging(
2132         [in] IShellItem *psi,
2133         [in] NSTCITEMSTATE nstcisMask,
2134         [in] NSTCITEMSTATE nstcisState);
2135
2136     HRESULT OnItemStateChanged(
2137         [in] IShellItem *psi,
2138         [in] NSTCITEMSTATE nstcisMask,
2139         [in] NSTCITEMSTATE nstcisState);
2140
2141     HRESULT OnSelectionChanged(
2142         [in] IShellItemArray *psiaSelection);
2143
2144     HRESULT OnKeyboardInput(
2145         [in] UINT uMsg,
2146         [in] WPARAM wParam,
2147         [in] LPARAM lParam);
2148
2149     HRESULT OnBeforeExpand(
2150         [in] IShellItem *psi);
2151
2152     HRESULT OnAfterExpand(
2153         [in] IShellItem *psi);
2154
2155     HRESULT OnBeginLabelEdit(
2156         [in] IShellItem *psi);
2157
2158     HRESULT OnEndLabelEdit(
2159         [in] IShellItem *psi);
2160
2161     HRESULT OnGetToolTip(
2162         [in] IShellItem *psi,
2163         [out, string, size_is(cchTip)] LPWSTR pszTip,
2164         [in] int cchTip);
2165
2166     HRESULT OnBeforeItemDelete(
2167         [in] IShellItem *psi);
2168
2169     HRESULT OnItemAdded(
2170         [in] IShellItem *psi,
2171         [in] BOOL fIsRoot);
2172
2173     HRESULT OnItemDeleted(
2174         [in] IShellItem *psi,
2175         [in] BOOL fIsRoot);
2176
2177     HRESULT OnBeforeContextMenu(
2178         [in, unique] IShellItem *psi,
2179         [in] REFIID riid,
2180         [out, iid_is(riid)] void **ppv);
2181
2182     HRESULT OnAfterContextMenu(
2183         [in] IShellItem *psi,
2184         [in] IContextMenu *pcmIn,
2185         [in] REFIID riid,
2186         [out, iid_is(riid)] void **ppv);
2187
2188     HRESULT OnBeforeStateImageChange(
2189         [in] IShellItem *psi,
2190         [out] int *piDefaultIcon,
2191         [out] int *piOpenIcon);
2192
2193     HRESULT OnGetDefaultIconIndex(
2194         [in] IShellItem *psi,
2195         [out] int *piDefaultIcon,
2196         [out] int *piOpenIcon);
2197 }