Added stub implementation of IDocHostUIHandler.
This commit is contained in:
parent
7627ea47e5
commit
d15de714e3
|
@ -12,6 +12,7 @@ EXTRALIBS = -luuid
|
|||
C_SRCS = \
|
||||
classinfo.c \
|
||||
client.c \
|
||||
dochost.c \
|
||||
events.c \
|
||||
factory.c \
|
||||
misc.c \
|
||||
|
|
|
@ -41,6 +41,12 @@ static HRESULT WINAPI ClientSite_QueryInterface(IOleClientSite *iface, REFIID ri
|
|||
}else if(IsEqualGUID(&IID_IOleInPlaceSite, riid)) {
|
||||
TRACE("(%p)->(IID_IOleInPlaceSite %p)\n", This, ppv);
|
||||
*ppv = INPLACESITE(This);
|
||||
}else if(IsEqualGUID(&IID_IDocHostUIHandler, riid)) {
|
||||
TRACE("(%p)->(IID_IDocHostUIHandler %p)\n", This, ppv);
|
||||
*ppv = DOCHOSTUI(This);
|
||||
}else if(IsEqualGUID(&IID_IDocHostUIHandler2, riid)) {
|
||||
TRACE("(%p)->(IID_IDocHostUIHandler2 %p)\n", This, ppv);
|
||||
*ppv = DOCHOSTUI2(This);
|
||||
}
|
||||
|
||||
if(*ppv) {
|
||||
|
|
|
@ -0,0 +1,200 @@
|
|||
/*
|
||||
* Copyright 2005 Jacek Caban for CodeWeavers
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "shdocvw.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
|
||||
|
||||
#define DOCHOSTUI_THIS(iface) DEFINE_THIS(WebBrowser, DocHostUIHandler, iface)
|
||||
|
||||
static HRESULT WINAPI DocHostUIHandler_QueryInterface(IDocHostUIHandler2 *iface,
|
||||
REFIID riid, void **ppv)
|
||||
{
|
||||
WebBrowser *This = DOCHOSTUI_THIS(iface);
|
||||
return IOleClientSite_QueryInterface(CLIENTSITE(This), riid, ppv);
|
||||
}
|
||||
|
||||
static ULONG WINAPI DocHostUIHandler_AddRef(IDocHostUIHandler2 *iface)
|
||||
{
|
||||
WebBrowser *This = DOCHOSTUI_THIS(iface);
|
||||
return IOleClientSite_AddRef(CLIENTSITE(This));
|
||||
}
|
||||
|
||||
static ULONG WINAPI DocHostUIHandler_Release(IDocHostUIHandler2 *iface)
|
||||
{
|
||||
WebBrowser *This = DOCHOSTUI_THIS(iface);
|
||||
return IOleClientSite_Release(CLIENTSITE(This));
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DocHostUIHandler_ShowContextMenu(IDocHostUIHandler2 *iface,
|
||||
DWORD dwID, POINT *ppt, IUnknown *pcmdtReserved, IDispatch *pdispReserved)
|
||||
{
|
||||
WebBrowser *This = DOCHOSTUI_THIS(iface);
|
||||
FIXME("(%p)->(%ld %p %p %p)\n", This, dwID, ppt, pcmdtReserved, pdispReserved);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DocHostUIHandler_GetHostInfo(IDocHostUIHandler2 *iface,
|
||||
DOCHOSTUIINFO *pInfo)
|
||||
{
|
||||
WebBrowser *This = DOCHOSTUI_THIS(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pInfo);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DocHostUIHandler_ShowUI(IDocHostUIHandler2 *iface, DWORD dwID,
|
||||
IOleInPlaceActiveObject *pActiveObject, IOleCommandTarget *pCommandTarget,
|
||||
IOleInPlaceFrame *pFrame, IOleInPlaceUIWindow *pDoc)
|
||||
{
|
||||
WebBrowser *This = DOCHOSTUI_THIS(iface);
|
||||
FIXME("(%p)->(%ld %p %p %p %p)\n", This, dwID, pActiveObject, pCommandTarget,
|
||||
pFrame, pDoc);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DocHostUIHandler_HideUI(IDocHostUIHandler2 *iface)
|
||||
{
|
||||
WebBrowser *This = DOCHOSTUI_THIS(iface);
|
||||
FIXME("(%p)\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DocHostUIHandler_UpdateUI(IDocHostUIHandler2 *iface)
|
||||
{
|
||||
WebBrowser *This = DOCHOSTUI_THIS(iface);
|
||||
FIXME("(%p)\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DocHostUIHandler_EnableModeless(IDocHostUIHandler2 *iface,
|
||||
BOOL fEnable)
|
||||
{
|
||||
WebBrowser *This = DOCHOSTUI_THIS(iface);
|
||||
FIXME("(%p)->(%x)\n", This, fEnable);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DocHostUIHandler_OnDocWindowActivate(IDocHostUIHandler2 *iface,
|
||||
BOOL fActivate)
|
||||
{
|
||||
WebBrowser *This = DOCHOSTUI_THIS(iface);
|
||||
FIXME("(%p)->(%x)\n", This, fActivate);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DocHostUIHandler_OnFrameWindowActivate(IDocHostUIHandler2 *iface,
|
||||
BOOL fActivate)
|
||||
{
|
||||
WebBrowser *This = DOCHOSTUI_THIS(iface);
|
||||
FIXME("(%p)->(%x)\n", This, fActivate);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DocHostUIHandler_ResizeBorder(IDocHostUIHandler2 *iface,
|
||||
LPCRECT prcBorder, IOleInPlaceUIWindow *pUIWindow, BOOL fRameWindow)
|
||||
{
|
||||
WebBrowser *This = DOCHOSTUI_THIS(iface);
|
||||
FIXME("(%p)->(%p %p %X)\n", This, prcBorder, pUIWindow, fRameWindow);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DocHostUIHandler_TranslateAccelerator(IDocHostUIHandler2 *iface,
|
||||
LPMSG lpMsg, const GUID *pguidCmdGroup, DWORD nCmdID)
|
||||
{
|
||||
WebBrowser *This = DOCHOSTUI_THIS(iface);
|
||||
FIXME("(%p)->(%p %p %ld)\n", This, lpMsg, pguidCmdGroup, nCmdID);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DocHostUIHandler_GetOptionKeyPath(IDocHostUIHandler2 *iface,
|
||||
LPOLESTR *pchKey, DWORD dw)
|
||||
{
|
||||
WebBrowser *This = DOCHOSTUI_THIS(iface);
|
||||
FIXME("(%p)->(%p %ld)\n", This, pchKey, dw);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DocHostUIHandler_GetDropTarget(IDocHostUIHandler2 *iface,
|
||||
IDropTarget *pDropTarget, IDropTarget **ppDropTarget)
|
||||
{
|
||||
WebBrowser *This = DOCHOSTUI_THIS(iface);
|
||||
FIXME("(%p)\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DocHostUIHandler_GetExternal(IDocHostUIHandler2 *iface,
|
||||
IDispatch **ppDispatch)
|
||||
{
|
||||
WebBrowser *This = DOCHOSTUI_THIS(iface);
|
||||
FIXME("(%p)->(%p)\n", This, ppDispatch);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DocHostUIHandler_TranslateUrl(IDocHostUIHandler2 *iface,
|
||||
DWORD dwTranslate, OLECHAR *pchURLIn, OLECHAR **ppchURLOut)
|
||||
{
|
||||
WebBrowser *This = DOCHOSTUI_THIS(iface);
|
||||
FIXME("(%p)->(%ld %s %p)\n", This, dwTranslate, debugstr_w(pchURLIn), ppchURLOut);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DocHostUIHandler_FilterDataObject(IDocHostUIHandler2 *iface,
|
||||
IDataObject *pDO, IDataObject **ppDORet)
|
||||
{
|
||||
WebBrowser *This = DOCHOSTUI_THIS(iface);
|
||||
FIXME("(%p)->(%p %p)\n", This, pDO, ppDORet);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DocHostUIHandler_GetOverrideKeyPath(IDocHostUIHandler2 *iface,
|
||||
LPOLESTR *pchKey, DWORD dw)
|
||||
{
|
||||
WebBrowser *This = DOCHOSTUI_THIS(iface);
|
||||
FIXME("(%p)->(%p %ld)\n", This, pchKey, dw);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
#undef DOCHOSTUI_THIS
|
||||
|
||||
static const IDocHostUIHandler2Vtbl DocHostUIHandler2Vtbl = {
|
||||
DocHostUIHandler_QueryInterface,
|
||||
DocHostUIHandler_AddRef,
|
||||
DocHostUIHandler_Release,
|
||||
DocHostUIHandler_ShowContextMenu,
|
||||
DocHostUIHandler_GetHostInfo,
|
||||
DocHostUIHandler_ShowUI,
|
||||
DocHostUIHandler_HideUI,
|
||||
DocHostUIHandler_UpdateUI,
|
||||
DocHostUIHandler_EnableModeless,
|
||||
DocHostUIHandler_OnDocWindowActivate,
|
||||
DocHostUIHandler_OnFrameWindowActivate,
|
||||
DocHostUIHandler_ResizeBorder,
|
||||
DocHostUIHandler_TranslateAccelerator,
|
||||
DocHostUIHandler_GetOptionKeyPath,
|
||||
DocHostUIHandler_GetDropTarget,
|
||||
DocHostUIHandler_GetExternal,
|
||||
DocHostUIHandler_TranslateUrl,
|
||||
DocHostUIHandler_FilterDataObject,
|
||||
DocHostUIHandler_GetOverrideKeyPath
|
||||
};
|
||||
|
||||
void WebBrowser_DocHost_Init(WebBrowser *This)
|
||||
{
|
||||
This->lpDocHostUIHandlerVtbl = &DocHostUIHandler2Vtbl;
|
||||
}
|
|
@ -35,6 +35,7 @@
|
|||
#include "olectl.h"
|
||||
#include "shlobj.h"
|
||||
#include "exdisp.h"
|
||||
#include "mshtmhst.h"
|
||||
|
||||
/**********************************************************************
|
||||
* IClassFactory declaration for SHDOCVW.DLL
|
||||
|
@ -75,6 +76,7 @@ typedef struct {
|
|||
|
||||
const IOleClientSiteVtbl *lpOleClientSiteVtbl;
|
||||
const IOleInPlaceSiteVtbl *lpOleInPlaceSiteVtbl;
|
||||
const IDocHostUIHandler2Vtbl *lpDocHostUIHandlerVtbl;
|
||||
|
||||
LONG ref;
|
||||
|
||||
|
@ -109,6 +111,8 @@ typedef struct {
|
|||
|
||||
#define CLIENTSITE(x) ((IOleClientSite*) &(x)->lpOleClientSiteVtbl)
|
||||
#define INPLACESITE(x) ((IOleInPlaceSite*) &(x)->lpOleInPlaceSiteVtbl)
|
||||
#define DOCHOSTUI(x) ((IDocHostUIHandler*) &(x)->lpDocHostUIHandlerVtbl)
|
||||
#define DOCHOSTUI2(x) ((IDocHostUIHandler2*) &(x)->lpDocHostUIHandlerVtbl)
|
||||
|
||||
void WebBrowser_OleObject_Init(WebBrowser*);
|
||||
void WebBrowser_ViewObject_Init(WebBrowser*);
|
||||
|
@ -118,6 +122,7 @@ void WebBrowser_Misc_Init(WebBrowser*);
|
|||
void WebBrowser_Events_Init(WebBrowser*);
|
||||
|
||||
void WebBrowser_ClientSite_Init(WebBrowser*);
|
||||
void WebBrowser_DocHost_Init(WebBrowser*);
|
||||
|
||||
void WebBrowser_OleObject_Destroy(WebBrowser*);
|
||||
|
||||
|
|
|
@ -782,6 +782,7 @@ HRESULT WebBrowser_Create(IUnknown *pOuter, REFIID riid, void **ppv)
|
|||
WebBrowser_Misc_Init(ret);
|
||||
WebBrowser_Events_Init(ret);
|
||||
WebBrowser_ClientSite_Init(ret);
|
||||
WebBrowser_DocHost_Init(ret);
|
||||
|
||||
hres = IWebBrowser_QueryInterface(WEBBROWSER(ret), riid, ppv);
|
||||
if(SUCCEEDED(hres)) {
|
||||
|
|
Loading…
Reference in New Issue