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) ((IHTMLInputTextElement*) &(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);
73 FIXME("(%p)->(%p)\n", This, pctinfo);
77 static HRESULT WINAPI HTMLInputElement_GetTypeInfo(IHTMLInputElement *iface, UINT iTInfo,
78 LCID lcid, ITypeInfo **ppTInfo)
80 HTMLInputElement *This = HTMLINPUT_THIS(iface);
81 FIXME("(%p)->(%u %u %p)\n", This, 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);
90 FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
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);
100 FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
101 lcid, wFlags, 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);
140 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
144 static HRESULT WINAPI HTMLInputElement_get_value(IHTMLInputElement *iface, BSTR *p)
146 HTMLInputElement *This = HTMLINPUT_THIS(iface);
148 const PRUnichar *value = NULL;
151 TRACE("(%p)->(%p)\n", This, p);
153 nsAString_Init(&value_str, NULL);
155 nsres = nsIDOMHTMLInputElement_GetValue(This->nsinput, &value_str);
156 if(NS_SUCCEEDED(nsres)) {
157 nsAString_GetData(&value_str, &value);
158 *p = SysAllocString(value);
160 ERR("GetValue failed: %08x\n", nsres);
163 nsAString_Finish(&value_str);
165 TRACE("value=%s\n", debugstr_w(*p));
169 static HRESULT WINAPI HTMLInputElement_put_name(IHTMLInputElement *iface, BSTR v)
171 HTMLInputElement *This = HTMLINPUT_THIS(iface);
172 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
176 static HRESULT WINAPI HTMLInputElement_get_name(IHTMLInputElement *iface, BSTR *p)
178 HTMLInputElement *This = HTMLINPUT_THIS(iface);
180 const PRUnichar *name;
183 TRACE("(%p)->(%p)\n", This, p);
185 nsAString_Init(&name_str, NULL);
187 nsres = nsIDOMHTMLInputElement_GetName(This->nsinput, &name_str);
188 if(NS_SUCCEEDED(nsres)) {
189 nsAString_GetData(&name_str, &name);
190 *p = SysAllocString(name);
192 ERR("GetName failed: %08x\n", nsres);
196 nsAString_Finish(&name_str);
198 TRACE("name=%s\n", debugstr_w(*p));
202 static HRESULT WINAPI HTMLInputElement_put_status(IHTMLInputElement *iface, VARIANT_BOOL v)
204 HTMLInputElement *This = HTMLINPUT_THIS(iface);
205 FIXME("(%p)->(%x)\n", This, v);
209 static HRESULT WINAPI HTMLInputElement_get_status(IHTMLInputElement *iface, VARIANT_BOOL *p)
211 HTMLInputElement *This = HTMLINPUT_THIS(iface);
212 FIXME("(%p)->(%p)\n", This, p);
216 static HRESULT WINAPI HTMLInputElement_put_disabled(IHTMLInputElement *iface, VARIANT_BOOL v)
218 HTMLInputElement *This = HTMLINPUT_THIS(iface);
219 FIXME("(%p)->(%x)\n", This, v);
223 static HRESULT WINAPI HTMLInputElement_get_disabled(IHTMLInputElement *iface, VARIANT_BOOL *p)
225 HTMLInputElement *This = HTMLINPUT_THIS(iface);
226 FIXME("(%p)->(%p)\n", This, p);
230 static HRESULT WINAPI HTMLInputElement_get_form(IHTMLInputElement *iface, IHTMLFormElement **p)
232 HTMLInputElement *This = HTMLINPUT_THIS(iface);
233 FIXME("(%p)->(%p)\n", This, p);
237 static HRESULT WINAPI HTMLInputElement_put_size(IHTMLInputElement *iface, long v)
239 HTMLInputElement *This = HTMLINPUT_THIS(iface);
240 FIXME("(%p)->(%ld)\n", This, v);
244 static HRESULT WINAPI HTMLInputElement_get_size(IHTMLInputElement *iface, long *p)
246 HTMLInputElement *This = HTMLINPUT_THIS(iface);
247 FIXME("(%p)->(%p)\n", This, p);
251 static HRESULT WINAPI HTMLInputElement_put_maxLength(IHTMLInputElement *iface, long v)
253 HTMLInputElement *This = HTMLINPUT_THIS(iface);
254 FIXME("(%p)->(%ld)\n", This, v);
258 static HRESULT WINAPI HTMLInputElement_get_maxLength(IHTMLInputElement *iface, long *p)
260 HTMLInputElement *This = HTMLINPUT_THIS(iface);
261 FIXME("(%p)->(%p)\n", This, p);
265 static HRESULT WINAPI HTMLInputElement_select(IHTMLInputElement *iface)
267 HTMLInputElement *This = HTMLINPUT_THIS(iface);
268 FIXME("(%p)\n", This);
272 static HRESULT WINAPI HTMLInputElement_put_onchange(IHTMLInputElement *iface, VARIANT v)
274 HTMLInputElement *This = HTMLINPUT_THIS(iface);
275 FIXME("(%p)->()\n", This);
279 static HRESULT WINAPI HTMLInputElement_get_onchange(IHTMLInputElement *iface, VARIANT *p)
281 HTMLInputElement *This = HTMLINPUT_THIS(iface);
282 FIXME("(%p)->(%p)\n", This, p);
286 static HRESULT WINAPI HTMLInputElement_put_onselect(IHTMLInputElement *iface, VARIANT v)
288 HTMLInputElement *This = HTMLINPUT_THIS(iface);
289 FIXME("(%p)->()\n", This);
293 static HRESULT WINAPI HTMLInputElement_get_onselect(IHTMLInputElement *iface, VARIANT *p)
295 HTMLInputElement *This = HTMLINPUT_THIS(iface);
296 FIXME("(%p)->(%p)\n", This, p);
300 static HRESULT WINAPI HTMLInputElement_put_defaultValue(IHTMLInputElement *iface, BSTR v)
302 HTMLInputElement *This = HTMLINPUT_THIS(iface);
303 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
307 static HRESULT WINAPI HTMLInputElement_get_defaultValue(IHTMLInputElement *iface, BSTR *p)
309 HTMLInputElement *This = HTMLINPUT_THIS(iface);
310 FIXME("(%p)->(%p)\n", This, p);
314 static HRESULT WINAPI HTMLInputElement_put_readOnly(IHTMLInputElement *iface, VARIANT_BOOL v)
316 HTMLInputElement *This = HTMLINPUT_THIS(iface);
317 FIXME("(%p)->(%x)\n", This, v);
321 static HRESULT WINAPI HTMLInputElement_get_readOnly(IHTMLInputElement *iface, VARIANT_BOOL *p)
323 HTMLInputElement *This = HTMLINPUT_THIS(iface);
324 FIXME("(%p)->(%p)\n", This, p);
328 static HRESULT WINAPI HTMLInputElement_createTextRange(IHTMLInputElement *iface, IHTMLTxtRange **range)
330 HTMLInputElement *This = HTMLINPUT_THIS(iface);
331 FIXME("(%p)->(%p)\n", This, range);
335 static HRESULT WINAPI HTMLInputElement_put_indeterminate(IHTMLInputElement *iface, VARIANT_BOOL v)
337 HTMLInputElement *This = HTMLINPUT_THIS(iface);
338 FIXME("(%p)->(%x)\n", This, v);
342 static HRESULT WINAPI HTMLInputElement_get_indeterminate(IHTMLInputElement *iface, VARIANT_BOOL *p)
344 HTMLInputElement *This = HTMLINPUT_THIS(iface);
345 FIXME("(%p)->(%p)\n", This, p);
349 static HRESULT WINAPI HTMLInputElement_put_defaultChecked(IHTMLInputElement *iface, VARIANT_BOOL v)
351 HTMLInputElement *This = HTMLINPUT_THIS(iface);
352 FIXME("(%p)->(%x)\n", This, v);
356 static HRESULT WINAPI HTMLInputElement_get_defaultChecked(IHTMLInputElement *iface, VARIANT_BOOL *p)
358 HTMLInputElement *This = HTMLINPUT_THIS(iface);
359 FIXME("(%p)->(%p)\n", This, p);
363 static HRESULT WINAPI HTMLInputElement_put_checked(IHTMLInputElement *iface, VARIANT_BOOL v)
365 HTMLInputElement *This = HTMLINPUT_THIS(iface);
366 FIXME("(%p)->(%x)\n", This, v);
370 static HRESULT WINAPI HTMLInputElement_get_checked(IHTMLInputElement *iface, VARIANT_BOOL *p)
372 HTMLInputElement *This = HTMLINPUT_THIS(iface);
376 TRACE("(%p)->(%p)\n", This, p);
378 nsres = nsIDOMHTMLInputElement_GetChecked(This->nsinput, &checked);
379 if(NS_FAILED(nsres)) {
380 ERR("GetChecked failed: %08x\n", nsres);
384 *p = checked ? VARIANT_TRUE : VARIANT_FALSE;
385 TRACE("checked=%x\n", *p);
389 static HRESULT WINAPI HTMLInputElement_put_border(IHTMLInputElement *iface, VARIANT v)
391 HTMLInputElement *This = HTMLINPUT_THIS(iface);
392 FIXME("(%p)->()\n", This);
396 static HRESULT WINAPI HTMLInputElement_get_border(IHTMLInputElement *iface, VARIANT *p)
398 HTMLInputElement *This = HTMLINPUT_THIS(iface);
399 FIXME("(%p)->(%p)\n", This, p);
403 static HRESULT WINAPI HTMLInputElement_put_vspace(IHTMLInputElement *iface, long v)
405 HTMLInputElement *This = HTMLINPUT_THIS(iface);
406 FIXME("(%p)->(%ld)\n", This, v);
410 static HRESULT WINAPI HTMLInputElement_get_vspace(IHTMLInputElement *iface, long *p)
412 HTMLInputElement *This = HTMLINPUT_THIS(iface);
413 FIXME("(%p)->(%p)\n", This, p);
417 static HRESULT WINAPI HTMLInputElement_put_hspace(IHTMLInputElement *iface, long v)
419 HTMLInputElement *This = HTMLINPUT_THIS(iface);
420 FIXME("(%p)->(%ld)\n", This, v);
424 static HRESULT WINAPI HTMLInputElement_get_hspace(IHTMLInputElement *iface, long *p)
426 HTMLInputElement *This = HTMLINPUT_THIS(iface);
427 FIXME("(%p)->(%p)\n", This, p);
431 static HRESULT WINAPI HTMLInputElement_put_alt(IHTMLInputElement *iface, BSTR v)
433 HTMLInputElement *This = HTMLINPUT_THIS(iface);
434 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
438 static HRESULT WINAPI HTMLInputElement_get_alt(IHTMLInputElement *iface, BSTR *p)
440 HTMLInputElement *This = HTMLINPUT_THIS(iface);
441 FIXME("(%p)->(%p)\n", This, p);
445 static HRESULT WINAPI HTMLInputElement_put_src(IHTMLInputElement *iface, BSTR v)
447 HTMLInputElement *This = HTMLINPUT_THIS(iface);
448 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
452 static HRESULT WINAPI HTMLInputElement_get_src(IHTMLInputElement *iface, BSTR *p)
454 HTMLInputElement *This = HTMLINPUT_THIS(iface);
455 FIXME("(%p)->(%p)\n", This, p);
459 static HRESULT WINAPI HTMLInputElement_put_lowsrc(IHTMLInputElement *iface, BSTR v)
461 HTMLInputElement *This = HTMLINPUT_THIS(iface);
462 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
466 static HRESULT WINAPI HTMLInputElement_get_lowsrc(IHTMLInputElement *iface, BSTR *p)
468 HTMLInputElement *This = HTMLINPUT_THIS(iface);
469 FIXME("(%p)->(%p)\n", This, p);
473 static HRESULT WINAPI HTMLInputElement_put_vrml(IHTMLInputElement *iface, BSTR v)
475 HTMLInputElement *This = HTMLINPUT_THIS(iface);
476 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
480 static HRESULT WINAPI HTMLInputElement_get_vrml(IHTMLInputElement *iface, BSTR *p)
482 HTMLInputElement *This = HTMLINPUT_THIS(iface);
483 FIXME("(%p)->(%p)\n", This, p);
487 static HRESULT WINAPI HTMLInputElement_put_dynsrc(IHTMLInputElement *iface, BSTR v)
489 HTMLInputElement *This = HTMLINPUT_THIS(iface);
490 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
494 static HRESULT WINAPI HTMLInputElement_get_dynsrc(IHTMLInputElement *iface, BSTR *p)
496 HTMLInputElement *This = HTMLINPUT_THIS(iface);
497 FIXME("(%p)->(%p)\n", This, p);
501 static HRESULT WINAPI HTMLInputElement_get_readyState(IHTMLInputElement *iface, BSTR *p)
503 HTMLInputElement *This = HTMLINPUT_THIS(iface);
504 FIXME("(%p)->(%p)\n", This, p);
508 static HRESULT WINAPI HTMLInputElement_get_complete(IHTMLInputElement *iface, VARIANT_BOOL *p)
510 HTMLInputElement *This = HTMLINPUT_THIS(iface);
511 FIXME("(%p)->(%p)\n", This, p);
515 static HRESULT WINAPI HTMLInputElement_put_loop(IHTMLInputElement *iface, VARIANT v)
517 HTMLInputElement *This = HTMLINPUT_THIS(iface);
518 FIXME("(%p)->()\n", This);
522 static HRESULT WINAPI HTMLInputElement_get_loop(IHTMLInputElement *iface, VARIANT *p)
524 HTMLInputElement *This = HTMLINPUT_THIS(iface);
525 FIXME("(%p)->(%p)\n", This, p);
529 static HRESULT WINAPI HTMLInputElement_put_align(IHTMLInputElement *iface, BSTR v)
531 HTMLInputElement *This = HTMLINPUT_THIS(iface);
532 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
536 static HRESULT WINAPI HTMLInputElement_get_align(IHTMLInputElement *iface, BSTR *p)
538 HTMLInputElement *This = HTMLINPUT_THIS(iface);
539 FIXME("(%p)->(%p)\n", This, p);
543 static HRESULT WINAPI HTMLInputElement_put_onload(IHTMLInputElement *iface, VARIANT v)
545 HTMLInputElement *This = HTMLINPUT_THIS(iface);
546 FIXME("(%p)->()\n", This);
550 static HRESULT WINAPI HTMLInputElement_get_onload(IHTMLInputElement *iface, VARIANT *p)
552 HTMLInputElement *This = HTMLINPUT_THIS(iface);
553 FIXME("(%p)->(%p)\n", This, p);
557 static HRESULT WINAPI HTMLInputElement_put_onerror(IHTMLInputElement *iface, VARIANT v)
559 HTMLInputElement *This = HTMLINPUT_THIS(iface);
560 FIXME("(%p)->()\n", This);
564 static HRESULT WINAPI HTMLInputElement_get_onerror(IHTMLInputElement *iface, VARIANT *p)
566 HTMLInputElement *This = HTMLINPUT_THIS(iface);
567 FIXME("(%p)->(%p)\n", This, p);
571 static HRESULT WINAPI HTMLInputElement_put_onabort(IHTMLInputElement *iface, VARIANT v)
573 HTMLInputElement *This = HTMLINPUT_THIS(iface);
574 FIXME("(%p)->()\n", This);
578 static HRESULT WINAPI HTMLInputElement_get_onabort(IHTMLInputElement *iface, VARIANT *p)
580 HTMLInputElement *This = HTMLINPUT_THIS(iface);
581 FIXME("(%p)->(%p)\n", This, p);
585 static HRESULT WINAPI HTMLInputElement_put_width(IHTMLInputElement *iface, long v)
587 HTMLInputElement *This = HTMLINPUT_THIS(iface);
588 FIXME("(%p)->(%ld)\n", This, v);
592 static HRESULT WINAPI HTMLInputElement_get_width(IHTMLInputElement *iface, long *p)
594 HTMLInputElement *This = HTMLINPUT_THIS(iface);
595 FIXME("(%p)->(%p)\n", This, p);
599 static HRESULT WINAPI HTMLInputElement_put_height(IHTMLInputElement *iface, long v)
601 HTMLInputElement *This = HTMLINPUT_THIS(iface);
602 FIXME("(%p)->(%ld)\n", This, v);
606 static HRESULT WINAPI HTMLInputElement_get_height(IHTMLInputElement *iface, long *p)
608 HTMLInputElement *This = HTMLINPUT_THIS(iface);
609 FIXME("(%p)->(%p)\n", This, p);
613 static HRESULT WINAPI HTMLInputElement_put_start(IHTMLInputElement *iface, BSTR v)
615 HTMLInputElement *This = HTMLINPUT_THIS(iface);
616 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
620 static HRESULT WINAPI HTMLInputElement_get_start(IHTMLInputElement *iface, BSTR *p)
622 HTMLInputElement *This = HTMLINPUT_THIS(iface);
623 FIXME("(%p)->(%p)\n", This, p);
627 #undef HTMLINPUT_THIS
629 static const IHTMLInputElementVtbl HTMLInputElementVtbl = {
630 HTMLInputElement_QueryInterface,
631 HTMLInputElement_AddRef,
632 HTMLInputElement_Release,
633 HTMLInputElement_GetTypeInfoCount,
634 HTMLInputElement_GetTypeInfo,
635 HTMLInputElement_GetIDsOfNames,
636 HTMLInputElement_Invoke,
637 HTMLInputElement_put_type,
638 HTMLInputElement_get_type,
639 HTMLInputElement_put_value,
640 HTMLInputElement_get_value,
641 HTMLInputElement_put_name,
642 HTMLInputElement_get_name,
643 HTMLInputElement_put_status,
644 HTMLInputElement_get_status,
645 HTMLInputElement_put_disabled,
646 HTMLInputElement_get_disabled,
647 HTMLInputElement_get_form,
648 HTMLInputElement_put_size,
649 HTMLInputElement_get_size,
650 HTMLInputElement_put_maxLength,
651 HTMLInputElement_get_maxLength,
652 HTMLInputElement_select,
653 HTMLInputElement_put_onchange,
654 HTMLInputElement_get_onchange,
655 HTMLInputElement_put_onselect,
656 HTMLInputElement_get_onselect,
657 HTMLInputElement_put_defaultValue,
658 HTMLInputElement_get_defaultValue,
659 HTMLInputElement_put_readOnly,
660 HTMLInputElement_get_readOnly,
661 HTMLInputElement_createTextRange,
662 HTMLInputElement_put_indeterminate,
663 HTMLInputElement_get_indeterminate,
664 HTMLInputElement_put_defaultChecked,
665 HTMLInputElement_get_defaultChecked,
666 HTMLInputElement_put_checked,
667 HTMLInputElement_get_checked,
668 HTMLInputElement_put_border,
669 HTMLInputElement_get_border,
670 HTMLInputElement_put_vspace,
671 HTMLInputElement_get_vspace,
672 HTMLInputElement_put_hspace,
673 HTMLInputElement_get_hspace,
674 HTMLInputElement_put_alt,
675 HTMLInputElement_get_alt,
676 HTMLInputElement_put_src,
677 HTMLInputElement_get_src,
678 HTMLInputElement_put_lowsrc,
679 HTMLInputElement_get_lowsrc,
680 HTMLInputElement_put_vrml,
681 HTMLInputElement_get_vrml,
682 HTMLInputElement_put_dynsrc,
683 HTMLInputElement_get_dynsrc,
684 HTMLInputElement_get_readyState,
685 HTMLInputElement_get_complete,
686 HTMLInputElement_put_loop,
687 HTMLInputElement_get_loop,
688 HTMLInputElement_put_align,
689 HTMLInputElement_get_align,
690 HTMLInputElement_put_onload,
691 HTMLInputElement_get_onload,
692 HTMLInputElement_put_onerror,
693 HTMLInputElement_get_onerror,
694 HTMLInputElement_put_onabort,
695 HTMLInputElement_get_onabort,
696 HTMLInputElement_put_width,
697 HTMLInputElement_get_width,
698 HTMLInputElement_put_height,
699 HTMLInputElement_get_height,
700 HTMLInputElement_put_start,
701 HTMLInputElement_get_start
704 #define HTMLINPUTTEXT_THIS(iface) DEFINE_THIS(HTMLInputElement, HTMLInputTextElement, iface)
706 static HRESULT WINAPI HTMLInputTextElement_QueryInterface(IHTMLInputTextElement *iface,
707 REFIID riid, void **ppv)
709 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
711 return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
714 static ULONG WINAPI HTMLInputTextElement_AddRef(IHTMLInputTextElement *iface)
716 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
718 return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
721 static ULONG WINAPI HTMLInputTextElement_Release(IHTMLInputTextElement *iface)
723 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
725 return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
728 static HRESULT WINAPI HTMLInputTextElement_GetTypeInfoCount(IHTMLInputTextElement *iface, UINT *pctinfo)
730 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
731 FIXME("(%p)->(%p)\n", This, pctinfo);
735 static HRESULT WINAPI HTMLInputTextElement_GetTypeInfo(IHTMLInputTextElement *iface, UINT iTInfo,
736 LCID lcid, ITypeInfo **ppTInfo)
738 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
739 FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
743 static HRESULT WINAPI HTMLInputTextElement_GetIDsOfNames(IHTMLInputTextElement *iface, REFIID riid,
744 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
746 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
747 FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
752 static HRESULT WINAPI HTMLInputTextElement_Invoke(IHTMLInputTextElement *iface, DISPID dispIdMember,
753 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
754 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
756 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
757 FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
758 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
762 static HRESULT WINAPI HTMLInputTextElement_get_type(IHTMLInputTextElement *iface, BSTR *p)
764 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
766 TRACE("(%p)->(%p)\n", This, p);
768 return IHTMLInputElement_get_type(HTMLINPUT(This), p);
771 static HRESULT WINAPI HTMLInputTextElement_put_value(IHTMLInputTextElement *iface, BSTR v)
773 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
775 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
777 return IHTMLInputElement_put_value(HTMLINPUT(This), v);
780 static HRESULT WINAPI HTMLInputTextElement_get_value(IHTMLInputTextElement *iface, BSTR *p)
782 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
784 TRACE("(%p)->(%p)\n", This, p);
786 return IHTMLInputTextElement_get_value(HTMLINPUT(This), p);
789 static HRESULT WINAPI HTMLInputTextElement_put_name(IHTMLInputTextElement *iface, BSTR v)
791 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
793 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
795 return IHTMLInputElement_put_name(HTMLINPUT(This), v);
798 static HRESULT WINAPI HTMLInputTextElement_get_name(IHTMLInputTextElement *iface, BSTR *p)
800 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
802 TRACE("(%p)->(%p)\n", This, p);
804 return IHTMLInputElement_get_name(HTMLINPUT(This), p);
807 static HRESULT WINAPI HTMLInputTextElement_put_status(IHTMLInputTextElement *iface, VARIANT v)
809 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
810 FIXME("(%p)->(v)\n", This);
814 static HRESULT WINAPI HTMLInputTextElement_get_status(IHTMLInputTextElement *iface, VARIANT *p)
816 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
817 TRACE("(%p)->(v)\n", This);
821 static HRESULT WINAPI HTMLInputTextElement_put_disabled(IHTMLInputTextElement *iface, VARIANT_BOOL v)
823 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
825 TRACE("(%p)->(%x)\n", This, v);
827 return IHTMLInputElement_put_disabled(HTMLINPUT(This), v);
830 static HRESULT WINAPI HTMLInputTextElement_get_disabled(IHTMLInputTextElement *iface, VARIANT_BOOL *p)
832 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
834 TRACE("(%p)->(%p)\n", This, p);
836 return IHTMLInputElement_get_disabled(HTMLINPUT(This), p);
839 static HRESULT WINAPI HTMLInputTextElement_get_form(IHTMLInputTextElement *iface, IHTMLFormElement **p)
841 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
843 TRACE("(%p)->(%p)\n", This, p);
845 return IHTMLInputElement_get_form(HTMLINPUT(This), p);
848 static HRESULT WINAPI HTMLInputTextElement_put_defaultValue(IHTMLInputTextElement *iface, BSTR v)
850 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
852 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
854 return IHTMLInputElement_put_defaultValue(HTMLINPUT(This), v);
857 static HRESULT WINAPI HTMLInputTextElement_get_defaultValue(IHTMLInputTextElement *iface, BSTR *p)
859 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
861 TRACE("(%p)->(%p)\n", This, p);
863 return IHTMLInputElement_get_defaultValue(HTMLINPUT(This), p);
866 static HRESULT WINAPI HTMLInputTextElement_put_size(IHTMLInputTextElement *iface, long v)
868 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
870 TRACE("(%p)->(%ld)\n", This, v);
872 return IHTMLInputElement_put_size(HTMLINPUT(This), v);
875 static HRESULT WINAPI HTMLInputTextElement_get_size(IHTMLInputTextElement *iface, long *p)
877 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
879 TRACE("(%p)->(%p)\n", This, p);
881 return IHTMLInputElement_get_size(HTMLINPUT(This), p);
884 static HRESULT WINAPI HTMLInputTextElement_put_maxLength(IHTMLInputTextElement *iface, long v)
886 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
888 TRACE("(%p)->(%ld)\n", This, v);
890 return IHTMLInputElement_put_maxLength(HTMLINPUT(This), v);
893 static HRESULT WINAPI HTMLInputTextElement_get_maxLength(IHTMLInputTextElement *iface, long *p)
895 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
897 TRACE("(%p)->(%p)\n", This, p);
899 return IHTMLInputElement_get_maxLength(HTMLINPUT(This), p);
902 static HRESULT WINAPI HTMLInputTextElement_select(IHTMLInputTextElement *iface)
904 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
906 TRACE("(%p)\n", This);
908 return IHTMLInputElement_select(HTMLINPUT(This));
911 static HRESULT WINAPI HTMLInputTextElement_put_onchange(IHTMLInputTextElement *iface, VARIANT v)
913 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
915 TRACE("(%p)->()\n", This);
917 return IHTMLInputElement_put_onchange(HTMLINPUT(This), v);
920 static HRESULT WINAPI HTMLInputTextElement_get_onchange(IHTMLInputTextElement *iface, VARIANT *p)
922 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
924 TRACE("(%p)->(%p)\n", This, p);
926 return IHTMLInputElement_get_onchange(HTMLINPUT(This), p);
929 static HRESULT WINAPI HTMLInputTextElement_put_onselect(IHTMLInputTextElement *iface, VARIANT v)
931 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
933 TRACE("(%p)->()\n", This);
935 return IHTMLInputElement_put_onselect(HTMLINPUT(This), v);
938 static HRESULT WINAPI HTMLInputTextElement_get_onselect(IHTMLInputTextElement *iface, VARIANT *p)
940 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
942 TRACE("(%p)->(%p)\n", This, p);
944 return IHTMLInputElement_get_onselect(HTMLINPUT(This), p);
947 static HRESULT WINAPI HTMLInputTextElement_put_readOnly(IHTMLInputTextElement *iface, VARIANT_BOOL v)
949 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
951 TRACE("(%p)->(%x)\n", This, v);
953 return IHTMLInputElement_put_readOnly(HTMLINPUT(This), v);
956 static HRESULT WINAPI HTMLInputTextElement_get_readOnly(IHTMLInputTextElement *iface, VARIANT_BOOL *p)
958 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
960 TRACE("(%p)->(%p)\n", This, p);
962 return IHTMLInputElement_get_readOnly(HTMLINPUT(This), p);
965 static HRESULT WINAPI HTMLInputTextElement_createTextRange(IHTMLInputTextElement *iface, IHTMLTxtRange **range)
967 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
969 TRACE("(%p)->(%p)\n", This, range);
971 return IHTMLInputElement_createTextRange(HTMLINPUT(This), range);
974 #undef HTMLINPUT_THIS
976 static const IHTMLInputTextElementVtbl HTMLInputTextElementVtbl = {
977 HTMLInputTextElement_QueryInterface,
978 HTMLInputTextElement_AddRef,
979 HTMLInputTextElement_Release,
980 HTMLInputTextElement_GetTypeInfoCount,
981 HTMLInputTextElement_GetTypeInfo,
982 HTMLInputTextElement_GetIDsOfNames,
983 HTMLInputTextElement_Invoke,
984 HTMLInputTextElement_get_type,
985 HTMLInputTextElement_put_value,
986 HTMLInputTextElement_get_value,
987 HTMLInputTextElement_put_name,
988 HTMLInputTextElement_get_name,
989 HTMLInputTextElement_put_status,
990 HTMLInputTextElement_get_status,
991 HTMLInputTextElement_put_disabled,
992 HTMLInputTextElement_get_disabled,
993 HTMLInputTextElement_get_form,
994 HTMLInputTextElement_put_defaultValue,
995 HTMLInputTextElement_get_defaultValue,
996 HTMLInputTextElement_put_size,
997 HTMLInputTextElement_get_size,
998 HTMLInputTextElement_put_maxLength,
999 HTMLInputTextElement_get_maxLength,
1000 HTMLInputTextElement_select,
1001 HTMLInputTextElement_put_onchange,
1002 HTMLInputTextElement_get_onchange,
1003 HTMLInputTextElement_put_onselect,
1004 HTMLInputTextElement_get_onselect,
1005 HTMLInputTextElement_put_readOnly,
1006 HTMLInputTextElement_get_readOnly,
1007 HTMLInputTextElement_createTextRange
1010 #define HTMLINPUT_NODE_THIS(iface) DEFINE_THIS2(HTMLInputElement, element.node, iface)
1012 static HRESULT HTMLInputElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
1014 HTMLInputElement *This = HTMLINPUT_NODE_THIS(iface);
1018 if(IsEqualGUID(&IID_IUnknown, riid)) {
1019 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
1020 *ppv = HTMLINPUT(This);
1021 }else if(IsEqualGUID(&IID_IDispatch, riid)) {
1022 TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
1023 *ppv = HTMLINPUT(This);
1024 }else if(IsEqualGUID(&IID_IHTMLInputElement, riid)) {
1025 TRACE("(%p)->(IID_IHTMLInputElement %p)\n", This, ppv);
1026 *ppv = HTMLINPUT(This);
1027 }else if(IsEqualGUID(&IID_IHTMLInputTextElement, riid)) {
1028 TRACE("(%p)->(IID_IHTMLInputTextElement %p)\n", This, ppv);
1029 *ppv = HTMLINPUT(This);
1033 IUnknown_AddRef((IUnknown*)*ppv);
1037 return HTMLElement_QI(&This->element.node, riid, ppv);
1040 static void HTMLInputElement_destructor(HTMLDOMNode *iface)
1042 HTMLInputElement *This = HTMLINPUT_NODE_THIS(iface);
1044 nsIDOMHTMLInputElement_Release(This->nsinput);
1046 HTMLElement_destructor(&This->element.node);
1049 #undef HTMLINPUT_NODE_THIS
1051 static const NodeImplVtbl HTMLInputElementImplVtbl = {
1052 HTMLInputElement_QI,
1053 HTMLInputElement_destructor
1056 HTMLElement *HTMLInputElement_Create(nsIDOMHTMLElement *nselem)
1058 HTMLInputElement *ret = heap_alloc_zero(sizeof(HTMLInputElement));
1061 HTMLElement_Init(&ret->element);
1063 ret->lpHTMLInputElementVtbl = &HTMLInputElementVtbl;
1064 ret->element.node.vtbl = &HTMLInputElementImplVtbl;
1066 nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLInputElement,
1067 (void**)&ret->nsinput);
1068 if(NS_FAILED(nsres))
1069 ERR("Could not get nsIDOMHTMLInputElement interface: %08x\n", nsres);
1071 return &ret->element;