setupapi: Fixed returns values and added a test for SetupDiOpenClassRegKeyExW.
[wine] / include / ocidl.idl
1 /*
2  * Copyright (C) 1999 Paul Quinn
3  * Copyright (C) 1999 Francis Beaudet
4  * Copyright (C) 2003 Alexandre Julliard
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  */
20
21 import "oleidl.idl";
22 import "oaidl.idl";
23 import "servprov.idl";
24 import "urlmon.idl";
25
26
27 /*****************************************************************************
28  * IOleControlTypes interface
29  */
30 [
31     pointer_default(unique)
32 ]
33 interface IOleControlTypes
34 {
35     typedef [v1_enum] enum tagUASFLAGS
36     {
37         UAS_NORMAL       = 0x0,
38         UAS_BLOCKED      = 0x1,
39         UAS_NOPARENTABLE = 0x2,
40         UAS_MASK         = 0x3
41     } UASFLAGS;
42
43     typedef enum tagREADYSTATE
44     {
45         READYSTATE_UNINITIALIZED  = 0,
46         READYSTATE_LOADING  = 1,
47         READYSTATE_LOADED = 2,
48         READYSTATE_INTERACTIVE  = 3,
49         READYSTATE_COMPLETE = 4
50     } READYSTATE;
51
52     typedef struct tagVARIANT_BLOB
53     {
54         DWORD clSize;
55         DWORD rpcReserved;
56         [size_is(clSize-1)] ULONGLONG ahData[];
57     } wireVARIANT_BLOB;
58
59     typedef struct tagUserVARIANT
60     {
61       wireVARIANT_BLOB pVarBlob;
62     } UserVARIANT;
63 }
64
65
66 /*****************************************************************************
67  * IFont interface
68  */
69 [
70     object,
71     uuid(bef6e002-a874-101a-8bba-00aa00300cab),
72     pointer_default(unique)
73 ]
74 interface IFont : IUnknown
75 {
76     typedef IFont *LPFONT;
77     typedef TEXTMETRICW TEXTMETRICOLE, *LPTEXTMETRICOLE;
78
79     [propget] HRESULT Name( [out] BSTR *pname);
80     [propput] HRESULT Name( [in] BSTR name );
81     [propget] HRESULT Size( [out] CY *psize );
82     [propput] HRESULT Size( [in] CY size );
83     [propget] HRESULT Bold( [out] BOOL *pbold );
84     [propput] HRESULT Bold( [in] BOOL bold );
85     [propget] HRESULT Italic( [out] BOOL *pitalic );
86     [propput] HRESULT Italic( [in] BOOL italic );
87     [propget] HRESULT Underline( [out] BOOL *punderline );
88     [propput] HRESULT Underline( [in] BOOL underline );
89     [propget] HRESULT Strikethrough( [out] BOOL *pstrikethrough );
90     [propput] HRESULT Strikethrough( [in] BOOL strikethrough );
91     [propget] HRESULT Weight( [out] SHORT *pweight );
92     [propput] HRESULT Weight( [in] SHORT weight );
93     [propget] HRESULT Charset( [out] SHORT *pcharset );
94     [propput] HRESULT Charset( [in] SHORT charset );
95     [propget] HRESULT hFont( [out] HFONT *phfont );
96     HRESULT Clone( [out] IFont **ppfont );
97     HRESULT IsEqual( [in] IFont *pFontOther );
98     HRESULT SetRatio( [in] LONG cyLogical, [in] LONG cyHimetric );
99     HRESULT QueryTextMetrics( [out] TEXTMETRICOLE * ptm );
100     HRESULT AddRefHfont( [in] HFONT hfont );
101     HRESULT ReleaseHfont( [in] HFONT hfont );
102     HRESULT SetHdc( [in] HDC hdc );
103 }
104
105
106 /*****************************************************************************
107  * IFontDisp interface
108  */
109 [
110     object,
111     uuid(bef6e003-a874-101a-8bba-00aa00300cab),
112     pointer_default(unique)
113 ]
114 interface IFontDisp : IDispatch
115 {
116     typedef IFontDisp *LPFONTDISP;
117 }
118
119
120 /*****************************************************************************
121  * IFontEventsDisp interface
122  */
123 [
124     object,
125     uuid(4ef6100a-af88-11d0-9846-00c04fc29993),
126     pointer_default(unique)
127 ]
128 interface IFontEventsDisp : IDispatch
129 {
130     typedef IFontEventsDisp *LPFONTEVENTS;
131 }
132
133
134 /*****************************************************************************
135  * IPicture interface
136  */
137 [
138     object,
139     uuid(7bf80980-bf32-101a-8bbb-00aa00300cab),
140     pointer_default(unique)
141 ]
142 interface IPicture : IUnknown
143 {
144     typedef IPicture *LPPICTURE;
145
146     typedef enum tagPicture
147     {
148         PICTURE_SCALABLE = 0x1,
149         PICTURE_TRANSPARENT = 0x2
150     } PICTUREATTRIBUTES;
151
152     typedef UINT OLE_HANDLE;
153     typedef LONG OLE_XPOS_HIMETRIC;
154     typedef LONG OLE_YPOS_HIMETRIC;
155     typedef LONG OLE_XSIZE_HIMETRIC;
156     typedef LONG OLE_YSIZE_HIMETRIC;
157
158     [propget] HRESULT Handle( [out] OLE_HANDLE *pHandle );
159     [propget] HRESULT hPal( [out] OLE_HANDLE *phPal );
160     [propget] HRESULT Type( [out] SHORT *pType );
161     [propget] HRESULT Width( [out] OLE_XSIZE_HIMETRIC *pWidth );
162     [propget] HRESULT Height( [out] OLE_YSIZE_HIMETRIC *pHeight );
163
164     HRESULT Render(
165         [in] HDC hdc,
166         [in] LONG x,
167         [in] LONG y,
168         [in] LONG cx,
169         [in] LONG cy,
170         [in] OLE_XPOS_HIMETRIC xSrc,
171         [in] OLE_YPOS_HIMETRIC ySrc,
172         [in] OLE_XSIZE_HIMETRIC cxSrc,
173         [in] OLE_YSIZE_HIMETRIC cySrc,
174         [in] LPCRECT pRcWBounds);
175
176     HRESULT set_hPal( [in] OLE_HANDLE hPal );
177
178     [propget] HRESULT CurDC( [out] HDC *phDC );
179
180     HRESULT SelectPicture(
181         [in] HDC hDCIn,
182         [out] HDC * phDCOut,
183         [out] OLE_HANDLE * phBmpOut);
184
185     [propget] HRESULT KeepOriginalFormat( [out] BOOL *pKeep );
186
187     [propput] HRESULT KeepOriginalFormat( [in] BOOL keep );
188
189     HRESULT PictureChanged();
190
191     HRESULT SaveAsFile(
192         [in] LPSTREAM pStream,
193         [in] BOOL fSaveMemCopy,
194         [out] LONG *pCbSize);
195
196     [propget] HRESULT Attributes( [out] DWORD *pDwAttr );
197 }
198
199
200 /*****************************************************************************
201  * IPictureDisp interface
202  */
203 [
204     object,
205     uuid(7bf80981-bf32-101a-8bbb-00aa00300cab),
206     pointer_default(unique)
207 ]
208 interface IPictureDisp : IDispatch
209 {
210     typedef IPictureDisp *LPPICTUREDISP;
211 }
212
213
214 /*****************************************************************************
215  * IOleControl interface
216  */
217 [
218     object,
219     uuid(b196b288-bab4-101a-b69c-00aa00341d07),
220     pointer_default(unique)
221 ]
222
223 interface IOleControl : IUnknown
224 {
225     typedef IOleControl *LPOLECONTROL;
226
227     typedef struct tagCONTROLINFO
228     {
229         ULONG cb;
230         HACCEL hAccel;
231         USHORT cAccel;
232         DWORD dwFlags;
233     } CONTROLINFO, *LPCONTROLINFO;
234
235     typedef enum tagCTRLINFO
236     {
237         CTRLINFO_EATS_RETURN = 1,
238         CTRLINFO_EATS_ESCAPE = 2
239     } CTRLINFO;
240
241     HRESULT GetControlInfo( [out] CONTROLINFO *pCI );
242     HRESULT OnMnemonic( [in] MSG *pMsg );
243     HRESULT OnAmbientPropertyChange( [in] DISPID dispID );
244     HRESULT FreezeEvents( [in] BOOL bFreeze );
245 }
246
247
248 /*****************************************************************************
249  * IOleControlSite interface
250  */
251 [
252     object,
253     uuid(b196b289-bab4-101a-b69c-00aa00341d07),
254     pointer_default(unique)
255 ]
256 interface IOleControlSite : IUnknown
257 {
258     typedef IOleControlSite *LPOLECONTROLSITE;
259
260     typedef struct tagPOINTF
261     {
262         FLOAT x;
263         FLOAT y;
264     } POINTF, *LPPOINTF;
265
266     typedef enum tagXFORMCOORDS
267     {
268         XFORMCOORDS_POSITION = 0x1,
269         XFORMCOORDS_SIZE = 0x2,
270         XFORMCOORDS_HIMETRICTOCONTAINER = 0x4,
271         XFORMCOORDS_CONTAINERTOHIMETRIC = 0x8,
272         XFORMCOORDS_EVENTCOMPAT = 0x10
273     } XFORMCOORDS;
274
275     HRESULT OnControlInfoChanged();
276
277     HRESULT LockInPlaceActive( [in] BOOL fLock );
278
279     HRESULT GetExtendedControl( [out] IDispatch ** ppDisp );
280
281     HRESULT TransformCoords(
282         [in, out] POINTL *pPtlHimetric,
283         [in, out] POINTF *pPtfContainer,
284         [in] DWORD dwFlags);
285
286     HRESULT TranslateAccelerator( [in] MSG *pMsg, [in] DWORD grfModifiers );
287
288     HRESULT OnFocus( [in] BOOL fGotFocus );
289
290     HRESULT ShowPropertyFrame();
291 }
292
293
294 /*****************************************************************************
295  * IOleInPlaceSiteEx interface
296  */
297 [
298     object,
299     uuid(9c2cad80-3424-11cf-b670-00aa004cd6d8),
300     pointer_default(unique)
301 ]
302 interface IOleInPlaceSiteEx : IOleInPlaceSite
303 {
304     typedef IOleInPlaceSiteEx *LPOLEINPLACESITEEX;
305
306     typedef enum tagACTIVATEFLAGS
307     {
308         ACTIVATE_WINDOWLESS = 1
309     } ACTIVATE_FLAGS;
310
311     HRESULT OnInPlaceActivateEx( [out] BOOL * pfNoRedraw, [in] DWORD dwFlags );
312     HRESULT OnInPlaceDeactivateEx( [in] BOOL fNoRedraw );
313     HRESULT RequestUIActivate();
314 }
315
316
317 /*****************************************************************************
318  * IOleInPlaceSiteWindowless interface
319  */
320 [
321     local,
322     object,
323     uuid(922eada0-3424-11cf-b670-00aa004cd6d8),
324     pointer_default(unique)
325 ]
326 interface IOleInPlaceSiteWindowless : IOleInPlaceSiteEx
327 {
328     typedef IOleInPlaceSiteWindowless *LPOLEINPLACESITEWINDOWLESS;
329
330     typedef enum tagOLEDCFLAGS
331     {
332         OLEDC_NODRAW = 0x1,
333         OLEDC_PAINTBKGND = 0x2,
334         OLEDC_OFFSCREEN = 0x4
335     } OLEDCFLAGS;
336
337     HRESULT CanWindowlessActivate();
338
339     HRESULT GetCapture();
340
341     HRESULT SetCapture( [in] BOOL fCapture );
342
343     HRESULT GetFocus();
344
345     HRESULT SetFocus( [in] BOOL fFocus );
346
347     HRESULT GetDC(
348         [in] LPCRECT pRect,
349         [in] DWORD grfFlags,
350         [out] HDC *phDC);
351
352     HRESULT ReleaseDC( [in] HDC hDC );
353
354     HRESULT InvalidateRect(
355         [in] LPCRECT pRect,
356         [in] BOOL fErase);
357
358     HRESULT InvalidateRgn(
359         [in] HRGN hRGN,
360         [in] BOOL fErase);
361
362     HRESULT ScrollRect(
363         [in] INT dx,
364         [in] INT dy,
365         [in] LPCRECT pRectScroll,
366         [in] LPCRECT pRectClip);
367
368     HRESULT AdjustRect( [in, out] LPRECT prc );
369
370     HRESULT OnDefWindowMessage(
371         [in] UINT msg,
372         [in] WPARAM wParam,
373         [in] LPARAM lParam,
374         [out] LRESULT *plResult);
375 }
376
377
378 /*****************************************************************************
379  * IOleInPlaceObjectWindowless interface
380  */
381 [
382     local,
383     object,
384     uuid(1c2056cc-5ef4-101b-8bc8-00aa003e3b29),
385     pointer_default(unique)
386 ]
387 interface IOleInPlaceObjectWindowless : IOleInPlaceObject
388 {
389     typedef IOleInPlaceObjectWindowless *LPOLEINPLACEOBJECTWINDOWLESS;
390
391     HRESULT OnWindowMessage(
392         [in] UINT msg,
393         [in] WPARAM wParam,
394         [in] LPARAM lParam,
395         [out] LRESULT *plResult);
396
397     HRESULT GetDropTarget( [out] IDropTarget **ppDropTarget );
398 }
399
400
401 /*****************************************************************************
402  * IClassFactory2 interface
403  */
404 [
405     object,
406     uuid(b196b28f-bab4-101a-b69c-00aa00341d07),
407     pointer_default(unique)
408 ]
409 interface IClassFactory2 : IClassFactory
410 {
411     typedef IClassFactory2 *LPCLASSFACTORY2;
412
413     typedef struct tagLICINFO
414     {
415         LONG cbLicInfo;
416         BOOL fRuntimeKeyAvail;
417         BOOL fLicVerified;
418     } LICINFO, *LPLICINFO;
419
420     HRESULT GetLicInfo( [out] LICINFO *pLicInfo );
421
422     HRESULT RequestLicKey(
423         [in] DWORD dwReserved,
424         [out] BSTR *pBstrKey);
425
426     [local]
427     HRESULT CreateInstanceLic(
428         [in] IUnknown *pUnkOuter,
429         [in] IUnknown *pUnkReserved,
430         [in] REFIID riid,
431         [in] BSTR bstrKey,
432         [out, iid_is(riid)] PVOID *ppvObj);
433
434     [call_as(CreateInstanceLic)]
435     HRESULT RemoteCreateInstanceLic(
436         [in] REFIID riid,
437         [in] BSTR bstrKey,
438         [out, iid_is(riid)] IUnknown **ppvObj);
439 }
440
441
442 /*****************************************************************************
443  * IViewObject interface
444  */
445 [
446     local,
447     object,
448     uuid(3af24292-0c96-11ce-a0cf-00aa00600ab8),
449     pointer_default(unique)
450 ]
451 interface IViewObjectEx : IViewObject2
452 {
453     typedef IViewObjectEx *LPVIEWOBJECTEX;
454
455     typedef enum tagVIEWSTATUS
456     {
457         VIEWSTATUS_OPAQUE = 1,
458         VIEWSTATUS_SOLIDBKGND = 2,
459         VIEWSTATUS_DVASPECTOPAQUE = 4,
460         VIEWSTATUS_DVASPECTTRANSPARENT = 8,
461         VIEWSTATUS_SURFACE = 16,
462         VIEWSTATUS_3DSURFACE = 32
463     } VIEWSTATUS;
464
465     typedef enum tagHITRESULT
466     {
467         HITRESULT_OUTSIDE = 0,
468         HITRESULT_TRANSPARENT = 1,
469         HITRESULT_CLOSE = 2,
470         HITRESULT_HIT = 3
471     } HITRESULT;
472
473     typedef enum tagDVASPECT2
474     {
475         DVASPECT_OPAQUE = 16,
476         DVASPECT_TRANSPARENT = 32
477     } DVASPECT2;
478
479     typedef struct tagExtentInfo
480     {
481         ULONG cb;
482         DWORD dwExtentMode;
483         SIZEL sizelProposed;
484     } DVEXTENTINFO;
485
486     typedef enum tagAspectInfoFlag
487     {
488         DVASPECTINFOFLAG_CANOPTIMIZE = 1
489     } DVASPECTINFOFLAG;
490
491     typedef struct tagAspectInfo
492     {
493         ULONG cb;
494         DWORD dwFlags;
495     } DVASPECTINFO;
496
497     HRESULT GetRect(
498         [in] DWORD dwAspect,
499         [out] LPRECTL pRect);
500
501     HRESULT GetViewStatus( [out] DWORD *pdwStatus );
502
503     HRESULT QueryHitPoint(
504         [in] DWORD dwAspect,
505         [in] LPCRECT pRectBounds,
506         [in] POINT ptlLoc,
507         [in] LONG lCloseHint,
508         [out] DWORD *pHitResult);
509
510     HRESULT QueryHitRect(
511         [in] DWORD dwAspect,
512         [in] LPCRECT pRectBounds,
513         [in] LPCRECT pRectLoc,
514         [in] LONG lCloseHint,
515         [out] DWORD *pHitResult);
516
517     HRESULT GetNaturalExtent (
518         [in] DWORD dwAspect,
519         [in] LONG lindex,
520         [in] DVTARGETDEVICE *ptd,
521         [in] HDC hicTargetDev,
522         [in] DVEXTENTINFO *pExtentInfo,
523         [out] LPSIZEL pSizel);
524 }
525
526
527 /*****************************************************************************
528  * IProvideClassInfo interface
529  */
530 [
531     object,
532     uuid(b196b283-bab4-101a-b69c-00aa00341d07),
533     pointer_default(unique)
534 ]
535 interface IProvideClassInfo : IUnknown
536 {
537     typedef IProvideClassInfo *LPPROVIDECLASSINFO;
538
539 cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
540 cpp_quote("#undef GetClassInfo")
541 cpp_quote("#endif")
542
543     HRESULT GetClassInfo( [out] ITypeInfo ** ppTI );
544 }
545
546
547 /*****************************************************************************
548  * IProvideClassInfo2 interface
549  */
550 [
551     object,
552     uuid(a6bc3ac0-dbaa-11ce-9de3-00aa004bb851),
553     pointer_default(unique)
554 ]
555 interface IProvideClassInfo2 : IProvideClassInfo
556 {
557     typedef IProvideClassInfo2 *LPPROVIDECLASSINFO2;
558
559     typedef enum tagGUIDKIND
560     {
561         GUIDKIND_DEFAULT_SOURCE_DISP_IID = 1
562     } GUIDKIND;
563
564     HRESULT GetGUID(
565         [in]  DWORD dwGuidKind,
566         [out] GUID *pGUID );
567 }
568
569
570 [
571     object,
572     uuid(a7aba9c1-8983-11cf-8f20-00805f2cd064),
573     pointer_default(unique)
574 ]
575 interface IProvideMultipleClassInfo : IProvideClassInfo2
576 {
577     cpp_quote("#define MULTICLASSINFO_GETTYPEINFO           0x00000001")
578     cpp_quote("#define MULTICLASSINFO_GETNUMRESERVEDDISPIDS 0x00000002")
579     cpp_quote("#define MULTICLASSINFO_GETIIDPRIMARY         0x00000004")
580     cpp_quote("#define MULTICLASSINFO_GETIIDSOURCE          0x00000008")
581
582     cpp_quote("#define TIFLAGS_EXTENDDISPATCHONLY           0x00000001")
583
584     typedef IProvideMultipleClassInfo *LPPROVIDEMULTIPLECLASSINFO;
585
586     HRESULT GetMultiTypeInfoCount( 
587         [out] ULONG *pcti);
588
589     HRESULT GetInfoOfIndex( 
590         [in] ULONG iti,
591         [in] DWORD dwFlags,
592         [out] ITypeInfo **pptiCoClass,
593         [out] DWORD *pdwTIFlags,
594         [out] ULONG *pcdispidReserved,
595         [out] IID *piidPrimary,
596         [out] IID *piidSource);
597 }
598
599
600 /*****************************************************************************
601  * IConnectionPoint interface
602  */
603 interface IConnectionPointContainer; /* forward declarations */
604 interface IEnumConnections;
605
606 [
607     object,
608     uuid(b196b286-bab4-101a-b69c-00aa00341d07),
609     pointer_default(unique)
610 ]
611 interface IConnectionPoint : IUnknown
612 {
613     typedef IConnectionPoint *PCONNECTIONPOINT, *LPCONNECTIONPOINT;
614
615     HRESULT GetConnectionInterface( [out] IID *pIID );
616     HRESULT GetConnectionPointContainer( [out] IConnectionPointContainer **ppCPC );
617     HRESULT Advise( [in] IUnknown *pUnkSink, [out] DWORD *pdwCookie );
618     HRESULT Unadvise( [in] DWORD dwCookie );
619     HRESULT EnumConnections( [out] IEnumConnections **ppEnum );
620 }
621
622
623 /*****************************************************************************
624  * IConnectionPointContainer interface
625  */
626 interface IEnumConnectionPoints; /* forward declaration */
627 [
628     object,
629     uuid(b196b284-bab4-101a-b69c-00aa00341d07),
630     pointer_default(unique)
631 ]
632 interface IConnectionPointContainer : IUnknown
633 {
634     typedef IConnectionPointContainer *PCONNECTIONPOINTCONTAINER, *LPCONNECTIONPOINTCONTAINER;
635
636     HRESULT EnumConnectionPoints( [out] IEnumConnectionPoints **ppEnum );
637     HRESULT FindConnectionPoint( [in] REFIID riid, [out] IConnectionPoint **ppCP );
638 }
639
640
641 /*****************************************************************************
642  * IEnumConnections interface
643  */
644 [
645     object,
646     uuid(b196b287-bab4-101a-b69c-00aa00341d07),
647     pointer_default(unique)
648 ]
649 interface IEnumConnections : IUnknown
650 {
651     typedef IEnumConnections *PENUMCONNECTIONS, *LPENUMCONNECTIONS;
652
653     typedef struct tagCONNECTDATA
654     {
655         IUnknown *pUnk;
656         DWORD dwCookie;
657     } CONNECTDATA, *PCONNECTDATA, *LPCONNECTDATA;
658
659     [local]
660     HRESULT Next(
661         [in] ULONG cConnections,
662         [out, size_is(cConnections), length_is(*pcFetched)] LPCONNECTDATA rgcd,
663         [out] ULONG *pcFetched);
664
665     [call_as(Next)]
666     HRESULT RemoteNext(
667         [in] ULONG cConnections,
668         [out, size_is(cConnections), length_is(*pcFetched)] LPCONNECTDATA rgcd,
669         [out] ULONG *pcFetched);
670
671     HRESULT Skip( [in] ULONG cConnections );
672
673     HRESULT Reset();
674
675     HRESULT Clone( [out] IEnumConnections **ppEnum );
676 }
677
678
679 /*****************************************************************************
680  * IEnumConnectionPoints interface
681  */
682 [
683     object,
684     uuid(b196b285-bab4-101a-b69c-00aa00341d07),
685     pointer_default(unique)
686 ]
687 interface IEnumConnectionPoints : IUnknown
688 {
689     typedef IEnumConnectionPoints *PENUMCONNECTIONPOINTS, *LPENUMCONNECTIONPOINTS;
690
691     [local]
692     HRESULT Next(
693         [in] ULONG cConnections,
694         [out, size_is(cConnections), length_is(*pcFetched)] LPCONNECTIONPOINT *ppCP,
695         [out] ULONG *pcFetched);
696
697     [call_as(Next)]
698     HRESULT RemoteNext(
699         [in] ULONG cConnections,
700         [out, size_is(cConnections), length_is(*pcFetched)] LPCONNECTIONPOINT *ppCP,
701         [out] ULONG *pcFetched);
702
703     HRESULT Skip( [in] ULONG cConnections );
704
705     HRESULT Reset();
706
707     HRESULT Clone( [out] IEnumConnectionPoints **ppEnum );
708 }
709
710
711 /*****************************************************************************
712  * IPropertyPage interface
713  */
714 interface IPropertyPageSite;  /* forward declaration */
715 [
716     object,
717     uuid(b196b28d-bab4-101a-b69c-00aa00341d07),
718     pointer_default(unique)
719 ]
720 interface IPropertyPage : IUnknown
721 {
722     typedef IPropertyPage *LPPROPERTYPAGE;
723
724     typedef struct tagPROPPAGEINFO
725     {
726         ULONG cb;
727         LPOLESTR pszTitle;
728         SIZE size;
729         LPOLESTR pszDocString;
730         LPOLESTR pszHelpFile;
731         DWORD dwHelpContext;
732     } PROPPAGEINFO, *LPPROPPAGEINFO;
733
734     HRESULT SetPageSite( [in] IPropertyPageSite *pPageSite );
735
736     HRESULT Activate(
737         [in] HWND hWndParent,
738         [in] LPCRECT pRect,
739         [in] BOOL bModal);
740
741     HRESULT Deactivate();
742
743     HRESULT GetPageInfo( [out] PROPPAGEINFO *pPageInfo );
744
745     HRESULT SetObjects(
746         [in] ULONG cObjects,
747         [in, size_is(cObjects)] IUnknown **ppUnk);
748
749     HRESULT Show( [in] UINT nCmdShow );
750
751     HRESULT Move( [in] LPCRECT pRect );
752
753     HRESULT IsPageDirty();
754
755     HRESULT Apply();
756
757     HRESULT Help( [in] LPCOLESTR pszHelpDir );
758
759     HRESULT TranslateAccelerator( [in] MSG *pMsg );
760 }
761
762
763 /*****************************************************************************
764  * IPropertyPage2 interface
765  */
766 [
767     object,
768     uuid(01e44665-24ac-101b-84ed-08002b2ec713),
769     pointer_default(unique)
770 ]
771 interface IPropertyPage2 : IPropertyPage
772 {
773     typedef IPropertyPage2 *LPPROPERTYPAGE2;
774
775     HRESULT EditProperty( [in] DISPID dispID );
776 }
777
778
779 /*****************************************************************************
780  * IPropertyPageSite interface
781  */
782 [
783     object,
784     uuid(b196b28c-bab4-101a-b69c-00aa00341d07),
785     pointer_default(unique)
786 ]
787 interface IPropertyPageSite : IUnknown
788 {
789     typedef IPropertyPageSite *LPPROPERTYPAGESITE;
790
791     typedef enum tagPROPPAGESTATUS
792     {
793         PROPPAGESTATUS_DIRTY = 0x1,
794         PROPPAGESTATUS_VALIDATE = 0x2,
795         PROPPAGESTATUS_CLEAN = 0x4
796     } PROPPAGESTATUS;
797
798     HRESULT OnStatusChange( [in] DWORD dwFlags );
799     HRESULT GetLocaleID( [out] LCID *pLocaleID );
800     HRESULT GetPageContainer( [out] IUnknown **ppUnk );
801     HRESULT TranslateAccelerator( [in] MSG *pMsg );
802 }
803
804
805 /*****************************************************************************
806  * IPropertyNotifySink interface
807  */
808 [
809     object,
810     uuid(9bfbbc02-eff1-101a-84ed-00aa00341d07),
811     pointer_default(unique)
812 ]
813 interface IPropertyNotifySink : IUnknown
814 {
815     typedef IPropertyNotifySink *LPPROPERTYNOTIFYSINK;
816
817     HRESULT OnChanged( [in] DISPID dispID );
818     HRESULT OnRequestEdit( [in] DISPID dispID );
819 }
820
821
822 /*****************************************************************************
823  * ISimpleFrameSite interface
824  */
825 [
826     object,
827     uuid(742b0e01-14e6-101b-914e-00aa00300cab),
828     pointer_default(unique)
829 ]
830 interface ISimpleFrameSite : IUnknown
831 {
832     typedef ISimpleFrameSite *LPSIMPLEFRAMESITE;
833
834     HRESULT PreMessageFilter(
835         [in] HWND hWnd,
836         [in] UINT msg,
837         [in] WPARAM wp,
838         [in] LPARAM lp,
839         [out] LRESULT *plResult,
840         [out] DWORD *pdwCookie);
841
842     HRESULT PostMessageFilter(
843         [in] HWND hWnd,
844         [in] UINT msg,
845         [in] WPARAM wp,
846         [in] LPARAM lp,
847         [out] LRESULT *plResult,
848         [in] DWORD dwCookie);
849 }
850
851
852 /*****************************************************************************
853  * IPersistStreamInit interface
854  */
855 [
856     object,
857     uuid(7fd52380-4e07-101b-ae2d-08002b2ec713),
858     pointer_default(unique)
859 ]
860 interface IPersistStreamInit : IPersist
861 {
862     typedef IPersistStreamInit *LPPERSISTSTREAMINIT;
863
864     HRESULT IsDirty();
865     HRESULT Load( [in] LPSTREAM pStm );
866     HRESULT Save( [in] LPSTREAM pStm, [in] BOOL fClearDirty );
867     HRESULT GetSizeMax( [out] ULARGE_INTEGER *pcbSize );
868     HRESULT InitNew();
869 }
870
871
872 /*****************************************************************************
873  * IPersistMemory interface
874  */
875 [
876     object,
877     uuid(bd1ae5e0-a6ae-11ce-bd37-504200c10000),
878     pointer_default(unique)
879 ]
880 interface IPersistMemory : IPersist
881 {
882     typedef IPersistMemory *LPPERSISTMEMORY;
883
884     HRESULT IsDirty();
885
886     [local]
887     HRESULT Load(
888         [in, size_is(cbSize)] LPVOID pMem,
889         [in] ULONG cbSize);
890
891     [call_as(Load)]
892     HRESULT RemoteLoad(
893         [in, size_is(cbSize)] BYTE *pMem,
894         [in] ULONG cbSize);
895
896     [local]
897     HRESULT Save(
898         [out, size_is(cbSize)] LPVOID pMem,
899         [in] BOOL fClearDirty,
900         [in] ULONG cbSize);
901
902     [call_as(Save)]
903     HRESULT RemoteSave(
904         [out, size_is(cbSize)] BYTE *pMem,
905         [in] BOOL fClearDirty,
906         [in] ULONG cbSize);
907
908     HRESULT GetSizeMax( [out] ULONG *pCbSize );
909     HRESULT InitNew();
910 }
911
912
913 /*****************************************************************************
914  * IPersistPropertyBag interface
915  */
916 [
917     object,
918     uuid(37d84f60-42cb-11ce-8135-00aa004bb851),
919     pointer_default(unique)
920 ]
921 interface IPersistPropertyBag : IPersist
922 {
923     typedef IPersistPropertyBag *LPPERSISTPROPERTYBAG;
924
925     HRESULT InitNew();
926
927     HRESULT Load(
928         [in] IPropertyBag *pPropBag,
929         [in] IErrorLog *pErrorLog);
930
931     HRESULT Save(
932         [in] IPropertyBag *pPropBag,
933         [in] BOOL fClearDirty,
934         [in] BOOL fSaveAllProperties);
935 }
936
937
938 /*****************************************************************************
939  * IPropertyBag2 interface
940  */
941 [
942     object,
943     uuid(22f55882-280b-11d0-a8a9-00a0c90c2004),
944     pointer_default(unique)
945 ]
946 interface IPropertyBag2 : IUnknown
947 {
948     typedef IPropertyBag2 *LPPROPERTYBAG2;
949
950     typedef enum tagPROPBAG2_TYPE
951     {
952         PROPBAG2_TYPE_UNDEFINED = 0,
953         PROPBAG2_TYPE_DATA = 1,
954         PROPBAG2_TYPE_URL = 2,
955         PROPBAG2_TYPE_OBJECT = 3,
956         PROPBAG2_TYPE_STREAM = 4,
957         PROPBAG2_TYPE_STORAGE = 5,
958         PROPBAG2_TYPE_MONIKER = 6
959     } PROPBAG2_TYPE;
960
961     typedef struct tagPROPBAG2
962     {
963         DWORD dwType;
964         VARTYPE vt;
965         CLIPFORMAT cfType;
966         DWORD dwHint;
967         LPOLESTR pstrName;
968         CLSID clsid;
969     } PROPBAG2;
970
971     HRESULT Read(
972         [in] ULONG cProperties,
973         [in] PROPBAG2 *pPropBag,
974         [in] IErrorLog *pErrLog,
975         [out] VARIANT *pvarValue,
976         [out] HRESULT *phrError);
977
978     HRESULT Write(
979         [in] ULONG cProperties,
980         [in] PROPBAG2 *pPropBag,
981         [in] VARIANT *pvarValue);
982
983     HRESULT CountProperties(
984         [out] ULONG *pcProperties );
985
986     HRESULT GetPropertyInfo(
987         [in] ULONG iProperty,
988         [in] ULONG cProperties,
989         [out] PROPBAG2 *pPropBag,
990         [out] ULONG *pcProperties);
991
992     HRESULT LoadObject(
993         [in] LPCOLESTR pstrName,
994         [in] DWORD dwHint,
995         [in] IUnknown *pUnkObject,
996         [in] IErrorLog *pErrLog);
997 }
998
999
1000 /*****************************************************************************
1001  * IPersistPropertyBag2 interface
1002  */
1003 [
1004     object,
1005     uuid(22f55881-280b-11d0-a8a9-00a0c90c2004),
1006     pointer_default(unique)
1007 ]
1008 interface IPersistPropertyBag2 : IPersist
1009 {
1010     typedef IPersistPropertyBag2 *LPPERSISTPROPERTYBAG2;
1011
1012     HRESULT InitNew();
1013
1014     HRESULT Load(
1015         [in] IPropertyBag2 *pPropBag,
1016         [in] IErrorLog *pErrorLog);
1017
1018     HRESULT Save(
1019         [in] IPropertyBag2 *pPropBag,
1020         [in] BOOL fClearDirty,
1021         [in] BOOL fSaveAllProperties);
1022
1023     HRESULT IsDirty();
1024 }
1025
1026
1027 /*****************************************************************************
1028  * ISpecifyPropertyPages interface
1029  */
1030 [
1031     object,
1032     uuid(b196b28b-bab4-101a-b69c-00aa00341d07),
1033     pointer_default(unique)
1034 ]
1035 interface ISpecifyPropertyPages : IUnknown
1036 {
1037     typedef ISpecifyPropertyPages *LPSPECIFYPROPERTYPAGES;
1038
1039     typedef struct tagCAUUID
1040     {
1041         ULONG cElems;
1042         [size_is(cElems)] GUID *pElems;
1043     } CAUUID, *LPCAUUID;
1044
1045     HRESULT GetPages( [out] CAUUID *pPages );
1046 }
1047
1048
1049 /*****************************************************************************
1050  * IPerPropertyBrowsing interface
1051  */
1052 [
1053     object,
1054     uuid(376bd3aa-3845-101b-84ed-08002b2ec713),
1055     pointer_default(unique)
1056 ]
1057 interface IPerPropertyBrowsing : IUnknown
1058 {
1059     typedef IPerPropertyBrowsing *LPPERPROPERTYBROWSING;
1060
1061     typedef struct tagCALPOLESTR
1062     {
1063         ULONG cElems;
1064         [size_is(cElems)] LPOLESTR *pElems;
1065     } CALPOLESTR, *LPCALPOLESTR;
1066
1067     typedef struct tagCADWORD
1068     {
1069         ULONG cElems;
1070         [size_is(cElems)] DWORD *pElems;
1071     } CADWORD, *LPCADWORD;
1072
1073     HRESULT GetDisplayString(
1074         [in] DISPID dispID,
1075         [out] BSTR *pBstr);
1076
1077     HRESULT MapPropertyToPage(
1078         [in] DISPID dispID,
1079         [out] CLSID *pClsid);
1080
1081     HRESULT GetPredefinedStrings(
1082         [in] DISPID dispID,
1083         [out] CALPOLESTR *pCaStringsOut,
1084         [out] CADWORD *pCaCookiesOut);
1085
1086     HRESULT GetPredefinedValue(
1087         [in] DISPID dispID,
1088         [in] DWORD dwCookie,
1089         [out] VARIANT *pVarOut);
1090 }
1091
1092
1093 /*****************************************************************************
1094  * IAdviseSinkEx interface
1095  */
1096 [
1097     object,
1098     uuid(3af24290-0c96-11ce-a0cf-00aa00600ab8),
1099     pointer_default(unique)
1100 ]
1101 interface IAdviseSinkEx : IAdviseSink
1102 {
1103     typedef IAdviseSinkEx *LPADVISESINKEX;
1104
1105     [local]
1106     void OnViewStatusChange( [in] DWORD dwViewStatus );
1107
1108     [call_as(OnViewStatusChange)]
1109     HRESULT RemoteOnViewStatusChange( [in] DWORD dwViewStatus );
1110 }
1111
1112
1113 /*****************************************************************************
1114  * IPointerInactive interface
1115  */
1116 [
1117     object,
1118     uuid(55980ba0-35aa-11cf-b671-00aa004cd6d8),
1119     pointer_default(unique)
1120 ]
1121 interface IPointerInactive : IUnknown
1122 {
1123     typedef IPointerInactive *LPPOINTERINACTIVE;
1124
1125     HRESULT GetActivationPolicy(
1126         [out] DWORD *pdwPolicy);
1127
1128     HRESULT OnInactiveMouseMove(
1129         [in] LPCRECT pRectBounds,
1130         [in] LONG x,
1131         [in] LONG y,
1132         [in] DWORD grfKeyState);
1133
1134     HRESULT OnInactiveSetCursor(
1135         [in] LPCRECT pRectBounds,
1136         [in] LONG x,
1137         [in] LONG y,
1138         [in] DWORD dwMouseMsg,
1139         [in] BOOL fSetAlways);
1140 }
1141
1142
1143 /*****************************************************************************
1144  * IObjectWithSite interface
1145  */
1146 [
1147     object,
1148     uuid(fc4801a3-2ba9-11cf-a229-00aa003d7352),
1149     pointer_default(unique)
1150 ]
1151 interface IObjectWithSite : IUnknown
1152 {
1153     typedef IObjectWithSite *LPOBJECTWITHSITE;
1154
1155     HRESULT SetSite(
1156         [in] IUnknown * pUnkSite);
1157
1158     HRESULT GetSite(
1159         [in] REFIID riid, 
1160         [out, iid_is(riid)] PVOID *ppvSite);
1161 }
1162
1163
1164 /*****************************************************************************
1165  * IOleUndoUnit interface
1166  */
1167 interface IOleUndoManager;  /* forward declaration */
1168 [
1169     object,
1170     uuid(894ad3b0-ef97-11ce-9bc9-00aa00608e01),
1171     pointer_default(unique)
1172 ]
1173 interface IOleUndoUnit : IUnknown
1174 {
1175     typedef IOleUndoUnit *LPOLEUNDOUNIT;
1176
1177     HRESULT Do( [in] IOleUndoManager *pUndoManager );
1178     HRESULT GetDescription( [out] BSTR *pBstr );
1179     HRESULT GetUnitType( [out] CLSID *pClsid, [out] LONG *plID );
1180     HRESULT OnNextAdd();
1181 }
1182
1183
1184 /*****************************************************************************
1185  * IOleParentUndoUnit interface
1186  */
1187 [
1188     object,
1189     uuid(a1faf330-ef97-11ce-9bc9-00aa00608e01),
1190     pointer_default(unique)
1191 ]
1192 interface IOleParentUndoUnit : IOleUndoUnit
1193 {
1194     typedef IOleParentUndoUnit *LPOLEPARENTUNDOUNIT;
1195
1196     HRESULT Open( [in] IOleParentUndoUnit *pPUU );
1197     HRESULT Close( [in] IOleParentUndoUnit *pPUU, [in] BOOL fCommit );
1198     HRESULT Add( [in] IOleUndoUnit *pUU );
1199     HRESULT FindUnit( [in] IOleUndoUnit *pUU );
1200     HRESULT GetParentState( [out] DWORD *pdwState );
1201 }
1202
1203
1204 /*****************************************************************************
1205  * IEnumOleUndoUnits interface
1206  */
1207 [
1208     object,
1209     uuid(b3e7c340-ef97-11ce-9bc9-00aa00608e01),
1210     pointer_default(unique)
1211 ]
1212 interface IEnumOleUndoUnits : IUnknown
1213 {
1214     typedef IEnumOleUndoUnits *LPENUMOLEUNDOUNITS;
1215
1216     [local]
1217     HRESULT Next(
1218         [in] ULONG cElt,
1219         [out, size_is(cElt), length_is(*pcEltFetched)] IOleUndoUnit **rgElt,
1220         [out] ULONG *pcEltFetched);
1221
1222     [call_as(Next)]
1223     HRESULT RemoteNext(
1224         [in] ULONG cElt,
1225         [out, size_is(cElt), length_is(*pcEltFetched)] IOleUndoUnit **rgElt,
1226         [out] ULONG *pcEltFetched);
1227
1228     HRESULT Skip( [in] ULONG cElt );
1229
1230     HRESULT Reset();
1231
1232     HRESULT Clone( [out] IEnumOleUndoUnits **ppEnum );
1233 }
1234
1235
1236 /*****************************************************************************
1237  * IOleUndoManager interface
1238  */
1239 [
1240     object,
1241     uuid(d001f200-ef97-11ce-9bc9-00aa00608e01),
1242     pointer_default(unique)
1243 ]
1244 interface IOleUndoManager : IUnknown
1245 {
1246     typedef IOleUndoManager *LPOLEUNDOMANAGER;
1247
1248     HRESULT Open( [in] IOleParentUndoUnit *pPUU );
1249     HRESULT Close( [in] IOleParentUndoUnit *pPUU, [in] BOOL fCommit );
1250     HRESULT Add( [in] IOleUndoUnit *pUU );
1251     HRESULT GetOpenParentState( [out] DWORD *pdwState );
1252     HRESULT DiscardFrom( [in] IOleUndoUnit *pUU );
1253     HRESULT UndoTo( [in] IOleUndoUnit *pUU );
1254     HRESULT RedoTo( [in] IOleUndoUnit *pUU );
1255     HRESULT EnumUndoable( [out] IEnumOleUndoUnits **ppEnum );
1256     HRESULT EnumRedoable( [out] IEnumOleUndoUnits **ppEnum );
1257     HRESULT GetLastUndoDescription( [out] BSTR *pBstr );
1258     HRESULT GetLastRedoDescription( [out] BSTR *pBstr );
1259     HRESULT Enable( [in] BOOL fEnable );
1260 }
1261
1262
1263 /*****************************************************************************
1264  * IQuickActivate interface
1265  */
1266 [
1267     object,
1268     uuid(cf51ed10-62fe-11cf-bf86-00a0c9034836),
1269     pointer_default(unique)
1270 ]
1271 interface IQuickActivate : IUnknown
1272 {
1273     typedef IQuickActivate *LPQUICKACTIVATE;
1274
1275     typedef enum tagQACONTAINERFLAGS
1276     {
1277         QACONTAINER_SHOWHATCHING = 0x1,
1278         QACONTAINER_SHOWGRABHANDLES = 0x2,
1279         QACONTAINER_USERMODE = 0x4,
1280         QACONTAINER_DISPLAYASDEFAULT = 0x8,
1281         QACONTAINER_UIDEAD = 0x10,
1282         QACONTAINER_AUTOCLIP = 0x20,
1283         QACONTAINER_MESSAGEREFLECT = 0x40,
1284         QACONTAINER_SUPPORTSMNEMONICS = 0x80
1285     } QACONTAINERFLAGS;
1286
1287     typedef DWORD OLE_COLOR;
1288     
1289     typedef struct tagQACONTAINER
1290     {
1291         ULONG cbSize;
1292         IOleClientSite *pClientSite;
1293         IAdviseSinkEx *pAdviseSink;
1294         IPropertyNotifySink *pPropertyNotifySink;
1295         IUnknown *pUnkEventSink;
1296         DWORD dwAmbientFlags;
1297         OLE_COLOR colorFore;
1298         OLE_COLOR colorBack;
1299         IFont *pFont;
1300         IOleUndoManager *pUndoMgr;
1301         DWORD dwAppearance;
1302         LONG lcid;
1303         HPALETTE hpal;
1304         IBindHost *pBindHost;
1305         IOleControlSite *pOleControlSite;
1306         IServiceProvider *pServiceProvider;
1307     } QACONTAINER;
1308
1309     typedef struct tagQACONTROL
1310     {
1311         ULONG cbSize;
1312         DWORD dwMiscStatus;
1313         DWORD dwViewStatus;
1314         DWORD dwEventCookie;
1315         DWORD dwPropNotifyCookie;
1316         DWORD dwPointerActivationPolicy;
1317     } QACONTROL;
1318
1319     [local]
1320     HRESULT QuickActivate(
1321         [in] QACONTAINER *pQaContainer,
1322         [in,out] QACONTROL *pQaControl);
1323
1324     [call_as(QuickActivate)]
1325     HRESULT RemoteQuickActivate(
1326         [in] QACONTAINER *pQaContainer,
1327         [out] QACONTROL *pQaControl);
1328
1329     HRESULT SetContentExtent( [in] LPSIZEL pSizel );
1330
1331     HRESULT GetContentExtent( [out] LPSIZEL pSizel );
1332 }