2 * Defines the COM interfaces and APIs related to ViewObject
4 * Copyright (C) 1999 Paul Quinn
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.
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.
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
21 #ifndef __WINE_WINE_OBJ_OLEVIEW_H
22 #define __WINE_WINE_OBJ_OLEVIEW_H
28 #endif /* defined(__cplusplus) */
30 /*****************************************************************************
31 * Declare the structures
35 /*****************************************************************************
36 * Predeclare the interfaces
39 DEFINE_OLEGUID(IID_IViewObject, 0x0000010dL, 0, 0);
40 typedef struct IViewObject IViewObject, *LPVIEWOBJECT;
42 DEFINE_OLEGUID(IID_IViewObject2, 0x00000127L, 0, 0);
43 typedef struct IViewObject2 IViewObject2, *LPVIEWOBJECT2;
45 /*****************************************************************************
46 * IViewObject interface
48 typedef BOOL (CALLBACK *IVO_ContCallback)(DWORD);
50 #define ICOM_INTERFACE IViewObject
51 #define IViewObject_METHODS \
52 ICOM_METHOD10(HRESULT,Draw, DWORD,dwDrawAspect, LONG,lindex, void*,pvAspect, DVTARGETDEVICE*,ptd, HDC,hdcTargetDev, HDC,hdcDraw, LPCRECTL,lprcBounds, LPCRECTL,lprcWBounds, IVO_ContCallback, pfnContinue, DWORD,dwContinue) \
53 ICOM_METHOD6(HRESULT,GetColorSet, DWORD,dwDrawAspect, LONG,lindex, void*,pvAspect, DVTARGETDEVICE*,ptd, HDC,hicTargetDevice, struct tagLOGPALETTE**,ppColorSet) \
54 ICOM_METHOD4(HRESULT,Freeze, DWORD,dwDrawAspect, LONG,lindex, void*,pvAspect, DWORD*,pdwFreeze) \
55 ICOM_METHOD1(HRESULT,Unfreeze, DWORD,dwFreeze) \
56 ICOM_METHOD3(HRESULT,SetAdvise, DWORD,aspects, DWORD,advf, IAdviseSink*,pAdvSink) \
57 ICOM_METHOD3(HRESULT,GetAdvise, DWORD*,pAspects, DWORD*,pAdvf, IAdviseSink**,ppAdvSink)
58 #define IViewObject_IMETHODS \
61 ICOM_DEFINE(IViewObject,IUnknown)
64 /*** IUnknown methods ***/
65 #define IViewObject_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
66 #define IViewObject_AddRef(p) ICOM_CALL (AddRef,p)
67 #define IViewObject_Release(p) ICOM_CALL (Release,p)
68 /*** IViewObject methods ***/
69 #define IViewObject_Draw(p,a,b,c,d,e,f,g,h,i,j) ICOM_CALL10(Draw,p,a,b,c,d,e,f,g,h,i,j)
70 #define IViewObject_GetColorSet(p,a,b,c,d,e,f) ICOM_CALL6(GetColorSet,p,a,b,c,d,e,f)
71 #define IViewObject_Freeze(p,a,b,c,d) ICOM_CALL4(Freeze,p,a,b,c,d)
72 #define IViewObject_Unfreeze(p,a) ICOM_CALL1(Unfreeze,p,a)
73 #define IViewObject_SetAdvise(p,a,b,c) ICOM_CALL3(SetAdvise,p,a,b,c)
74 #define IViewObject_GetAdvise(p,a,b,c) ICOM_CALL3(GetAdvise,p,a,b,c)
78 /*****************************************************************************
79 * IViewObject2 interface
81 #define ICOM_INTERFACE IViewObject2
82 #define IViewObject2_METHODS \
83 ICOM_METHOD4(HRESULT,GetExtent, DWORD,dwDrawAspect, LONG,lindex, DVTARGETDEVICE*,ptd, LPSIZEL,lpsizel)
84 #define IViewObject2_IMETHODS \
85 IViewObject_IMETHODS \
87 ICOM_DEFINE(IViewObject2,IViewObject)
90 /*** IUnknown methods ***/
91 #define IViewObject2_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
92 #define IViewObject2_AddRef(p) ICOM_CALL (AddRef,p)
93 #define IViewObject2_Release(p) ICOM_CALL (Release,p)
94 /*** IViewObject methods ***/
95 #define IViewObject2_Draw(p,a,b,c,d,e,f,g,h,i,j) ICOM_CALL10(Draw,p,a,b,c,d,e,f,g,h,i,j)
96 #define IViewObject2_GetColorSet(p,a,b,c,d,e,f) ICOM_CALL6(GetColorSet,p,a,b,c,d,e,f)
97 #define IViewObject2_Freeze(p,a,b,c,d) ICOM_CALL4(Freeze,p,a,b,c,d)
98 #define IViewObject2_Unfreeze(p,a) ICOM_CALL1(Unfreeze,p,a)
99 #define IViewObject2_SetAdvise(p,a,b,c) ICOM_CALL3(SetAdvise,p,a,b,c)
100 #define IViewObject2_GetAdvise(p,a,b,c) ICOM_CALL3(GetAdvise,p,a,b,c)
101 /*** IViewObject2 methods ***/
102 #define IViewObject2_GetExtent(p,a,b,c,d) ICOM_CALL4(GetExtent,p,a,b,c,d)
106 #endif /* defined(__cplusplus) */
108 #endif /* __WINE_WINE_OBJ_OLEVIEW_H */