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 static inline HTMLTextContainer
*impl_from_IHTMLTextContainer(IHTMLTextContainer
*iface
)
39 return CONTAINING_RECORD(iface
, HTMLTextContainer
, IHTMLTextContainer_iface
);
42 static HRESULT WINAPI
HTMLTextContainer_QueryInterface(IHTMLTextContainer
*iface
,
43 REFIID riid
, void **ppv
)
45 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
46 return IHTMLElement_QueryInterface(&This
->element
.IHTMLElement_iface
, riid
, ppv
);
49 static ULONG WINAPI
HTMLTextContainer_AddRef(IHTMLTextContainer
*iface
)
51 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
52 return IHTMLElement_AddRef(&This
->element
.IHTMLElement_iface
);
55 static ULONG WINAPI
HTMLTextContainer_Release(IHTMLTextContainer
*iface
)
57 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
58 return IHTMLElement_Release(&This
->element
.IHTMLElement_iface
);
61 static HRESULT WINAPI
HTMLTextContainer_GetTypeInfoCount(IHTMLTextContainer
*iface
, UINT
*pctinfo
)
63 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
64 return IDispatchEx_GetTypeInfoCount(&This
->element
.node
.dispex
.IDispatchEx_iface
, pctinfo
);
67 static HRESULT WINAPI
HTMLTextContainer_GetTypeInfo(IHTMLTextContainer
*iface
, UINT iTInfo
,
68 LCID lcid
, ITypeInfo
**ppTInfo
)
70 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
71 return IDispatchEx_GetTypeInfo(&This
->element
.node
.dispex
.IDispatchEx_iface
, iTInfo
, lcid
,
75 static HRESULT WINAPI
HTMLTextContainer_GetIDsOfNames(IHTMLTextContainer
*iface
, REFIID riid
,
76 LPOLESTR
*rgszNames
, UINT cNames
,
77 LCID lcid
, DISPID
*rgDispId
)
79 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
80 return IDispatchEx_GetIDsOfNames(&This
->element
.node
.dispex
.IDispatchEx_iface
, riid
, rgszNames
,
81 cNames
, lcid
, rgDispId
);
84 static HRESULT WINAPI
HTMLTextContainer_Invoke(IHTMLTextContainer
*iface
, DISPID dispIdMember
,
85 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
86 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
88 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
89 return IDispatchEx_Invoke(&This
->element
.node
.dispex
.IDispatchEx_iface
, dispIdMember
, riid
,
90 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
93 static HRESULT WINAPI
HTMLTextContainer_createControlRange(IHTMLTextContainer
*iface
,
96 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
97 FIXME("(%p)->(%p)\n", This
, range
);
101 static HRESULT WINAPI
HTMLTextContainer_get_scrollHeight(IHTMLTextContainer
*iface
, LONG
*p
)
103 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
105 TRACE("(%p)->(%p)\n", This
, p
);
107 return IHTMLElement2_get_scrollHeight(&This
->element
.IHTMLElement2_iface
, p
);
110 static HRESULT WINAPI
HTMLTextContainer_get_scrollWidth(IHTMLTextContainer
*iface
, LONG
*p
)
112 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
114 TRACE("(%p)->(%p)\n", This
, p
);
116 return IHTMLElement2_get_scrollWidth(&This
->element
.IHTMLElement2_iface
, p
);
119 static HRESULT WINAPI
HTMLTextContainer_put_scrollTop(IHTMLTextContainer
*iface
, LONG v
)
121 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
123 TRACE("(%p)->(%d)\n", This
, v
);
125 return IHTMLElement2_put_scrollTop(&This
->element
.IHTMLElement2_iface
, v
);
128 static HRESULT WINAPI
HTMLTextContainer_get_scrollTop(IHTMLTextContainer
*iface
, LONG
*p
)
130 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
132 TRACE("(%p)->(%p)\n", This
, p
);
134 return IHTMLElement2_get_scrollTop(&This
->element
.IHTMLElement2_iface
, p
);
137 static HRESULT WINAPI
HTMLTextContainer_put_scrollLeft(IHTMLTextContainer
*iface
, LONG v
)
139 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
141 TRACE("(%p)->(%d)\n", This
, v
);
143 return IHTMLElement2_put_scrollLeft(&This
->element
.IHTMLElement2_iface
, v
);
146 static HRESULT WINAPI
HTMLTextContainer_get_scrollLeft(IHTMLTextContainer
*iface
, LONG
*p
)
148 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
150 TRACE("(%p)->(%p)\n", This
, p
);
152 return IHTMLElement2_get_scrollLeft(&This
->element
.IHTMLElement2_iface
, p
);
155 static HRESULT WINAPI
HTMLTextContainer_put_onscroll(IHTMLTextContainer
*iface
, VARIANT v
)
157 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
158 FIXME("(%p)->()\n", This
);
162 static HRESULT WINAPI
HTMLTextContainer_get_onscroll(IHTMLTextContainer
*iface
, VARIANT
*p
)
164 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
165 FIXME("(%p)->(%p)\n", This
, p
);
169 static const IHTMLTextContainerVtbl HTMLTextContainerVtbl
= {
170 HTMLTextContainer_QueryInterface
,
171 HTMLTextContainer_AddRef
,
172 HTMLTextContainer_Release
,
173 HTMLTextContainer_GetTypeInfoCount
,
174 HTMLTextContainer_GetTypeInfo
,
175 HTMLTextContainer_GetIDsOfNames
,
176 HTMLTextContainer_Invoke
,
177 HTMLTextContainer_createControlRange
,
178 HTMLTextContainer_get_scrollHeight
,
179 HTMLTextContainer_get_scrollWidth
,
180 HTMLTextContainer_put_scrollTop
,
181 HTMLTextContainer_get_scrollTop
,
182 HTMLTextContainer_put_scrollLeft
,
183 HTMLTextContainer_get_scrollLeft
,
184 HTMLTextContainer_put_onscroll
,
185 HTMLTextContainer_get_onscroll
188 void HTMLTextContainer_Init(HTMLTextContainer
*This
, HTMLDocumentNode
*doc
, nsIDOMHTMLElement
*nselem
,
189 dispex_static_data_t
*dispex_data
)
191 This
->IHTMLTextContainer_iface
.lpVtbl
= &HTMLTextContainerVtbl
;
193 HTMLElement_Init(&This
->element
, doc
, nselem
, dispex_data
);