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
28 #include "wine/debug.h"
30 #include "mshtml_private.h"
32 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
37 const IHTMLInputElementVtbl *lpHTMLInputElementVtbl;
38 const IHTMLInputTextElementVtbl *lpHTMLInputTextElementVtbl;
40 nsIDOMHTMLInputElement *nsinput;
43 #define HTMLINPUT(x) ((IHTMLInputElement*) &(x)->lpHTMLInputElementVtbl)
44 #define HTMLINPUTTEXT(x) (&(x)->lpHTMLInputTextElementVtbl)
46 #define HTMLINPUT_THIS(iface) DEFINE_THIS(HTMLInputElement, HTMLInputElement, iface)
48 static HRESULT WINAPI HTMLInputElement_QueryInterface(IHTMLInputElement *iface,
49 REFIID riid, void **ppv)
51 HTMLInputElement *This = HTMLINPUT_THIS(iface);
53 return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
56 static ULONG WINAPI HTMLInputElement_AddRef(IHTMLInputElement *iface)
58 HTMLInputElement *This = HTMLINPUT_THIS(iface);
60 return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
63 static ULONG WINAPI HTMLInputElement_Release(IHTMLInputElement *iface)
65 HTMLInputElement *This = HTMLINPUT_THIS(iface);
67 return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
70 static HRESULT WINAPI HTMLInputElement_GetTypeInfoCount(IHTMLInputElement *iface, UINT *pctinfo)
72 HTMLInputElement *This = HTMLINPUT_THIS(iface);
74 return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->element.node.dispex), pctinfo);
77 static HRESULT WINAPI HTMLInputElement_GetTypeInfo(IHTMLInputElement *iface, UINT iTInfo,
78 LCID lcid, ITypeInfo **ppTInfo)
80 HTMLInputElement *This = HTMLINPUT_THIS(iface);
82 return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->element.node.dispex), iTInfo, lcid, ppTInfo);
85 static HRESULT WINAPI HTMLInputElement_GetIDsOfNames(IHTMLInputElement *iface, REFIID riid,
86 LPOLESTR *rgszNames, UINT cNames,
87 LCID lcid, DISPID *rgDispId)
89 HTMLInputElement *This = HTMLINPUT_THIS(iface);
91 return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->element.node.dispex), riid, rgszNames,
92 cNames, lcid, rgDispId);
95 static HRESULT WINAPI HTMLInputElement_Invoke(IHTMLInputElement *iface, DISPID dispIdMember,
96 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
97 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
99 HTMLInputElement *This = HTMLINPUT_THIS(iface);
101 return IDispatchEx_Invoke(DISPATCHEX(&This->element.node.dispex), dispIdMember, riid, lcid, wFlags,
102 pDispParams, pVarResult, pExcepInfo, puArgErr);
105 static HRESULT WINAPI HTMLInputElement_put_type(IHTMLInputElement *iface, BSTR v)
107 HTMLInputElement *This = HTMLINPUT_THIS(iface);
108 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
112 static HRESULT WINAPI HTMLInputElement_get_type(IHTMLInputElement *iface, BSTR *p)
114 HTMLInputElement *This = HTMLINPUT_THIS(iface);
116 const PRUnichar *type;
119 TRACE("(%p)->(%p)\n", This, p);
121 nsAString_Init(&type_str, NULL);
122 nsres = nsIDOMHTMLInputElement_GetType(This->nsinput, &type_str);
124 if(NS_SUCCEEDED(nsres)) {
125 nsAString_GetData(&type_str, &type);
126 *p = SysAllocString(type);
128 ERR("GetType failed: %08x\n", nsres);
131 nsAString_Finish(&type_str);
133 TRACE("type=%s\n", debugstr_w(*p));
137 static HRESULT WINAPI HTMLInputElement_put_value(IHTMLInputElement *iface, BSTR v)
139 HTMLInputElement *This = HTMLINPUT_THIS(iface);
143 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
145 nsAString_Init(&val_str, v);
146 nsres = nsIDOMHTMLInputElement_SetValue(This->nsinput, &val_str);
147 nsAString_Finish(&val_str);
149 ERR("SetValue failed: %08x\n", nsres);
154 static HRESULT WINAPI HTMLInputElement_get_value(IHTMLInputElement *iface, BSTR *p)
156 HTMLInputElement *This = HTMLINPUT_THIS(iface);
158 const PRUnichar *value = NULL;
161 TRACE("(%p)->(%p)\n", This, p);
163 nsAString_Init(&value_str, NULL);
165 nsres = nsIDOMHTMLInputElement_GetValue(This->nsinput, &value_str);
166 if(NS_SUCCEEDED(nsres)) {
167 nsAString_GetData(&value_str, &value);
168 *p = SysAllocString(value);
170 ERR("GetValue failed: %08x\n", nsres);
173 nsAString_Finish(&value_str);
175 TRACE("value=%s\n", debugstr_w(*p));
179 static HRESULT WINAPI HTMLInputElement_put_name(IHTMLInputElement *iface, BSTR v)
181 HTMLInputElement *This = HTMLINPUT_THIS(iface);
182 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
186 static HRESULT WINAPI HTMLInputElement_get_name(IHTMLInputElement *iface, BSTR *p)
188 HTMLInputElement *This = HTMLINPUT_THIS(iface);
190 const PRUnichar *name;
193 TRACE("(%p)->(%p)\n", This, p);
195 nsAString_Init(&name_str, NULL);
197 nsres = nsIDOMHTMLInputElement_GetName(This->nsinput, &name_str);
198 if(NS_SUCCEEDED(nsres)) {
199 nsAString_GetData(&name_str, &name);
200 *p = SysAllocString(name);
202 ERR("GetName failed: %08x\n", nsres);
206 nsAString_Finish(&name_str);
208 TRACE("name=%s\n", debugstr_w(*p));
212 static HRESULT WINAPI HTMLInputElement_put_status(IHTMLInputElement *iface, VARIANT_BOOL v)
214 HTMLInputElement *This = HTMLINPUT_THIS(iface);
215 FIXME("(%p)->(%x)\n", This, v);
219 static HRESULT WINAPI HTMLInputElement_get_status(IHTMLInputElement *iface, VARIANT_BOOL *p)
221 HTMLInputElement *This = HTMLINPUT_THIS(iface);
222 FIXME("(%p)->(%p)\n", This, p);
226 static HRESULT WINAPI HTMLInputElement_put_disabled(IHTMLInputElement *iface, VARIANT_BOOL v)
228 HTMLInputElement *This = HTMLINPUT_THIS(iface);
231 TRACE("(%p)->(%x)\n", This, v);
233 nsres = nsIDOMHTMLInputElement_SetDisabled(This->nsinput, v != VARIANT_FALSE);
235 ERR("SetDisabled failed: %08x\n", nsres);
240 static HRESULT WINAPI HTMLInputElement_get_disabled(IHTMLInputElement *iface, VARIANT_BOOL *p)
242 HTMLInputElement *This = HTMLINPUT_THIS(iface);
243 PRBool disabled = FALSE;
245 TRACE("(%p)->(%p)\n", This, p);
247 nsIDOMHTMLInputElement_GetDisabled(This->nsinput, &disabled);
249 *p = disabled ? VARIANT_TRUE : VARIANT_FALSE;
253 static HRESULT WINAPI HTMLInputElement_get_form(IHTMLInputElement *iface, IHTMLFormElement **p)
255 HTMLInputElement *This = HTMLINPUT_THIS(iface);
256 FIXME("(%p)->(%p)\n", This, p);
260 static HRESULT WINAPI HTMLInputElement_put_size(IHTMLInputElement *iface, LONG v)
262 HTMLInputElement *This = HTMLINPUT_THIS(iface);
263 FIXME("(%p)->(%d)\n", This, v);
267 static HRESULT WINAPI HTMLInputElement_get_size(IHTMLInputElement *iface, LONG *p)
269 HTMLInputElement *This = HTMLINPUT_THIS(iface);
270 FIXME("(%p)->(%p)\n", This, p);
274 static HRESULT WINAPI HTMLInputElement_put_maxLength(IHTMLInputElement *iface, LONG v)
276 HTMLInputElement *This = HTMLINPUT_THIS(iface);
277 FIXME("(%p)->(%d)\n", This, v);
281 static HRESULT WINAPI HTMLInputElement_get_maxLength(IHTMLInputElement *iface, LONG *p)
283 HTMLInputElement *This = HTMLINPUT_THIS(iface);
284 FIXME("(%p)->(%p)\n", This, p);
288 static HRESULT WINAPI HTMLInputElement_select(IHTMLInputElement *iface)
290 HTMLInputElement *This = HTMLINPUT_THIS(iface);
293 TRACE("(%p)\n", This);
295 nsres = nsIDOMHTMLInputElement_Select(This->nsinput);
296 if(NS_FAILED(nsres)) {
297 ERR("Select failed: %08x\n", nsres);
304 static HRESULT WINAPI HTMLInputElement_put_onchange(IHTMLInputElement *iface, VARIANT v)
306 HTMLInputElement *This = HTMLINPUT_THIS(iface);
307 FIXME("(%p)->()\n", This);
311 static HRESULT WINAPI HTMLInputElement_get_onchange(IHTMLInputElement *iface, VARIANT *p)
313 HTMLInputElement *This = HTMLINPUT_THIS(iface);
314 FIXME("(%p)->(%p)\n", This, p);
318 static HRESULT WINAPI HTMLInputElement_put_onselect(IHTMLInputElement *iface, VARIANT v)
320 HTMLInputElement *This = HTMLINPUT_THIS(iface);
321 FIXME("(%p)->()\n", This);
325 static HRESULT WINAPI HTMLInputElement_get_onselect(IHTMLInputElement *iface, VARIANT *p)
327 HTMLInputElement *This = HTMLINPUT_THIS(iface);
328 FIXME("(%p)->(%p)\n", This, p);
332 static HRESULT WINAPI HTMLInputElement_put_defaultValue(IHTMLInputElement *iface, BSTR v)
334 HTMLInputElement *This = HTMLINPUT_THIS(iface);
335 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
339 static HRESULT WINAPI HTMLInputElement_get_defaultValue(IHTMLInputElement *iface, BSTR *p)
341 HTMLInputElement *This = HTMLINPUT_THIS(iface);
342 FIXME("(%p)->(%p)\n", This, p);
346 static HRESULT WINAPI HTMLInputElement_put_readOnly(IHTMLInputElement *iface, VARIANT_BOOL v)
348 HTMLInputElement *This = HTMLINPUT_THIS(iface);
349 FIXME("(%p)->(%x)\n", This, v);
353 static HRESULT WINAPI HTMLInputElement_get_readOnly(IHTMLInputElement *iface, VARIANT_BOOL *p)
355 HTMLInputElement *This = HTMLINPUT_THIS(iface);
356 FIXME("(%p)->(%p)\n", This, p);
360 static HRESULT WINAPI HTMLInputElement_createTextRange(IHTMLInputElement *iface, IHTMLTxtRange **range)
362 HTMLInputElement *This = HTMLINPUT_THIS(iface);
363 FIXME("(%p)->(%p)\n", This, range);
367 static HRESULT WINAPI HTMLInputElement_put_indeterminate(IHTMLInputElement *iface, VARIANT_BOOL v)
369 HTMLInputElement *This = HTMLINPUT_THIS(iface);
370 FIXME("(%p)->(%x)\n", This, v);
374 static HRESULT WINAPI HTMLInputElement_get_indeterminate(IHTMLInputElement *iface, VARIANT_BOOL *p)
376 HTMLInputElement *This = HTMLINPUT_THIS(iface);
377 FIXME("(%p)->(%p)\n", This, p);
381 static HRESULT WINAPI HTMLInputElement_put_defaultChecked(IHTMLInputElement *iface, VARIANT_BOOL v)
383 HTMLInputElement *This = HTMLINPUT_THIS(iface);
386 TRACE("(%p)->(%x)\n", This, v);
388 nsres = nsIDOMHTMLInputElement_SetDefaultChecked(This->nsinput, v != VARIANT_FALSE);
389 if(NS_FAILED(nsres)) {
390 ERR("SetDefaultChecked failed: %08x\n", nsres);
397 static HRESULT WINAPI HTMLInputElement_get_defaultChecked(IHTMLInputElement *iface, VARIANT_BOOL *p)
399 HTMLInputElement *This = HTMLINPUT_THIS(iface);
400 PRBool default_checked = FALSE;
403 TRACE("(%p)->(%p)\n", This, p);
405 nsres = nsIDOMHTMLInputElement_GetDefaultChecked(This->nsinput, &default_checked);
406 if(NS_FAILED(nsres)) {
407 ERR("GetDefaultChecked failed: %08x\n", nsres);
411 *p = default_checked ? VARIANT_TRUE : VARIANT_FALSE;
415 static HRESULT WINAPI HTMLInputElement_put_checked(IHTMLInputElement *iface, VARIANT_BOOL v)
417 HTMLInputElement *This = HTMLINPUT_THIS(iface);
420 TRACE("(%p)->(%x)\n", This, v);
422 nsres = nsIDOMHTMLInputElement_SetChecked(This->nsinput, v != VARIANT_FALSE);
423 if(NS_FAILED(nsres)) {
424 ERR("SetChecked failed: %08x\n", nsres);
431 static HRESULT WINAPI HTMLInputElement_get_checked(IHTMLInputElement *iface, VARIANT_BOOL *p)
433 HTMLInputElement *This = HTMLINPUT_THIS(iface);
437 TRACE("(%p)->(%p)\n", This, p);
439 nsres = nsIDOMHTMLInputElement_GetChecked(This->nsinput, &checked);
440 if(NS_FAILED(nsres)) {
441 ERR("GetChecked failed: %08x\n", nsres);
445 *p = checked ? VARIANT_TRUE : VARIANT_FALSE;
446 TRACE("checked=%x\n", *p);
450 static HRESULT WINAPI HTMLInputElement_put_border(IHTMLInputElement *iface, VARIANT v)
452 HTMLInputElement *This = HTMLINPUT_THIS(iface);
453 FIXME("(%p)->()\n", This);
457 static HRESULT WINAPI HTMLInputElement_get_border(IHTMLInputElement *iface, VARIANT *p)
459 HTMLInputElement *This = HTMLINPUT_THIS(iface);
460 FIXME("(%p)->(%p)\n", This, p);
464 static HRESULT WINAPI HTMLInputElement_put_vspace(IHTMLInputElement *iface, LONG v)
466 HTMLInputElement *This = HTMLINPUT_THIS(iface);
467 FIXME("(%p)->(%d)\n", This, v);
471 static HRESULT WINAPI HTMLInputElement_get_vspace(IHTMLInputElement *iface, LONG *p)
473 HTMLInputElement *This = HTMLINPUT_THIS(iface);
474 FIXME("(%p)->(%p)\n", This, p);
478 static HRESULT WINAPI HTMLInputElement_put_hspace(IHTMLInputElement *iface, LONG v)
480 HTMLInputElement *This = HTMLINPUT_THIS(iface);
481 FIXME("(%p)->(%d)\n", This, v);
485 static HRESULT WINAPI HTMLInputElement_get_hspace(IHTMLInputElement *iface, LONG *p)
487 HTMLInputElement *This = HTMLINPUT_THIS(iface);
488 FIXME("(%p)->(%p)\n", This, p);
492 static HRESULT WINAPI HTMLInputElement_put_alt(IHTMLInputElement *iface, BSTR v)
494 HTMLInputElement *This = HTMLINPUT_THIS(iface);
495 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
499 static HRESULT WINAPI HTMLInputElement_get_alt(IHTMLInputElement *iface, BSTR *p)
501 HTMLInputElement *This = HTMLINPUT_THIS(iface);
502 FIXME("(%p)->(%p)\n", This, p);
506 static HRESULT WINAPI HTMLInputElement_put_src(IHTMLInputElement *iface, BSTR v)
508 HTMLInputElement *This = HTMLINPUT_THIS(iface);
512 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
514 nsAString_Init(&nsstr, v);
515 nsres = nsIDOMHTMLInputElement_SetSrc(This->nsinput, &nsstr);
516 nsAString_Finish(&nsstr);
518 ERR("SetSrc failed: %08x\n", nsres);
523 static HRESULT WINAPI HTMLInputElement_get_src(IHTMLInputElement *iface, BSTR *p)
525 HTMLInputElement *This = HTMLINPUT_THIS(iface);
526 const PRUnichar *src;
531 TRACE("(%p)->(%p)\n", This, p);
533 nsAString_Init(&src_str, NULL);
534 nsres = nsIDOMHTMLInputElement_GetSrc(This->nsinput, &src_str);
535 if(NS_FAILED(nsres)) {
536 ERR("GetSrc failed: %08x\n", nsres);
540 nsAString_GetData(&src_str, &src);
541 hres = nsuri_to_url(src, FALSE, p);
542 nsAString_Finish(&src_str);
547 static HRESULT WINAPI HTMLInputElement_put_lowsrc(IHTMLInputElement *iface, BSTR v)
549 HTMLInputElement *This = HTMLINPUT_THIS(iface);
550 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
554 static HRESULT WINAPI HTMLInputElement_get_lowsrc(IHTMLInputElement *iface, BSTR *p)
556 HTMLInputElement *This = HTMLINPUT_THIS(iface);
557 FIXME("(%p)->(%p)\n", This, p);
561 static HRESULT WINAPI HTMLInputElement_put_vrml(IHTMLInputElement *iface, BSTR v)
563 HTMLInputElement *This = HTMLINPUT_THIS(iface);
564 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
568 static HRESULT WINAPI HTMLInputElement_get_vrml(IHTMLInputElement *iface, BSTR *p)
570 HTMLInputElement *This = HTMLINPUT_THIS(iface);
571 FIXME("(%p)->(%p)\n", This, p);
575 static HRESULT WINAPI HTMLInputElement_put_dynsrc(IHTMLInputElement *iface, BSTR v)
577 HTMLInputElement *This = HTMLINPUT_THIS(iface);
578 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
582 static HRESULT WINAPI HTMLInputElement_get_dynsrc(IHTMLInputElement *iface, BSTR *p)
584 HTMLInputElement *This = HTMLINPUT_THIS(iface);
585 FIXME("(%p)->(%p)\n", This, p);
589 static HRESULT WINAPI HTMLInputElement_get_readyState(IHTMLInputElement *iface, BSTR *p)
591 HTMLInputElement *This = HTMLINPUT_THIS(iface);
592 FIXME("(%p)->(%p)\n", This, p);
596 static HRESULT WINAPI HTMLInputElement_get_complete(IHTMLInputElement *iface, VARIANT_BOOL *p)
598 HTMLInputElement *This = HTMLINPUT_THIS(iface);
599 FIXME("(%p)->(%p)\n", This, p);
603 static HRESULT WINAPI HTMLInputElement_put_loop(IHTMLInputElement *iface, VARIANT v)
605 HTMLInputElement *This = HTMLINPUT_THIS(iface);
606 FIXME("(%p)->()\n", This);
610 static HRESULT WINAPI HTMLInputElement_get_loop(IHTMLInputElement *iface, VARIANT *p)
612 HTMLInputElement *This = HTMLINPUT_THIS(iface);
613 FIXME("(%p)->(%p)\n", This, p);
617 static HRESULT WINAPI HTMLInputElement_put_align(IHTMLInputElement *iface, BSTR v)
619 HTMLInputElement *This = HTMLINPUT_THIS(iface);
620 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
624 static HRESULT WINAPI HTMLInputElement_get_align(IHTMLInputElement *iface, BSTR *p)
626 HTMLInputElement *This = HTMLINPUT_THIS(iface);
627 FIXME("(%p)->(%p)\n", This, p);
631 static HRESULT WINAPI HTMLInputElement_put_onload(IHTMLInputElement *iface, VARIANT v)
633 HTMLInputElement *This = HTMLINPUT_THIS(iface);
634 FIXME("(%p)->()\n", This);
638 static HRESULT WINAPI HTMLInputElement_get_onload(IHTMLInputElement *iface, VARIANT *p)
640 HTMLInputElement *This = HTMLINPUT_THIS(iface);
641 FIXME("(%p)->(%p)\n", This, p);
645 static HRESULT WINAPI HTMLInputElement_put_onerror(IHTMLInputElement *iface, VARIANT v)
647 HTMLInputElement *This = HTMLINPUT_THIS(iface);
648 FIXME("(%p)->()\n", This);
652 static HRESULT WINAPI HTMLInputElement_get_onerror(IHTMLInputElement *iface, VARIANT *p)
654 HTMLInputElement *This = HTMLINPUT_THIS(iface);
655 FIXME("(%p)->(%p)\n", This, p);
659 static HRESULT WINAPI HTMLInputElement_put_onabort(IHTMLInputElement *iface, VARIANT v)
661 HTMLInputElement *This = HTMLINPUT_THIS(iface);
662 FIXME("(%p)->()\n", This);
666 static HRESULT WINAPI HTMLInputElement_get_onabort(IHTMLInputElement *iface, VARIANT *p)
668 HTMLInputElement *This = HTMLINPUT_THIS(iface);
669 FIXME("(%p)->(%p)\n", This, p);
673 static HRESULT WINAPI HTMLInputElement_put_width(IHTMLInputElement *iface, LONG v)
675 HTMLInputElement *This = HTMLINPUT_THIS(iface);
676 FIXME("(%p)->(%d)\n", This, v);
680 static HRESULT WINAPI HTMLInputElement_get_width(IHTMLInputElement *iface, LONG *p)
682 HTMLInputElement *This = HTMLINPUT_THIS(iface);
683 FIXME("(%p)->(%p)\n", This, p);
687 static HRESULT WINAPI HTMLInputElement_put_height(IHTMLInputElement *iface, LONG v)
689 HTMLInputElement *This = HTMLINPUT_THIS(iface);
690 FIXME("(%p)->(%d)\n", This, v);
694 static HRESULT WINAPI HTMLInputElement_get_height(IHTMLInputElement *iface, LONG *p)
696 HTMLInputElement *This = HTMLINPUT_THIS(iface);
697 FIXME("(%p)->(%p)\n", This, p);
701 static HRESULT WINAPI HTMLInputElement_put_start(IHTMLInputElement *iface, BSTR v)
703 HTMLInputElement *This = HTMLINPUT_THIS(iface);
704 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
708 static HRESULT WINAPI HTMLInputElement_get_start(IHTMLInputElement *iface, BSTR *p)
710 HTMLInputElement *This = HTMLINPUT_THIS(iface);
711 FIXME("(%p)->(%p)\n", This, p);
715 #undef HTMLINPUT_THIS
717 static const IHTMLInputElementVtbl HTMLInputElementVtbl = {
718 HTMLInputElement_QueryInterface,
719 HTMLInputElement_AddRef,
720 HTMLInputElement_Release,
721 HTMLInputElement_GetTypeInfoCount,
722 HTMLInputElement_GetTypeInfo,
723 HTMLInputElement_GetIDsOfNames,
724 HTMLInputElement_Invoke,
725 HTMLInputElement_put_type,
726 HTMLInputElement_get_type,
727 HTMLInputElement_put_value,
728 HTMLInputElement_get_value,
729 HTMLInputElement_put_name,
730 HTMLInputElement_get_name,
731 HTMLInputElement_put_status,
732 HTMLInputElement_get_status,
733 HTMLInputElement_put_disabled,
734 HTMLInputElement_get_disabled,
735 HTMLInputElement_get_form,
736 HTMLInputElement_put_size,
737 HTMLInputElement_get_size,
738 HTMLInputElement_put_maxLength,
739 HTMLInputElement_get_maxLength,
740 HTMLInputElement_select,
741 HTMLInputElement_put_onchange,
742 HTMLInputElement_get_onchange,
743 HTMLInputElement_put_onselect,
744 HTMLInputElement_get_onselect,
745 HTMLInputElement_put_defaultValue,
746 HTMLInputElement_get_defaultValue,
747 HTMLInputElement_put_readOnly,
748 HTMLInputElement_get_readOnly,
749 HTMLInputElement_createTextRange,
750 HTMLInputElement_put_indeterminate,
751 HTMLInputElement_get_indeterminate,
752 HTMLInputElement_put_defaultChecked,
753 HTMLInputElement_get_defaultChecked,
754 HTMLInputElement_put_checked,
755 HTMLInputElement_get_checked,
756 HTMLInputElement_put_border,
757 HTMLInputElement_get_border,
758 HTMLInputElement_put_vspace,
759 HTMLInputElement_get_vspace,
760 HTMLInputElement_put_hspace,
761 HTMLInputElement_get_hspace,
762 HTMLInputElement_put_alt,
763 HTMLInputElement_get_alt,
764 HTMLInputElement_put_src,
765 HTMLInputElement_get_src,
766 HTMLInputElement_put_lowsrc,
767 HTMLInputElement_get_lowsrc,
768 HTMLInputElement_put_vrml,
769 HTMLInputElement_get_vrml,
770 HTMLInputElement_put_dynsrc,
771 HTMLInputElement_get_dynsrc,
772 HTMLInputElement_get_readyState,
773 HTMLInputElement_get_complete,
774 HTMLInputElement_put_loop,
775 HTMLInputElement_get_loop,
776 HTMLInputElement_put_align,
777 HTMLInputElement_get_align,
778 HTMLInputElement_put_onload,
779 HTMLInputElement_get_onload,
780 HTMLInputElement_put_onerror,
781 HTMLInputElement_get_onerror,
782 HTMLInputElement_put_onabort,
783 HTMLInputElement_get_onabort,
784 HTMLInputElement_put_width,
785 HTMLInputElement_get_width,
786 HTMLInputElement_put_height,
787 HTMLInputElement_get_height,
788 HTMLInputElement_put_start,
789 HTMLInputElement_get_start
792 #define HTMLINPUTTEXT_THIS(iface) DEFINE_THIS(HTMLInputElement, HTMLInputTextElement, iface)
794 static HRESULT WINAPI HTMLInputTextElement_QueryInterface(IHTMLInputTextElement *iface,
795 REFIID riid, void **ppv)
797 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
799 return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
802 static ULONG WINAPI HTMLInputTextElement_AddRef(IHTMLInputTextElement *iface)
804 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
806 return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
809 static ULONG WINAPI HTMLInputTextElement_Release(IHTMLInputTextElement *iface)
811 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
813 return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
816 static HRESULT WINAPI HTMLInputTextElement_GetTypeInfoCount(IHTMLInputTextElement *iface, UINT *pctinfo)
818 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
819 return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->element.node.dispex), pctinfo);
822 static HRESULT WINAPI HTMLInputTextElement_GetTypeInfo(IHTMLInputTextElement *iface, UINT iTInfo,
823 LCID lcid, ITypeInfo **ppTInfo)
825 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
826 return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->element.node.dispex), iTInfo, lcid, ppTInfo);
829 static HRESULT WINAPI HTMLInputTextElement_GetIDsOfNames(IHTMLInputTextElement *iface, REFIID riid,
830 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
832 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
833 return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->element.node.dispex), riid, rgszNames, cNames, lcid, rgDispId);
836 static HRESULT WINAPI HTMLInputTextElement_Invoke(IHTMLInputTextElement *iface, DISPID dispIdMember,
837 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
838 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
840 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
841 return IDispatchEx_Invoke(DISPATCHEX(&This->element.node.dispex), dispIdMember, riid, lcid, wFlags, pDispParams,
842 pVarResult, pExcepInfo, puArgErr);
845 static HRESULT WINAPI HTMLInputTextElement_get_type(IHTMLInputTextElement *iface, BSTR *p)
847 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
849 TRACE("(%p)->(%p)\n", This, p);
851 return IHTMLInputElement_get_type(HTMLINPUT(This), p);
854 static HRESULT WINAPI HTMLInputTextElement_put_value(IHTMLInputTextElement *iface, BSTR v)
856 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
858 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
860 return IHTMLInputElement_put_value(HTMLINPUT(This), v);
863 static HRESULT WINAPI HTMLInputTextElement_get_value(IHTMLInputTextElement *iface, BSTR *p)
865 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
867 TRACE("(%p)->(%p)\n", This, p);
869 return IHTMLInputElement_get_value(HTMLINPUT(This), p);
872 static HRESULT WINAPI HTMLInputTextElement_put_name(IHTMLInputTextElement *iface, BSTR v)
874 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
876 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
878 return IHTMLInputElement_put_name(HTMLINPUT(This), v);
881 static HRESULT WINAPI HTMLInputTextElement_get_name(IHTMLInputTextElement *iface, BSTR *p)
883 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
885 TRACE("(%p)->(%p)\n", This, p);
887 return IHTMLInputElement_get_name(HTMLINPUT(This), p);
890 static HRESULT WINAPI HTMLInputTextElement_put_status(IHTMLInputTextElement *iface, VARIANT v)
892 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
893 FIXME("(%p)->(v)\n", This);
897 static HRESULT WINAPI HTMLInputTextElement_get_status(IHTMLInputTextElement *iface, VARIANT *p)
899 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
900 TRACE("(%p)->(v)\n", This);
904 static HRESULT WINAPI HTMLInputTextElement_put_disabled(IHTMLInputTextElement *iface, VARIANT_BOOL v)
906 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
908 TRACE("(%p)->(%x)\n", This, v);
910 return IHTMLInputElement_put_disabled(HTMLINPUT(This), v);
913 static HRESULT WINAPI HTMLInputTextElement_get_disabled(IHTMLInputTextElement *iface, VARIANT_BOOL *p)
915 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
917 TRACE("(%p)->(%p)\n", This, p);
919 return IHTMLInputElement_get_disabled(HTMLINPUT(This), p);
922 static HRESULT WINAPI HTMLInputTextElement_get_form(IHTMLInputTextElement *iface, IHTMLFormElement **p)
924 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
926 TRACE("(%p)->(%p)\n", This, p);
928 return IHTMLInputElement_get_form(HTMLINPUT(This), p);
931 static HRESULT WINAPI HTMLInputTextElement_put_defaultValue(IHTMLInputTextElement *iface, BSTR v)
933 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
935 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
937 return IHTMLInputElement_put_defaultValue(HTMLINPUT(This), v);
940 static HRESULT WINAPI HTMLInputTextElement_get_defaultValue(IHTMLInputTextElement *iface, BSTR *p)
942 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
944 TRACE("(%p)->(%p)\n", This, p);
946 return IHTMLInputElement_get_defaultValue(HTMLINPUT(This), p);
949 static HRESULT WINAPI HTMLInputTextElement_put_size(IHTMLInputTextElement *iface, LONG v)
951 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
953 TRACE("(%p)->(%d)\n", This, v);
955 return IHTMLInputElement_put_size(HTMLINPUT(This), v);
958 static HRESULT WINAPI HTMLInputTextElement_get_size(IHTMLInputTextElement *iface, LONG *p)
960 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
962 TRACE("(%p)->(%p)\n", This, p);
964 return IHTMLInputElement_get_size(HTMLINPUT(This), p);
967 static HRESULT WINAPI HTMLInputTextElement_put_maxLength(IHTMLInputTextElement *iface, LONG v)
969 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
971 TRACE("(%p)->(%d)\n", This, v);
973 return IHTMLInputElement_put_maxLength(HTMLINPUT(This), v);
976 static HRESULT WINAPI HTMLInputTextElement_get_maxLength(IHTMLInputTextElement *iface, LONG *p)
978 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
980 TRACE("(%p)->(%p)\n", This, p);
982 return IHTMLInputElement_get_maxLength(HTMLINPUT(This), p);
985 static HRESULT WINAPI HTMLInputTextElement_select(IHTMLInputTextElement *iface)
987 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
989 TRACE("(%p)\n", This);
991 return IHTMLInputElement_select(HTMLINPUT(This));
994 static HRESULT WINAPI HTMLInputTextElement_put_onchange(IHTMLInputTextElement *iface, VARIANT v)
996 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
998 TRACE("(%p)->()\n", This);
1000 return IHTMLInputElement_put_onchange(HTMLINPUT(This), v);
1003 static HRESULT WINAPI HTMLInputTextElement_get_onchange(IHTMLInputTextElement *iface, VARIANT *p)
1005 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
1007 TRACE("(%p)->(%p)\n", This, p);
1009 return IHTMLInputElement_get_onchange(HTMLINPUT(This), p);
1012 static HRESULT WINAPI HTMLInputTextElement_put_onselect(IHTMLInputTextElement *iface, VARIANT v)
1014 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
1016 TRACE("(%p)->()\n", This);
1018 return IHTMLInputElement_put_onselect(HTMLINPUT(This), v);
1021 static HRESULT WINAPI HTMLInputTextElement_get_onselect(IHTMLInputTextElement *iface, VARIANT *p)
1023 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
1025 TRACE("(%p)->(%p)\n", This, p);
1027 return IHTMLInputElement_get_onselect(HTMLINPUT(This), p);
1030 static HRESULT WINAPI HTMLInputTextElement_put_readOnly(IHTMLInputTextElement *iface, VARIANT_BOOL v)
1032 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
1034 TRACE("(%p)->(%x)\n", This, v);
1036 return IHTMLInputElement_put_readOnly(HTMLINPUT(This), v);
1039 static HRESULT WINAPI HTMLInputTextElement_get_readOnly(IHTMLInputTextElement *iface, VARIANT_BOOL *p)
1041 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
1043 TRACE("(%p)->(%p)\n", This, p);
1045 return IHTMLInputElement_get_readOnly(HTMLINPUT(This), p);
1048 static HRESULT WINAPI HTMLInputTextElement_createTextRange(IHTMLInputTextElement *iface, IHTMLTxtRange **range)
1050 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
1052 TRACE("(%p)->(%p)\n", This, range);
1054 return IHTMLInputElement_createTextRange(HTMLINPUT(This), range);
1057 #undef HTMLINPUT_THIS
1059 static const IHTMLInputTextElementVtbl HTMLInputTextElementVtbl = {
1060 HTMLInputTextElement_QueryInterface,
1061 HTMLInputTextElement_AddRef,
1062 HTMLInputTextElement_Release,
1063 HTMLInputTextElement_GetTypeInfoCount,
1064 HTMLInputTextElement_GetTypeInfo,
1065 HTMLInputTextElement_GetIDsOfNames,
1066 HTMLInputTextElement_Invoke,
1067 HTMLInputTextElement_get_type,
1068 HTMLInputTextElement_put_value,
1069 HTMLInputTextElement_get_value,
1070 HTMLInputTextElement_put_name,
1071 HTMLInputTextElement_get_name,
1072 HTMLInputTextElement_put_status,
1073 HTMLInputTextElement_get_status,
1074 HTMLInputTextElement_put_disabled,
1075 HTMLInputTextElement_get_disabled,
1076 HTMLInputTextElement_get_form,
1077 HTMLInputTextElement_put_defaultValue,
1078 HTMLInputTextElement_get_defaultValue,
1079 HTMLInputTextElement_put_size,
1080 HTMLInputTextElement_get_size,
1081 HTMLInputTextElement_put_maxLength,
1082 HTMLInputTextElement_get_maxLength,
1083 HTMLInputTextElement_select,
1084 HTMLInputTextElement_put_onchange,
1085 HTMLInputTextElement_get_onchange,
1086 HTMLInputTextElement_put_onselect,
1087 HTMLInputTextElement_get_onselect,
1088 HTMLInputTextElement_put_readOnly,
1089 HTMLInputTextElement_get_readOnly,
1090 HTMLInputTextElement_createTextRange
1093 #define HTMLINPUT_NODE_THIS(iface) DEFINE_THIS2(HTMLInputElement, element.node, iface)
1095 static HRESULT HTMLInputElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
1097 HTMLInputElement *This = HTMLINPUT_NODE_THIS(iface);
1101 if(IsEqualGUID(&IID_IUnknown, riid)) {
1102 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
1103 *ppv = HTMLINPUT(This);
1104 }else if(IsEqualGUID(&IID_IDispatch, riid)) {
1105 TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
1106 *ppv = HTMLINPUT(This);
1107 }else if(IsEqualGUID(&IID_IHTMLInputElement, riid)) {
1108 TRACE("(%p)->(IID_IHTMLInputElement %p)\n", This, ppv);
1109 *ppv = HTMLINPUT(This);
1110 }else if(IsEqualGUID(&IID_IHTMLInputTextElement, riid)) {
1111 TRACE("(%p)->(IID_IHTMLInputTextElement %p)\n", This, ppv);
1112 *ppv = HTMLINPUTTEXT(This);
1116 IUnknown_AddRef((IUnknown*)*ppv);
1120 return HTMLElement_QI(&This->element.node, riid, ppv);
1123 static void HTMLInputElement_destructor(HTMLDOMNode *iface)
1125 HTMLInputElement *This = HTMLINPUT_NODE_THIS(iface);
1127 nsIDOMHTMLInputElement_Release(This->nsinput);
1129 HTMLElement_destructor(&This->element.node);
1132 static HRESULT HTMLInputElementImpl_put_disabled(HTMLDOMNode *iface, VARIANT_BOOL v)
1134 HTMLInputElement *This = HTMLINPUT_NODE_THIS(iface);
1135 return IHTMLInputElement_put_disabled(HTMLINPUT(This), v);
1138 static HRESULT HTMLInputElementImpl_get_disabled(HTMLDOMNode *iface, VARIANT_BOOL *p)
1140 HTMLInputElement *This = HTMLINPUT_NODE_THIS(iface);
1141 return IHTMLInputElement_get_disabled(HTMLINPUT(This), p);
1144 #undef HTMLINPUT_NODE_THIS
1146 static const NodeImplVtbl HTMLInputElementImplVtbl = {
1147 HTMLInputElement_QI,
1148 HTMLInputElement_destructor,
1150 HTMLInputElementImpl_put_disabled,
1151 HTMLInputElementImpl_get_disabled,
1154 static const tid_t HTMLInputElement_iface_tids[] = {
1160 IHTMLInputElement_tid,
1163 static dispex_static_data_t HTMLInputElement_dispex = {
1165 DispHTMLInputElement_tid,
1167 HTMLInputElement_iface_tids
1170 HTMLElement *HTMLInputElement_Create(nsIDOMHTMLElement *nselem)
1172 HTMLInputElement *ret = heap_alloc_zero(sizeof(HTMLInputElement));
1175 ret->lpHTMLInputElementVtbl = &HTMLInputElementVtbl;
1176 ret->lpHTMLInputTextElementVtbl = &HTMLInputTextElementVtbl;
1177 ret->element.node.vtbl = &HTMLInputElementImplVtbl;
1179 init_dispex(&ret->element.node.dispex, (IUnknown*)HTMLINPUT(ret), &HTMLInputElement_dispex);
1180 HTMLElement_Init(&ret->element);
1182 nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLInputElement,
1183 (void**)&ret->nsinput);
1184 if(NS_FAILED(nsres))
1185 ERR("Could not get nsIDOMHTMLInputElement interface: %08x\n", nsres);
1187 return &ret->element;