push b79aff4f9e064e6702329573e5ebb8548e254b61
[wine/hacks.git] / dlls / mshtml / htmlinput.c
blob5fc5dd312f8007c7a7aafc620bceddb4d658f09f
1 /*
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
19 #include "config.h"
21 #include <stdarg.h>
22 #include <stdio.h>
24 #define COBJMACROS
26 #include "windef.h"
27 #include "winbase.h"
28 #include "winuser.h"
29 #include "winnls.h"
30 #include "ole2.h"
32 #include "wine/debug.h"
34 #include "mshtml_private.h"
36 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
38 typedef struct {
39 HTMLElement element;
41 const IHTMLInputElementVtbl *lpHTMLInputElementVtbl;
42 const IHTMLInputTextElementVtbl *lpHTMLInputTextElementVtbl;
44 nsIDOMHTMLInputElement *nsinput;
45 } HTMLInputElement;
47 #define HTMLINPUT(x) ((IHTMLInputElement*) &(x)->lpHTMLInputElementVtbl)
48 #define HTMLINPUTTEXT(x) ((IHTMLInputTextElement*) &(x)->lpHTMLInputTextElementVtbl)
50 #define HTMLINPUT_THIS(iface) DEFINE_THIS(HTMLInputElement, HTMLInputElement, iface)
52 static HRESULT WINAPI HTMLInputElement_QueryInterface(IHTMLInputElement *iface,
53 REFIID riid, void **ppv)
55 HTMLInputElement *This = HTMLINPUT_THIS(iface);
57 return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
60 static ULONG WINAPI HTMLInputElement_AddRef(IHTMLInputElement *iface)
62 HTMLInputElement *This = HTMLINPUT_THIS(iface);
64 return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
67 static ULONG WINAPI HTMLInputElement_Release(IHTMLInputElement *iface)
69 HTMLInputElement *This = HTMLINPUT_THIS(iface);
71 return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
74 static HRESULT WINAPI HTMLInputElement_GetTypeInfoCount(IHTMLInputElement *iface, UINT *pctinfo)
76 HTMLInputElement *This = HTMLINPUT_THIS(iface);
77 FIXME("(%p)->(%p)\n", This, pctinfo);
78 return E_NOTIMPL;
81 static HRESULT WINAPI HTMLInputElement_GetTypeInfo(IHTMLInputElement *iface, UINT iTInfo,
82 LCID lcid, ITypeInfo **ppTInfo)
84 HTMLInputElement *This = HTMLINPUT_THIS(iface);
85 FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
86 return E_NOTIMPL;
89 static HRESULT WINAPI HTMLInputElement_GetIDsOfNames(IHTMLInputElement *iface, REFIID riid,
90 LPOLESTR *rgszNames, UINT cNames,
91 LCID lcid, DISPID *rgDispId)
93 HTMLInputElement *This = HTMLINPUT_THIS(iface);
94 FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
95 lcid, rgDispId);
96 return E_NOTIMPL;
99 static HRESULT WINAPI HTMLInputElement_Invoke(IHTMLInputElement *iface, DISPID dispIdMember,
100 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
101 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
103 HTMLInputElement *This = HTMLINPUT_THIS(iface);
104 FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
105 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
106 return E_NOTIMPL;
109 static HRESULT WINAPI HTMLInputElement_put_type(IHTMLInputElement *iface, BSTR v)
111 HTMLInputElement *This = HTMLINPUT_THIS(iface);
112 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
113 return E_NOTIMPL;
116 static HRESULT WINAPI HTMLInputElement_get_type(IHTMLInputElement *iface, BSTR *p)
118 HTMLInputElement *This = HTMLINPUT_THIS(iface);
119 nsAString type_str;
120 const PRUnichar *type;
121 nsresult nsres;
123 TRACE("(%p)->(%p)\n", This, p);
125 nsAString_Init(&type_str, NULL);
126 nsres = nsIDOMHTMLInputElement_GetType(This->nsinput, &type_str);
128 if(NS_SUCCEEDED(nsres)) {
129 nsAString_GetData(&type_str, &type, NULL);
130 *p = SysAllocString(type);
131 }else {
132 ERR("GetType failed: %08x\n", nsres);
135 nsAString_Finish(&type_str);
137 TRACE("type=%s\n", debugstr_w(*p));
138 return S_OK;
141 static HRESULT WINAPI HTMLInputElement_put_value(IHTMLInputElement *iface, BSTR v)
143 HTMLInputElement *This = HTMLINPUT_THIS(iface);
144 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
145 return E_NOTIMPL;
148 static HRESULT WINAPI HTMLInputElement_get_value(IHTMLInputElement *iface, BSTR *p)
150 HTMLInputElement *This = HTMLINPUT_THIS(iface);
151 nsAString value_str;
152 const PRUnichar *value = NULL;
153 nsresult nsres;
155 TRACE("(%p)->(%p)\n", This, p);
157 nsAString_Init(&value_str, NULL);
159 nsres = nsIDOMHTMLInputElement_GetValue(This->nsinput, &value_str);
160 if(NS_SUCCEEDED(nsres)) {
161 nsAString_GetData(&value_str, &value, NULL);
162 *p = SysAllocString(value);
163 }else {
164 ERR("GetValue failed: %08x\n", nsres);
167 nsAString_Finish(&value_str);
169 TRACE("value=%s\n", debugstr_w(*p));
170 return S_OK;
173 static HRESULT WINAPI HTMLInputElement_put_name(IHTMLInputElement *iface, BSTR v)
175 HTMLInputElement *This = HTMLINPUT_THIS(iface);
176 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
177 return E_NOTIMPL;
180 static HRESULT WINAPI HTMLInputElement_get_name(IHTMLInputElement *iface, BSTR *p)
182 HTMLInputElement *This = HTMLINPUT_THIS(iface);
183 nsAString name_str;
184 const PRUnichar *name;
185 nsresult nsres;
187 TRACE("(%p)->(%p)\n", This, p);
189 nsAString_Init(&name_str, NULL);
191 nsres = nsIDOMHTMLInputElement_GetName(This->nsinput, &name_str);
192 if(NS_SUCCEEDED(nsres)) {
193 nsAString_GetData(&name_str, &name, NULL);
194 *p = SysAllocString(name);
195 }else {
196 ERR("GetName failed: %08x\n", nsres);
197 return E_FAIL;
200 nsAString_Finish(&name_str);
202 TRACE("name=%s\n", debugstr_w(*p));
203 return S_OK;
206 static HRESULT WINAPI HTMLInputElement_put_status(IHTMLInputElement *iface, VARIANT_BOOL v)
208 HTMLInputElement *This = HTMLINPUT_THIS(iface);
209 FIXME("(%p)->(%x)\n", This, v);
210 return E_NOTIMPL;
213 static HRESULT WINAPI HTMLInputElement_get_status(IHTMLInputElement *iface, VARIANT_BOOL *p)
215 HTMLInputElement *This = HTMLINPUT_THIS(iface);
216 FIXME("(%p)->(%p)\n", This, p);
217 return E_NOTIMPL;
220 static HRESULT WINAPI HTMLInputElement_put_disabled(IHTMLInputElement *iface, VARIANT_BOOL v)
222 HTMLInputElement *This = HTMLINPUT_THIS(iface);
223 FIXME("(%p)->(%x)\n", This, v);
224 return E_NOTIMPL;
227 static HRESULT WINAPI HTMLInputElement_get_disabled(IHTMLInputElement *iface, VARIANT_BOOL *p)
229 HTMLInputElement *This = HTMLINPUT_THIS(iface);
230 FIXME("(%p)->(%p)\n", This, p);
231 return E_NOTIMPL;
234 static HRESULT WINAPI HTMLInputElement_get_form(IHTMLInputElement *iface, IHTMLFormElement **p)
236 HTMLInputElement *This = HTMLINPUT_THIS(iface);
237 FIXME("(%p)->(%p)\n", This, p);
238 return E_NOTIMPL;
241 static HRESULT WINAPI HTMLInputElement_put_size(IHTMLInputElement *iface, long v)
243 HTMLInputElement *This = HTMLINPUT_THIS(iface);
244 FIXME("(%p)->(%ld)\n", This, v);
245 return E_NOTIMPL;
248 static HRESULT WINAPI HTMLInputElement_get_size(IHTMLInputElement *iface, long *p)
250 HTMLInputElement *This = HTMLINPUT_THIS(iface);
251 FIXME("(%p)->(%p)\n", This, p);
252 return E_NOTIMPL;
255 static HRESULT WINAPI HTMLInputElement_put_maxLength(IHTMLInputElement *iface, long v)
257 HTMLInputElement *This = HTMLINPUT_THIS(iface);
258 FIXME("(%p)->(%ld)\n", This, v);
259 return E_NOTIMPL;
262 static HRESULT WINAPI HTMLInputElement_get_maxLength(IHTMLInputElement *iface, long *p)
264 HTMLInputElement *This = HTMLINPUT_THIS(iface);
265 FIXME("(%p)->(%p)\n", This, p);
266 return E_NOTIMPL;
269 static HRESULT WINAPI HTMLInputElement_select(IHTMLInputElement *iface)
271 HTMLInputElement *This = HTMLINPUT_THIS(iface);
272 FIXME("(%p)\n", This);
273 return E_NOTIMPL;
276 static HRESULT WINAPI HTMLInputElement_put_onchange(IHTMLInputElement *iface, VARIANT v)
278 HTMLInputElement *This = HTMLINPUT_THIS(iface);
279 FIXME("(%p)->()\n", This);
280 return E_NOTIMPL;
283 static HRESULT WINAPI HTMLInputElement_get_onchange(IHTMLInputElement *iface, VARIANT *p)
285 HTMLInputElement *This = HTMLINPUT_THIS(iface);
286 FIXME("(%p)->(%p)\n", This, p);
287 return E_NOTIMPL;
290 static HRESULT WINAPI HTMLInputElement_put_onselect(IHTMLInputElement *iface, VARIANT v)
292 HTMLInputElement *This = HTMLINPUT_THIS(iface);
293 FIXME("(%p)->()\n", This);
294 return E_NOTIMPL;
297 static HRESULT WINAPI HTMLInputElement_get_onselect(IHTMLInputElement *iface, VARIANT *p)
299 HTMLInputElement *This = HTMLINPUT_THIS(iface);
300 FIXME("(%p)->(%p)\n", This, p);
301 return E_NOTIMPL;
304 static HRESULT WINAPI HTMLInputElement_put_defaultValue(IHTMLInputElement *iface, BSTR v)
306 HTMLInputElement *This = HTMLINPUT_THIS(iface);
307 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
308 return E_NOTIMPL;
311 static HRESULT WINAPI HTMLInputElement_get_defaultValue(IHTMLInputElement *iface, BSTR *p)
313 HTMLInputElement *This = HTMLINPUT_THIS(iface);
314 FIXME("(%p)->(%p)\n", This, p);
315 return E_NOTIMPL;
318 static HRESULT WINAPI HTMLInputElement_put_readOnly(IHTMLInputElement *iface, VARIANT_BOOL v)
320 HTMLInputElement *This = HTMLINPUT_THIS(iface);
321 FIXME("(%p)->(%x)\n", This, v);
322 return E_NOTIMPL;
325 static HRESULT WINAPI HTMLInputElement_get_readOnly(IHTMLInputElement *iface, VARIANT_BOOL *p)
327 HTMLInputElement *This = HTMLINPUT_THIS(iface);
328 FIXME("(%p)->(%p)\n", This, p);
329 return E_NOTIMPL;
332 static HRESULT WINAPI HTMLInputElement_createTextRange(IHTMLInputElement *iface, IHTMLTxtRange **range)
334 HTMLInputElement *This = HTMLINPUT_THIS(iface);
335 FIXME("(%p)->(%p)\n", This, range);
336 return E_NOTIMPL;
339 static HRESULT WINAPI HTMLInputElement_put_indeterminate(IHTMLInputElement *iface, VARIANT_BOOL v)
341 HTMLInputElement *This = HTMLINPUT_THIS(iface);
342 FIXME("(%p)->(%x)\n", This, v);
343 return E_NOTIMPL;
346 static HRESULT WINAPI HTMLInputElement_get_indeterminate(IHTMLInputElement *iface, VARIANT_BOOL *p)
348 HTMLInputElement *This = HTMLINPUT_THIS(iface);
349 FIXME("(%p)->(%p)\n", This, p);
350 return E_NOTIMPL;
353 static HRESULT WINAPI HTMLInputElement_put_defaultChecked(IHTMLInputElement *iface, VARIANT_BOOL v)
355 HTMLInputElement *This = HTMLINPUT_THIS(iface);
356 FIXME("(%p)->(%x)\n", This, v);
357 return E_NOTIMPL;
360 static HRESULT WINAPI HTMLInputElement_get_defaultChecked(IHTMLInputElement *iface, VARIANT_BOOL *p)
362 HTMLInputElement *This = HTMLINPUT_THIS(iface);
363 FIXME("(%p)->(%p)\n", This, p);
364 return E_NOTIMPL;
367 static HRESULT WINAPI HTMLInputElement_put_checked(IHTMLInputElement *iface, VARIANT_BOOL v)
369 HTMLInputElement *This = HTMLINPUT_THIS(iface);
370 FIXME("(%p)->(%x)\n", This, v);
371 return E_NOTIMPL;
374 static HRESULT WINAPI HTMLInputElement_get_checked(IHTMLInputElement *iface, VARIANT_BOOL *p)
376 HTMLInputElement *This = HTMLINPUT_THIS(iface);
377 PRBool checked;
378 nsresult nsres;
380 TRACE("(%p)->(%p)\n", This, p);
382 nsres = nsIDOMHTMLInputElement_GetChecked(This->nsinput, &checked);
383 if(NS_FAILED(nsres)) {
384 ERR("GetChecked failed: %08x\n", nsres);
385 return E_FAIL;
388 *p = checked ? VARIANT_TRUE : VARIANT_FALSE;
389 TRACE("checked=%x\n", *p);
390 return S_OK;
393 static HRESULT WINAPI HTMLInputElement_put_border(IHTMLInputElement *iface, VARIANT v)
395 HTMLInputElement *This = HTMLINPUT_THIS(iface);
396 FIXME("(%p)->()\n", This);
397 return E_NOTIMPL;
400 static HRESULT WINAPI HTMLInputElement_get_border(IHTMLInputElement *iface, VARIANT *p)
402 HTMLInputElement *This = HTMLINPUT_THIS(iface);
403 FIXME("(%p)->(%p)\n", This, p);
404 return E_NOTIMPL;
407 static HRESULT WINAPI HTMLInputElement_put_vspace(IHTMLInputElement *iface, long v)
409 HTMLInputElement *This = HTMLINPUT_THIS(iface);
410 FIXME("(%p)->(%ld)\n", This, v);
411 return E_NOTIMPL;
414 static HRESULT WINAPI HTMLInputElement_get_vspace(IHTMLInputElement *iface, long *p)
416 HTMLInputElement *This = HTMLINPUT_THIS(iface);
417 FIXME("(%p)->(%p)\n", This, p);
418 return E_NOTIMPL;
421 static HRESULT WINAPI HTMLInputElement_put_hspace(IHTMLInputElement *iface, long v)
423 HTMLInputElement *This = HTMLINPUT_THIS(iface);
424 FIXME("(%p)->(%ld)\n", This, v);
425 return E_NOTIMPL;
428 static HRESULT WINAPI HTMLInputElement_get_hspace(IHTMLInputElement *iface, long *p)
430 HTMLInputElement *This = HTMLINPUT_THIS(iface);
431 FIXME("(%p)->(%p)\n", This, p);
432 return E_NOTIMPL;
435 static HRESULT WINAPI HTMLInputElement_put_alt(IHTMLInputElement *iface, BSTR v)
437 HTMLInputElement *This = HTMLINPUT_THIS(iface);
438 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
439 return E_NOTIMPL;
442 static HRESULT WINAPI HTMLInputElement_get_alt(IHTMLInputElement *iface, BSTR *p)
444 HTMLInputElement *This = HTMLINPUT_THIS(iface);
445 FIXME("(%p)->(%p)\n", This, p);
446 return E_NOTIMPL;
449 static HRESULT WINAPI HTMLInputElement_put_src(IHTMLInputElement *iface, BSTR v)
451 HTMLInputElement *This = HTMLINPUT_THIS(iface);
452 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
453 return E_NOTIMPL;
456 static HRESULT WINAPI HTMLInputElement_get_src(IHTMLInputElement *iface, BSTR *p)
458 HTMLInputElement *This = HTMLINPUT_THIS(iface);
459 FIXME("(%p)->(%p)\n", This, p);
460 return E_NOTIMPL;
463 static HRESULT WINAPI HTMLInputElement_put_lowsrc(IHTMLInputElement *iface, BSTR v)
465 HTMLInputElement *This = HTMLINPUT_THIS(iface);
466 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
467 return E_NOTIMPL;
470 static HRESULT WINAPI HTMLInputElement_get_lowsrc(IHTMLInputElement *iface, BSTR *p)
472 HTMLInputElement *This = HTMLINPUT_THIS(iface);
473 FIXME("(%p)->(%p)\n", This, p);
474 return E_NOTIMPL;
477 static HRESULT WINAPI HTMLInputElement_put_vrml(IHTMLInputElement *iface, BSTR v)
479 HTMLInputElement *This = HTMLINPUT_THIS(iface);
480 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
481 return E_NOTIMPL;
484 static HRESULT WINAPI HTMLInputElement_get_vrml(IHTMLInputElement *iface, BSTR *p)
486 HTMLInputElement *This = HTMLINPUT_THIS(iface);
487 FIXME("(%p)->(%p)\n", This, p);
488 return E_NOTIMPL;
491 static HRESULT WINAPI HTMLInputElement_put_dynsrc(IHTMLInputElement *iface, BSTR v)
493 HTMLInputElement *This = HTMLINPUT_THIS(iface);
494 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
495 return E_NOTIMPL;
498 static HRESULT WINAPI HTMLInputElement_get_dynsrc(IHTMLInputElement *iface, BSTR *p)
500 HTMLInputElement *This = HTMLINPUT_THIS(iface);
501 FIXME("(%p)->(%p)\n", This, p);
502 return E_NOTIMPL;
505 static HRESULT WINAPI HTMLInputElement_get_readyState(IHTMLInputElement *iface, BSTR *p)
507 HTMLInputElement *This = HTMLINPUT_THIS(iface);
508 FIXME("(%p)->(%p)\n", This, p);
509 return E_NOTIMPL;
512 static HRESULT WINAPI HTMLInputElement_get_complete(IHTMLInputElement *iface, VARIANT_BOOL *p)
514 HTMLInputElement *This = HTMLINPUT_THIS(iface);
515 FIXME("(%p)->(%p)\n", This, p);
516 return E_NOTIMPL;
519 static HRESULT WINAPI HTMLInputElement_put_loop(IHTMLInputElement *iface, VARIANT v)
521 HTMLInputElement *This = HTMLINPUT_THIS(iface);
522 FIXME("(%p)->()\n", This);
523 return E_NOTIMPL;
526 static HRESULT WINAPI HTMLInputElement_get_loop(IHTMLInputElement *iface, VARIANT *p)
528 HTMLInputElement *This = HTMLINPUT_THIS(iface);
529 FIXME("(%p)->(%p)\n", This, p);
530 return E_NOTIMPL;
533 static HRESULT WINAPI HTMLInputElement_put_align(IHTMLInputElement *iface, BSTR v)
535 HTMLInputElement *This = HTMLINPUT_THIS(iface);
536 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
537 return E_NOTIMPL;
540 static HRESULT WINAPI HTMLInputElement_get_align(IHTMLInputElement *iface, BSTR *p)
542 HTMLInputElement *This = HTMLINPUT_THIS(iface);
543 FIXME("(%p)->(%p)\n", This, p);
544 return E_NOTIMPL;
547 static HRESULT WINAPI HTMLInputElement_put_onload(IHTMLInputElement *iface, VARIANT v)
549 HTMLInputElement *This = HTMLINPUT_THIS(iface);
550 FIXME("(%p)->()\n", This);
551 return E_NOTIMPL;
554 static HRESULT WINAPI HTMLInputElement_get_onload(IHTMLInputElement *iface, VARIANT *p)
556 HTMLInputElement *This = HTMLINPUT_THIS(iface);
557 FIXME("(%p)->(%p)\n", This, p);
558 return E_NOTIMPL;
561 static HRESULT WINAPI HTMLInputElement_put_onerror(IHTMLInputElement *iface, VARIANT v)
563 HTMLInputElement *This = HTMLINPUT_THIS(iface);
564 FIXME("(%p)->()\n", This);
565 return E_NOTIMPL;
568 static HRESULT WINAPI HTMLInputElement_get_onerror(IHTMLInputElement *iface, VARIANT *p)
570 HTMLInputElement *This = HTMLINPUT_THIS(iface);
571 FIXME("(%p)->(%p)\n", This, p);
572 return E_NOTIMPL;
575 static HRESULT WINAPI HTMLInputElement_put_onabort(IHTMLInputElement *iface, VARIANT v)
577 HTMLInputElement *This = HTMLINPUT_THIS(iface);
578 FIXME("(%p)->()\n", This);
579 return E_NOTIMPL;
582 static HRESULT WINAPI HTMLInputElement_get_onabort(IHTMLInputElement *iface, VARIANT *p)
584 HTMLInputElement *This = HTMLINPUT_THIS(iface);
585 FIXME("(%p)->(%p)\n", This, p);
586 return E_NOTIMPL;
589 static HRESULT WINAPI HTMLInputElement_put_width(IHTMLInputElement *iface, long v)
591 HTMLInputElement *This = HTMLINPUT_THIS(iface);
592 FIXME("(%p)->(%ld)\n", This, v);
593 return E_NOTIMPL;
596 static HRESULT WINAPI HTMLInputElement_get_width(IHTMLInputElement *iface, long *p)
598 HTMLInputElement *This = HTMLINPUT_THIS(iface);
599 FIXME("(%p)->(%p)\n", This, p);
600 return E_NOTIMPL;
603 static HRESULT WINAPI HTMLInputElement_put_height(IHTMLInputElement *iface, long v)
605 HTMLInputElement *This = HTMLINPUT_THIS(iface);
606 FIXME("(%p)->(%ld)\n", This, v);
607 return E_NOTIMPL;
610 static HRESULT WINAPI HTMLInputElement_get_height(IHTMLInputElement *iface, long *p)
612 HTMLInputElement *This = HTMLINPUT_THIS(iface);
613 FIXME("(%p)->(%p)\n", This, p);
614 return E_NOTIMPL;
617 static HRESULT WINAPI HTMLInputElement_put_start(IHTMLInputElement *iface, BSTR v)
619 HTMLInputElement *This = HTMLINPUT_THIS(iface);
620 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
621 return E_NOTIMPL;
624 static HRESULT WINAPI HTMLInputElement_get_start(IHTMLInputElement *iface, BSTR *p)
626 HTMLInputElement *This = HTMLINPUT_THIS(iface);
627 FIXME("(%p)->(%p)\n", This, p);
628 return E_NOTIMPL;
631 #undef HTMLINPUT_THIS
633 static const IHTMLInputElementVtbl HTMLInputElementVtbl = {
634 HTMLInputElement_QueryInterface,
635 HTMLInputElement_AddRef,
636 HTMLInputElement_Release,
637 HTMLInputElement_GetTypeInfoCount,
638 HTMLInputElement_GetTypeInfo,
639 HTMLInputElement_GetIDsOfNames,
640 HTMLInputElement_Invoke,
641 HTMLInputElement_put_type,
642 HTMLInputElement_get_type,
643 HTMLInputElement_put_value,
644 HTMLInputElement_get_value,
645 HTMLInputElement_put_name,
646 HTMLInputElement_get_name,
647 HTMLInputElement_put_status,
648 HTMLInputElement_get_status,
649 HTMLInputElement_put_disabled,
650 HTMLInputElement_get_disabled,
651 HTMLInputElement_get_form,
652 HTMLInputElement_put_size,
653 HTMLInputElement_get_size,
654 HTMLInputElement_put_maxLength,
655 HTMLInputElement_get_maxLength,
656 HTMLInputElement_select,
657 HTMLInputElement_put_onchange,
658 HTMLInputElement_get_onchange,
659 HTMLInputElement_put_onselect,
660 HTMLInputElement_get_onselect,
661 HTMLInputElement_put_defaultValue,
662 HTMLInputElement_get_defaultValue,
663 HTMLInputElement_put_readOnly,
664 HTMLInputElement_get_readOnly,
665 HTMLInputElement_createTextRange,
666 HTMLInputElement_put_indeterminate,
667 HTMLInputElement_get_indeterminate,
668 HTMLInputElement_put_defaultChecked,
669 HTMLInputElement_get_defaultChecked,
670 HTMLInputElement_put_checked,
671 HTMLInputElement_get_checked,
672 HTMLInputElement_put_border,
673 HTMLInputElement_get_border,
674 HTMLInputElement_put_vspace,
675 HTMLInputElement_get_vspace,
676 HTMLInputElement_put_hspace,
677 HTMLInputElement_get_hspace,
678 HTMLInputElement_put_alt,
679 HTMLInputElement_get_alt,
680 HTMLInputElement_put_src,
681 HTMLInputElement_get_src,
682 HTMLInputElement_put_lowsrc,
683 HTMLInputElement_get_lowsrc,
684 HTMLInputElement_put_vrml,
685 HTMLInputElement_get_vrml,
686 HTMLInputElement_put_dynsrc,
687 HTMLInputElement_get_dynsrc,
688 HTMLInputElement_get_readyState,
689 HTMLInputElement_get_complete,
690 HTMLInputElement_put_loop,
691 HTMLInputElement_get_loop,
692 HTMLInputElement_put_align,
693 HTMLInputElement_get_align,
694 HTMLInputElement_put_onload,
695 HTMLInputElement_get_onload,
696 HTMLInputElement_put_onerror,
697 HTMLInputElement_get_onerror,
698 HTMLInputElement_put_onabort,
699 HTMLInputElement_get_onabort,
700 HTMLInputElement_put_width,
701 HTMLInputElement_get_width,
702 HTMLInputElement_put_height,
703 HTMLInputElement_get_height,
704 HTMLInputElement_put_start,
705 HTMLInputElement_get_start
708 #define HTMLINPUTTEXT_THIS(iface) DEFINE_THIS(HTMLInputElement, HTMLInputTextElement, iface)
710 static HRESULT WINAPI HTMLInputTextElement_QueryInterface(IHTMLInputTextElement *iface,
711 REFIID riid, void **ppv)
713 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
715 return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
718 static ULONG WINAPI HTMLInputTextElement_AddRef(IHTMLInputTextElement *iface)
720 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
722 return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
725 static ULONG WINAPI HTMLInputTextElement_Release(IHTMLInputTextElement *iface)
727 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
729 return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
732 static HRESULT WINAPI HTMLInputTextElement_GetTypeInfoCount(IHTMLInputTextElement *iface, UINT *pctinfo)
734 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
735 FIXME("(%p)->(%p)\n", This, pctinfo);
736 return E_NOTIMPL;
739 static HRESULT WINAPI HTMLInputTextElement_GetTypeInfo(IHTMLInputTextElement *iface, UINT iTInfo,
740 LCID lcid, ITypeInfo **ppTInfo)
742 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
743 FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
744 return E_NOTIMPL;
747 static HRESULT WINAPI HTMLInputTextElement_GetIDsOfNames(IHTMLInputTextElement *iface, REFIID riid,
748 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
750 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
751 FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
752 lcid, rgDispId);
753 return E_NOTIMPL;
756 static HRESULT WINAPI HTMLInputTextElement_Invoke(IHTMLInputTextElement *iface, DISPID dispIdMember,
757 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
758 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
760 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
761 FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
762 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
763 return E_NOTIMPL;
766 static HRESULT WINAPI HTMLInputTextElement_get_type(IHTMLInputTextElement *iface, BSTR *p)
768 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
770 TRACE("(%p)->(%p)\n", This, p);
772 return IHTMLInputElement_get_type(HTMLINPUT(This), p);
775 static HRESULT WINAPI HTMLInputTextElement_put_value(IHTMLInputTextElement *iface, BSTR v)
777 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
779 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
781 return IHTMLInputElement_put_value(HTMLINPUT(This), v);
784 static HRESULT WINAPI HTMLInputTextElement_get_value(IHTMLInputTextElement *iface, BSTR *p)
786 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
788 TRACE("(%p)->(%p)\n", This, p);
790 return IHTMLInputTextElement_get_value(HTMLINPUT(This), p);
793 static HRESULT WINAPI HTMLInputTextElement_put_name(IHTMLInputTextElement *iface, BSTR v)
795 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
797 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
799 return IHTMLInputElement_put_name(HTMLINPUT(This), v);
802 static HRESULT WINAPI HTMLInputTextElement_get_name(IHTMLInputTextElement *iface, BSTR *p)
804 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
806 TRACE("(%p)->(%p)\n", This, p);
808 return IHTMLInputElement_get_name(HTMLINPUT(This), p);
811 static HRESULT WINAPI HTMLInputTextElement_put_status(IHTMLInputTextElement *iface, VARIANT v)
813 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
814 FIXME("(%p)->(v)\n", This);
815 return E_NOTIMPL;
818 static HRESULT WINAPI HTMLInputTextElement_get_status(IHTMLInputTextElement *iface, VARIANT *p)
820 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
821 TRACE("(%p)->(v)\n", This);
822 return E_NOTIMPL;
825 static HRESULT WINAPI HTMLInputTextElement_put_disabled(IHTMLInputTextElement *iface, VARIANT_BOOL v)
827 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
829 TRACE("(%p)->(%x)\n", This, v);
831 return IHTMLInputElement_put_disabled(HTMLINPUT(This), v);
834 static HRESULT WINAPI HTMLInputTextElement_get_disabled(IHTMLInputTextElement *iface, VARIANT_BOOL *p)
836 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
838 TRACE("(%p)->(%p)\n", This, p);
840 return IHTMLInputElement_get_disabled(HTMLINPUT(This), p);
843 static HRESULT WINAPI HTMLInputTextElement_get_form(IHTMLInputTextElement *iface, IHTMLFormElement **p)
845 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
847 TRACE("(%p)->(%p)\n", This, p);
849 return IHTMLInputElement_get_form(HTMLINPUT(This), p);
852 static HRESULT WINAPI HTMLInputTextElement_put_defaultValue(IHTMLInputTextElement *iface, BSTR v)
854 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
856 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
858 return IHTMLInputElement_put_defaultValue(HTMLINPUT(This), v);
861 static HRESULT WINAPI HTMLInputTextElement_get_defaultValue(IHTMLInputTextElement *iface, BSTR *p)
863 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
865 TRACE("(%p)->(%p)\n", This, p);
867 return IHTMLInputElement_get_defaultValue(HTMLINPUT(This), p);
870 static HRESULT WINAPI HTMLInputTextElement_put_size(IHTMLInputTextElement *iface, long v)
872 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
874 TRACE("(%p)->(%ld)\n", This, v);
876 return IHTMLInputElement_put_size(HTMLINPUT(This), v);
879 static HRESULT WINAPI HTMLInputTextElement_get_size(IHTMLInputTextElement *iface, long *p)
881 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
883 TRACE("(%p)->(%p)\n", This, p);
885 return IHTMLInputElement_get_size(HTMLINPUT(This), p);
888 static HRESULT WINAPI HTMLInputTextElement_put_maxLength(IHTMLInputTextElement *iface, long v)
890 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
892 TRACE("(%p)->(%ld)\n", This, v);
894 return IHTMLInputElement_put_maxLength(HTMLINPUT(This), v);
897 static HRESULT WINAPI HTMLInputTextElement_get_maxLength(IHTMLInputTextElement *iface, long *p)
899 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
901 TRACE("(%p)->(%p)\n", This, p);
903 return IHTMLInputElement_get_maxLength(HTMLINPUT(This), p);
906 static HRESULT WINAPI HTMLInputTextElement_select(IHTMLInputTextElement *iface)
908 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
910 TRACE("(%p)\n", This);
912 return IHTMLInputElement_select(HTMLINPUT(This));
915 static HRESULT WINAPI HTMLInputTextElement_put_onchange(IHTMLInputTextElement *iface, VARIANT v)
917 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
919 TRACE("(%p)->()\n", This);
921 return IHTMLInputElement_put_onchange(HTMLINPUT(This), v);
924 static HRESULT WINAPI HTMLInputTextElement_get_onchange(IHTMLInputTextElement *iface, VARIANT *p)
926 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
928 TRACE("(%p)->(%p)\n", This, p);
930 return IHTMLInputElement_get_onchange(HTMLINPUT(This), p);
933 static HRESULT WINAPI HTMLInputTextElement_put_onselect(IHTMLInputTextElement *iface, VARIANT v)
935 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
937 TRACE("(%p)->()\n", This);
939 return IHTMLInputElement_put_onselect(HTMLINPUT(This), v);
942 static HRESULT WINAPI HTMLInputTextElement_get_onselect(IHTMLInputTextElement *iface, VARIANT *p)
944 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
946 TRACE("(%p)->(%p)\n", This, p);
948 return IHTMLInputElement_get_onselect(HTMLINPUT(This), p);
951 static HRESULT WINAPI HTMLInputTextElement_put_readOnly(IHTMLInputTextElement *iface, VARIANT_BOOL v)
953 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
955 TRACE("(%p)->(%x)\n", This, v);
957 return IHTMLInputElement_put_readOnly(HTMLINPUT(This), v);
960 static HRESULT WINAPI HTMLInputTextElement_get_readOnly(IHTMLInputTextElement *iface, VARIANT_BOOL *p)
962 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
964 TRACE("(%p)->(%p)\n", This, p);
966 return IHTMLInputElement_get_readOnly(HTMLINPUT(This), p);
969 static HRESULT WINAPI HTMLInputTextElement_createTextRange(IHTMLInputTextElement *iface, IHTMLTxtRange **range)
971 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
973 TRACE("(%p)->(%p)\n", This, range);
975 return IHTMLInputElement_createTextRange(HTMLINPUT(This), range);
978 #undef HTMLINPUT_THIS
980 static const IHTMLInputTextElementVtbl HTMLInputTextElementVtbl = {
981 HTMLInputTextElement_QueryInterface,
982 HTMLInputTextElement_AddRef,
983 HTMLInputTextElement_Release,
984 HTMLInputTextElement_GetTypeInfoCount,
985 HTMLInputTextElement_GetTypeInfo,
986 HTMLInputTextElement_GetIDsOfNames,
987 HTMLInputTextElement_Invoke,
988 HTMLInputTextElement_get_type,
989 HTMLInputTextElement_put_value,
990 HTMLInputTextElement_get_value,
991 HTMLInputTextElement_put_name,
992 HTMLInputTextElement_get_name,
993 HTMLInputTextElement_put_status,
994 HTMLInputTextElement_get_status,
995 HTMLInputTextElement_put_disabled,
996 HTMLInputTextElement_get_disabled,
997 HTMLInputTextElement_get_form,
998 HTMLInputTextElement_put_defaultValue,
999 HTMLInputTextElement_get_defaultValue,
1000 HTMLInputTextElement_put_size,
1001 HTMLInputTextElement_get_size,
1002 HTMLInputTextElement_put_maxLength,
1003 HTMLInputTextElement_get_maxLength,
1004 HTMLInputTextElement_select,
1005 HTMLInputTextElement_put_onchange,
1006 HTMLInputTextElement_get_onchange,
1007 HTMLInputTextElement_put_onselect,
1008 HTMLInputTextElement_get_onselect,
1009 HTMLInputTextElement_put_readOnly,
1010 HTMLInputTextElement_get_readOnly,
1011 HTMLInputTextElement_createTextRange
1014 #define HTMLINPUT_NODE_THIS(iface) DEFINE_THIS2(HTMLInputElement, element.node, iface)
1016 static HRESULT HTMLInputElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
1018 HTMLInputElement *This = HTMLINPUT_NODE_THIS(iface);
1020 *ppv = NULL;
1022 if(IsEqualGUID(&IID_IUnknown, riid)) {
1023 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
1024 *ppv = HTMLINPUT(This);
1025 }else if(IsEqualGUID(&IID_IDispatch, riid)) {
1026 TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
1027 *ppv = HTMLINPUT(This);
1028 }else if(IsEqualGUID(&IID_IHTMLInputElement, riid)) {
1029 TRACE("(%p)->(IID_IHTMLInputElement %p)\n", This, ppv);
1030 *ppv = HTMLINPUT(This);
1031 }else if(IsEqualGUID(&IID_IHTMLInputTextElement, riid)) {
1032 TRACE("(%p)->(IID_IHTMLInputTextElement %p)\n", This, ppv);
1033 *ppv = HTMLINPUT(This);
1036 if(*ppv) {
1037 IUnknown_AddRef((IUnknown*)*ppv);
1038 return S_OK;
1041 return HTMLElement_QI(&This->element.node, riid, ppv);
1044 static void HTMLInputElement_destructor(HTMLDOMNode *iface)
1046 HTMLInputElement *This = HTMLINPUT_NODE_THIS(iface);
1048 nsIDOMHTMLInputElement_Release(This->nsinput);
1050 HTMLElement_destructor(&This->element.node);
1053 #undef HTMLINPUT_NODE_THIS
1055 static const NodeImplVtbl HTMLInputElementImplVtbl = {
1056 HTMLInputElement_QI,
1057 HTMLInputElement_destructor
1060 HTMLElement *HTMLInputElement_Create(nsIDOMHTMLElement *nselem)
1062 HTMLInputElement *ret = mshtml_alloc(sizeof(HTMLInputElement));
1063 nsresult nsres;
1065 ret->lpHTMLInputElementVtbl = &HTMLInputElementVtbl;
1066 ret->element.node.vtbl = &HTMLInputElementImplVtbl;
1068 nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLInputElement,
1069 (void**)&ret->nsinput);
1070 if(NS_FAILED(nsres))
1071 ERR("Could not get nsIDOMHTMLInputElement interface: %08x\n", nsres);
1073 return &ret->element;