MSHTML: Added stub implementation of IViewObject[2] interface
Jacek Caban
jack at itma.pwr.wroc.pl
Thu Jun 23 09:50:55 CDT 2005
Changelog:
Added stub implementation of IViewObject[2] interface
-------------- next part --------------
Index: dlls/mshtml/mshtml_private.h
===================================================================
RCS file: /home/wine/wine/dlls/mshtml/mshtml_private.h,v
retrieving revision 1.7
diff -u -p -r1.7 mshtml_private.h
--- dlls/mshtml/mshtml_private.h 1 Jun 2005 19:57:42 -0000 1.7
+++ dlls/mshtml/mshtml_private.h 23 Jun 2005 14:46:41 -0000
@@ -25,6 +25,7 @@ typedef struct {
const IOleDocumentVtbl *lpOleDocumentVtbl;
const IOleDocumentViewVtbl *lpOleDocumentViewVtbl;
const IOleInPlaceActiveObjectVtbl *lpOleInPlaceActiveObjectVtbl;
+ const IViewObject2Vtbl *lpViewObject2Vtbl;
ULONG ref;
@@ -43,7 +44,9 @@ typedef struct {
#define OLEOBJ(x) ((IOleObject*) &(x)->lpOleObjectVtbl)
#define OLEDOC(x) ((IOleDocument*) &(x)->lpOleDocumentVtbl)
#define DOCVIEW(x) ((IOleDocumentView*) &(x)->lpOleDocumentViewVtbl)
-#define ACTOBJ(x) ((IOleInPlaceActiveObject*) &(x)->lpOleInPlaceActiveObjectVtbl)
+#define ACTOBJ(x) ((IOleInPlaceActiveObject*) &(x)->lpOleInPlaceActiveObjectVtbl)
+#define VIEWOBJ(x) ((IViewObject*) &(x)->lpViewObject2Vtbl)
+#define VIEWOBJ2(x) ((IViewObject2*) &(x)->lpViewObject2Vtbl)
HRESULT HTMLDocument_Create(IUnknown*,REFIID,void**);
Index: dlls/mshtml/htmldoc.c
===================================================================
RCS file: /home/wine/wine/dlls/mshtml/htmldoc.c,v
retrieving revision 1.7
diff -u -p -r1.7 htmldoc.c
--- dlls/mshtml/htmldoc.c 1 Jun 2005 19:57:42 -0000 1.7
+++ dlls/mshtml/htmldoc.c 23 Jun 2005 14:46:42 -0000
@@ -79,6 +79,12 @@ static HRESULT WINAPI HTMLDocument_Query
}else if(IsEqualGUID(&IID_IOleInPlaceActiveObject, riid)) {
TRACE("(%p)->(IID_IOleInPlaceActiveObject, %p)\n", This, ppvObject);
*ppvObject = ACTOBJ(This);
+ }else if(IsEqualGUID(&IID_IViewObject, riid)) {
+ TRACE("(%p)->(IID_IViewObject, %p)\n", This, ppvObject);
+ *ppvObject = VIEWOBJ(This);
+ }else if(IsEqualGUID(&IID_IViewObject2, riid)) {
+ TRACE("(%p)->(IID_IViewObject2, %p)\n", This, ppvObject);
+ *ppvObject = VIEWOBJ2(This);
}
if(*ppvObject) {
Index: dlls/mshtml/view.c
===================================================================
RCS file: /home/wine/wine/dlls/mshtml/view.c,v
retrieving revision 1.5
diff -u -p -r1.5 view.c
--- dlls/mshtml/view.c 16 Jun 2005 15:52:44 -0000 1.5
+++ dlls/mshtml/view.c 23 Jun 2005 14:46:42 -0000
@@ -374,9 +374,103 @@ static const IOleDocumentViewVtbl OleDoc
OleDocumentView_Clone
};
+/**********************************************************
+ * IViewObject implementation
+ */
+
+#define VIEWOBJ_THIS \
+ HTMLDocument* const This=(HTMLDocument*)((char*)(iface)-offsetof(HTMLDocument,lpViewObject2Vtbl));
+
+static HRESULT WINAPI ViewObject_QueryInterface(IViewObject2 *iface, REFIID riid, void **ppvObject)
+{
+ VIEWOBJ_THIS
+ return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppvObject);
+}
+
+static ULONG WINAPI ViewObject_AddRef(IViewObject2 *iface)
+{
+ VIEWOBJ_THIS
+ return IHTMLDocument2_AddRef(HTMLDOC(This));
+}
+
+static ULONG WINAPI ViewObject_Release(IViewObject2 *iface)
+{
+ VIEWOBJ_THIS
+ return IHTMLDocument2_Release(HTMLDOC(This));
+}
+
+static HRESULT WINAPI ViewObject_Draw(IViewObject2 *iface, DWORD dwDrawAspect, LONG lindex, void *pvAspect,
+ DVTARGETDEVICE *ptd, HDC hdcTargetDev, HDC hdcDraw, LPCRECTL lprcBounds,
+ LPCRECTL lprcWBounds, BOOL (CALLBACK *pfnContinue)(ULONG_PTR dwContinue), ULONG_PTR dwContinue)
+{
+ VIEWOBJ_THIS
+ FIXME("(%p)->(%ld %ld %p %p %p %p %p %p %p %ld)\n", This, dwDrawAspect, lindex, pvAspect,
+ ptd, hdcTargetDev, hdcDraw, lprcBounds, lprcWBounds, pfnContinue, dwContinue);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ViewObject_GetColorSet(IViewObject2 *iface, DWORD dwDrawAspect, LONG lindex, void *pvAspect,
+ DVTARGETDEVICE *ptd, HDC hicTargetDev, LOGPALETTE **ppColorSet)
+{
+ VIEWOBJ_THIS
+ FIXME("(%p)->(%ld %ld %p %p %p %p)\n", This, dwDrawAspect, lindex, pvAspect, ptd, hicTargetDev, ppColorSet);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ViewObject_Freeze(IViewObject2 *iface, DWORD dwDrawAspect, LONG lindex,
+ void *pvAspect, DWORD *pdwFreeze)
+{
+ VIEWOBJ_THIS
+ FIXME("(%p)->(%ld %ld %p %p)\n", This, dwDrawAspect, lindex, pvAspect, pdwFreeze);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ViewObject_Unfreeze(IViewObject2 *iface, DWORD dwFreeze)
+{
+ VIEWOBJ_THIS
+ FIXME("(%p)->(%ld)\n", This, dwFreeze);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ViewObject_SetAdvise(IViewObject2 *iface, DWORD aspects, DWORD advf, IAdviseSink *pAdvSink)
+{
+ VIEWOBJ_THIS
+ FIXME("(%p)->(%ld %ld %p)\n", This, aspects, advf, pAdvSink);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ViewObject_GetAdvise(IViewObject2 *iface, DWORD *pAspects, DWORD *pAdvf, IAdviseSink **ppAdvSink)
+{
+ VIEWOBJ_THIS
+ FIXME("(%p)->(%p %p %p)\n", This, pAspects, pAdvf, ppAdvSink);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ViewObject_GetExtent(IViewObject2 *iface, DWORD dwDrawAspect, LONG lindex,
+ DVTARGETDEVICE* ptd, LPSIZEL lpsizel)
+{
+ VIEWOBJ_THIS
+ FIXME("(%p)->(%ld %ld %p %p)\n", This, dwDrawAspect, lindex, ptd, lpsizel);
+ return E_NOTIMPL;
+}
+
+static const IViewObject2Vtbl ViewObjectVtbl = {
+ ViewObject_QueryInterface,
+ ViewObject_AddRef,
+ ViewObject_Release,
+ ViewObject_Draw,
+ ViewObject_GetColorSet,
+ ViewObject_Freeze,
+ ViewObject_Unfreeze,
+ ViewObject_SetAdvise,
+ ViewObject_GetAdvise,
+ ViewObject_GetExtent
+};
+
void HTMLDocument_View_Init(HTMLDocument *This)
{
This->lpOleDocumentViewVtbl = &OleDocumentViewVtbl;
+ This->lpViewObject2Vtbl = &ViewObjectVtbl;
This->ipsite = NULL;
This->frame = NULL;
More information about the wine-patches
mailing list