mshtml: Added IWindowForBindingUI stub implementation.

This commit is contained in:
Jacek Caban 2012-05-30 15:49:15 +02:00 committed by Alexandre Julliard
parent f658aabfd5
commit cf9d0d320c
4 changed files with 66 additions and 0 deletions

View File

@ -2428,6 +2428,8 @@ HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject)
doc->usermode = UNKNOWN_USERMODE;
init_binding_ui(doc);
hres = create_nscontainer(doc, &doc->nscontainer);
if(FAILED(hres)) {
ERR("Failed to init Gecko, returning CLASS_E_CLASSNOTAVAILABLE\n");

View File

@ -453,6 +453,8 @@ struct HTMLDocumentObj {
ICustomDoc ICustomDoc_iface;
ITargetContainer ITargetContainer_iface;
IWindowForBindingUI IWindowForBindingUI_iface;
LONG ref;
NSContainer *nscontainer;
@ -657,6 +659,7 @@ void HTMLDocument_Service_Init(HTMLDocument*) DECLSPEC_HIDDEN;
void HTMLDocument_Hlink_Init(HTMLDocument*) DECLSPEC_HIDDEN;
void TargetContainer_Init(HTMLDocumentObj*) DECLSPEC_HIDDEN;
void init_binding_ui(HTMLDocumentObj*) DECLSPEC_HIDDEN;
void HTMLDocumentNode_SecMgr_Init(HTMLDocumentNode*) DECLSPEC_HIDDEN;

View File

@ -254,6 +254,11 @@ static HRESULT WINAPI ServiceProvider_QueryService(IServiceProvider *iface, REFG
return IHTMLDocument2_QueryInterface(&This->IHTMLDocument2_iface, riid, ppv);
}
if(IsEqualGUID(&IID_IWindowForBindingUI, guidService)) {
TRACE("IID_IWindowForBindingUI\n");
return IWindowForBindingUI_QueryInterface(&This->doc_obj->IWindowForBindingUI_iface, riid, ppv);
}
TRACE("(%p)->(%s %s %p)\n", This, debugstr_guid(guidService), debugstr_guid(riid), ppv);
if(This->doc_obj->client) {

View File

@ -912,3 +912,59 @@ void HTMLDocument_View_Init(HTMLDocument *This)
This->IOleDocumentView_iface.lpVtbl = &OleDocumentViewVtbl;
This->IViewObjectEx_iface.lpVtbl = &ViewObjectVtbl;
}
static inline HTMLDocumentObj *impl_from_IWindowForBindingUI(IWindowForBindingUI *iface)
{
return CONTAINING_RECORD(iface, HTMLDocumentObj, IWindowForBindingUI_iface);
}
static HRESULT WINAPI WindowForBindingUI_QueryInterface(IWindowForBindingUI *iface, REFIID riid, void **ppv)
{
HTMLDocumentObj *This = impl_from_IWindowForBindingUI(iface);
if(IsEqualGUID(&IID_IUnknown, riid)) {
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
*ppv = &This->IWindowForBindingUI_iface;
}else if(IsEqualGUID(&IID_IWindowForBindingUI, riid)) {
TRACE("(%p)->(IID_IWindowForBindingUI %p)\n", This, ppv);
*ppv = &This->IWindowForBindingUI_iface;
}else {
WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
*ppv = NULL;
return E_NOINTERFACE;
}
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
}
static ULONG WINAPI WindowForBindingUI_AddRef(IWindowForBindingUI *iface)
{
HTMLDocumentObj *This = impl_from_IWindowForBindingUI(iface);
return htmldoc_addref(&This->basedoc);
}
static ULONG WINAPI WindowForBindingUI_Release(IWindowForBindingUI *iface)
{
HTMLDocumentObj *This = impl_from_IWindowForBindingUI(iface);
return htmldoc_release(&This->basedoc);
}
static HRESULT WINAPI WindowForBindingUI_GetWindow(IWindowForBindingUI *iface, REFGUID rguidReason, HWND *phwnd)
{
HTMLDocumentObj *This = impl_from_IWindowForBindingUI(iface);
FIXME("(%p)->(%s %p)\n", This, debugstr_guid(rguidReason), phwnd);
return E_NOTIMPL;
}
static const IWindowForBindingUIVtbl WindowForBindingUIVtbl = {
WindowForBindingUI_QueryInterface,
WindowForBindingUI_AddRef,
WindowForBindingUI_Release,
WindowForBindingUI_GetWindow
};
void init_binding_ui(HTMLDocumentObj *doc)
{
doc->IWindowForBindingUI_iface.lpVtbl = &WindowForBindingUIVtbl;
}