2 * Copyright 2006 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
31 #include "wine/debug.h"
33 #include "mshtml_private.h"
35 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
37 #define HTMLTEXTCONT_THIS(iface) DEFINE_THIS(HTMLTextContainer, HTMLTextContainer, iface)
39 static HRESULT WINAPI HTMLTextContainer_QueryInterface(IHTMLTextContainer *iface,
40 REFIID riid, void **ppv)
42 HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
43 return IHTMLElement_QueryInterface(&This->element.IHTMLElement_iface, riid, ppv);
46 static ULONG WINAPI HTMLTextContainer_AddRef(IHTMLTextContainer *iface)
48 HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
49 return IHTMLElement_AddRef(&This->element.IHTMLElement_iface);
52 static ULONG WINAPI HTMLTextContainer_Release(IHTMLTextContainer *iface)
54 HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
55 return IHTMLElement_Release(&This->element.IHTMLElement_iface);
58 static HRESULT WINAPI HTMLTextContainer_GetTypeInfoCount(IHTMLTextContainer *iface, UINT *pctinfo)
60 HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
61 return IDispatchEx_GetTypeInfoCount(&This->element.node.dispex.IDispatchEx_iface, pctinfo);
64 static HRESULT WINAPI HTMLTextContainer_GetTypeInfo(IHTMLTextContainer *iface, UINT iTInfo,
65 LCID lcid, ITypeInfo **ppTInfo)
67 HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
68 return IDispatchEx_GetTypeInfo(&This->element.node.dispex.IDispatchEx_iface, iTInfo, lcid,
72 static HRESULT WINAPI HTMLTextContainer_GetIDsOfNames(IHTMLTextContainer *iface, REFIID riid,
73 LPOLESTR *rgszNames, UINT cNames,
74 LCID lcid, DISPID *rgDispId)
76 HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
77 return IDispatchEx_GetIDsOfNames(&This->element.node.dispex.IDispatchEx_iface, riid, rgszNames,
78 cNames, lcid, rgDispId);
81 static HRESULT WINAPI HTMLTextContainer_Invoke(IHTMLTextContainer *iface, DISPID dispIdMember,
82 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
83 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
85 HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
86 return IDispatchEx_Invoke(&This->element.node.dispex.IDispatchEx_iface, dispIdMember, riid,
87 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
90 static HRESULT WINAPI HTMLTextContainer_createControlRange(IHTMLTextContainer *iface,
93 HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
94 FIXME("(%p)->(%p)\n", This, range);
98 static HRESULT WINAPI HTMLTextContainer_get_scrollHeight(IHTMLTextContainer *iface, LONG *p)
100 HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
102 TRACE("(%p)->(%p)\n", This, p);
104 return IHTMLElement2_get_scrollHeight(&This->element.IHTMLElement2_iface, p);
107 static HRESULT WINAPI HTMLTextContainer_get_scrollWidth(IHTMLTextContainer *iface, LONG *p)
109 HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
111 TRACE("(%p)->(%p)\n", This, p);
113 return IHTMLElement2_get_scrollWidth(&This->element.IHTMLElement2_iface, p);
116 static HRESULT WINAPI HTMLTextContainer_put_scrollTop(IHTMLTextContainer *iface, LONG v)
118 HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
120 TRACE("(%p)->(%d)\n", This, v);
122 return IHTMLElement2_put_scrollTop(&This->element.IHTMLElement2_iface, v);
125 static HRESULT WINAPI HTMLTextContainer_get_scrollTop(IHTMLTextContainer *iface, LONG *p)
127 HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
129 TRACE("(%p)->(%p)\n", This, p);
131 return IHTMLElement2_get_scrollTop(&This->element.IHTMLElement2_iface, p);
134 static HRESULT WINAPI HTMLTextContainer_put_scrollLeft(IHTMLTextContainer *iface, LONG v)
136 HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
138 TRACE("(%p)->(%d)\n", This, v);
140 return IHTMLElement2_put_scrollLeft(&This->element.IHTMLElement2_iface, v);
143 static HRESULT WINAPI HTMLTextContainer_get_scrollLeft(IHTMLTextContainer *iface, LONG *p)
145 HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
147 TRACE("(%p)->(%p)\n", This, p);
149 return IHTMLElement2_get_scrollLeft(&This->element.IHTMLElement2_iface, p);
152 static HRESULT WINAPI HTMLTextContainer_put_onscroll(IHTMLTextContainer *iface, VARIANT v)
154 HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
155 FIXME("(%p)->()\n", This);
159 static HRESULT WINAPI HTMLTextContainer_get_onscroll(IHTMLTextContainer *iface, VARIANT *p)
161 HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
162 FIXME("(%p)->(%p)\n", This, p);
166 #undef HTMLTEXTCONT_THIS
168 static const IHTMLTextContainerVtbl HTMLTextContainerVtbl = {
169 HTMLTextContainer_QueryInterface,
170 HTMLTextContainer_AddRef,
171 HTMLTextContainer_Release,
172 HTMLTextContainer_GetTypeInfoCount,
173 HTMLTextContainer_GetTypeInfo,
174 HTMLTextContainer_GetIDsOfNames,
175 HTMLTextContainer_Invoke,
176 HTMLTextContainer_createControlRange,
177 HTMLTextContainer_get_scrollHeight,
178 HTMLTextContainer_get_scrollWidth,
179 HTMLTextContainer_put_scrollTop,
180 HTMLTextContainer_get_scrollTop,
181 HTMLTextContainer_put_scrollLeft,
182 HTMLTextContainer_get_scrollLeft,
183 HTMLTextContainer_put_onscroll,
184 HTMLTextContainer_get_onscroll
187 void HTMLTextContainer_Init(HTMLTextContainer *This, HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem,
188 dispex_static_data_t *dispex_data)
190 This->lpHTMLTextContainerVtbl = &HTMLTextContainerVtbl;
192 HTMLElement_Init(&This->element, doc, nselem, dispex_data);
194 ConnectionPoint_Init(&This->cp, &This->element.cp_container, &DIID_HTMLTextContainerEvents, NULL);