2006-03-06 22:38:02 +01:00
|
|
|
/*
|
|
|
|
* 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
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2006-03-06 22:38:02 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdarg.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);
|
|
|
|
|
|
|
|
typedef struct {
|
2007-09-15 16:07:26 +02:00
|
|
|
HTMLElement element;
|
|
|
|
|
2006-03-06 22:38:02 +01:00
|
|
|
const IHTMLTextAreaElementVtbl *lpHTMLTextAreaElementVtbl;
|
|
|
|
|
|
|
|
nsIDOMHTMLTextAreaElement *nstextarea;
|
|
|
|
} HTMLTextAreaElement;
|
|
|
|
|
|
|
|
#define HTMLTXTAREA(x) ((IHTMLTextAreaElement*) &(x)->lpHTMLTextAreaElementVtbl)
|
|
|
|
|
|
|
|
#define HTMLTXTAREA_THIS(iface) DEFINE_THIS(HTMLTextAreaElement, HTMLTextAreaElement, iface)
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_QueryInterface(IHTMLTextAreaElement *iface,
|
|
|
|
REFIID riid, void **ppv)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
|
|
|
|
|
2007-10-04 02:10:36 +02:00
|
|
|
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
|
2006-03-06 22:38:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI HTMLTextAreaElement_AddRef(IHTMLTextAreaElement *iface)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
|
|
|
|
|
2007-09-19 12:40:41 +02:00
|
|
|
return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
|
2006-03-06 22:38:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI HTMLTextAreaElement_Release(IHTMLTextAreaElement *iface)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
|
|
|
|
|
2007-09-19 12:40:41 +02:00
|
|
|
return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
|
2006-03-06 22:38:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_GetTypeInfoCount(IHTMLTextAreaElement *iface, UINT *pctinfo)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
|
2008-09-08 13:14:59 +02:00
|
|
|
return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->element.node.dispex), pctinfo);
|
2006-03-06 22:38:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_GetTypeInfo(IHTMLTextAreaElement *iface, UINT iTInfo,
|
|
|
|
LCID lcid, ITypeInfo **ppTInfo)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
|
2008-09-08 13:14:59 +02:00
|
|
|
return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->element.node.dispex), iTInfo, lcid, ppTInfo);
|
2006-03-06 22:38:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_GetIDsOfNames(IHTMLTextAreaElement *iface, REFIID riid,
|
|
|
|
LPOLESTR *rgszNames, UINT cNames,
|
|
|
|
LCID lcid, DISPID *rgDispId)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
|
2008-09-08 13:14:59 +02:00
|
|
|
return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->element.node.dispex), riid, rgszNames, cNames, lcid, rgDispId);
|
2006-03-06 22:38:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_Invoke(IHTMLTextAreaElement *iface, DISPID dispIdMember,
|
|
|
|
REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
|
|
|
|
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
|
2008-09-08 13:14:59 +02:00
|
|
|
return IDispatchEx_Invoke(DISPATCHEX(&This->element.node.dispex), dispIdMember, riid, lcid, wFlags, pDispParams,
|
|
|
|
pVarResult, pExcepInfo, puArgErr);
|
2006-03-06 22:38:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_type(IHTMLTextAreaElement *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_put_value(IHTMLTextAreaElement *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
|
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_value(IHTMLTextAreaElement *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
|
2006-03-07 23:11:09 +01:00
|
|
|
nsAString value_str;
|
|
|
|
const PRUnichar *value;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
nsAString_Init(&value_str, NULL);
|
|
|
|
|
|
|
|
nsres = nsIDOMHTMLTextAreaElement_GetValue(This->nstextarea, &value_str);
|
|
|
|
if(NS_SUCCEEDED(nsres)) {
|
2007-12-17 01:38:30 +01:00
|
|
|
nsAString_GetData(&value_str, &value);
|
2006-03-07 23:11:09 +01:00
|
|
|
*p = SysAllocString(value);
|
|
|
|
}else {
|
2006-10-05 23:50:39 +02:00
|
|
|
ERR("GetValue failed: %08x\n", nsres);
|
2006-03-07 23:11:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
nsAString_Finish(&value_str);
|
|
|
|
|
|
|
|
TRACE("%s\n", debugstr_w(*p));
|
|
|
|
return S_OK;
|
2006-03-06 22:38:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_put_name(IHTMLTextAreaElement *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
|
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_name(IHTMLTextAreaElement *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
|
2006-03-07 23:11:09 +01:00
|
|
|
nsAString name_str;
|
|
|
|
const PRUnichar *name;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
nsAString_Init(&name_str, NULL);
|
|
|
|
|
|
|
|
nsres = nsIDOMHTMLTextAreaElement_GetName(This->nstextarea, &name_str);
|
|
|
|
if(NS_SUCCEEDED(nsres)) {
|
2007-12-17 01:38:30 +01:00
|
|
|
nsAString_GetData(&name_str, &name);
|
2006-03-07 23:11:09 +01:00
|
|
|
*p = SysAllocString(name);
|
|
|
|
}else {
|
2006-10-05 23:50:39 +02:00
|
|
|
ERR("GetName failed: %08x\n", nsres);
|
2006-03-07 23:11:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
nsAString_Finish(&name_str);
|
|
|
|
|
|
|
|
TRACE("%s\n", debugstr_w(*p));
|
|
|
|
return S_OK;
|
2006-03-06 22:38:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_put_status(IHTMLTextAreaElement *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
|
|
|
|
FIXME("(%p)->()\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_status(IHTMLTextAreaElement *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_put_disabled(IHTMLTextAreaElement *iface, VARIANT_BOOL v)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
|
|
|
|
FIXME("(%p)->(%x)\n", This, v);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_disabled(IHTMLTextAreaElement *iface, VARIANT_BOOL *p)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_form(IHTMLTextAreaElement *iface, IHTMLFormElement **p)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_put_defaultValue(IHTMLTextAreaElement *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
|
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_defaultValue(IHTMLTextAreaElement *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_select(IHTMLTextAreaElement *iface)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
|
|
|
|
FIXME("(%p)\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_put_onchange(IHTMLTextAreaElement *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
|
|
|
|
FIXME("(%p)->()\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_onchange(IHTMLTextAreaElement *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_put_onselect(IHTMLTextAreaElement *iface, VARIANT v)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
|
|
|
|
FIXME("(%p)->()\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_onselect(IHTMLTextAreaElement *iface, VARIANT *p)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_put_readOnly(IHTMLTextAreaElement *iface, VARIANT_BOOL v)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
|
|
|
|
FIXME("(%p)->(%x)\n", This, v);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_readOnly(IHTMLTextAreaElement *iface, VARIANT_BOOL *p)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2009-03-12 01:43:18 +01:00
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_put_rows(IHTMLTextAreaElement *iface, LONG v)
|
2006-03-06 22:38:02 +01:00
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
|
2009-03-12 01:43:18 +01:00
|
|
|
FIXME("(%p)->(%d)\n", This, v);
|
2006-03-06 22:38:02 +01:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2009-03-12 01:43:18 +01:00
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_rows(IHTMLTextAreaElement *iface, LONG *p)
|
2006-03-06 22:38:02 +01:00
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2009-03-12 01:43:18 +01:00
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_put_cols(IHTMLTextAreaElement *iface, LONG v)
|
2006-03-06 22:38:02 +01:00
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
|
2009-03-12 01:43:18 +01:00
|
|
|
FIXME("(%p)->(%d)\n", This, v);
|
2006-03-06 22:38:02 +01:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2009-03-12 01:43:18 +01:00
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_cols(IHTMLTextAreaElement *iface, LONG *p)
|
2006-03-06 22:38:02 +01:00
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_put_wrap(IHTMLTextAreaElement *iface, BSTR v)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
|
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_wrap(IHTMLTextAreaElement *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_createTextRange(IHTMLTextAreaElement *iface,
|
|
|
|
IHTMLTxtRange **range)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, range);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
#undef HTMLTXTAREA_THIS
|
|
|
|
|
|
|
|
static const IHTMLTextAreaElementVtbl HTMLTextAreaElementVtbl = {
|
|
|
|
HTMLTextAreaElement_QueryInterface,
|
|
|
|
HTMLTextAreaElement_AddRef,
|
|
|
|
HTMLTextAreaElement_Release,
|
|
|
|
HTMLTextAreaElement_GetTypeInfoCount,
|
|
|
|
HTMLTextAreaElement_GetTypeInfo,
|
|
|
|
HTMLTextAreaElement_GetIDsOfNames,
|
|
|
|
HTMLTextAreaElement_Invoke,
|
|
|
|
HTMLTextAreaElement_get_type,
|
|
|
|
HTMLTextAreaElement_put_value,
|
|
|
|
HTMLTextAreaElement_get_value,
|
|
|
|
HTMLTextAreaElement_put_name,
|
|
|
|
HTMLTextAreaElement_get_name,
|
|
|
|
HTMLTextAreaElement_put_status,
|
|
|
|
HTMLTextAreaElement_get_status,
|
|
|
|
HTMLTextAreaElement_put_disabled,
|
|
|
|
HTMLTextAreaElement_get_disabled,
|
|
|
|
HTMLTextAreaElement_get_form,
|
|
|
|
HTMLTextAreaElement_put_defaultValue,
|
|
|
|
HTMLTextAreaElement_get_defaultValue,
|
|
|
|
HTMLTextAreaElement_select,
|
|
|
|
HTMLTextAreaElement_put_onchange,
|
|
|
|
HTMLTextAreaElement_get_onchange,
|
|
|
|
HTMLTextAreaElement_put_onselect,
|
|
|
|
HTMLTextAreaElement_get_onselect,
|
|
|
|
HTMLTextAreaElement_put_readOnly,
|
|
|
|
HTMLTextAreaElement_get_readOnly,
|
|
|
|
HTMLTextAreaElement_put_rows,
|
|
|
|
HTMLTextAreaElement_get_rows,
|
|
|
|
HTMLTextAreaElement_put_cols,
|
|
|
|
HTMLTextAreaElement_get_cols,
|
|
|
|
HTMLTextAreaElement_put_wrap,
|
|
|
|
HTMLTextAreaElement_get_wrap,
|
|
|
|
HTMLTextAreaElement_createTextRange
|
|
|
|
};
|
|
|
|
|
2007-10-04 02:08:56 +02:00
|
|
|
#define HTMLTXTAREA_NODE_THIS(iface) DEFINE_THIS2(HTMLTextAreaElement, element.node, iface)
|
|
|
|
|
2007-10-04 02:10:36 +02:00
|
|
|
static HRESULT HTMLTextAreaElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_NODE_THIS(iface);
|
|
|
|
|
|
|
|
*ppv = NULL;
|
|
|
|
|
|
|
|
if(IsEqualGUID(&IID_IUnknown, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
|
|
|
|
*ppv = HTMLTXTAREA(This);
|
|
|
|
}else if(IsEqualGUID(&IID_IDispatch, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
|
|
|
|
*ppv = HTMLTXTAREA(This);
|
|
|
|
}else if(IsEqualGUID(&IID_IHTMLTextAreaElement, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IHTMLTextAreaElement %p)\n", This, ppv);
|
|
|
|
*ppv = HTMLTXTAREA(This);
|
|
|
|
}
|
|
|
|
|
|
|
|
if(*ppv) {
|
|
|
|
IUnknown_AddRef((IUnknown*)*ppv);
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
return HTMLElement_QI(&This->element.node, riid, ppv);
|
|
|
|
}
|
|
|
|
|
2007-10-04 02:08:56 +02:00
|
|
|
static void HTMLTextAreaElement_destructor(HTMLDOMNode *iface)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_NODE_THIS(iface);
|
|
|
|
|
|
|
|
nsIDOMHTMLTextAreaElement_Release(This->nstextarea);
|
2007-10-04 02:09:48 +02:00
|
|
|
|
|
|
|
HTMLElement_destructor(&This->element.node);
|
2007-10-04 02:08:56 +02:00
|
|
|
}
|
|
|
|
|
2008-10-09 22:26:41 +02:00
|
|
|
static HRESULT HTMLTextAreaElementImpl_put_disabled(HTMLDOMNode *iface, VARIANT_BOOL v)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_NODE_THIS(iface);
|
|
|
|
return IHTMLTextAreaElement_put_disabled(HTMLTXTAREA(This), v);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT HTMLTextAreaElementImpl_get_disabled(HTMLDOMNode *iface, VARIANT_BOOL *p)
|
|
|
|
{
|
|
|
|
HTMLTextAreaElement *This = HTMLTXTAREA_NODE_THIS(iface);
|
|
|
|
return IHTMLTextAreaElement_get_disabled(HTMLTXTAREA(This), p);
|
|
|
|
}
|
|
|
|
|
2007-10-04 02:08:56 +02:00
|
|
|
#undef HTMLTXTAREA_NODE_THIS
|
|
|
|
|
2007-10-04 02:09:48 +02:00
|
|
|
static const NodeImplVtbl HTMLTextAreaElementImplVtbl = {
|
2007-10-04 02:10:36 +02:00
|
|
|
HTMLTextAreaElement_QI,
|
2008-10-09 22:26:41 +02:00
|
|
|
HTMLTextAreaElement_destructor,
|
2009-09-08 22:29:39 +02:00
|
|
|
NULL,
|
2009-10-13 00:42:22 +02:00
|
|
|
NULL,
|
2008-10-09 22:26:41 +02:00
|
|
|
HTMLTextAreaElementImpl_put_disabled,
|
|
|
|
HTMLTextAreaElementImpl_get_disabled
|
2007-10-04 02:09:48 +02:00
|
|
|
};
|
|
|
|
|
2009-11-01 19:16:48 +01:00
|
|
|
HTMLElement *HTMLTextAreaElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem)
|
2006-03-06 22:38:02 +01:00
|
|
|
{
|
2008-04-23 16:44:21 +02:00
|
|
|
HTMLTextAreaElement *ret = heap_alloc_zero(sizeof(HTMLTextAreaElement));
|
2006-03-06 22:38:02 +01:00
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
ret->lpHTMLTextAreaElementVtbl = &HTMLTextAreaElementVtbl;
|
2007-10-04 02:09:48 +02:00
|
|
|
ret->element.node.vtbl = &HTMLTextAreaElementImplVtbl;
|
2006-03-06 22:38:02 +01:00
|
|
|
|
2009-11-01 19:16:48 +01:00
|
|
|
HTMLElement_Init(&ret->element, doc, nselem, NULL);
|
2009-10-02 13:50:48 +02:00
|
|
|
|
2007-09-15 16:07:26 +02:00
|
|
|
nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLTextAreaElement,
|
2006-03-06 22:38:02 +01:00
|
|
|
(void**)&ret->nstextarea);
|
|
|
|
if(NS_FAILED(nsres))
|
2006-10-05 23:50:39 +02:00
|
|
|
ERR("Could not get nsDOMHTMLInputElement: %08x\n", nsres);
|
2006-03-06 22:38:02 +01:00
|
|
|
|
2007-09-15 16:07:26 +02:00
|
|
|
return &ret->element;
|
2006-03-06 22:38:02 +01:00
|
|
|
}
|