dmime: Use the generic IPersistStream for DMTimeSigTrack.
[wine.git] / dlls / ieframe / view.c
blob2bf14b59a88d789669da2e38c75ae655208558ea
1 /*
2 * Copyright 2005 Jacek Caban
3 * Copyright 2010 Ilya Shpigor
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.
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.
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
20 #include "ieframe.h"
22 #include "wine/debug.h"
24 WINE_DEFAULT_DEBUG_CHANNEL(ieframe);
26 /**********************************************************************
27 * Implement the IViewObject interface
30 static inline WebBrowser *impl_from_IViewObject2(IViewObject2 *iface)
32 return CONTAINING_RECORD(iface, WebBrowser, IViewObject2_iface);
35 static HRESULT WINAPI ViewObject_QueryInterface(IViewObject2 *iface, REFIID riid, void **ppv)
37 WebBrowser *This = impl_from_IViewObject2(iface);
38 return IWebBrowser2_QueryInterface(&This->IWebBrowser2_iface, riid, ppv);
41 static ULONG WINAPI ViewObject_AddRef(IViewObject2 *iface)
43 WebBrowser *This = impl_from_IViewObject2(iface);
44 return IWebBrowser2_AddRef(&This->IWebBrowser2_iface);
47 static ULONG WINAPI ViewObject_Release(IViewObject2 *iface)
49 WebBrowser *This = impl_from_IViewObject2(iface);
50 return IWebBrowser2_Release(&This->IWebBrowser2_iface);
53 static 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)
59 WebBrowser *This = impl_from_IViewObject2(iface);
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 E_NOTIMPL;
66 static HRESULT WINAPI ViewObject_GetColorSet(IViewObject2 *iface, DWORD dwAspect,
67 LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hicTargetDev,
68 LOGPALETTE **ppColorSet)
70 WebBrowser *This = impl_from_IViewObject2(iface);
71 FIXME("(%p)->(%d %d %p %p %p %p)\n", This, dwAspect, lindex, pvAspect, ptd,
72 hicTargetDev, ppColorSet);
73 return E_NOTIMPL;
76 static HRESULT WINAPI ViewObject_Freeze(IViewObject2 *iface, DWORD dwDrawAspect, LONG lindex,
77 void *pvAspect, DWORD *pdwFreeze)
79 WebBrowser *This = impl_from_IViewObject2(iface);
80 FIXME("(%p)->(%d %d %p %p)\n", This, dwDrawAspect, lindex, pvAspect, pdwFreeze);
81 return E_NOTIMPL;
84 static HRESULT WINAPI ViewObject_Unfreeze(IViewObject2 *iface, DWORD dwFreeze)
86 WebBrowser *This = impl_from_IViewObject2(iface);
87 FIXME("(%p)->(%d)\n", This, dwFreeze);
88 return E_NOTIMPL;
91 static HRESULT WINAPI ViewObject_SetAdvise(IViewObject2 *iface, DWORD aspects, DWORD advf,
92 IAdviseSink *pAdvSink)
94 WebBrowser *This = impl_from_IViewObject2(iface);
95 FIXME("(%p)->(%d %08x %p)\n", This, aspects, advf, pAdvSink);
96 return E_NOTIMPL;
99 static HRESULT WINAPI ViewObject_GetAdvise(IViewObject2 *iface, DWORD *pAspects,
100 DWORD *pAdvf, IAdviseSink **ppAdvSink)
102 WebBrowser *This = impl_from_IViewObject2(iface);
103 FIXME("(%p)->(%p %p %p)\n", This, pAspects, pAdvf, ppAdvSink);
104 return E_NOTIMPL;
107 static HRESULT WINAPI ViewObject_GetExtent(IViewObject2 *iface, DWORD dwAspect, LONG lindex,
108 DVTARGETDEVICE *ptd, LPSIZEL lpsizel)
110 WebBrowser *This = impl_from_IViewObject2(iface);
111 FIXME("(%p)->(%d %d %p %p)\n", This, dwAspect, lindex, ptd, lpsizel);
112 return E_NOTIMPL;
115 static const IViewObject2Vtbl ViewObjectVtbl = {
116 ViewObject_QueryInterface,
117 ViewObject_AddRef,
118 ViewObject_Release,
119 ViewObject_Draw,
120 ViewObject_GetColorSet,
121 ViewObject_Freeze,
122 ViewObject_Unfreeze,
123 ViewObject_SetAdvise,
124 ViewObject_GetAdvise,
125 ViewObject_GetExtent
128 /**********************************************************************
129 * Implement the IDataObject interface
132 static inline WebBrowser *impl_from_IDataObject(IDataObject *iface)
134 return CONTAINING_RECORD(iface, WebBrowser, IDataObject_iface);
137 static HRESULT WINAPI DataObject_QueryInterface(LPDATAOBJECT iface, REFIID riid, LPVOID * ppvObj)
139 WebBrowser *This = impl_from_IDataObject(iface);
140 return IWebBrowser2_QueryInterface(&This->IWebBrowser2_iface, riid, ppvObj);
143 static ULONG WINAPI DataObject_AddRef(LPDATAOBJECT iface)
145 WebBrowser *This = impl_from_IDataObject(iface);
146 return IWebBrowser2_AddRef(&This->IWebBrowser2_iface);
149 static ULONG WINAPI DataObject_Release(LPDATAOBJECT iface)
151 WebBrowser *This = impl_from_IDataObject(iface);
152 return IWebBrowser2_Release(&This->IWebBrowser2_iface);
155 static HRESULT WINAPI DataObject_GetData(LPDATAOBJECT iface, LPFORMATETC pformatetcIn, STGMEDIUM *pmedium)
157 WebBrowser *This = impl_from_IDataObject(iface);
158 FIXME("(%p)->()\n", This);
159 return E_NOTIMPL;
162 static HRESULT WINAPI DataObject_GetDataHere(LPDATAOBJECT iface, LPFORMATETC pformatetc, STGMEDIUM *pmedium)
164 WebBrowser *This = impl_from_IDataObject(iface);
165 FIXME("(%p)->()\n", This);
166 return E_NOTIMPL;
169 static HRESULT WINAPI DataObject_QueryGetData(LPDATAOBJECT iface, LPFORMATETC pformatetc)
171 WebBrowser *This = impl_from_IDataObject(iface);
172 FIXME("(%p)->()\n", This);
173 return E_NOTIMPL;
176 static HRESULT WINAPI DataObject_GetCanonicalFormatEtc(LPDATAOBJECT iface, LPFORMATETC pformatectIn, LPFORMATETC pformatetcOut)
178 WebBrowser *This = impl_from_IDataObject(iface);
179 FIXME("(%p)->()\n", This);
180 return E_NOTIMPL;
183 static HRESULT WINAPI DataObject_SetData(LPDATAOBJECT iface, LPFORMATETC pformatetc, STGMEDIUM *pmedium, BOOL fRelease)
185 WebBrowser *This = impl_from_IDataObject(iface);
186 FIXME("(%p)->()\n", This);
187 return E_NOTIMPL;
190 static HRESULT WINAPI DataObject_EnumFormatEtc(LPDATAOBJECT iface, DWORD dwDirection, IEnumFORMATETC **ppenumFormatEtc)
192 WebBrowser *This = impl_from_IDataObject(iface);
193 FIXME("(%p)->()\n", This);
194 return E_NOTIMPL;
197 static HRESULT WINAPI DataObject_DAdvise(LPDATAOBJECT iface, FORMATETC *pformatetc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection)
199 WebBrowser *This = impl_from_IDataObject(iface);
200 FIXME("(%p)->()\n", This);
201 return E_NOTIMPL;
204 static HRESULT WINAPI DataObject_DUnadvise(LPDATAOBJECT iface, DWORD dwConnection)
206 WebBrowser *This = impl_from_IDataObject(iface);
207 FIXME("(%p)->()\n", This);
208 return E_NOTIMPL;
211 static HRESULT WINAPI DataObject_EnumDAdvise(LPDATAOBJECT iface, IEnumSTATDATA **ppenumAdvise)
213 WebBrowser *This = impl_from_IDataObject(iface);
214 FIXME("(%p)->()\n", This);
215 return E_NOTIMPL;
218 static const IDataObjectVtbl DataObjectVtbl = {
219 DataObject_QueryInterface,
220 DataObject_AddRef,
221 DataObject_Release,
222 DataObject_GetData,
223 DataObject_GetDataHere,
224 DataObject_QueryGetData,
225 DataObject_GetCanonicalFormatEtc,
226 DataObject_SetData,
227 DataObject_EnumFormatEtc,
228 DataObject_DAdvise,
229 DataObject_DUnadvise,
230 DataObject_EnumDAdvise
233 void WebBrowser_ViewObject_Init(WebBrowser *This)
235 This->IViewObject2_iface.lpVtbl = &ViewObjectVtbl;
236 This->IDataObject_iface.lpVtbl = &DataObjectVtbl;