ReactOS 0.4.15-dev-8428-g6910fa6
view.c
Go to the documentation of this file.
1/*
2 * Copyright 2005 Jacek Caban
3 * Copyright 2010 Ilya Shpigor
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 */
19
20#include "ieframe.h"
21
22#include "wine/debug.h"
23
25
26/**********************************************************************
27 * Implement the IViewObject interface
28 */
29
31{
32 return CONTAINING_RECORD(iface, WebBrowser, IViewObject2_iface);
33}
34
36{
38 return IWebBrowser2_QueryInterface(&This->IWebBrowser2_iface, riid, ppv);
39}
40
42{
44 return IWebBrowser2_AddRef(&This->IWebBrowser2_iface);
45}
46
48{
50 return IWebBrowser2_Release(&This->IWebBrowser2_iface);
51}
52
53static HRESULT WINAPI ViewObject_Draw(IViewObject2 *iface, DWORD dwDrawAspect,
54 LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hdcTargetDev,
55 HDC hdcDraw, LPCRECTL lprcBounds, LPCRECTL lprcWBounds,
56 BOOL (STDMETHODCALLTYPE *pfnContinue)(ULONG_PTR),
57 ULONG_PTR dwContinue)
58{
60 FIXME("(%p)->(%d %d %p %p %p %p %p %p %p %08lx)\n", This, dwDrawAspect, lindex,
61 pvAspect, ptd, hdcTargetDev, hdcDraw, lprcBounds, lprcWBounds, pfnContinue,
62 dwContinue);
63 return S_OK;
64}
65
67 LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hicTargetDev,
68 LOGPALETTE **ppColorSet)
69{
71 FIXME("(%p)->(%d %d %p %p %p %p)\n", This, dwAspect, lindex, pvAspect, ptd,
72 hicTargetDev, ppColorSet);
73 return E_NOTIMPL;
74}
75
76static HRESULT WINAPI ViewObject_Freeze(IViewObject2 *iface, DWORD dwDrawAspect, LONG lindex,
77 void *pvAspect, DWORD *pdwFreeze)
78{
80 FIXME("(%p)->(%d %d %p %p)\n", This, dwDrawAspect, lindex, pvAspect, pdwFreeze);
81 return E_NOTIMPL;
82}
83
85{
87 FIXME("(%p)->(%d)\n", This, dwFreeze);
88 return E_NOTIMPL;
89}
90
92 IAdviseSink *pAdvSink)
93{
95
96 TRACE("(%p)->(%d %08x %p)\n", This, aspects, advf, pAdvSink);
97
98 if (aspects || advf) FIXME("aspects and/or flags not supported yet\n");
99
100 This->sink_aspects = aspects;
101 This->sink_flags = advf;
102 if (This->sink) IAdviseSink_Release(This->sink);
103 This->sink = pAdvSink;
104 if (This->sink) IAdviseSink_AddRef(This->sink);
105
106 return S_OK;
107}
108
110 DWORD *pAdvf, IAdviseSink **ppAdvSink)
111{
113
114 TRACE("(%p)->(%p %p %p)\n", This, pAspects, pAdvf, ppAdvSink);
115
116 if (pAspects) *pAspects = This->sink_aspects;
117 if (pAdvf) *pAdvf = This->sink_flags;
118 if (ppAdvSink)
119 {
120 *ppAdvSink = This->sink;
121 if (*ppAdvSink) IAdviseSink_AddRef(*ppAdvSink);
122 }
123
124 return S_OK;
125}
126
128 DVTARGETDEVICE *ptd, LPSIZEL lpsizel)
129{
131 FIXME("(%p)->(%d %d %p %p)\n", This, dwAspect, lindex, ptd, lpsizel);
132 return E_NOTIMPL;
133}
134
135static const IViewObject2Vtbl ViewObjectVtbl = {
146};
147
148/**********************************************************************
149 * Implement the IDataObject interface
150 */
151
153{
154 return CONTAINING_RECORD(iface, WebBrowser, IDataObject_iface);
155}
156
158{
160 return IWebBrowser2_QueryInterface(&This->IWebBrowser2_iface, riid, ppvObj);
161}
162
164{
166 return IWebBrowser2_AddRef(&This->IWebBrowser2_iface);
167}
168
170{
172 return IWebBrowser2_Release(&This->IWebBrowser2_iface);
173}
174
175static HRESULT WINAPI DataObject_GetData(LPDATAOBJECT iface, LPFORMATETC pformatetcIn, STGMEDIUM *pmedium)
176{
178 FIXME("(%p)->()\n", This);
179 return E_NOTIMPL;
180}
181
182static HRESULT WINAPI DataObject_GetDataHere(LPDATAOBJECT iface, LPFORMATETC pformatetc, STGMEDIUM *pmedium)
183{
185 FIXME("(%p)->()\n", This);
186 return E_NOTIMPL;
187}
188
189static HRESULT WINAPI DataObject_QueryGetData(LPDATAOBJECT iface, LPFORMATETC pformatetc)
190{
192 FIXME("(%p)->()\n", This);
193 return E_NOTIMPL;
194}
195
196static HRESULT WINAPI DataObject_GetCanonicalFormatEtc(LPDATAOBJECT iface, LPFORMATETC pformatectIn, LPFORMATETC pformatetcOut)
197{
199 FIXME("(%p)->()\n", This);
200 return E_NOTIMPL;
201}
202
203static HRESULT WINAPI DataObject_SetData(LPDATAOBJECT iface, LPFORMATETC pformatetc, STGMEDIUM *pmedium, BOOL fRelease)
204{
206 FIXME("(%p)->()\n", This);
207 return E_NOTIMPL;
208}
209
210static HRESULT WINAPI DataObject_EnumFormatEtc(LPDATAOBJECT iface, DWORD dwDirection, IEnumFORMATETC **ppenumFormatEtc)
211{
213 FIXME("(%p)->()\n", This);
214 return E_NOTIMPL;
215}
216
217static HRESULT WINAPI DataObject_DAdvise(LPDATAOBJECT iface, FORMATETC *pformatetc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection)
218{
220 FIXME("(%p)->()\n", This);
221 return E_NOTIMPL;
222}
223
225{
227 FIXME("(%p)->()\n", This);
228 return E_NOTIMPL;
229}
230
232{
234 FIXME("(%p)->()\n", This);
235 return E_NOTIMPL;
236}
237
238static const IDataObjectVtbl DataObjectVtbl = {
251};
252
254{
255 This->IViewObject2_iface.lpVtbl = &ViewObjectVtbl;
256 This->IDataObject_iface.lpVtbl = &DataObjectVtbl;
257}
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define FIXME(fmt,...)
Definition: precomp.h:53
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
#define E_NOTIMPL
Definition: ddrawi.h:99
static HRESULT WINAPI ViewObject_QueryInterface(IViewObject2 *iface, REFIID riid, void **ppv)
Definition: view.c:35
static HRESULT WINAPI ViewObject_Freeze(IViewObject2 *iface, DWORD dwDrawAspect, LONG lindex, void *pvAspect, DWORD *pdwFreeze)
Definition: view.c:76
static HRESULT WINAPI DataObject_QueryGetData(LPDATAOBJECT iface, LPFORMATETC pformatetc)
Definition: view.c:189
static HRESULT WINAPI ViewObject_SetAdvise(IViewObject2 *iface, DWORD aspects, DWORD advf, IAdviseSink *pAdvSink)
Definition: view.c:91
static HRESULT WINAPI DataObject_GetData(LPDATAOBJECT iface, LPFORMATETC pformatetcIn, STGMEDIUM *pmedium)
Definition: view.c:175
static ULONG WINAPI DataObject_Release(LPDATAOBJECT iface)
Definition: view.c:169
static HRESULT WINAPI DataObject_EnumFormatEtc(LPDATAOBJECT iface, DWORD dwDirection, IEnumFORMATETC **ppenumFormatEtc)
Definition: view.c:210
static ULONG WINAPI ViewObject_AddRef(IViewObject2 *iface)
Definition: view.c:41
static HRESULT WINAPI DataObject_GetCanonicalFormatEtc(LPDATAOBJECT iface, LPFORMATETC pformatectIn, LPFORMATETC pformatetcOut)
Definition: view.c:196
static const IViewObject2Vtbl ViewObjectVtbl
Definition: view.c:135
static WebBrowser * impl_from_IDataObject(IDataObject *iface)
Definition: view.c:152
static HRESULT WINAPI ViewObject_Draw(IViewObject2 *iface, DWORD dwDrawAspect, LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hdcTargetDev, HDC hdcDraw, LPCRECTL lprcBounds, LPCRECTL lprcWBounds, BOOL(STDMETHODCALLTYPE *pfnContinue)(ULONG_PTR), ULONG_PTR dwContinue)
Definition: view.c:53
static HRESULT WINAPI ViewObject_GetAdvise(IViewObject2 *iface, DWORD *pAspects, DWORD *pAdvf, IAdviseSink **ppAdvSink)
Definition: view.c:109
static HRESULT WINAPI DataObject_GetDataHere(LPDATAOBJECT iface, LPFORMATETC pformatetc, STGMEDIUM *pmedium)
Definition: view.c:182
static HRESULT WINAPI DataObject_SetData(LPDATAOBJECT iface, LPFORMATETC pformatetc, STGMEDIUM *pmedium, BOOL fRelease)
Definition: view.c:203
void WebBrowser_ViewObject_Init(WebBrowser *This)
Definition: view.c:253
static HRESULT WINAPI DataObject_EnumDAdvise(LPDATAOBJECT iface, IEnumSTATDATA **ppenumAdvise)
Definition: view.c:231
static HRESULT WINAPI ViewObject_Unfreeze(IViewObject2 *iface, DWORD dwFreeze)
Definition: view.c:84
static HRESULT WINAPI ViewObject_GetExtent(IViewObject2 *iface, DWORD dwAspect, LONG lindex, DVTARGETDEVICE *ptd, LPSIZEL lpsizel)
Definition: view.c:127
static ULONG WINAPI ViewObject_Release(IViewObject2 *iface)
Definition: view.c:47
static const IDataObjectVtbl DataObjectVtbl
Definition: view.c:238
static ULONG WINAPI DataObject_AddRef(LPDATAOBJECT iface)
Definition: view.c:163
static HRESULT WINAPI ViewObject_GetColorSet(IViewObject2 *iface, DWORD dwAspect, LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hicTargetDev, LOGPALETTE **ppColorSet)
Definition: view.c:66
static HRESULT WINAPI DataObject_DUnadvise(LPDATAOBJECT iface, DWORD dwConnection)
Definition: view.c:224
static HRESULT WINAPI DataObject_DAdvise(LPDATAOBJECT iface, FORMATETC *pformatetc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection)
Definition: view.c:217
static WebBrowser * impl_from_IViewObject2(IViewObject2 *iface)
Definition: view.c:30
static HRESULT WINAPI DataObject_QueryInterface(LPDATAOBJECT iface, REFIID riid, LPVOID *ppvObj)
Definition: view.c:157
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
static HDC
Definition: imagelist.c:92
interface IDataObject * LPDATAOBJECT
Definition: objfwd.h:21
long LONG
Definition: pedump.c:60
#define REFIID
Definition: guiddef.h:118
#define TRACE(s)
Definition: solgame.cpp:4
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
#define WINAPI
Definition: msvc.h:6