Jacek Caban : mshtml: Added IHTMLTextContainer stub implementation.

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


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

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

mshtml: Added IHTMLTextContainer stub implementation.

---

 dlls/mshtml/Makefile.in      |    1 
 dlls/mshtml/htmlbody.c       |    7 ++
 dlls/mshtml/htmltextcont.c   |  182 ++++++++++++++++++++++++++++++++++++++++++
 dlls/mshtml/mshtml_private.h |   10 ++
 4 files changed, 200 insertions(+), 0 deletions(-)
 create mode 100644 dlls/mshtml/htmltextcont.c

diff --git a/dlls/mshtml/Makefile.in b/dlls/mshtml/Makefile.in
index b7cce4b..817005d 100644
--- a/dlls/mshtml/Makefile.in
+++ b/dlls/mshtml/Makefile.in
@@ -18,6 +18,7 @@ C_SRCS = \
 	htmlinput.c \
 	htmlnode.c \
 	htmlselect.c \
+	htmltextcont.c \
 	htmltextarea.c \
 	main.c \
 	navigate.c \
diff --git a/dlls/mshtml/htmlbody.c b/dlls/mshtml/htmlbody.c
index e55c06c..fea3507 100644
--- a/dlls/mshtml/htmlbody.c
+++ b/dlls/mshtml/htmlbody.c
@@ -38,6 +38,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
 typedef struct {
     const IHTMLBodyElementVtbl *lpHTMLBodyElementVtbl;
 
+    HTMLTextContainer text_container;
+
     HTMLElement *element;
     nsIDOMHTMLBodyElement *nsbody;
 } HTMLBodyElement;
@@ -63,6 +65,9 @@ static HRESULT WINAPI HTMLBodyElement_Qu
     }else if(IsEqualGUID(&IID_IHTMLBodyElement, riid)) {
         TRACE("(%p)->(IID_IHTMLBodyElement %p)\n", This, ppv);
         *ppv = HTMLBODY(This);
+    }else if(IsEqualGUID(&IID_IHTMLTextContainer, riid)) {
+        TRACE("(%p)->(IID_IHTMLTextContainer %p)\n", This, ppv);
+        *ppv = HTMLTEXTCONT(&This->text_container);
     }
 
     if(*ppv) {
@@ -436,6 +441,8 @@ void HTMLBodyElement_Create(HTMLElement 
     ret->lpHTMLBodyElementVtbl = &HTMLBodyElementVtbl;
     ret->element = element;
 
+    HTMLTextContainer_Init(&ret->text_container, (IUnknown*)HTMLBODY(ret));
+
     nsres = nsIDOMHTMLElement_QueryInterface(element->nselem, &IID_nsIDOMHTMLBodyElement,
                                              (void**)&ret->nsbody);
     if(NS_FAILED(nsres))
diff --git a/dlls/mshtml/htmltextcont.c b/dlls/mshtml/htmltextcont.c
new file mode 100644
index 0000000..2d6faf9
--- /dev/null
+++ b/dlls/mshtml/htmltextcont.c
@@ -0,0 +1,182 @@
+/*
+ * 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 HTMLTEXTCONT_THIS(iface) DEFINE_THIS(HTMLTextContainer, HTMLTextContainer, iface)
+
+static HRESULT WINAPI HTMLTextContainer_QueryInterface(IHTMLTextContainer *iface,
+                                                       REFIID riid, void **ppv)
+{
+    HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
+    return IUnknown_QueryInterface(This->impl, riid, ppv);
+}
+
+static ULONG WINAPI HTMLTextContainer_AddRef(IHTMLTextContainer *iface)
+{
+    HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
+    return IUnknown_AddRef(This->impl);
+}
+
+static ULONG WINAPI HTMLTextContainer_Release(IHTMLTextContainer *iface)
+{
+    HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
+    return IUnknown_Release(This->impl);
+}
+
+static HRESULT WINAPI HTMLTextContainer_GetTypeInfoCount(IHTMLTextContainer *iface, UINT *pctinfo)
+{
+    HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
+    FIXME("(%p)->(%p)\n", This, pctinfo);
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI HTMLTextContainer_GetTypeInfo(IHTMLTextContainer *iface, UINT iTInfo,
+                                              LCID lcid, ITypeInfo **ppTInfo)
+{
+    HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
+    FIXME("(%p)->(%u %lu %p)\n", This, iTInfo, lcid, ppTInfo);
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI HTMLTextContainer_GetIDsOfNames(IHTMLTextContainer *iface, REFIID riid,
+                                                LPOLESTR *rgszNames, UINT cNames,
+                                                LCID lcid, DISPID *rgDispId)
+{
+    HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
+    FIXME("(%p)->(%s %p %u %lu %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
+                                        lcid, rgDispId);
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI HTMLTextContainer_Invoke(IHTMLTextContainer *iface, DISPID dispIdMember,
+                            REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
+                            VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
+{
+    HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
+    FIXME("(%p)->(%ld %s %ld %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
+            lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI HTMLTextContainer_createControlRange(IHTMLTextContainer *iface,
+                                                           IDispatch **range)
+{
+    HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
+    FIXME("(%p)->(%p)\n", This, range);
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI HTMLTextContainer_get_scrollHeight(IHTMLTextContainer *iface, long *p)
+{
+    HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
+    FIXME("(%p)->(%p)\n", This, p);
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI HTMLTextContainer_get_scrollWidth(IHTMLTextContainer *iface, long *p)
+{
+    HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
+    FIXME("(%p)->(%p)\n", This, p);
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI HTMLTextContainer_put_scrollTop(IHTMLTextContainer *iface, long v)
+{
+    HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
+    FIXME("(%p)->(%ld)\n", This, v);
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI HTMLTextContainer_get_scrollTop(IHTMLTextContainer *iface, long *p)
+{
+    HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
+    FIXME("(%p)->(%p)\n", This, p);
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI HTMLTextContainer_put_scrollLeft(IHTMLTextContainer *iface, long v)
+{
+    HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
+    FIXME("(%p)->(%ld)\n", This, v);
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI HTMLTextContainer_get_scrollLeft(IHTMLTextContainer *iface, long *p)
+{
+    HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
+    FIXME("(%p)->(%p)\n", This, p);
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI HTMLTextContainer_put_onscroll(IHTMLTextContainer *iface, VARIANT v)
+{
+    HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
+    FIXME("(%p)->()\n", This);
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI HTMLTextContainer_get_onscroll(IHTMLTextContainer *iface, VARIANT *p)
+{
+    HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
+    FIXME("(%p)->(%p)\n", This, p);
+    return E_NOTIMPL;
+}
+
+#undef HTMLTEXTCONT_THIS
+
+static const IHTMLTextContainerVtbl HTMLTextContainerVtbl = {
+    HTMLTextContainer_QueryInterface,
+    HTMLTextContainer_AddRef,
+    HTMLTextContainer_Release,
+    HTMLTextContainer_GetTypeInfoCount,
+    HTMLTextContainer_GetTypeInfo,
+    HTMLTextContainer_GetIDsOfNames,
+    HTMLTextContainer_Invoke,
+    HTMLTextContainer_createControlRange,
+    HTMLTextContainer_get_scrollHeight,
+    HTMLTextContainer_get_scrollWidth,
+    HTMLTextContainer_put_scrollTop,
+    HTMLTextContainer_get_scrollTop,
+    HTMLTextContainer_put_scrollLeft,
+    HTMLTextContainer_get_scrollLeft,
+    HTMLTextContainer_put_onscroll,
+    HTMLTextContainer_get_onscroll
+};
+
+void HTMLTextContainer_Init(HTMLTextContainer *This, IUnknown *impl)
+{
+    This->lpHTMLTextContainerVtbl = &HTMLTextContainerVtbl;
+    This->impl = impl;
+}
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h
index 478f152..5f76ebb 100644
--- a/dlls/mshtml/mshtml_private.h
+++ b/dlls/mshtml/mshtml_private.h
@@ -145,6 +145,12 @@ typedef struct {
     IUnknown *impl;
 } HTMLElement;
 
+typedef struct {
+    const IHTMLTextContainerVtbl *lpHTMLTextContainerVtbl;
+
+    IUnknown *impl;
+} HTMLTextContainer;
+
 #define HTMLDOC(x)       ((IHTMLDocument2*)               &(x)->lpHTMLDocument2Vtbl)
 #define HTMLDOC3(x)      ((IHTMLDocument3*)               &(x)->lpHTMLDocument3Vtbl)
 #define PERSIST(x)       ((IPersist*)                     &(x)->lpPersistFileVtbl)
@@ -179,6 +185,8 @@ #define HTMLELEM(x)      ((IHTMLElement*
 #define HTMLELEM2(x)     ((IHTMLElement2*)                &(x)->lpHTMLElement2Vtbl)
 #define HTMLDOMNODE(x)   ((IHTMLDOMNode*)                 &(x)->lpHTMLDOMNodeVtbl)
 
+#define HTMLTEXTCONT(x)  ((IHTMLTextContainer*)           &(x)->lpHTMLTextContainerVtbl)
+
 #define DEFINE_THIS(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,lp ## ifc ## Vtbl)))
 
 HRESULT HTMLDocument_Create(IUnknown*,REFIID,void**);
@@ -233,6 +241,8 @@ void HTMLTextAreaElement_Create(HTMLElem
 
 void HTMLElement2_Init(HTMLElement*);
 
+void HTMLTextContainer_Init(HTMLTextContainer*,IUnknown*);
+
 HRESULT HTMLDOMNode_QI(HTMLDOMNode*,REFIID,void**);
 HRESULT HTMLElement_QI(HTMLElement*,REFIID,void**);
 




More information about the wine-cvs mailing list