Added IOleInPlaceActiveObject stub implementation.

This commit is contained in:
Jacek Caban 2005-12-01 11:36:52 +01:00 committed by Alexandre Julliard
parent bdfa506e40
commit ff28e4201e
3 changed files with 100 additions and 5 deletions

View File

@ -116,7 +116,7 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, LPOLECLIENTSITE
This->client = pClientSite;
if(!pClientSite)
return S_OK;
IOleClientSite_AddRef(pClientSite);
create_shell_embedding_hwnd(This);
@ -237,7 +237,6 @@ static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG iVerb, struct tag
This->pos_rect.bottom-This->pos_rect.top,
SWP_NOZORDER | SWP_SHOWWINDOW);
if(This->client) {
IOleClientSite_ShowObject(This->client);
IOleClientSite_GetContainer(This->client, &This->container);
@ -556,11 +555,102 @@ static const IOleControlVtbl OleControlVtbl =
OleControl_FreezeEvents
};
#define ACTIVEOBJ_THIS(iface) DEFINE_THIS(WebBrowser, OleInPlaceActiveObject, iface)
static HRESULT WINAPI InPlaceActiveObject_QueryInterface(IOleInPlaceActiveObject *iface,
REFIID riid, void **ppv)
{
WebBrowser *This = ACTIVEOBJ_THIS(iface);
return IWebBrowser2_QueryInterface(WEBBROWSER2(This), riid, ppv);
}
static ULONG WINAPI InPlaceActiveObject_AddRef(IOleInPlaceActiveObject *iface)
{
WebBrowser *This = ACTIVEOBJ_THIS(iface);
return IWebBrowser2_AddRef(WEBBROWSER2(This));
}
static ULONG WINAPI InPlaceActiveObject_Release(IOleInPlaceActiveObject *iface)
{
WebBrowser *This = ACTIVEOBJ_THIS(iface);
return IWebBrowser2_Release(WEBBROWSER2(This));
}
static HRESULT WINAPI InPlaceActiveObject_GetWindow(IOleInPlaceActiveObject *iface,
HWND *phwnd)
{
WebBrowser *This = ACTIVEOBJ_THIS(iface);
return IOleInPlaceObject_GetWindow(INPLACEOBJ(This), phwnd);
}
static HRESULT WINAPI InPlaceActiveObject_ContextSensitiveHelp(IOleInPlaceActiveObject *iface,
BOOL fEnterMode)
{
WebBrowser *This = ACTIVEOBJ_THIS(iface);
return IOleInPlaceObject_ContextSensitiveHelp(INPLACEOBJ(This), fEnterMode);
}
static HRESULT WINAPI InPlaceActiveObject_TranslateAccelerator(IOleInPlaceActiveObject *iface,
LPMSG lpmsg)
{
WebBrowser *This = ACTIVEOBJ_THIS(iface);
FIXME("(%p)->(%p)\n", This, lpmsg);
return E_NOTIMPL;
}
static HRESULT WINAPI InPlaceActiveObject_OnFrameWindowActivate(IOleInPlaceActiveObject *iface,
BOOL fActivate)
{
WebBrowser *This = ACTIVEOBJ_THIS(iface);
FIXME("(%p)->(%x)\n", This, fActivate);
return E_NOTIMPL;
}
static HRESULT WINAPI InPlaceActiveObject_OnDocWindowActivate(IOleInPlaceActiveObject *iface,
BOOL fActivate)
{
WebBrowser *This = ACTIVEOBJ_THIS(iface);
FIXME("(%p)->(%x)\n", This, fActivate);
return E_NOTIMPL;
}
static HRESULT WINAPI InPlaceActiveObject_ResizeBorder(IOleInPlaceActiveObject *iface,
LPCRECT lprcBorder, IOleInPlaceUIWindow *pUIWindow, BOOL fFrameWindow)
{
WebBrowser *This = ACTIVEOBJ_THIS(iface);
FIXME("(%p)->(%p %p %x)\n", This, lprcBorder, pUIWindow, fFrameWindow);
return E_NOTIMPL;
}
static HRESULT WINAPI InPlaceActiveObject_EnableModeless(IOleInPlaceActiveObject *iface,
BOOL fEnable)
{
WebBrowser *This = ACTIVEOBJ_THIS(iface);
FIXME("(%p)->(%x)\n", This, fEnable);
return E_NOTIMPL;
}
#undef ACTIVEOBJ_THIS
static const IOleInPlaceActiveObjectVtbl OleInPlaceActiveObjectVtbl = {
InPlaceActiveObject_QueryInterface,
InPlaceActiveObject_AddRef,
InPlaceActiveObject_Release,
InPlaceActiveObject_GetWindow,
InPlaceActiveObject_ContextSensitiveHelp,
InPlaceActiveObject_TranslateAccelerator,
InPlaceActiveObject_OnFrameWindowActivate,
InPlaceActiveObject_OnDocWindowActivate,
InPlaceActiveObject_ResizeBorder,
InPlaceActiveObject_EnableModeless
};
void WebBrowser_OleObject_Init(WebBrowser *This)
{
This->lpOleObjectVtbl = &OleObjectVtbl;
This->lpOleInPlaceObjectVtbl = &OleInPlaceObjectVtbl;
This->lpOleControlVtbl = &OleControlVtbl;
This->lpOleObjectVtbl = &OleObjectVtbl;
This->lpOleInPlaceObjectVtbl = &OleInPlaceObjectVtbl;
This->lpOleControlVtbl = &OleControlVtbl;
This->lpOleInPlaceActiveObjectVtbl = &OleInPlaceActiveObjectVtbl;
This->client = NULL;
This->container = NULL;

View File

@ -71,6 +71,7 @@ typedef struct {
const IQuickActivateVtbl *lpQuickActivateVtbl;
const IConnectionPointContainerVtbl *lpConnectionPointContainerVtbl;
const IViewObject2Vtbl *lpViewObjectVtbl;
const IOleInPlaceActiveObjectVtbl *lpOleInPlaceActiveObjectVtbl;
/* Interfaces available for embeded document */
@ -125,6 +126,7 @@ typedef struct {
#define CONPTCONT(x) ((IConnectionPointContainer*) &(x)->lpConnectionPointContainerVtbl)
#define VIEWOBJ(x) ((IViewObject*) &(x)->lpViewObjectVtbl);
#define VIEWOBJ2(x) ((IViewObject2*) &(x)->lpViewObjectVtbl);
#define ACTIVEOBJ(x) ((IOleInPlaceActiveObject*) &(x)->lpOleInPlaceActiveObjectVtbl)
#define CLIENTSITE(x) ((IOleClientSite*) &(x)->lpOleClientSiteVtbl)
#define INPLACESITE(x) ((IOleInPlaceSite*) &(x)->lpOleInPlaceSiteVtbl)

View File

@ -94,6 +94,9 @@ static HRESULT WINAPI WebBrowser_QueryInterface(IWebBrowser2 *iface, REFIID riid
}else if(IsEqualGUID(&IID_IViewObject2, riid)) {
TRACE("(%p)->(IID_IViewObject2 %p)\n", This, ppv);
*ppv = VIEWOBJ2(This);
}else if(IsEqualGUID(&IID_IOleInPlaceActiveObject, riid)) {
TRACE("(%p)->(IID_IOleInPlaceActiveObject %p)\n", This, ppv);
*ppv = ACTIVEOBJ(This);
}
if(*ppv) {