mshtml: Added IHTMLInputElement implementation.

This commit is contained in:
Jacek Caban 2006-03-06 22:35:56 +01:00 committed by Alexandre Julliard
parent 3d68599355
commit 8b3eab6e35
5 changed files with 758 additions and 1 deletions

View File

@ -13,6 +13,7 @@ C_SRCS = \
htmldoc.c \
htmldoc3.c \
htmlelem.c \
htmlinput.c \
htmlnode.c \
main.c \
navigate.c \

View File

@ -918,6 +918,11 @@ static const IHTMLElementVtbl HTMLElementVtbl = {
void HTMLElement_Create(HTMLDOMNode *node)
{
HTMLElement *ret;
nsAString class_name_str;
const PRUnichar *class_name;
nsresult nsres;
static const WCHAR wszINPUT[] = {'I','N','P','U','T',0};
ret = HeapAlloc(GetProcessHeap(), 0, sizeof(HTMLElement));
ret->lpHTMLElementVtbl = &HTMLElementVtbl;
@ -929,7 +934,19 @@ void HTMLElement_Create(HTMLDOMNode *node)
node->impl.elem = HTMLELEM(ret);
node->destructor = HTMLElement_destructor;
nsIDOMNode_QueryInterface(node->nsnode, &IID_nsIDOMHTMLElement, (void**)&ret->nselem);
nsres = nsIDOMNode_QueryInterface(node->nsnode, &IID_nsIDOMHTMLElement, (void**)&ret->nselem);
if(NS_FAILED(nsres))
return;
nsAString_Init(&class_name_str, NULL);
nsIDOMHTMLElement_GetTagName(ret->nselem, &class_name_str);
nsAString_GetData(&class_name_str, &class_name, NULL);
if(!strcmpW(class_name, wszINPUT))
HTMLInputElement_Create(ret);
nsAString_Finish(&class_name_str);
}
typedef struct {

690
dlls/mshtml/htmlinput.c Normal file
View File

@ -0,0 +1,690 @@
/*
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include <stdarg.h>
#include <stdio.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "winnls.h"
#include "ole2.h"
#include "wine/debug.h"
#include "mshtml_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
typedef struct {
const IHTMLInputElementVtbl *lpHTMLInputElementVtbl;
HTMLElement *element;
nsIDOMHTMLInputElement *nsinput;
} HTMLInputElement;
#define HTMLINPUT(x) ((IHTMLInputElement*) &(x)->lpHTMLInputElementVtbl)
#define HTMLINPUT_THIS(iface) DEFINE_THIS(HTMLInputElement, HTMLInputElement, iface)
static HRESULT WINAPI HTMLInputElement_QueryInterface(IHTMLInputElement *iface,
REFIID riid, void **ppv)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
*ppv = NULL;
if(IsEqualGUID(&IID_IUnknown, riid)) {
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
*ppv = HTMLINPUT(This);
}else if(IsEqualGUID(&IID_IDispatch, riid)) {
TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
*ppv = HTMLINPUT(This);
}else if(IsEqualGUID(&IID_IHTMLInputElement, riid)) {
TRACE("(%p)->(IID_IHTMLInputElement %p)\n", This, ppv);
*ppv = HTMLINPUT(This);
}else if(IsEqualGUID(&IID_IHTMLElement, riid)) {
TRACE("(%p)->(IID_IHTMLElement %p)\n", This, ppv);
*ppv = HTMLELEM(This->element);
}else if(IsEqualGUID(&IID_IHTMLDOMNode, riid)) {
TRACE("(%p)->(IID_IHTMLDOMNode %p)\n", This, ppv);
*ppv = HTMLDOMNODE(This->element->node);
}
if(*ppv) {
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
}
WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
return E_NOINTERFACE;
}
static ULONG WINAPI HTMLInputElement_AddRef(IHTMLInputElement *iface)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
TRACE("(%p)\n", This);
return IHTMLDocument2_AddRef(HTMLDOC(This->element->node->doc));
}
static ULONG WINAPI HTMLInputElement_Release(IHTMLInputElement *iface)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
TRACE("(%p)\n", This);
return IHTMLDocument2_Release(HTMLDOC(This->element->node->doc));
}
static HRESULT WINAPI HTMLInputElement_GetTypeInfoCount(IHTMLInputElement *iface, UINT *pctinfo)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, pctinfo);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_GetTypeInfo(IHTMLInputElement *iface, UINT iTInfo,
LCID lcid, ITypeInfo **ppTInfo)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%u %lu %p)\n", This, iTInfo, lcid, ppTInfo);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_GetIDsOfNames(IHTMLInputElement *iface, REFIID riid,
LPOLESTR *rgszNames, UINT cNames,
LCID lcid, DISPID *rgDispId)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%s %p %u %lu %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
lcid, rgDispId);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_Invoke(IHTMLInputElement *iface, DISPID dispIdMember,
REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%ld %s %ld %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_put_type(IHTMLInputElement *iface, BSTR v)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_get_type(IHTMLInputElement *iface, BSTR *p)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_put_value(IHTMLInputElement *iface, BSTR v)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_get_value(IHTMLInputElement *iface, BSTR *p)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_put_name(IHTMLInputElement *iface, BSTR v)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_get_name(IHTMLInputElement *iface, BSTR *p)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_put_status(IHTMLInputElement *iface, VARIANT_BOOL v)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%x)\n", This, v);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_get_status(IHTMLInputElement *iface, VARIANT_BOOL *p)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_put_disabled(IHTMLInputElement *iface, VARIANT_BOOL v)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%x)\n", This, v);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_get_disabled(IHTMLInputElement *iface, VARIANT_BOOL *p)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_get_form(IHTMLInputElement *iface, IHTMLFormElement **p)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_put_size(IHTMLInputElement *iface, long v)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%ld)\n", This, v);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_get_size(IHTMLInputElement *iface, long *p)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_put_maxLength(IHTMLInputElement *iface, long v)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%ld)\n", This, v);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_get_maxLength(IHTMLInputElement *iface, long *p)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_select(IHTMLInputElement *iface)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)\n", This);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_put_onchange(IHTMLInputElement *iface, VARIANT v)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->()\n", This);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_get_onchange(IHTMLInputElement *iface, VARIANT *p)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_put_onselect(IHTMLInputElement *iface, VARIANT v)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->()\n", This);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_get_onselect(IHTMLInputElement *iface, VARIANT *p)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_put_defaultValue(IHTMLInputElement *iface, BSTR v)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_get_defaultValue(IHTMLInputElement *iface, BSTR *p)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_put_readOnly(IHTMLInputElement *iface, VARIANT_BOOL v)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%x)\n", This, v);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_get_readOnly(IHTMLInputElement *iface, VARIANT_BOOL *p)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_createTextRange(IHTMLInputElement *iface, IHTMLTxtRange **range)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, range);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_put_indeterminate(IHTMLInputElement *iface, VARIANT_BOOL v)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%x)\n", This, v);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_get_indeterminate(IHTMLInputElement *iface, VARIANT_BOOL *p)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_put_defaultChecked(IHTMLInputElement *iface, VARIANT_BOOL v)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%x)\n", This, v);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_get_defaultChecked(IHTMLInputElement *iface, VARIANT_BOOL *p)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_put_checked(IHTMLInputElement *iface, VARIANT_BOOL v)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%x)\n", This, v);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_get_checked(IHTMLInputElement *iface, VARIANT_BOOL *p)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_put_border(IHTMLInputElement *iface, VARIANT v)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->()\n", This);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_get_border(IHTMLInputElement *iface, VARIANT *p)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_put_vspace(IHTMLInputElement *iface, long v)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%ld)\n", This, v);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_get_vspace(IHTMLInputElement *iface, long *p)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_put_hspace(IHTMLInputElement *iface, long v)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%ld)\n", This, v);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_get_hspace(IHTMLInputElement *iface, long *p)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_put_alt(IHTMLInputElement *iface, BSTR v)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_get_alt(IHTMLInputElement *iface, BSTR *p)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_put_src(IHTMLInputElement *iface, BSTR v)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_get_src(IHTMLInputElement *iface, BSTR *p)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_put_lowsrc(IHTMLInputElement *iface, BSTR v)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_get_lowsrc(IHTMLInputElement *iface, BSTR *p)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_put_vrml(IHTMLInputElement *iface, BSTR v)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_get_vrml(IHTMLInputElement *iface, BSTR *p)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_put_dynsrc(IHTMLInputElement *iface, BSTR v)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_get_dynsrc(IHTMLInputElement *iface, BSTR *p)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_get_readyState(IHTMLInputElement *iface, BSTR *p)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_get_complete(IHTMLInputElement *iface, VARIANT_BOOL *p)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_put_loop(IHTMLInputElement *iface, VARIANT v)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->()\n", This);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_get_loop(IHTMLInputElement *iface, VARIANT *p)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_put_align(IHTMLInputElement *iface, BSTR v)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_get_align(IHTMLInputElement *iface, BSTR *p)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_put_onload(IHTMLInputElement *iface, VARIANT v)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->()\n", This);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_get_onload(IHTMLInputElement *iface, VARIANT *p)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_put_onerror(IHTMLInputElement *iface, VARIANT v)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->()\n", This);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_get_onerror(IHTMLInputElement *iface, VARIANT *p)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_put_onabort(IHTMLInputElement *iface, VARIANT v)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->()\n", This);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_get_onabort(IHTMLInputElement *iface, VARIANT *p)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_put_width(IHTMLInputElement *iface, long v)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%ld)\n", This, v);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_get_width(IHTMLInputElement *iface, long *p)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_put_height(IHTMLInputElement *iface, long v)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%ld)\n", This, v);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_get_height(IHTMLInputElement *iface, long *p)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_put_start(IHTMLInputElement *iface, BSTR v)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLInputElement_get_start(IHTMLInputElement *iface, BSTR *p)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static void HTMLInputElement_destructor(IUnknown *iface)
{
HTMLInputElement *This = HTMLINPUT_THIS(iface);
nsIDOMHTMLInputElement_Release(This->nsinput);
HeapFree(GetProcessHeap(), 0, This);
}
#undef HTMLINPUT_THIS
static const IHTMLInputElementVtbl HTMLInputElementVtbl = {
HTMLInputElement_QueryInterface,
HTMLInputElement_AddRef,
HTMLInputElement_Release,
HTMLInputElement_GetTypeInfoCount,
HTMLInputElement_GetTypeInfo,
HTMLInputElement_GetIDsOfNames,
HTMLInputElement_Invoke,
HTMLInputElement_put_type,
HTMLInputElement_get_type,
HTMLInputElement_put_value,
HTMLInputElement_get_value,
HTMLInputElement_put_name,
HTMLInputElement_get_name,
HTMLInputElement_put_status,
HTMLInputElement_get_status,
HTMLInputElement_put_disabled,
HTMLInputElement_get_disabled,
HTMLInputElement_get_form,
HTMLInputElement_put_size,
HTMLInputElement_get_size,
HTMLInputElement_put_maxLength,
HTMLInputElement_get_maxLength,
HTMLInputElement_select,
HTMLInputElement_put_onchange,
HTMLInputElement_get_onchange,
HTMLInputElement_put_onselect,
HTMLInputElement_get_onselect,
HTMLInputElement_put_defaultValue,
HTMLInputElement_get_defaultValue,
HTMLInputElement_put_readOnly,
HTMLInputElement_get_readOnly,
HTMLInputElement_createTextRange,
HTMLInputElement_put_indeterminate,
HTMLInputElement_get_indeterminate,
HTMLInputElement_put_defaultChecked,
HTMLInputElement_get_defaultChecked,
HTMLInputElement_put_checked,
HTMLInputElement_get_checked,
HTMLInputElement_put_border,
HTMLInputElement_get_border,
HTMLInputElement_put_vspace,
HTMLInputElement_get_vspace,
HTMLInputElement_put_hspace,
HTMLInputElement_get_hspace,
HTMLInputElement_put_alt,
HTMLInputElement_get_alt,
HTMLInputElement_put_src,
HTMLInputElement_get_src,
HTMLInputElement_put_lowsrc,
HTMLInputElement_get_lowsrc,
HTMLInputElement_put_vrml,
HTMLInputElement_get_vrml,
HTMLInputElement_put_dynsrc,
HTMLInputElement_get_dynsrc,
HTMLInputElement_get_readyState,
HTMLInputElement_get_complete,
HTMLInputElement_put_loop,
HTMLInputElement_get_loop,
HTMLInputElement_put_align,
HTMLInputElement_get_align,
HTMLInputElement_put_onload,
HTMLInputElement_get_onload,
HTMLInputElement_put_onerror,
HTMLInputElement_get_onerror,
HTMLInputElement_put_onabort,
HTMLInputElement_get_onabort,
HTMLInputElement_put_width,
HTMLInputElement_get_width,
HTMLInputElement_put_height,
HTMLInputElement_get_height,
HTMLInputElement_put_start,
HTMLInputElement_get_start
};
void HTMLInputElement_Create(HTMLElement *element)
{
HTMLInputElement *ret = HeapAlloc(GetProcessHeap(), 0, sizeof(HTMLInputElement));
nsresult nsres;
ret->lpHTMLInputElementVtbl = &HTMLInputElementVtbl;
ret->element = element;
nsres = nsIDOMHTMLElement_QueryInterface(element->nselem, &IID_nsIDOMHTMLInputElement,
(void**)&ret->nsinput);
if(NS_FAILED(nsres))
ERR("Could not get nsIDOMHTMLInputElement interface: %08lx\n", nsres);
element->impl = (IUnknown*)HTMLINPUT(ret);
element->destructor = HTMLInputElement_destructor;
}

View File

@ -212,6 +212,7 @@ nsIInputStream *create_nsstream(const char*,PRInt32);
IHlink *Hlink_Create(void);
void HTMLElement_Create(HTMLDOMNode*);
void HTMLInputElement_Create(HTMLElement*);
HTMLDOMNode *get_node(HTMLDocument*,nsIDOMNode*);
void release_nodes(HTMLDocument*);

View File

@ -100,6 +100,7 @@ typedef nsISupports nsIDOMComment;
typedef nsISupports nsIDOMCDATASection;
typedef nsISupports nsIDOMProcessingInstruction;
typedef nsISupports nsIDOMEntityReference;
typedef nsISupports nsIDOMHTMLFormElement;
[
object,
@ -460,6 +461,53 @@ interface nsIDOMWindow : nsISupports
nsresult SizeToContent();
}
[
object,
uuid(a6cf9093-15b3-11d2-932e-00805f8add32)
]
interface nsIDOMHTMLInputElement : nsIDOMHTMLElement
{
nsresult GetDefaultValue(nsAString *aDefaultValue);
nsresult SetDefaultValue(const nsAString *aDefaultValue);
nsresult GetDefaultChecked(PRBool *aDefaultChecked);
nsresult SetDefaultChecked(PRBool aDefaultChecked);
nsresult GetForm(nsIDOMHTMLFormElement **aForm);
nsresult GetAccept(nsAString *aAccept);
nsresult SetAccept(const nsAString *aAccept);
nsresult GetAccessKey(nsAString *aAccessKey);
nsresult SetAccessKey(const nsAString *aAccessKey);
nsresult GetAlign(nsAString *aAlign);
nsresult SetAlign(const nsAString *aAlign);
nsresult GetAlt(nsAString *aAlt);
nsresult SetAlt(const nsAString *aAlt);
nsresult GetChecked(PRBool *aChecked);
nsresult SetChecked(PRBool aChecked);
nsresult GetDisabled(PRBool *aDisabled);
nsresult SetDisabled(PRBool aDisabled);
nsresult GetMaxLength(PRInt32 *aMaxLength);
nsresult SetMaxLength(PRInt32 aMaxLength);
nsresult GetName(nsAString *aName);
nsresult SetName(const nsAString *aName);
nsresult GetReadOnly(PRBool *aReadOnly);
nsresult SetReadOnly(PRBool aReadOnly);
nsresult GetSize(PRUint32 *aSize);
nsresult SetSize(PRUint32 aSize);
nsresult GetSrc(nsAString *aSrc);
nsresult SetSrc(const nsAString *aSrc);
nsresult GetTabIndex(PRInt32 *aTabIndex);
nsresult SetTabIndex(PRInt32 aTabIndex);
nsresult GetType(nsAString *aType);
nsresult SetType(const nsAString *aType);
nsresult GetUseMap(nsAString *aUseMap);
nsresult SetUseMap(const nsAString *aUseMap);
nsresult GetValue(nsAString *aValue);
nsresult SetValue(const nsAString *aValue);
nsresult Blur();
nsresult Focus();
nsresult Select();
nsresult Click();
}
[
object,
uuid(94928ab3-8b63-11d3-989d-001083010e9b)