Commit 254bdf08 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

shdocvw: Added client site's IOleCommandTarget stub implementation.

parent ecbccb97
...@@ -50,6 +50,9 @@ static HRESULT WINAPI ClientSite_QueryInterface(IOleClientSite *iface, REFIID ri ...@@ -50,6 +50,9 @@ static HRESULT WINAPI ClientSite_QueryInterface(IOleClientSite *iface, REFIID ri
}else if(IsEqualGUID(&IID_IOleDocumentSite, riid)) { }else if(IsEqualGUID(&IID_IOleDocumentSite, riid)) {
TRACE("(%p)->(IID_IOleDocumentSite %p)\n", This, ppv); TRACE("(%p)->(IID_IOleDocumentSite %p)\n", This, ppv);
*ppv = DOCSITE(This); *ppv = DOCSITE(This);
}else if(IsEqualGUID(&IID_IOleClientSite, riid)) {
TRACE("(%p)->(IID_IOleClientSite %p)\n", This, ppv);
*ppv = CLOLECMD(This);
} }
if(*ppv) { if(*ppv) {
......
...@@ -206,6 +206,56 @@ void deactivate_document(WebBrowser *This) ...@@ -206,6 +206,56 @@ void deactivate_document(WebBrowser *This)
This->document = NULL; This->document = NULL;
} }
#define OLECMD_THIS(iface) DEFINE_THIS(WebBrowser, ClOleCommandTarget, iface)
static HRESULT WINAPI ClOleCommandTarget_QueryInterface(IOleCommandTarget *iface,
REFIID riid, void **ppv)
{
WebBrowser *This = OLECMD_THIS(iface);
return IOleClientSite_QueryInterface(CLIENTSITE(This), riid, ppv);
}
static ULONG WINAPI ClOleCommandTarget_AddRef(IOleCommandTarget *iface)
{
WebBrowser *This = OLECMD_THIS(iface);
return IWebBrowser2_AddRef(WEBBROWSER(This));
}
static ULONG WINAPI ClOleCommandTarget_Release(IOleCommandTarget *iface)
{
WebBrowser *This = OLECMD_THIS(iface);
return IWebBrowser2_Release(WEBBROWSER(This));
}
static HRESULT WINAPI ClOleCommandTarget_QueryStatus(IOleCommandTarget *iface,
const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText)
{
WebBrowser *This = OLECMD_THIS(iface);
FIXME("(%p)->(%s %lu %p %p)\n", This, debugstr_guid(pguidCmdGroup), cCmds, prgCmds,
pCmdText);
return E_NOTIMPL;
}
static HRESULT WINAPI ClOleCommandTarget_Exec(IOleCommandTarget *iface,
const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn,
VARIANT *pvaOut)
{
WebBrowser *This = OLECMD_THIS(iface);
FIXME("(%p)->(%s %ld %ld %p %p)\n", This, debugstr_guid(pguidCmdGroup), nCmdID,
nCmdexecopt, pvaIn, pvaOut);
return E_NOTIMPL;
}
#undef OLECMD_THIS
static const IOleCommandTargetVtbl OleCommandTargetVtbl = {
ClOleCommandTarget_QueryInterface,
ClOleCommandTarget_AddRef,
ClOleCommandTarget_Release,
ClOleCommandTarget_QueryStatus,
ClOleCommandTarget_Exec
};
#define DOCHOSTUI_THIS(iface) DEFINE_THIS(WebBrowser, DocHostUIHandler, iface) #define DOCHOSTUI_THIS(iface) DEFINE_THIS(WebBrowser, DocHostUIHandler, iface)
static HRESULT WINAPI DocHostUIHandler_QueryInterface(IDocHostUIHandler2 *iface, static HRESULT WINAPI DocHostUIHandler_QueryInterface(IDocHostUIHandler2 *iface,
...@@ -419,7 +469,8 @@ static const IDocHostUIHandler2Vtbl DocHostUIHandler2Vtbl = { ...@@ -419,7 +469,8 @@ static const IDocHostUIHandler2Vtbl DocHostUIHandler2Vtbl = {
void WebBrowser_DocHost_Init(WebBrowser *This) void WebBrowser_DocHost_Init(WebBrowser *This)
{ {
This->lpDocHostUIHandlerVtbl = &DocHostUIHandler2Vtbl; This->lpDocHostUIHandlerVtbl = &DocHostUIHandler2Vtbl;
This->lpClOleCommandTargetVtbl = &OleCommandTargetVtbl;
This->hostui = NULL; This->hostui = NULL;
......
...@@ -83,6 +83,7 @@ typedef struct { ...@@ -83,6 +83,7 @@ typedef struct {
const IOleInPlaceSiteVtbl *lpOleInPlaceSiteVtbl; const IOleInPlaceSiteVtbl *lpOleInPlaceSiteVtbl;
const IDocHostUIHandler2Vtbl *lpDocHostUIHandlerVtbl; const IDocHostUIHandler2Vtbl *lpDocHostUIHandlerVtbl;
const IOleDocumentSiteVtbl *lpOleDocumentSiteVtbl; const IOleDocumentSiteVtbl *lpOleDocumentSiteVtbl;
const IOleCommandTargetVtbl *lpClOleCommandTargetVtbl;
/* Interfaces of InPlaceFrame object */ /* Interfaces of InPlaceFrame object */
...@@ -138,6 +139,7 @@ typedef struct { ...@@ -138,6 +139,7 @@ typedef struct {
#define DOCHOSTUI(x) ((IDocHostUIHandler*) &(x)->lpDocHostUIHandlerVtbl) #define DOCHOSTUI(x) ((IDocHostUIHandler*) &(x)->lpDocHostUIHandlerVtbl)
#define DOCHOSTUI2(x) ((IDocHostUIHandler2*) &(x)->lpDocHostUIHandlerVtbl) #define DOCHOSTUI2(x) ((IDocHostUIHandler2*) &(x)->lpDocHostUIHandlerVtbl)
#define DOCSITE(x) ((IOleDocumentSite*) &(x)->lpOleDocumentSiteVtbl) #define DOCSITE(x) ((IOleDocumentSite*) &(x)->lpOleDocumentSiteVtbl)
#define CLOLECMD(x) ((IOleCommandTarget*) &(x)->lpClOleCommandTargetVtbl)
#define INPLACEFRAME(x) ((IOleInPlaceFrame*) &(x)->lpOleInPlaceFrameVtbl) #define INPLACEFRAME(x) ((IOleInPlaceFrame*) &(x)->lpOleInPlaceFrameVtbl)
......
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