Jacek Caban : mshtml: Added IConnectionPointContainer stub implementation.

Alexandre Julliard julliard at wine.codeweavers.com
Fri May 5 12:10:31 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 570a1c4eeade854406d23cf813b556003f08619c
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=570a1c4eeade854406d23cf813b556003f08619c

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Fri Apr 28 19:59:58 2006 +0200

mshtml: Added IConnectionPointContainer stub implementation.

---

 dlls/mshtml/Makefile.in      |    1 
 dlls/mshtml/conpoint.c       |   93 ++++++++++++++++++++++++++++++++++++++++++
 dlls/mshtml/htmldoc.c        |    4 ++
 dlls/mshtml/mshtml_private.h |    3 +
 4 files changed, 101 insertions(+), 0 deletions(-)
 create mode 100644 dlls/mshtml/conpoint.c

diff --git a/dlls/mshtml/Makefile.in b/dlls/mshtml/Makefile.in
index 817005d..e6044c7 100644
--- a/dlls/mshtml/Makefile.in
+++ b/dlls/mshtml/Makefile.in
@@ -9,6 +9,7 @@ EXTRALIBS = $(LIBUNICODE) -lstrmiids -lu
 EXTRADEFS = -DCOM_NO_WINDOWS_H
 
 C_SRCS = \
+	conpoint.c \
 	hlink.c \
 	htmlbody.c \
 	htmldoc.c \
diff --git a/dlls/mshtml/conpoint.c b/dlls/mshtml/conpoint.c
new file mode 100644
index 0000000..0436aa6
--- /dev/null
+++ b/dlls/mshtml/conpoint.c
@@ -0,0 +1,93 @@
+/*
+ * Copyright 2006 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 "config.h"
+
+#include <stdarg.h>
+#include <stdio.h>
+
+#define COBJMACROS
+
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "ole2.h"
+
+#include "wine/debug.h"
+
+#include "mshtml_private.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
+
+#define CONPOINT(x) ((IConnectionPoint*) &(x)->lpConnectionPointVtbl);
+
+struct ConnectionPoint {
+    const IConnectionPointVtbl *lpConnectionPointVtbl;
+};
+
+#define CONPTCONT_THIS(iface) DEFINE_THIS(HTMLDocument, ConnectionPointContainer, iface)
+
+static HRESULT WINAPI ConnectionPointContainer_QueryInterface(IConnectionPointContainer *iface,
+                                                              REFIID riid, void **ppv)
+{
+    HTMLDocument *This = CONPTCONT_THIS(iface);
+    return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppv);
+}
+
+static ULONG WINAPI ConnectionPointContainer_AddRef(IConnectionPointContainer *iface)
+{
+    HTMLDocument *This = CONPTCONT_THIS(iface);
+    return IHTMLDocument2_AddRef(HTMLDOC(This));
+}
+
+static ULONG WINAPI ConnectionPointContainer_Release(IConnectionPointContainer *iface)
+{
+    HTMLDocument *This = CONPTCONT_THIS(iface);
+    return IHTMLDocument2_Release(HTMLDOC(This));
+}
+
+static HRESULT WINAPI ConnectionPointContainer_EnumConnectionPoints(IConnectionPointContainer *iface,
+        IEnumConnectionPoints **ppEnum)
+{
+    HTMLDocument *This = CONPTCONT_THIS(iface);
+    FIXME("(%p)->(%p)\n", This, ppEnum);
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint(IConnectionPointContainer *iface,
+        REFIID riid, IConnectionPoint **ppCP)
+{
+    HTMLDocument *This = CONPTCONT_THIS(iface);
+    FIXME("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppCP);
+    return E_NOTIMPL;
+}
+
+static const IConnectionPointContainerVtbl ConnectionPointContainerVtbl = {
+    ConnectionPointContainer_QueryInterface,
+    ConnectionPointContainer_AddRef,
+    ConnectionPointContainer_Release,
+    ConnectionPointContainer_EnumConnectionPoints,
+    ConnectionPointContainer_FindConnectionPoint
+};
+
+#undef CONPTCONT_THIS
+
+void HTMLDocument_ConnectionPoints_Init(HTMLDocument *This)
+{
+    This->lpConnectionPointContainerVtbl = &ConnectionPointContainerVtbl;
+}
diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c
index 52035cc..e02cd76 100644
--- a/dlls/mshtml/htmldoc.c
+++ b/dlls/mshtml/htmldoc.c
@@ -107,6 +107,9 @@ static HRESULT WINAPI HTMLDocument_Query
     }else if(IsEqualGUID(&IID_IHlinkTarget, riid)) {
         TRACE("(%p)->(IID_IHlinkTarget, %p)\n", This, ppvObject);
         *ppvObject = HLNKTARGET(This);
+    }else if(IsEqualGUID(&IID_IConnectionPointContainer, riid)) {
+        TRACE("(%p)->(IID_IConnectionPointContainer %p)\n", This, ppvObject);
+        *ppvObject = CONPTCONT(This);
     }
 
     if(*ppvObject) {
@@ -1043,6 +1046,7 @@ HRESULT HTMLDocument_Create(IUnknown *pU
     HTMLDocument_Window_Init(ret);
     HTMLDocument_Service_Init(ret);
     HTMLDocument_Hlink_Init(ret);
+    HTMLDocument_ConnectionPoints_Init(ret);
 
     ret->nscontainer = NSContainer_Create(ret, NULL);
 
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h
index 5f76ebb..3ebe445 100644
--- a/dlls/mshtml/mshtml_private.h
+++ b/dlls/mshtml/mshtml_private.h
@@ -62,6 +62,7 @@ typedef struct {
     const IOleCommandTargetVtbl           *lpOleCommandTargetVtbl;
     const IOleControlVtbl                 *lpOleControlVtbl;
     const IHlinkTargetVtbl                *lpHlinkTargetVtbl;
+    const IConnectionPointContainerVtbl   *lpConnectionPointContainerVtbl;
 
     LONG ref;
 
@@ -171,6 +172,7 @@ #define CMDTARGET(x)     ((IOleCommandTa
 #define CONTROL(x)       ((IOleControl*)                  &(x)->lpOleControlVtbl)
 #define STATUSCLB(x)     ((IBindStatusCallback*)          &(x)->lpBindStatusCallbackVtbl)
 #define HLNKTARGET(x)    ((IHlinkTarget*)                 &(x)->lpHlinkTargetVtbl)
+#define CONPTCONT(x)     ((IConnectionPointContainer*)    &(x)->lpConnectionPointContainerVtbl)
 
 #define NSWBCHROME(x)    ((nsIWebBrowserChrome*)          &(x)->lpWebBrowserChromeVtbl)
 #define NSCML(x)         ((nsIContextMenuListener*)       &(x)->lpContextMenuListenerVtbl)
@@ -198,6 +200,7 @@ void HTMLDocument_View_Init(HTMLDocument
 void HTMLDocument_Window_Init(HTMLDocument*);
 void HTMLDocument_Service_Init(HTMLDocument*);
 void HTMLDocument_Hlink_Init(HTMLDocument*);
+void HTMLDocument_ConnectionPoints_Init(HTMLDocument*);
 
 NSContainer *NSContainer_Create(HTMLDocument*,NSContainer*);
 void NSContainer_Release(NSContainer*);




More information about the wine-cvs mailing list