shdocvw: Silence common invalid QueryInterface FIXMEs.
[wine] / dlls / shdocvw / view.c
1 /*
2  * Copyright 2005 Jacek Caban
3  *
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.
8  *
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.
13  *
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
17  */
18
19 #include "wine/debug.h"
20 #include "shdocvw.h"
21
22 WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
23
24 #define VIEWOBJ_THIS(iface) DEFINE_THIS(WebBrowser, ViewObject, iface)
25
26 static HRESULT WINAPI ViewObject_QueryInterface(IViewObject2 *iface, REFIID riid, void **ppv)
27 {
28     WebBrowser *This = VIEWOBJ_THIS(iface);
29     return IWebBrowser2_QueryInterface(WEBBROWSER(This), riid, ppv);
30 }
31
32 static ULONG WINAPI ViewObject_AddRef(IViewObject2 *iface)
33 {
34     WebBrowser *This = VIEWOBJ_THIS(iface);
35     return IWebBrowser2_AddRef(WEBBROWSER(This));
36 }
37
38 static ULONG WINAPI ViewObject_Release(IViewObject2 *iface)
39 {
40     WebBrowser *This = VIEWOBJ_THIS(iface);
41     return IWebBrowser2_Release(WEBBROWSER(This));
42 }
43
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),
48         ULONG_PTR dwContinue)
49 {
50     WebBrowser *This = VIEWOBJ_THIS(iface);
51     FIXME("(%p)->(%ld %ld %p %p %p %p %p %p %p %08lx)\n", This, dwDrawAspect, lindex,
52             pvAspect, ptd, hdcTargetDev, hdcDraw, lprcBounds, lprcWBounds, pfnContinue,
53             dwContinue);
54     return E_NOTIMPL;
55 }
56
57 static HRESULT WINAPI ViewObject_GetColorSet(IViewObject2 *iface, DWORD dwAspect,
58         LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hicTargetDev,
59         LOGPALETTE **ppColorSet)
60 {
61     WebBrowser *This = VIEWOBJ_THIS(iface);
62     FIXME("(%p)->(%ld %ld %p %p %p %p)\n", This, dwAspect, lindex, pvAspect, ptd,
63             hicTargetDev, ppColorSet);
64     return E_NOTIMPL;
65 }
66
67 static HRESULT WINAPI ViewObject_Freeze(IViewObject2 *iface, DWORD dwDrawAspect, LONG lindex,
68                                         void *pvAspect, DWORD *pdwFreeze)
69 {
70     WebBrowser *This = VIEWOBJ_THIS(iface);
71     FIXME("(%p)->(%ld %ld %p %p)\n", This, dwDrawAspect, lindex, pvAspect, pdwFreeze);
72     return E_NOTIMPL;
73 }
74
75 static HRESULT WINAPI ViewObject_Unfreeze(IViewObject2 *iface, DWORD dwFreeze)
76 {
77     WebBrowser *This = VIEWOBJ_THIS(iface);
78     FIXME("(%p)->(%ld)\n", This, dwFreeze);
79     return E_NOTIMPL;
80 }
81
82 static HRESULT WINAPI ViewObject_SetAdvise(IViewObject2 *iface, DWORD aspects, DWORD advf,
83         IAdviseSink *pAdvSink)
84 {
85     WebBrowser *This = VIEWOBJ_THIS(iface);
86     FIXME("(%p)->(%ld %08lx %p)\n", This, aspects, advf, pAdvSink);
87     return E_NOTIMPL;
88 }
89
90 static HRESULT WINAPI ViewObject_GetAdvise(IViewObject2 *iface, DWORD *pAspects,
91         DWORD *pAdvf, IAdviseSink **ppAdvSink)
92 {
93     WebBrowser *This = VIEWOBJ_THIS(iface);
94     FIXME("(%p)->(%p %p %p)\n", This, pAspects, pAdvf, ppAdvSink);
95     return E_NOTIMPL;
96 }
97
98 static HRESULT WINAPI ViewObject_GetExtent(IViewObject2 *iface, DWORD dwAspect, LONG lindex,
99         DVTARGETDEVICE *ptd, LPSIZEL lpsizel)
100 {
101     WebBrowser *This = VIEWOBJ_THIS(iface);
102     FIXME("(%p)->(%ld %ld %p %p)\n", This, dwAspect, lindex, ptd, lpsizel);
103     return E_NOTIMPL;
104 }
105
106 static const IViewObject2Vtbl ViewObjectVtbl = {
107     ViewObject_QueryInterface,
108     ViewObject_AddRef,
109     ViewObject_Release,
110     ViewObject_Draw,
111     ViewObject_GetColorSet,
112     ViewObject_Freeze,
113     ViewObject_Unfreeze,
114     ViewObject_SetAdvise,
115     ViewObject_GetAdvise,
116     ViewObject_GetExtent
117 };
118
119 #undef VIEWOBJ_THIS
120
121 void WebBrowser_ViewObject_Init(WebBrowser *This)
122 {
123     This->lpViewObjectVtbl = &ViewObjectVtbl;
124 }