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