2 * Copyright 2005 Jacek Caban
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include "wine/debug.h"
22 WINE_DEFAULT_DEBUG_CHANNEL(shdocvw
);
24 #define VIEWOBJ_THIS(iface) DEFINE_THIS(WebBrowser, ViewObject, iface)
26 static HRESULT WINAPI
ViewObject_QueryInterface(IViewObject2
*iface
, REFIID riid
, void **ppv
)
28 WebBrowser
*This
= VIEWOBJ_THIS(iface
);
29 return IWebBrowser2_QueryInterface(WEBBROWSER(This
), riid
, ppv
);
32 static ULONG WINAPI
ViewObject_AddRef(IViewObject2
*iface
)
34 WebBrowser
*This
= VIEWOBJ_THIS(iface
);
35 return IWebBrowser2_AddRef(WEBBROWSER(This
));
38 static ULONG WINAPI
ViewObject_Release(IViewObject2
*iface
)
40 WebBrowser
*This
= VIEWOBJ_THIS(iface
);
41 return IWebBrowser2_Release(WEBBROWSER(This
));
44 static HRESULT WINAPI
ViewObject_Draw(IViewObject2
*iface
, DWORD dwDrawAspect
,
45 LONG lindex
, void *pvAspect
, DVTARGETDEVICE
*ptd
, HDC hdcTargetDev
,
46 HDC hdcDraw
, LPCRECTL lprcBounds
, LPCRECTL lprcWBounds
,
47 BOOL (STDMETHODCALLTYPE
*pfnContinue
)(ULONG_PTR
),
50 WebBrowser
*This
= VIEWOBJ_THIS(iface
);
51 FIXME("(%p)->(%d %d %p %p %p %p %p %p %p %08lx)\n", This
, dwDrawAspect
, lindex
,
52 pvAspect
, ptd
, hdcTargetDev
, hdcDraw
, lprcBounds
, lprcWBounds
, pfnContinue
,
57 static HRESULT WINAPI
ViewObject_GetColorSet(IViewObject2
*iface
, DWORD dwAspect
,
58 LONG lindex
, void *pvAspect
, DVTARGETDEVICE
*ptd
, HDC hicTargetDev
,
59 LOGPALETTE
**ppColorSet
)
61 WebBrowser
*This
= VIEWOBJ_THIS(iface
);
62 FIXME("(%p)->(%d %d %p %p %p %p)\n", This
, dwAspect
, lindex
, pvAspect
, ptd
,
63 hicTargetDev
, ppColorSet
);
67 static HRESULT WINAPI
ViewObject_Freeze(IViewObject2
*iface
, DWORD dwDrawAspect
, LONG lindex
,
68 void *pvAspect
, DWORD
*pdwFreeze
)
70 WebBrowser
*This
= VIEWOBJ_THIS(iface
);
71 FIXME("(%p)->(%d %d %p %p)\n", This
, dwDrawAspect
, lindex
, pvAspect
, pdwFreeze
);
75 static HRESULT WINAPI
ViewObject_Unfreeze(IViewObject2
*iface
, DWORD dwFreeze
)
77 WebBrowser
*This
= VIEWOBJ_THIS(iface
);
78 FIXME("(%p)->(%d)\n", This
, dwFreeze
);
82 static HRESULT WINAPI
ViewObject_SetAdvise(IViewObject2
*iface
, DWORD aspects
, DWORD advf
,
83 IAdviseSink
*pAdvSink
)
85 WebBrowser
*This
= VIEWOBJ_THIS(iface
);
86 FIXME("(%p)->(%d %08x %p)\n", This
, aspects
, advf
, pAdvSink
);
90 static HRESULT WINAPI
ViewObject_GetAdvise(IViewObject2
*iface
, DWORD
*pAspects
,
91 DWORD
*pAdvf
, IAdviseSink
**ppAdvSink
)
93 WebBrowser
*This
= VIEWOBJ_THIS(iface
);
94 FIXME("(%p)->(%p %p %p)\n", This
, pAspects
, pAdvf
, ppAdvSink
);
98 static HRESULT WINAPI
ViewObject_GetExtent(IViewObject2
*iface
, DWORD dwAspect
, LONG lindex
,
99 DVTARGETDEVICE
*ptd
, LPSIZEL lpsizel
)
101 WebBrowser
*This
= VIEWOBJ_THIS(iface
);
102 FIXME("(%p)->(%d %d %p %p)\n", This
, dwAspect
, lindex
, ptd
, lpsizel
);
106 static const IViewObject2Vtbl ViewObjectVtbl
= {
107 ViewObject_QueryInterface
,
111 ViewObject_GetColorSet
,
114 ViewObject_SetAdvise
,
115 ViewObject_GetAdvise
,
121 void WebBrowser_ViewObject_Init(WebBrowser
*This
)
123 This
->lpViewObjectVtbl
= &ViewObjectVtbl
;