kernel32: Avoid returning the same name when GetTempFileName is called twice in a...
[wine/multimedia.git] / dlls / shdocvw / view.c
blob9ee7c067333a12f1afb96ee207cab7efb889dcf8
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 "wine/debug.h"
21 #include "shdocvw.h"
23 WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
25 /**********************************************************************
26 * Implement the IViewObject interface
29 #define VIEWOBJ_THIS(iface) DEFINE_THIS(WebBrowser, ViewObject, iface)
31 static HRESULT WINAPI ViewObject_QueryInterface(IViewObject2 *iface, REFIID riid, void **ppv)
33 WebBrowser *This = VIEWOBJ_THIS(iface);
34 return IWebBrowser2_QueryInterface(WEBBROWSER(This), riid, ppv);
37 static ULONG WINAPI ViewObject_AddRef(IViewObject2 *iface)
39 WebBrowser *This = VIEWOBJ_THIS(iface);
40 return IWebBrowser2_AddRef(WEBBROWSER(This));
43 static ULONG WINAPI ViewObject_Release(IViewObject2 *iface)
45 WebBrowser *This = VIEWOBJ_THIS(iface);
46 return IWebBrowser2_Release(WEBBROWSER(This));
49 static HRESULT WINAPI ViewObject_Draw(IViewObject2 *iface, DWORD dwDrawAspect,
50 LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hdcTargetDev,
51 HDC hdcDraw, LPCRECTL lprcBounds, LPCRECTL lprcWBounds,
52 BOOL (STDMETHODCALLTYPE *pfnContinue)(ULONG_PTR),
53 ULONG_PTR dwContinue)
55 WebBrowser *This = VIEWOBJ_THIS(iface);
56 FIXME("(%p)->(%d %d %p %p %p %p %p %p %p %08lx)\n", This, dwDrawAspect, lindex,
57 pvAspect, ptd, hdcTargetDev, hdcDraw, lprcBounds, lprcWBounds, pfnContinue,
58 dwContinue);
59 return E_NOTIMPL;
62 static HRESULT WINAPI ViewObject_GetColorSet(IViewObject2 *iface, DWORD dwAspect,
63 LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hicTargetDev,
64 LOGPALETTE **ppColorSet)
66 WebBrowser *This = VIEWOBJ_THIS(iface);
67 FIXME("(%p)->(%d %d %p %p %p %p)\n", This, dwAspect, lindex, pvAspect, ptd,
68 hicTargetDev, ppColorSet);
69 return E_NOTIMPL;
72 static HRESULT WINAPI ViewObject_Freeze(IViewObject2 *iface, DWORD dwDrawAspect, LONG lindex,
73 void *pvAspect, DWORD *pdwFreeze)
75 WebBrowser *This = VIEWOBJ_THIS(iface);
76 FIXME("(%p)->(%d %d %p %p)\n", This, dwDrawAspect, lindex, pvAspect, pdwFreeze);
77 return E_NOTIMPL;
80 static HRESULT WINAPI ViewObject_Unfreeze(IViewObject2 *iface, DWORD dwFreeze)
82 WebBrowser *This = VIEWOBJ_THIS(iface);
83 FIXME("(%p)->(%d)\n", This, dwFreeze);
84 return E_NOTIMPL;
87 static HRESULT WINAPI ViewObject_SetAdvise(IViewObject2 *iface, DWORD aspects, DWORD advf,
88 IAdviseSink *pAdvSink)
90 WebBrowser *This = VIEWOBJ_THIS(iface);
91 FIXME("(%p)->(%d %08x %p)\n", This, aspects, advf, pAdvSink);
92 return E_NOTIMPL;
95 static HRESULT WINAPI ViewObject_GetAdvise(IViewObject2 *iface, DWORD *pAspects,
96 DWORD *pAdvf, IAdviseSink **ppAdvSink)
98 WebBrowser *This = VIEWOBJ_THIS(iface);
99 FIXME("(%p)->(%p %p %p)\n", This, pAspects, pAdvf, ppAdvSink);
100 return E_NOTIMPL;
103 static HRESULT WINAPI ViewObject_GetExtent(IViewObject2 *iface, DWORD dwAspect, LONG lindex,
104 DVTARGETDEVICE *ptd, LPSIZEL lpsizel)
106 WebBrowser *This = VIEWOBJ_THIS(iface);
107 FIXME("(%p)->(%d %d %p %p)\n", This, dwAspect, lindex, ptd, lpsizel);
108 return E_NOTIMPL;
111 static const IViewObject2Vtbl ViewObjectVtbl = {
112 ViewObject_QueryInterface,
113 ViewObject_AddRef,
114 ViewObject_Release,
115 ViewObject_Draw,
116 ViewObject_GetColorSet,
117 ViewObject_Freeze,
118 ViewObject_Unfreeze,
119 ViewObject_SetAdvise,
120 ViewObject_GetAdvise,
121 ViewObject_GetExtent
124 #undef VIEWOBJ_THIS
126 void WebBrowser_ViewObject_Init(WebBrowser *This)
128 This->lpViewObjectVtbl = &ViewObjectVtbl;
131 /**********************************************************************
132 * Implement the IDataObject interface
135 #define DATAOBJ_THIS(iface) DEFINE_THIS(WebBrowser, DataObject, iface)
137 static HRESULT WINAPI DataObject_QueryInterface(LPDATAOBJECT iface, REFIID riid, LPVOID * ppvObj)
139 WebBrowser *This = DATAOBJ_THIS(iface);
140 return IWebBrowser2_QueryInterface(WEBBROWSER(This), riid, ppvObj);
143 static ULONG WINAPI DataObject_AddRef(LPDATAOBJECT iface)
145 WebBrowser *This = DATAOBJ_THIS(iface);
146 return IWebBrowser2_AddRef(WEBBROWSER(This));
149 static ULONG WINAPI DataObject_Release(LPDATAOBJECT iface)
151 WebBrowser *This = DATAOBJ_THIS(iface);
152 return IWebBrowser2_Release(WEBBROWSER(This));
155 static HRESULT WINAPI DataObject_GetData(LPDATAOBJECT iface, LPFORMATETC pformatetcIn, STGMEDIUM *pmedium)
157 WebBrowser *This = DATAOBJ_THIS(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 = DATAOBJ_THIS(iface);
165 FIXME("(%p)->()\n", This);
166 return E_NOTIMPL;
169 static HRESULT WINAPI DataObject_QueryGetData(LPDATAOBJECT iface, LPFORMATETC pformatetc)
171 WebBrowser *This = DATAOBJ_THIS(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 = DATAOBJ_THIS(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 = DATAOBJ_THIS(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 = DATAOBJ_THIS(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 = DATAOBJ_THIS(iface);
200 FIXME("(%p)->()\n", This);
201 return E_NOTIMPL;
204 static HRESULT WINAPI DataObject_DUnadvise(LPDATAOBJECT iface, DWORD dwConnection)
206 WebBrowser *This = DATAOBJ_THIS(iface);
207 FIXME("(%p)->()\n", This);
208 return E_NOTIMPL;
211 static HRESULT WINAPI DataObject_EnumDAdvise(LPDATAOBJECT iface, IEnumSTATDATA **ppenumAdvise)
213 WebBrowser *This = DATAOBJ_THIS(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 #undef DATAOBJ_THIS
235 void WebBrowser_DataObject_Init(WebBrowser *This)
237 This->lpDataObjectVtbl = &DataObjectVtbl;