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 #define WIN32_NO_STATUS
31 //#include "winuser.h"
34 #include <wine/debug.h>
36 #include "mshtml_private.h"
38 WINE_DEFAULT_DEBUG_CHANNEL(mshtml
);
40 static inline HTMLTextContainer
*impl_from_IHTMLTextContainer(IHTMLTextContainer
*iface
)
42 return CONTAINING_RECORD(iface
, HTMLTextContainer
, IHTMLTextContainer_iface
);
45 static HRESULT WINAPI
HTMLTextContainer_QueryInterface(IHTMLTextContainer
*iface
,
46 REFIID riid
, void **ppv
)
48 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
49 return IHTMLElement_QueryInterface(&This
->element
.IHTMLElement_iface
, riid
, ppv
);
52 static ULONG WINAPI
HTMLTextContainer_AddRef(IHTMLTextContainer
*iface
)
54 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
55 return IHTMLElement_AddRef(&This
->element
.IHTMLElement_iface
);
58 static ULONG WINAPI
HTMLTextContainer_Release(IHTMLTextContainer
*iface
)
60 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
61 return IHTMLElement_Release(&This
->element
.IHTMLElement_iface
);
64 static HRESULT WINAPI
HTMLTextContainer_GetTypeInfoCount(IHTMLTextContainer
*iface
, UINT
*pctinfo
)
66 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
67 return IDispatchEx_GetTypeInfoCount(&This
->element
.node
.dispex
.IDispatchEx_iface
, pctinfo
);
70 static HRESULT WINAPI
HTMLTextContainer_GetTypeInfo(IHTMLTextContainer
*iface
, UINT iTInfo
,
71 LCID lcid
, ITypeInfo
**ppTInfo
)
73 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
74 return IDispatchEx_GetTypeInfo(&This
->element
.node
.dispex
.IDispatchEx_iface
, iTInfo
, lcid
,
78 static HRESULT WINAPI
HTMLTextContainer_GetIDsOfNames(IHTMLTextContainer
*iface
, REFIID riid
,
79 LPOLESTR
*rgszNames
, UINT cNames
,
80 LCID lcid
, DISPID
*rgDispId
)
82 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
83 return IDispatchEx_GetIDsOfNames(&This
->element
.node
.dispex
.IDispatchEx_iface
, riid
, rgszNames
,
84 cNames
, lcid
, rgDispId
);
87 static HRESULT WINAPI
HTMLTextContainer_Invoke(IHTMLTextContainer
*iface
, DISPID dispIdMember
,
88 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
89 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
91 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
92 return IDispatchEx_Invoke(&This
->element
.node
.dispex
.IDispatchEx_iface
, dispIdMember
, riid
,
93 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
96 static HRESULT WINAPI
HTMLTextContainer_createControlRange(IHTMLTextContainer
*iface
,
99 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
100 FIXME("(%p)->(%p)\n", This
, range
);
104 static HRESULT WINAPI
HTMLTextContainer_get_scrollHeight(IHTMLTextContainer
*iface
, LONG
*p
)
106 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
108 TRACE("(%p)->(%p)\n", This
, p
);
110 return IHTMLElement2_get_scrollHeight(&This
->element
.IHTMLElement2_iface
, p
);
113 static HRESULT WINAPI
HTMLTextContainer_get_scrollWidth(IHTMLTextContainer
*iface
, LONG
*p
)
115 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
117 TRACE("(%p)->(%p)\n", This
, p
);
119 return IHTMLElement2_get_scrollWidth(&This
->element
.IHTMLElement2_iface
, p
);
122 static HRESULT WINAPI
HTMLTextContainer_put_scrollTop(IHTMLTextContainer
*iface
, LONG v
)
124 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
126 TRACE("(%p)->(%d)\n", This
, v
);
128 return IHTMLElement2_put_scrollTop(&This
->element
.IHTMLElement2_iface
, v
);
131 static HRESULT WINAPI
HTMLTextContainer_get_scrollTop(IHTMLTextContainer
*iface
, LONG
*p
)
133 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
135 TRACE("(%p)->(%p)\n", This
, p
);
137 return IHTMLElement2_get_scrollTop(&This
->element
.IHTMLElement2_iface
, p
);
140 static HRESULT WINAPI
HTMLTextContainer_put_scrollLeft(IHTMLTextContainer
*iface
, LONG v
)
142 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
144 TRACE("(%p)->(%d)\n", This
, v
);
146 return IHTMLElement2_put_scrollLeft(&This
->element
.IHTMLElement2_iface
, v
);
149 static HRESULT WINAPI
HTMLTextContainer_get_scrollLeft(IHTMLTextContainer
*iface
, LONG
*p
)
151 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
153 TRACE("(%p)->(%p)\n", This
, p
);
155 return IHTMLElement2_get_scrollLeft(&This
->element
.IHTMLElement2_iface
, p
);
158 static HRESULT WINAPI
HTMLTextContainer_put_onscroll(IHTMLTextContainer
*iface
, VARIANT v
)
160 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
161 FIXME("(%p)->()\n", This
);
165 static HRESULT WINAPI
HTMLTextContainer_get_onscroll(IHTMLTextContainer
*iface
, VARIANT
*p
)
167 HTMLTextContainer
*This
= impl_from_IHTMLTextContainer(iface
);
168 FIXME("(%p)->(%p)\n", This
, p
);
172 static const IHTMLTextContainerVtbl HTMLTextContainerVtbl
= {
173 HTMLTextContainer_QueryInterface
,
174 HTMLTextContainer_AddRef
,
175 HTMLTextContainer_Release
,
176 HTMLTextContainer_GetTypeInfoCount
,
177 HTMLTextContainer_GetTypeInfo
,
178 HTMLTextContainer_GetIDsOfNames
,
179 HTMLTextContainer_Invoke
,
180 HTMLTextContainer_createControlRange
,
181 HTMLTextContainer_get_scrollHeight
,
182 HTMLTextContainer_get_scrollWidth
,
183 HTMLTextContainer_put_scrollTop
,
184 HTMLTextContainer_get_scrollTop
,
185 HTMLTextContainer_put_scrollLeft
,
186 HTMLTextContainer_get_scrollLeft
,
187 HTMLTextContainer_put_onscroll
,
188 HTMLTextContainer_get_onscroll
191 void HTMLTextContainer_Init(HTMLTextContainer
*This
, HTMLDocumentNode
*doc
, nsIDOMHTMLElement
*nselem
,
192 dispex_static_data_t
*dispex_data
)
194 This
->IHTMLTextContainer_iface
.lpVtbl
= &HTMLTextContainerVtbl
;
196 HTMLElement_Init(&This
->element
, doc
, nselem
, dispex_data
);