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
19 #include "mshtml_private.h"
21 static inline HTMLTextContainer
*impl_from_IHTMLTextContainer(IHTMLTextContainer
*iface
)
23 return CONTAINING_RECORD(iface
, HTMLTextContainer
, IHTMLTextContainer_iface
);
26 static HRESULT WINAPI
HTMLTextContainer_QueryInterface(IHTMLTextContainer
*iface
,
27 REFIID riid
, void **ppv
)
29 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
30 return IHTMLElement_QueryInterface(&This
->element
.IHTMLElement_iface
, riid
, ppv
);
33 static ULONG WINAPI
HTMLTextContainer_AddRef(IHTMLTextContainer
*iface
)
35 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
36 return IHTMLElement_AddRef(&This
->element
.IHTMLElement_iface
);
39 static ULONG WINAPI
HTMLTextContainer_Release(IHTMLTextContainer
*iface
)
41 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
42 return IHTMLElement_Release(&This
->element
.IHTMLElement_iface
);
45 static HRESULT WINAPI
HTMLTextContainer_GetTypeInfoCount(IHTMLTextContainer
*iface
, UINT
*pctinfo
)
47 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
48 return IDispatchEx_GetTypeInfoCount(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, pctinfo
);
51 static HRESULT WINAPI
HTMLTextContainer_GetTypeInfo(IHTMLTextContainer
*iface
, UINT iTInfo
,
52 LCID lcid
, ITypeInfo
**ppTInfo
)
54 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
55 return IDispatchEx_GetTypeInfo(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, iTInfo
, lcid
,
59 static HRESULT WINAPI
HTMLTextContainer_GetIDsOfNames(IHTMLTextContainer
*iface
, REFIID riid
,
60 LPOLESTR
*rgszNames
, UINT cNames
,
61 LCID lcid
, DISPID
*rgDispId
)
63 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
64 return IDispatchEx_GetIDsOfNames(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, riid
, rgszNames
,
65 cNames
, lcid
, rgDispId
);
68 static HRESULT WINAPI
HTMLTextContainer_Invoke(IHTMLTextContainer
*iface
, DISPID dispIdMember
,
69 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
70 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
72 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
73 return IDispatchEx_Invoke(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, dispIdMember
, riid
,
74 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
77 static HRESULT WINAPI
HTMLTextContainer_createControlRange(IHTMLTextContainer
*iface
,
80 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
81 FIXME("(%p)->(%p)\n", This
, range
);
85 static HRESULT WINAPI
HTMLTextContainer_get_scrollHeight(IHTMLTextContainer
*iface
, LONG
*p
)
87 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
89 TRACE("(%p)->(%p)\n", This
, p
);
91 return IHTMLElement2_get_scrollHeight(&This
->element
.IHTMLElement2_iface
, p
);
94 static HRESULT WINAPI
HTMLTextContainer_get_scrollWidth(IHTMLTextContainer
*iface
, LONG
*p
)
96 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
98 TRACE("(%p)->(%p)\n", This
, p
);
100 return IHTMLElement2_get_scrollWidth(&This
->element
.IHTMLElement2_iface
, p
);
103 static HRESULT WINAPI
HTMLTextContainer_put_scrollTop(IHTMLTextContainer
*iface
, LONG v
)
105 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
107 TRACE("(%p)->(%d)\n", This
, v
);
109 return IHTMLElement2_put_scrollTop(&This
->element
.IHTMLElement2_iface
, v
);
112 static HRESULT WINAPI
HTMLTextContainer_get_scrollTop(IHTMLTextContainer
*iface
, LONG
*p
)
114 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
116 TRACE("(%p)->(%p)\n", This
, p
);
118 return IHTMLElement2_get_scrollTop(&This
->element
.IHTMLElement2_iface
, p
);
121 static HRESULT WINAPI
HTMLTextContainer_put_scrollLeft(IHTMLTextContainer
*iface
, LONG v
)
123 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
125 TRACE("(%p)->(%d)\n", This
, v
);
127 return IHTMLElement2_put_scrollLeft(&This
->element
.IHTMLElement2_iface
, v
);
130 static HRESULT WINAPI
HTMLTextContainer_get_scrollLeft(IHTMLTextContainer
*iface
, LONG
*p
)
132 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
134 TRACE("(%p)->(%p)\n", This
, p
);
136 return IHTMLElement2_get_scrollLeft(&This
->element
.IHTMLElement2_iface
, p
);
139 static HRESULT WINAPI
HTMLTextContainer_put_onscroll(IHTMLTextContainer
*iface
, VARIANT v
)
141 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
142 FIXME("(%p)->()\n", This
);
146 static HRESULT WINAPI
HTMLTextContainer_get_onscroll(IHTMLTextContainer
*iface
, VARIANT
*p
)
148 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
149 FIXME("(%p)->(%p)\n", This
, p
);
153 static const IHTMLTextContainerVtbl HTMLTextContainerVtbl
= {
154 HTMLTextContainer_QueryInterface
,
155 HTMLTextContainer_AddRef
,
156 HTMLTextContainer_Release
,
157 HTMLTextContainer_GetTypeInfoCount
,
158 HTMLTextContainer_GetTypeInfo
,
159 HTMLTextContainer_GetIDsOfNames
,
160 HTMLTextContainer_Invoke
,
161 HTMLTextContainer_createControlRange
,
162 HTMLTextContainer_get_scrollHeight
,
163 HTMLTextContainer_get_scrollWidth
,
164 HTMLTextContainer_put_scrollTop
,
165 HTMLTextContainer_get_scrollTop
,
166 HTMLTextContainer_put_scrollLeft
,
167 HTMLTextContainer_get_scrollLeft
,
168 HTMLTextContainer_put_onscroll
,
169 HTMLTextContainer_get_onscroll
172 void HTMLTextContainer_Init(HTMLTextContainer
*This
, HTMLDocumentNode
*doc
, nsIDOMHTMLElement
*nselem
,
173 dispex_static_data_t
*dispex_data
)
175 This
->IHTMLTextContainer_iface
.lpVtbl
= &HTMLTextContainerVtbl
;
177 HTMLElement_Init(&This
->element
, doc
, nselem
, dispex_data
);