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