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
);
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
);
229 FIXME("(%p)->(%x)\n", This
, v
);
233 static HRESULT WINAPI
HTMLInputElement_get_disabled(IHTMLInputElement
*iface
, VARIANT_BOOL
*p
)
235 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
236 PRBool disabled
= FALSE
;
238 TRACE("(%p)->(%p)\n", This
, p
);
240 nsIDOMHTMLInputElement_GetDisabled(This
->nsinput
, &disabled
);
242 *p
= disabled
? VARIANT_TRUE
: VARIANT_FALSE
;
246 static HRESULT WINAPI
HTMLInputElement_get_form(IHTMLInputElement
*iface
, IHTMLFormElement
**p
)
248 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
249 FIXME("(%p)->(%p)\n", This
, p
);
253 static HRESULT WINAPI
HTMLInputElement_put_size(IHTMLInputElement
*iface
, long v
)
255 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
256 FIXME("(%p)->(%ld)\n", This
, v
);
260 static HRESULT WINAPI
HTMLInputElement_get_size(IHTMLInputElement
*iface
, long *p
)
262 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
263 FIXME("(%p)->(%p)\n", This
, p
);
267 static HRESULT WINAPI
HTMLInputElement_put_maxLength(IHTMLInputElement
*iface
, long v
)
269 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
270 FIXME("(%p)->(%ld)\n", This
, v
);
274 static HRESULT WINAPI
HTMLInputElement_get_maxLength(IHTMLInputElement
*iface
, long *p
)
276 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
277 FIXME("(%p)->(%p)\n", This
, p
);
281 static HRESULT WINAPI
HTMLInputElement_select(IHTMLInputElement
*iface
)
283 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
284 FIXME("(%p)\n", This
);
288 static HRESULT WINAPI
HTMLInputElement_put_onchange(IHTMLInputElement
*iface
, VARIANT v
)
290 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
291 FIXME("(%p)->()\n", This
);
295 static HRESULT WINAPI
HTMLInputElement_get_onchange(IHTMLInputElement
*iface
, VARIANT
*p
)
297 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
298 FIXME("(%p)->(%p)\n", This
, p
);
302 static HRESULT WINAPI
HTMLInputElement_put_onselect(IHTMLInputElement
*iface
, VARIANT v
)
304 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
305 FIXME("(%p)->()\n", This
);
309 static HRESULT WINAPI
HTMLInputElement_get_onselect(IHTMLInputElement
*iface
, VARIANT
*p
)
311 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
312 FIXME("(%p)->(%p)\n", This
, p
);
316 static HRESULT WINAPI
HTMLInputElement_put_defaultValue(IHTMLInputElement
*iface
, BSTR v
)
318 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
319 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
323 static HRESULT WINAPI
HTMLInputElement_get_defaultValue(IHTMLInputElement
*iface
, BSTR
*p
)
325 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
326 FIXME("(%p)->(%p)\n", This
, p
);
330 static HRESULT WINAPI
HTMLInputElement_put_readOnly(IHTMLInputElement
*iface
, VARIANT_BOOL v
)
332 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
333 FIXME("(%p)->(%x)\n", This
, v
);
337 static HRESULT WINAPI
HTMLInputElement_get_readOnly(IHTMLInputElement
*iface
, VARIANT_BOOL
*p
)
339 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
340 FIXME("(%p)->(%p)\n", This
, p
);
344 static HRESULT WINAPI
HTMLInputElement_createTextRange(IHTMLInputElement
*iface
, IHTMLTxtRange
**range
)
346 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
347 FIXME("(%p)->(%p)\n", This
, range
);
351 static HRESULT WINAPI
HTMLInputElement_put_indeterminate(IHTMLInputElement
*iface
, VARIANT_BOOL v
)
353 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
354 FIXME("(%p)->(%x)\n", This
, v
);
358 static HRESULT WINAPI
HTMLInputElement_get_indeterminate(IHTMLInputElement
*iface
, VARIANT_BOOL
*p
)
360 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
361 FIXME("(%p)->(%p)\n", This
, p
);
365 static HRESULT WINAPI
HTMLInputElement_put_defaultChecked(IHTMLInputElement
*iface
, VARIANT_BOOL v
)
367 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
368 FIXME("(%p)->(%x)\n", This
, v
);
372 static HRESULT WINAPI
HTMLInputElement_get_defaultChecked(IHTMLInputElement
*iface
, VARIANT_BOOL
*p
)
374 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
375 FIXME("(%p)->(%p)\n", This
, p
);
379 static HRESULT WINAPI
HTMLInputElement_put_checked(IHTMLInputElement
*iface
, VARIANT_BOOL v
)
381 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
382 FIXME("(%p)->(%x)\n", This
, v
);
386 static HRESULT WINAPI
HTMLInputElement_get_checked(IHTMLInputElement
*iface
, VARIANT_BOOL
*p
)
388 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
392 TRACE("(%p)->(%p)\n", This
, p
);
394 nsres
= nsIDOMHTMLInputElement_GetChecked(This
->nsinput
, &checked
);
395 if(NS_FAILED(nsres
)) {
396 ERR("GetChecked failed: %08x\n", nsres
);
400 *p
= checked
? VARIANT_TRUE
: VARIANT_FALSE
;
401 TRACE("checked=%x\n", *p
);
405 static HRESULT WINAPI
HTMLInputElement_put_border(IHTMLInputElement
*iface
, VARIANT v
)
407 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
408 FIXME("(%p)->()\n", This
);
412 static HRESULT WINAPI
HTMLInputElement_get_border(IHTMLInputElement
*iface
, VARIANT
*p
)
414 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
415 FIXME("(%p)->(%p)\n", This
, p
);
419 static HRESULT WINAPI
HTMLInputElement_put_vspace(IHTMLInputElement
*iface
, long v
)
421 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
422 FIXME("(%p)->(%ld)\n", This
, v
);
426 static HRESULT WINAPI
HTMLInputElement_get_vspace(IHTMLInputElement
*iface
, long *p
)
428 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
429 FIXME("(%p)->(%p)\n", This
, p
);
433 static HRESULT WINAPI
HTMLInputElement_put_hspace(IHTMLInputElement
*iface
, long v
)
435 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
436 FIXME("(%p)->(%ld)\n", This
, v
);
440 static HRESULT WINAPI
HTMLInputElement_get_hspace(IHTMLInputElement
*iface
, long *p
)
442 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
443 FIXME("(%p)->(%p)\n", This
, p
);
447 static HRESULT WINAPI
HTMLInputElement_put_alt(IHTMLInputElement
*iface
, BSTR v
)
449 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
450 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
454 static HRESULT WINAPI
HTMLInputElement_get_alt(IHTMLInputElement
*iface
, BSTR
*p
)
456 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
457 FIXME("(%p)->(%p)\n", This
, p
);
461 static HRESULT WINAPI
HTMLInputElement_put_src(IHTMLInputElement
*iface
, BSTR v
)
463 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
464 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
468 static HRESULT WINAPI
HTMLInputElement_get_src(IHTMLInputElement
*iface
, BSTR
*p
)
470 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
471 FIXME("(%p)->(%p)\n", This
, p
);
475 static HRESULT WINAPI
HTMLInputElement_put_lowsrc(IHTMLInputElement
*iface
, BSTR v
)
477 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
478 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
482 static HRESULT WINAPI
HTMLInputElement_get_lowsrc(IHTMLInputElement
*iface
, BSTR
*p
)
484 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
485 FIXME("(%p)->(%p)\n", This
, p
);
489 static HRESULT WINAPI
HTMLInputElement_put_vrml(IHTMLInputElement
*iface
, BSTR v
)
491 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
492 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
496 static HRESULT WINAPI
HTMLInputElement_get_vrml(IHTMLInputElement
*iface
, BSTR
*p
)
498 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
499 FIXME("(%p)->(%p)\n", This
, p
);
503 static HRESULT WINAPI
HTMLInputElement_put_dynsrc(IHTMLInputElement
*iface
, BSTR v
)
505 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
506 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
510 static HRESULT WINAPI
HTMLInputElement_get_dynsrc(IHTMLInputElement
*iface
, BSTR
*p
)
512 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
513 FIXME("(%p)->(%p)\n", This
, p
);
517 static HRESULT WINAPI
HTMLInputElement_get_readyState(IHTMLInputElement
*iface
, BSTR
*p
)
519 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
520 FIXME("(%p)->(%p)\n", This
, p
);
524 static HRESULT WINAPI
HTMLInputElement_get_complete(IHTMLInputElement
*iface
, VARIANT_BOOL
*p
)
526 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
527 FIXME("(%p)->(%p)\n", This
, p
);
531 static HRESULT WINAPI
HTMLInputElement_put_loop(IHTMLInputElement
*iface
, VARIANT v
)
533 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
534 FIXME("(%p)->()\n", This
);
538 static HRESULT WINAPI
HTMLInputElement_get_loop(IHTMLInputElement
*iface
, VARIANT
*p
)
540 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
541 FIXME("(%p)->(%p)\n", This
, p
);
545 static HRESULT WINAPI
HTMLInputElement_put_align(IHTMLInputElement
*iface
, BSTR v
)
547 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
548 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
552 static HRESULT WINAPI
HTMLInputElement_get_align(IHTMLInputElement
*iface
, BSTR
*p
)
554 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
555 FIXME("(%p)->(%p)\n", This
, p
);
559 static HRESULT WINAPI
HTMLInputElement_put_onload(IHTMLInputElement
*iface
, VARIANT v
)
561 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
562 FIXME("(%p)->()\n", This
);
566 static HRESULT WINAPI
HTMLInputElement_get_onload(IHTMLInputElement
*iface
, VARIANT
*p
)
568 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
569 FIXME("(%p)->(%p)\n", This
, p
);
573 static HRESULT WINAPI
HTMLInputElement_put_onerror(IHTMLInputElement
*iface
, VARIANT v
)
575 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
576 FIXME("(%p)->()\n", This
);
580 static HRESULT WINAPI
HTMLInputElement_get_onerror(IHTMLInputElement
*iface
, VARIANT
*p
)
582 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
583 FIXME("(%p)->(%p)\n", This
, p
);
587 static HRESULT WINAPI
HTMLInputElement_put_onabort(IHTMLInputElement
*iface
, VARIANT v
)
589 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
590 FIXME("(%p)->()\n", This
);
594 static HRESULT WINAPI
HTMLInputElement_get_onabort(IHTMLInputElement
*iface
, VARIANT
*p
)
596 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
597 FIXME("(%p)->(%p)\n", This
, p
);
601 static HRESULT WINAPI
HTMLInputElement_put_width(IHTMLInputElement
*iface
, long v
)
603 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
604 FIXME("(%p)->(%ld)\n", This
, v
);
608 static HRESULT WINAPI
HTMLInputElement_get_width(IHTMLInputElement
*iface
, long *p
)
610 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
611 FIXME("(%p)->(%p)\n", This
, p
);
615 static HRESULT WINAPI
HTMLInputElement_put_height(IHTMLInputElement
*iface
, long v
)
617 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
618 FIXME("(%p)->(%ld)\n", This
, v
);
622 static HRESULT WINAPI
HTMLInputElement_get_height(IHTMLInputElement
*iface
, long *p
)
624 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
625 FIXME("(%p)->(%p)\n", This
, p
);
629 static HRESULT WINAPI
HTMLInputElement_put_start(IHTMLInputElement
*iface
, BSTR v
)
631 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
632 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
636 static HRESULT WINAPI
HTMLInputElement_get_start(IHTMLInputElement
*iface
, BSTR
*p
)
638 HTMLInputElement
*This
= HTMLINPUT_THIS(iface
);
639 FIXME("(%p)->(%p)\n", This
, p
);
643 #undef HTMLINPUT_THIS
645 static const IHTMLInputElementVtbl HTMLInputElementVtbl
= {
646 HTMLInputElement_QueryInterface
,
647 HTMLInputElement_AddRef
,
648 HTMLInputElement_Release
,
649 HTMLInputElement_GetTypeInfoCount
,
650 HTMLInputElement_GetTypeInfo
,
651 HTMLInputElement_GetIDsOfNames
,
652 HTMLInputElement_Invoke
,
653 HTMLInputElement_put_type
,
654 HTMLInputElement_get_type
,
655 HTMLInputElement_put_value
,
656 HTMLInputElement_get_value
,
657 HTMLInputElement_put_name
,
658 HTMLInputElement_get_name
,
659 HTMLInputElement_put_status
,
660 HTMLInputElement_get_status
,
661 HTMLInputElement_put_disabled
,
662 HTMLInputElement_get_disabled
,
663 HTMLInputElement_get_form
,
664 HTMLInputElement_put_size
,
665 HTMLInputElement_get_size
,
666 HTMLInputElement_put_maxLength
,
667 HTMLInputElement_get_maxLength
,
668 HTMLInputElement_select
,
669 HTMLInputElement_put_onchange
,
670 HTMLInputElement_get_onchange
,
671 HTMLInputElement_put_onselect
,
672 HTMLInputElement_get_onselect
,
673 HTMLInputElement_put_defaultValue
,
674 HTMLInputElement_get_defaultValue
,
675 HTMLInputElement_put_readOnly
,
676 HTMLInputElement_get_readOnly
,
677 HTMLInputElement_createTextRange
,
678 HTMLInputElement_put_indeterminate
,
679 HTMLInputElement_get_indeterminate
,
680 HTMLInputElement_put_defaultChecked
,
681 HTMLInputElement_get_defaultChecked
,
682 HTMLInputElement_put_checked
,
683 HTMLInputElement_get_checked
,
684 HTMLInputElement_put_border
,
685 HTMLInputElement_get_border
,
686 HTMLInputElement_put_vspace
,
687 HTMLInputElement_get_vspace
,
688 HTMLInputElement_put_hspace
,
689 HTMLInputElement_get_hspace
,
690 HTMLInputElement_put_alt
,
691 HTMLInputElement_get_alt
,
692 HTMLInputElement_put_src
,
693 HTMLInputElement_get_src
,
694 HTMLInputElement_put_lowsrc
,
695 HTMLInputElement_get_lowsrc
,
696 HTMLInputElement_put_vrml
,
697 HTMLInputElement_get_vrml
,
698 HTMLInputElement_put_dynsrc
,
699 HTMLInputElement_get_dynsrc
,
700 HTMLInputElement_get_readyState
,
701 HTMLInputElement_get_complete
,
702 HTMLInputElement_put_loop
,
703 HTMLInputElement_get_loop
,
704 HTMLInputElement_put_align
,
705 HTMLInputElement_get_align
,
706 HTMLInputElement_put_onload
,
707 HTMLInputElement_get_onload
,
708 HTMLInputElement_put_onerror
,
709 HTMLInputElement_get_onerror
,
710 HTMLInputElement_put_onabort
,
711 HTMLInputElement_get_onabort
,
712 HTMLInputElement_put_width
,
713 HTMLInputElement_get_width
,
714 HTMLInputElement_put_height
,
715 HTMLInputElement_get_height
,
716 HTMLInputElement_put_start
,
717 HTMLInputElement_get_start
720 #define HTMLINPUTTEXT_THIS(iface) DEFINE_THIS(HTMLInputElement, HTMLInputTextElement, iface)
722 static HRESULT WINAPI
HTMLInputTextElement_QueryInterface(IHTMLInputTextElement
*iface
,
723 REFIID riid
, void **ppv
)
725 HTMLInputElement
*This
= HTMLINPUTTEXT_THIS(iface
);
727 return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This
->element
.node
), riid
, ppv
);
730 static ULONG WINAPI
HTMLInputTextElement_AddRef(IHTMLInputTextElement
*iface
)
732 HTMLInputElement
*This
= HTMLINPUTTEXT_THIS(iface
);
734 return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This
->element
.node
));
737 static ULONG WINAPI
HTMLInputTextElement_Release(IHTMLInputTextElement
*iface
)
739 HTMLInputElement
*This
= HTMLINPUTTEXT_THIS(iface
);
741 return IHTMLDOMNode_Release(HTMLDOMNODE(&This
->element
.node
));
744 static HRESULT WINAPI
HTMLInputTextElement_GetTypeInfoCount(IHTMLInputTextElement
*iface
, UINT
*pctinfo
)
746 HTMLInputElement
*This
= HTMLINPUTTEXT_THIS(iface
);
747 FIXME("(%p)->(%p)\n", This
, pctinfo
);
751 static HRESULT WINAPI
HTMLInputTextElement_GetTypeInfo(IHTMLInputTextElement
*iface
, UINT iTInfo
,
752 LCID lcid
, ITypeInfo
**ppTInfo
)
754 HTMLInputElement
*This
= HTMLINPUTTEXT_THIS(iface
);
755 FIXME("(%p)->(%u %u %p)\n", This
, iTInfo
, lcid
, ppTInfo
);
759 static HRESULT WINAPI
HTMLInputTextElement_GetIDsOfNames(IHTMLInputTextElement
*iface
, REFIID riid
,
760 LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
762 HTMLInputElement
*This
= HTMLINPUTTEXT_THIS(iface
);
763 FIXME("(%p)->(%s %p %u %u %p)\n", This
, debugstr_guid(riid
), rgszNames
, cNames
,
768 static HRESULT WINAPI
HTMLInputTextElement_Invoke(IHTMLInputTextElement
*iface
, DISPID dispIdMember
,
769 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
770 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
772 HTMLInputElement
*This
= HTMLINPUTTEXT_THIS(iface
);
773 FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This
, dispIdMember
, debugstr_guid(riid
),
774 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
778 static HRESULT WINAPI
HTMLInputTextElement_get_type(IHTMLInputTextElement
*iface
, BSTR
*p
)
780 HTMLInputElement
*This
= HTMLINPUTTEXT_THIS(iface
);
782 TRACE("(%p)->(%p)\n", This
, p
);
784 return IHTMLInputElement_get_type(HTMLINPUT(This
), p
);
787 static HRESULT WINAPI
HTMLInputTextElement_put_value(IHTMLInputTextElement
*iface
, BSTR v
)
789 HTMLInputElement
*This
= HTMLINPUTTEXT_THIS(iface
);
791 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
793 return IHTMLInputElement_put_value(HTMLINPUT(This
), v
);
796 static HRESULT WINAPI
HTMLInputTextElement_get_value(IHTMLInputTextElement
*iface
, BSTR
*p
)
798 HTMLInputElement
*This
= HTMLINPUTTEXT_THIS(iface
);
800 TRACE("(%p)->(%p)\n", This
, p
);
802 return IHTMLInputTextElement_get_value(HTMLINPUT(This
), p
);
805 static HRESULT WINAPI
HTMLInputTextElement_put_name(IHTMLInputTextElement
*iface
, BSTR v
)
807 HTMLInputElement
*This
= HTMLINPUTTEXT_THIS(iface
);
809 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
811 return IHTMLInputElement_put_name(HTMLINPUT(This
), v
);
814 static HRESULT WINAPI
HTMLInputTextElement_get_name(IHTMLInputTextElement
*iface
, BSTR
*p
)
816 HTMLInputElement
*This
= HTMLINPUTTEXT_THIS(iface
);
818 TRACE("(%p)->(%p)\n", This
, p
);
820 return IHTMLInputElement_get_name(HTMLINPUT(This
), p
);
823 static HRESULT WINAPI
HTMLInputTextElement_put_status(IHTMLInputTextElement
*iface
, VARIANT v
)
825 HTMLInputElement
*This
= HTMLINPUTTEXT_THIS(iface
);
826 FIXME("(%p)->(v)\n", This
);
830 static HRESULT WINAPI
HTMLInputTextElement_get_status(IHTMLInputTextElement
*iface
, VARIANT
*p
)
832 HTMLInputElement
*This
= HTMLINPUTTEXT_THIS(iface
);
833 TRACE("(%p)->(v)\n", This
);
837 static HRESULT WINAPI
HTMLInputTextElement_put_disabled(IHTMLInputTextElement
*iface
, VARIANT_BOOL v
)
839 HTMLInputElement
*This
= HTMLINPUTTEXT_THIS(iface
);
841 TRACE("(%p)->(%x)\n", This
, v
);
843 return IHTMLInputElement_put_disabled(HTMLINPUT(This
), v
);
846 static HRESULT WINAPI
HTMLInputTextElement_get_disabled(IHTMLInputTextElement
*iface
, VARIANT_BOOL
*p
)
848 HTMLInputElement
*This
= HTMLINPUTTEXT_THIS(iface
);
850 TRACE("(%p)->(%p)\n", This
, p
);
852 return IHTMLInputElement_get_disabled(HTMLINPUT(This
), p
);
855 static HRESULT WINAPI
HTMLInputTextElement_get_form(IHTMLInputTextElement
*iface
, IHTMLFormElement
**p
)
857 HTMLInputElement
*This
= HTMLINPUTTEXT_THIS(iface
);
859 TRACE("(%p)->(%p)\n", This
, p
);
861 return IHTMLInputElement_get_form(HTMLINPUT(This
), p
);
864 static HRESULT WINAPI
HTMLInputTextElement_put_defaultValue(IHTMLInputTextElement
*iface
, BSTR v
)
866 HTMLInputElement
*This
= HTMLINPUTTEXT_THIS(iface
);
868 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
870 return IHTMLInputElement_put_defaultValue(HTMLINPUT(This
), v
);
873 static HRESULT WINAPI
HTMLInputTextElement_get_defaultValue(IHTMLInputTextElement
*iface
, BSTR
*p
)
875 HTMLInputElement
*This
= HTMLINPUTTEXT_THIS(iface
);
877 TRACE("(%p)->(%p)\n", This
, p
);
879 return IHTMLInputElement_get_defaultValue(HTMLINPUT(This
), p
);
882 static HRESULT WINAPI
HTMLInputTextElement_put_size(IHTMLInputTextElement
*iface
, long v
)
884 HTMLInputElement
*This
= HTMLINPUTTEXT_THIS(iface
);
886 TRACE("(%p)->(%ld)\n", This
, v
);
888 return IHTMLInputElement_put_size(HTMLINPUT(This
), v
);
891 static HRESULT WINAPI
HTMLInputTextElement_get_size(IHTMLInputTextElement
*iface
, long *p
)
893 HTMLInputElement
*This
= HTMLINPUTTEXT_THIS(iface
);
895 TRACE("(%p)->(%p)\n", This
, p
);
897 return IHTMLInputElement_get_size(HTMLINPUT(This
), p
);
900 static HRESULT WINAPI
HTMLInputTextElement_put_maxLength(IHTMLInputTextElement
*iface
, long v
)
902 HTMLInputElement
*This
= HTMLINPUTTEXT_THIS(iface
);
904 TRACE("(%p)->(%ld)\n", This
, v
);
906 return IHTMLInputElement_put_maxLength(HTMLINPUT(This
), v
);
909 static HRESULT WINAPI
HTMLInputTextElement_get_maxLength(IHTMLInputTextElement
*iface
, long *p
)
911 HTMLInputElement
*This
= HTMLINPUTTEXT_THIS(iface
);
913 TRACE("(%p)->(%p)\n", This
, p
);
915 return IHTMLInputElement_get_maxLength(HTMLINPUT(This
), p
);
918 static HRESULT WINAPI
HTMLInputTextElement_select(IHTMLInputTextElement
*iface
)
920 HTMLInputElement
*This
= HTMLINPUTTEXT_THIS(iface
);
922 TRACE("(%p)\n", This
);
924 return IHTMLInputElement_select(HTMLINPUT(This
));
927 static HRESULT WINAPI
HTMLInputTextElement_put_onchange(IHTMLInputTextElement
*iface
, VARIANT v
)
929 HTMLInputElement
*This
= HTMLINPUTTEXT_THIS(iface
);
931 TRACE("(%p)->()\n", This
);
933 return IHTMLInputElement_put_onchange(HTMLINPUT(This
), v
);
936 static HRESULT WINAPI
HTMLInputTextElement_get_onchange(IHTMLInputTextElement
*iface
, VARIANT
*p
)
938 HTMLInputElement
*This
= HTMLINPUTTEXT_THIS(iface
);
940 TRACE("(%p)->(%p)\n", This
, p
);
942 return IHTMLInputElement_get_onchange(HTMLINPUT(This
), p
);
945 static HRESULT WINAPI
HTMLInputTextElement_put_onselect(IHTMLInputTextElement
*iface
, VARIANT v
)
947 HTMLInputElement
*This
= HTMLINPUTTEXT_THIS(iface
);
949 TRACE("(%p)->()\n", This
);
951 return IHTMLInputElement_put_onselect(HTMLINPUT(This
), v
);
954 static HRESULT WINAPI
HTMLInputTextElement_get_onselect(IHTMLInputTextElement
*iface
, VARIANT
*p
)
956 HTMLInputElement
*This
= HTMLINPUTTEXT_THIS(iface
);
958 TRACE("(%p)->(%p)\n", This
, p
);
960 return IHTMLInputElement_get_onselect(HTMLINPUT(This
), p
);
963 static HRESULT WINAPI
HTMLInputTextElement_put_readOnly(IHTMLInputTextElement
*iface
, VARIANT_BOOL v
)
965 HTMLInputElement
*This
= HTMLINPUTTEXT_THIS(iface
);
967 TRACE("(%p)->(%x)\n", This
, v
);
969 return IHTMLInputElement_put_readOnly(HTMLINPUT(This
), v
);
972 static HRESULT WINAPI
HTMLInputTextElement_get_readOnly(IHTMLInputTextElement
*iface
, VARIANT_BOOL
*p
)
974 HTMLInputElement
*This
= HTMLINPUTTEXT_THIS(iface
);
976 TRACE("(%p)->(%p)\n", This
, p
);
978 return IHTMLInputElement_get_readOnly(HTMLINPUT(This
), p
);
981 static HRESULT WINAPI
HTMLInputTextElement_createTextRange(IHTMLInputTextElement
*iface
, IHTMLTxtRange
**range
)
983 HTMLInputElement
*This
= HTMLINPUTTEXT_THIS(iface
);
985 TRACE("(%p)->(%p)\n", This
, range
);
987 return IHTMLInputElement_createTextRange(HTMLINPUT(This
), range
);
990 #undef HTMLINPUT_THIS
992 static const IHTMLInputTextElementVtbl HTMLInputTextElementVtbl
= {
993 HTMLInputTextElement_QueryInterface
,
994 HTMLInputTextElement_AddRef
,
995 HTMLInputTextElement_Release
,
996 HTMLInputTextElement_GetTypeInfoCount
,
997 HTMLInputTextElement_GetTypeInfo
,
998 HTMLInputTextElement_GetIDsOfNames
,
999 HTMLInputTextElement_Invoke
,
1000 HTMLInputTextElement_get_type
,
1001 HTMLInputTextElement_put_value
,
1002 HTMLInputTextElement_get_value
,
1003 HTMLInputTextElement_put_name
,
1004 HTMLInputTextElement_get_name
,
1005 HTMLInputTextElement_put_status
,
1006 HTMLInputTextElement_get_status
,
1007 HTMLInputTextElement_put_disabled
,
1008 HTMLInputTextElement_get_disabled
,
1009 HTMLInputTextElement_get_form
,
1010 HTMLInputTextElement_put_defaultValue
,
1011 HTMLInputTextElement_get_defaultValue
,
1012 HTMLInputTextElement_put_size
,
1013 HTMLInputTextElement_get_size
,
1014 HTMLInputTextElement_put_maxLength
,
1015 HTMLInputTextElement_get_maxLength
,
1016 HTMLInputTextElement_select
,
1017 HTMLInputTextElement_put_onchange
,
1018 HTMLInputTextElement_get_onchange
,
1019 HTMLInputTextElement_put_onselect
,
1020 HTMLInputTextElement_get_onselect
,
1021 HTMLInputTextElement_put_readOnly
,
1022 HTMLInputTextElement_get_readOnly
,
1023 HTMLInputTextElement_createTextRange
1026 #define HTMLINPUT_NODE_THIS(iface) DEFINE_THIS2(HTMLInputElement, element.node, iface)
1028 static HRESULT
HTMLInputElement_QI(HTMLDOMNode
*iface
, REFIID riid
, void **ppv
)
1030 HTMLInputElement
*This
= HTMLINPUT_NODE_THIS(iface
);
1034 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
1035 TRACE("(%p)->(IID_IUnknown %p)\n", This
, ppv
);
1036 *ppv
= HTMLINPUT(This
);
1037 }else if(IsEqualGUID(&IID_IDispatch
, riid
)) {
1038 TRACE("(%p)->(IID_IDispatch %p)\n", This
, ppv
);
1039 *ppv
= HTMLINPUT(This
);
1040 }else if(IsEqualGUID(&IID_IHTMLInputElement
, riid
)) {
1041 TRACE("(%p)->(IID_IHTMLInputElement %p)\n", This
, ppv
);
1042 *ppv
= HTMLINPUT(This
);
1043 }else if(IsEqualGUID(&IID_IHTMLInputTextElement
, riid
)) {
1044 TRACE("(%p)->(IID_IHTMLInputTextElement %p)\n", This
, ppv
);
1045 *ppv
= HTMLINPUT(This
);
1049 IUnknown_AddRef((IUnknown
*)*ppv
);
1053 return HTMLElement_QI(&This
->element
.node
, riid
, ppv
);
1056 static void HTMLInputElement_destructor(HTMLDOMNode
*iface
)
1058 HTMLInputElement
*This
= HTMLINPUT_NODE_THIS(iface
);
1060 nsIDOMHTMLInputElement_Release(This
->nsinput
);
1062 HTMLElement_destructor(&This
->element
.node
);
1065 #undef HTMLINPUT_NODE_THIS
1067 static const NodeImplVtbl HTMLInputElementImplVtbl
= {
1068 HTMLInputElement_QI
,
1069 HTMLInputElement_destructor
1072 static const tid_t HTMLInputElement_iface_tids
[] = {
1077 IHTMLInputElement_tid
,
1080 static dispex_static_data_t HTMLInputElement_dispex
= {
1082 DispHTMLInputElement_tid
,
1084 HTMLInputElement_iface_tids
1087 HTMLElement
*HTMLInputElement_Create(nsIDOMHTMLElement
*nselem
)
1089 HTMLInputElement
*ret
= heap_alloc_zero(sizeof(HTMLInputElement
));
1092 ret
->lpHTMLInputElementVtbl
= &HTMLInputElementVtbl
;
1093 ret
->element
.node
.vtbl
= &HTMLInputElementImplVtbl
;
1095 init_dispex(&ret
->element
.node
.dispex
, (IUnknown
*)HTMLINPUT(ret
), &HTMLInputElement_dispex
);
1096 HTMLElement_Init(&ret
->element
);
1098 nsres
= nsIDOMHTMLElement_QueryInterface(nselem
, &IID_nsIDOMHTMLInputElement
,
1099 (void**)&ret
->nsinput
);
1100 if(NS_FAILED(nsres
))
1101 ERR("Could not get nsIDOMHTMLInputElement interface: %08x\n", nsres
);
1103 return &ret
->element
;