Jacek Caban : mshtml: Added IWindowForBindingUI stub implementation.

Alexandre Julliard julliard at winehq.org
Wed May 30 13:18:53 CDT 2012


Module: wine
Branch: master
Commit: cf9d0d320c0603018d3c463f8daa69cbfd68a755
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=cf9d0d320c0603018d3c463f8daa69cbfd68a755

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Wed May 30 15:49:15 2012 +0200

mshtml: Added IWindowForBindingUI stub implementation.

---

 dlls/mshtml/htmldoc.c        |    2 +
 dlls/mshtml/mshtml_private.h |    3 ++
 dlls/mshtml/service.c        |    5 +++
 dlls/mshtml/view.c           |   56 ++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 66 insertions(+), 0 deletions(-)

diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c
index 05eb664..a0ab79d 100644
--- a/dlls/mshtml/htmldoc.c
+++ b/dlls/mshtml/htmldoc.c
@@ -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");
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h
index 7eaaa57..3eb81b9 100644
--- a/dlls/mshtml/mshtml_private.h
+++ b/dlls/mshtml/mshtml_private.h
@@ -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;
 
diff --git a/dlls/mshtml/service.c b/dlls/mshtml/service.c
index 9cafbf0..56744e6 100644
--- a/dlls/mshtml/service.c
+++ b/dlls/mshtml/service.c
@@ -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) {
diff --git a/dlls/mshtml/view.c b/dlls/mshtml/view.c
index 3852046..6701987 100644
--- a/dlls/mshtml/view.c
+++ b/dlls/mshtml/view.c
@@ -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;
+}




More information about the wine-cvs mailing list