Commit 34d71249 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

Added stub implementation of IViewObject[2] interface.

parent fd2b4986
...@@ -79,6 +79,12 @@ static HRESULT WINAPI HTMLDocument_QueryInterface(IHTMLDocument2 *iface, REFIID ...@@ -79,6 +79,12 @@ static HRESULT WINAPI HTMLDocument_QueryInterface(IHTMLDocument2 *iface, REFIID
}else if(IsEqualGUID(&IID_IOleInPlaceActiveObject, riid)) { }else if(IsEqualGUID(&IID_IOleInPlaceActiveObject, riid)) {
TRACE("(%p)->(IID_IOleInPlaceActiveObject, %p)\n", This, ppvObject); TRACE("(%p)->(IID_IOleInPlaceActiveObject, %p)\n", This, ppvObject);
*ppvObject = ACTOBJ(This); *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) { if(*ppvObject) {
......
...@@ -25,6 +25,7 @@ typedef struct { ...@@ -25,6 +25,7 @@ typedef struct {
const IOleDocumentVtbl *lpOleDocumentVtbl; const IOleDocumentVtbl *lpOleDocumentVtbl;
const IOleDocumentViewVtbl *lpOleDocumentViewVtbl; const IOleDocumentViewVtbl *lpOleDocumentViewVtbl;
const IOleInPlaceActiveObjectVtbl *lpOleInPlaceActiveObjectVtbl; const IOleInPlaceActiveObjectVtbl *lpOleInPlaceActiveObjectVtbl;
const IViewObject2Vtbl *lpViewObject2Vtbl;
ULONG ref; ULONG ref;
...@@ -43,7 +44,9 @@ typedef struct { ...@@ -43,7 +44,9 @@ typedef struct {
#define OLEOBJ(x) ((IOleObject*) &(x)->lpOleObjectVtbl) #define OLEOBJ(x) ((IOleObject*) &(x)->lpOleObjectVtbl)
#define OLEDOC(x) ((IOleDocument*) &(x)->lpOleDocumentVtbl) #define OLEDOC(x) ((IOleDocument*) &(x)->lpOleDocumentVtbl)
#define DOCVIEW(x) ((IOleDocumentView*) &(x)->lpOleDocumentViewVtbl) #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**); HRESULT HTMLDocument_Create(IUnknown*,REFIID,void**);
......
...@@ -374,9 +374,103 @@ static const IOleDocumentViewVtbl OleDocumentViewVtbl = { ...@@ -374,9 +374,103 @@ static const IOleDocumentViewVtbl OleDocumentViewVtbl = {
OleDocumentView_Clone 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) void HTMLDocument_View_Init(HTMLDocument *This)
{ {
This->lpOleDocumentViewVtbl = &OleDocumentViewVtbl; This->lpOleDocumentViewVtbl = &OleDocumentViewVtbl;
This->lpViewObject2Vtbl = &ViewObjectVtbl;
This->ipsite = NULL; This->ipsite = NULL;
This->frame = NULL; This->frame = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment