2006-03-06 21:38:02 +00: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 12:49:52 +00:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2006-03-06 21:38:02 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdarg.h>
|
2012-06-28 09:20:05 +00:00
|
|
|
#include <assert.h>
|
2006-03-06 21:38:02 +00:00
|
|
|
|
|
|
|
#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 14:07:26 +00:00
|
|
|
HTMLElement element;
|
|
|
|
|
2010-12-06 22:32:05 +00:00
|
|
|
IHTMLTextAreaElement IHTMLTextAreaElement_iface;
|
2006-03-06 21:38:02 +00:00
|
|
|
|
|
|
|
nsIDOMHTMLTextAreaElement *nstextarea;
|
|
|
|
} HTMLTextAreaElement;
|
|
|
|
|
2010-12-06 22:32:05 +00:00
|
|
|
static inline HTMLTextAreaElement *impl_from_IHTMLTextAreaElement(IHTMLTextAreaElement *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, HTMLTextAreaElement, IHTMLTextAreaElement_iface);
|
|
|
|
}
|
2006-03-06 21:38:02 +00:00
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_QueryInterface(IHTMLTextAreaElement *iface,
|
|
|
|
REFIID riid, void **ppv)
|
|
|
|
{
|
2010-12-06 22:32:05 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 21:38:02 +00:00
|
|
|
|
2010-12-30 00:39:16 +00:00
|
|
|
return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
|
2006-03-06 21:38:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI HTMLTextAreaElement_AddRef(IHTMLTextAreaElement *iface)
|
|
|
|
{
|
2010-12-06 22:32:05 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 21:38:02 +00:00
|
|
|
|
2010-12-30 00:39:16 +00:00
|
|
|
return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
|
2006-03-06 21:38:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI HTMLTextAreaElement_Release(IHTMLTextAreaElement *iface)
|
|
|
|
{
|
2010-12-06 22:32:05 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 21:38:02 +00:00
|
|
|
|
2010-12-30 00:39:16 +00:00
|
|
|
return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
|
2006-03-06 21:38:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_GetTypeInfoCount(IHTMLTextAreaElement *iface, UINT *pctinfo)
|
|
|
|
{
|
2010-12-06 22:32:05 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2010-12-31 10:07:33 +00:00
|
|
|
return IDispatchEx_GetTypeInfoCount(&This->element.node.dispex.IDispatchEx_iface, pctinfo);
|
2006-03-06 21:38:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_GetTypeInfo(IHTMLTextAreaElement *iface, UINT iTInfo,
|
|
|
|
LCID lcid, ITypeInfo **ppTInfo)
|
|
|
|
{
|
2010-12-06 22:32:05 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2010-12-31 10:07:33 +00:00
|
|
|
return IDispatchEx_GetTypeInfo(&This->element.node.dispex.IDispatchEx_iface, iTInfo, lcid,
|
|
|
|
ppTInfo);
|
2006-03-06 21:38:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_GetIDsOfNames(IHTMLTextAreaElement *iface, REFIID riid,
|
|
|
|
LPOLESTR *rgszNames, UINT cNames,
|
|
|
|
LCID lcid, DISPID *rgDispId)
|
|
|
|
{
|
2010-12-06 22:32:05 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2010-12-31 10:07:33 +00:00
|
|
|
return IDispatchEx_GetIDsOfNames(&This->element.node.dispex.IDispatchEx_iface, riid, rgszNames,
|
|
|
|
cNames, lcid, rgDispId);
|
2006-03-06 21:38:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_Invoke(IHTMLTextAreaElement *iface, DISPID dispIdMember,
|
|
|
|
REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
|
|
|
|
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
|
|
|
|
{
|
2010-12-06 22:32:05 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2010-12-31 10:07:33 +00:00
|
|
|
return IDispatchEx_Invoke(&This->element.node.dispex.IDispatchEx_iface, dispIdMember, riid,
|
|
|
|
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
|
2006-03-06 21:38:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_type(IHTMLTextAreaElement *iface, BSTR *p)
|
|
|
|
{
|
2010-10-27 22:30:55 +00:00
|
|
|
static const WCHAR textareaW[] = {'t','e','x','t','a','r','e','a',0};
|
|
|
|
|
2010-12-06 22:32:05 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2010-10-27 22:30:55 +00:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
*p = SysAllocString(textareaW);
|
|
|
|
if(!*p)
|
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
return S_OK;
|
2006-03-06 21:38:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_put_value(IHTMLTextAreaElement *iface, BSTR v)
|
|
|
|
{
|
2010-12-06 22:32:05 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2010-05-11 15:56:58 +00:00
|
|
|
nsAString value_str;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
|
|
|
|
nsAString_InitDepend(&value_str, v);
|
|
|
|
nsres = nsIDOMHTMLTextAreaElement_SetValue(This->nstextarea, &value_str);
|
|
|
|
nsAString_Finish(&value_str);
|
|
|
|
if(NS_FAILED(nsres)) {
|
|
|
|
ERR("SetValue failed: %08x\n", nsres);
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return S_OK;
|
2006-03-06 21:38:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_value(IHTMLTextAreaElement *iface, BSTR *p)
|
|
|
|
{
|
2010-12-06 22:32:05 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-07 22:11:09 +00:00
|
|
|
nsAString value_str;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
nsAString_Init(&value_str, NULL);
|
|
|
|
nsres = nsIDOMHTMLTextAreaElement_GetValue(This->nstextarea, &value_str);
|
2012-04-13 10:20:25 +00:00
|
|
|
return return_nsstr(nsres, &value_str, p);
|
2006-03-06 21:38:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_put_name(IHTMLTextAreaElement *iface, BSTR v)
|
|
|
|
{
|
2010-12-06 22:32:05 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 21:38:02 +00:00
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_name(IHTMLTextAreaElement *iface, BSTR *p)
|
|
|
|
{
|
2010-12-06 22:32:05 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-07 22:11:09 +00:00
|
|
|
nsAString name_str;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
nsAString_Init(&name_str, NULL);
|
|
|
|
nsres = nsIDOMHTMLTextAreaElement_GetName(This->nstextarea, &name_str);
|
2012-04-13 10:20:25 +00:00
|
|
|
return return_nsstr(nsres, &name_str, p);
|
2006-03-06 21:38:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_put_status(IHTMLTextAreaElement *iface, VARIANT v)
|
|
|
|
{
|
2010-12-06 22:32:05 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 21:38:02 +00:00
|
|
|
FIXME("(%p)->()\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_status(IHTMLTextAreaElement *iface, VARIANT *p)
|
|
|
|
{
|
2010-12-06 22:32:05 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 21:38:02 +00:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_put_disabled(IHTMLTextAreaElement *iface, VARIANT_BOOL v)
|
|
|
|
{
|
2010-12-06 22:32:05 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 21:38:02 +00:00
|
|
|
FIXME("(%p)->(%x)\n", This, v);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_disabled(IHTMLTextAreaElement *iface, VARIANT_BOOL *p)
|
|
|
|
{
|
2010-12-06 22:32:05 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 21:38:02 +00:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_form(IHTMLTextAreaElement *iface, IHTMLFormElement **p)
|
|
|
|
{
|
2010-12-06 22:32:05 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 21:38:02 +00:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_put_defaultValue(IHTMLTextAreaElement *iface, BSTR v)
|
|
|
|
{
|
2010-12-06 22:32:05 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 21:38:02 +00:00
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_defaultValue(IHTMLTextAreaElement *iface, BSTR *p)
|
|
|
|
{
|
2010-12-06 22:32:05 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 21:38:02 +00:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_select(IHTMLTextAreaElement *iface)
|
|
|
|
{
|
2010-12-06 22:32:05 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 21:38:02 +00:00
|
|
|
FIXME("(%p)\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_put_onchange(IHTMLTextAreaElement *iface, VARIANT v)
|
|
|
|
{
|
2010-12-06 22:32:05 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 21:38:02 +00:00
|
|
|
FIXME("(%p)->()\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_onchange(IHTMLTextAreaElement *iface, VARIANT *p)
|
|
|
|
{
|
2010-12-06 22:32:05 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 21:38:02 +00:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_put_onselect(IHTMLTextAreaElement *iface, VARIANT v)
|
|
|
|
{
|
2010-12-06 22:32:05 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 21:38:02 +00:00
|
|
|
FIXME("(%p)->()\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_onselect(IHTMLTextAreaElement *iface, VARIANT *p)
|
|
|
|
{
|
2010-12-06 22:32:05 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 21:38:02 +00:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_put_readOnly(IHTMLTextAreaElement *iface, VARIANT_BOOL v)
|
|
|
|
{
|
2010-12-06 22:32:05 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2010-05-11 15:58:40 +00:00
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%x)\n", This, v);
|
|
|
|
|
|
|
|
nsres = nsIDOMHTMLTextAreaElement_SetReadOnly(This->nstextarea, v != VARIANT_FALSE);
|
|
|
|
if(NS_FAILED(nsres)) {
|
|
|
|
ERR("SetReadOnly failed: %08x\n", nsres);
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return S_OK;
|
2006-03-06 21:38:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_readOnly(IHTMLTextAreaElement *iface, VARIANT_BOOL *p)
|
|
|
|
{
|
2010-12-06 22:32:05 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2012-03-15 10:55:01 +00:00
|
|
|
cpp_bool b;
|
2010-05-11 15:58:40 +00:00
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
nsres = nsIDOMHTMLTextAreaElement_GetReadOnly(This->nstextarea, &b);
|
|
|
|
if(NS_FAILED(nsres)) {
|
|
|
|
ERR("GetReadOnly failed: %08x\n", nsres);
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
|
|
|
|
*p = b ? VARIANT_TRUE : VARIANT_FALSE;
|
|
|
|
return S_OK;
|
2006-03-06 21:38:02 +00:00
|
|
|
}
|
|
|
|
|
2009-03-12 00:43:18 +00:00
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_put_rows(IHTMLTextAreaElement *iface, LONG v)
|
2006-03-06 21:38:02 +00:00
|
|
|
{
|
2010-12-06 22:32:05 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2009-03-12 00:43:18 +00:00
|
|
|
FIXME("(%p)->(%d)\n", This, v);
|
2006-03-06 21:38:02 +00:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2009-03-12 00:43:18 +00:00
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_rows(IHTMLTextAreaElement *iface, LONG *p)
|
2006-03-06 21:38:02 +00:00
|
|
|
{
|
2010-12-06 22:32:05 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 21:38:02 +00:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2009-03-12 00:43:18 +00:00
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_put_cols(IHTMLTextAreaElement *iface, LONG v)
|
2006-03-06 21:38:02 +00:00
|
|
|
{
|
2010-12-06 22:32:05 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2009-03-12 00:43:18 +00:00
|
|
|
FIXME("(%p)->(%d)\n", This, v);
|
2006-03-06 21:38:02 +00:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2009-03-12 00:43:18 +00:00
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_cols(IHTMLTextAreaElement *iface, LONG *p)
|
2006-03-06 21:38:02 +00:00
|
|
|
{
|
2010-12-06 22:32:05 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 21:38:02 +00:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_put_wrap(IHTMLTextAreaElement *iface, BSTR v)
|
|
|
|
{
|
2010-12-06 22:32:05 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 21:38:02 +00:00
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_get_wrap(IHTMLTextAreaElement *iface, BSTR *p)
|
|
|
|
{
|
2010-12-06 22:32:05 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 21:38:02 +00:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLTextAreaElement_createTextRange(IHTMLTextAreaElement *iface,
|
|
|
|
IHTMLTxtRange **range)
|
|
|
|
{
|
2010-12-06 22:32:05 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
|
2006-03-06 21:38:02 +00:00
|
|
|
FIXME("(%p)->(%p)\n", This, range);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
};
|
|
|
|
|
2010-12-27 19:13:09 +00:00
|
|
|
static inline HTMLTextAreaElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, HTMLTextAreaElement, element.node);
|
|
|
|
}
|
2007-10-04 00:08:56 +00:00
|
|
|
|
2007-10-04 00:10:36 +00:00
|
|
|
static HRESULT HTMLTextAreaElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
|
|
|
|
{
|
2010-12-27 19:13:09 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_HTMLDOMNode(iface);
|
2007-10-04 00:10:36 +00:00
|
|
|
|
|
|
|
*ppv = NULL;
|
|
|
|
|
|
|
|
if(IsEqualGUID(&IID_IUnknown, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
|
2010-12-06 22:32:05 +00:00
|
|
|
*ppv = &This->IHTMLTextAreaElement_iface;
|
2007-10-04 00:10:36 +00:00
|
|
|
}else if(IsEqualGUID(&IID_IDispatch, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
|
2010-12-06 22:32:05 +00:00
|
|
|
*ppv = &This->IHTMLTextAreaElement_iface;
|
2007-10-04 00:10:36 +00:00
|
|
|
}else if(IsEqualGUID(&IID_IHTMLTextAreaElement, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IHTMLTextAreaElement %p)\n", This, ppv);
|
2010-12-06 22:32:05 +00:00
|
|
|
*ppv = &This->IHTMLTextAreaElement_iface;
|
2007-10-04 00:10:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if(*ppv) {
|
|
|
|
IUnknown_AddRef((IUnknown*)*ppv);
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
return HTMLElement_QI(&This->element.node, riid, ppv);
|
|
|
|
}
|
|
|
|
|
2008-10-09 20:26:41 +00:00
|
|
|
static HRESULT HTMLTextAreaElementImpl_put_disabled(HTMLDOMNode *iface, VARIANT_BOOL v)
|
|
|
|
{
|
2010-12-27 19:13:09 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_HTMLDOMNode(iface);
|
2010-12-06 22:32:05 +00:00
|
|
|
return IHTMLTextAreaElement_put_disabled(&This->IHTMLTextAreaElement_iface, v);
|
2008-10-09 20:26:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT HTMLTextAreaElementImpl_get_disabled(HTMLDOMNode *iface, VARIANT_BOOL *p)
|
|
|
|
{
|
2010-12-27 19:13:09 +00:00
|
|
|
HTMLTextAreaElement *This = impl_from_HTMLDOMNode(iface);
|
2010-12-06 22:32:05 +00:00
|
|
|
return IHTMLTextAreaElement_get_disabled(&This->IHTMLTextAreaElement_iface, p);
|
2008-10-09 20:26:41 +00:00
|
|
|
}
|
|
|
|
|
2007-10-04 00:09:48 +00:00
|
|
|
static const NodeImplVtbl HTMLTextAreaElementImplVtbl = {
|
2007-10-04 00:10:36 +00:00
|
|
|
HTMLTextAreaElement_QI,
|
2012-06-28 09:20:05 +00:00
|
|
|
HTMLElement_destructor,
|
2010-11-14 13:41:39 +00:00
|
|
|
HTMLElement_clone,
|
2012-09-04 11:58:58 +00:00
|
|
|
HTMLElement_handle_event,
|
2011-08-25 13:23:35 +00:00
|
|
|
HTMLElement_get_attr_col,
|
2009-09-08 20:29:39 +00:00
|
|
|
NULL,
|
2009-10-12 22:42:22 +00:00
|
|
|
NULL,
|
2008-10-09 20:26:41 +00:00
|
|
|
HTMLTextAreaElementImpl_put_disabled,
|
|
|
|
HTMLTextAreaElementImpl_get_disabled
|
2007-10-04 00:09:48 +00:00
|
|
|
};
|
|
|
|
|
2010-01-28 22:53:55 +00:00
|
|
|
static const tid_t HTMLTextAreaElement_iface_tids[] = {
|
|
|
|
HTMLELEMENT_TIDS,
|
|
|
|
IHTMLTextAreaElement_tid,
|
|
|
|
0
|
|
|
|
};
|
|
|
|
|
|
|
|
static dispex_static_data_t HTMLTextAreaElement_dispex = {
|
|
|
|
NULL,
|
|
|
|
DispHTMLTextAreaElement_tid,
|
|
|
|
NULL,
|
|
|
|
HTMLTextAreaElement_iface_tids
|
|
|
|
};
|
|
|
|
|
2010-12-01 21:43:14 +00:00
|
|
|
HRESULT HTMLTextAreaElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
|
2006-03-06 21:38:02 +00:00
|
|
|
{
|
2010-12-01 21:43:14 +00:00
|
|
|
HTMLTextAreaElement *ret;
|
2006-03-06 21:38:02 +00:00
|
|
|
nsresult nsres;
|
|
|
|
|
2010-12-01 21:43:14 +00:00
|
|
|
ret = heap_alloc_zero(sizeof(HTMLTextAreaElement));
|
|
|
|
if(!ret)
|
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
|
2010-12-06 22:32:05 +00:00
|
|
|
ret->IHTMLTextAreaElement_iface.lpVtbl = &HTMLTextAreaElementVtbl;
|
2007-10-04 00:09:48 +00:00
|
|
|
ret->element.node.vtbl = &HTMLTextAreaElementImplVtbl;
|
2006-03-06 21:38:02 +00:00
|
|
|
|
2012-06-28 09:20:05 +00:00
|
|
|
HTMLElement_Init(&ret->element, doc, nselem, &HTMLTextAreaElement_dispex);
|
|
|
|
|
2007-09-15 14:07:26 +00:00
|
|
|
nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLTextAreaElement,
|
2006-03-06 21:38:02 +00:00
|
|
|
(void**)&ret->nstextarea);
|
|
|
|
|
2012-06-28 09:20:05 +00:00
|
|
|
/* Share nstextarea reference with nsnode */
|
|
|
|
assert(nsres == NS_OK && (nsIDOMNode*)ret->nstextarea == ret->element.node.nsnode);
|
|
|
|
nsIDOMNode_Release(ret->element.node.nsnode);
|
2010-12-01 21:43:14 +00:00
|
|
|
|
|
|
|
*elem = &ret->element;
|
|
|
|
return S_OK;
|
2006-03-06 21:38:02 +00:00
|
|
|
}
|