cryptdlg: Add missing encoding info to the German resource file.
[wine] / dlls / mshtml / htmlinput.c
1 /*
2  * Copyright 2006 Jacek Caban for CodeWeavers
3  *
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.
8  *
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.
13  *
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
17  */
18
19 #include <stdarg.h>
20
21 #define COBJMACROS
22
23 #include "windef.h"
24 #include "winbase.h"
25 #include "winuser.h"
26 #include "ole2.h"
27
28 #include "wine/debug.h"
29
30 #include "mshtml_private.h"
31
32 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
33
34 typedef struct {
35     HTMLElement element;
36
37     const IHTMLInputElementVtbl *lpHTMLInputElementVtbl;
38     const IHTMLInputTextElementVtbl *lpHTMLInputTextElementVtbl;
39
40     nsIDOMHTMLInputElement *nsinput;
41 } HTMLInputElement;
42
43 #define HTMLINPUT(x)      ((IHTMLInputElement*)      &(x)->lpHTMLInputElementVtbl)
44 #define HTMLINPUTTEXT(x)  (&(x)->lpHTMLInputTextElementVtbl)
45
46 #define HTMLINPUT_THIS(iface) DEFINE_THIS(HTMLInputElement, HTMLInputElement, iface)
47
48 static HRESULT WINAPI HTMLInputElement_QueryInterface(IHTMLInputElement *iface,
49                                                          REFIID riid, void **ppv)
50 {
51     HTMLInputElement *This = HTMLINPUT_THIS(iface);
52
53     return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
54 }
55
56 static ULONG WINAPI HTMLInputElement_AddRef(IHTMLInputElement *iface)
57 {
58     HTMLInputElement *This = HTMLINPUT_THIS(iface);
59
60     return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
61 }
62
63 static ULONG WINAPI HTMLInputElement_Release(IHTMLInputElement *iface)
64 {
65     HTMLInputElement *This = HTMLINPUT_THIS(iface);
66
67     return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
68 }
69
70 static HRESULT WINAPI HTMLInputElement_GetTypeInfoCount(IHTMLInputElement *iface, UINT *pctinfo)
71 {
72     HTMLInputElement *This = HTMLINPUT_THIS(iface);
73
74     return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->element.node.dispex), pctinfo);
75 }
76
77 static HRESULT WINAPI HTMLInputElement_GetTypeInfo(IHTMLInputElement *iface, UINT iTInfo,
78                                               LCID lcid, ITypeInfo **ppTInfo)
79 {
80     HTMLInputElement *This = HTMLINPUT_THIS(iface);
81
82     return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->element.node.dispex), iTInfo, lcid, ppTInfo);
83 }
84
85 static HRESULT WINAPI HTMLInputElement_GetIDsOfNames(IHTMLInputElement *iface, REFIID riid,
86                                                 LPOLESTR *rgszNames, UINT cNames,
87                                                 LCID lcid, DISPID *rgDispId)
88 {
89     HTMLInputElement *This = HTMLINPUT_THIS(iface);
90
91     return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->element.node.dispex), riid, rgszNames,
92             cNames, lcid, rgDispId);
93 }
94
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)
98 {
99     HTMLInputElement *This = HTMLINPUT_THIS(iface);
100
101     return IDispatchEx_Invoke(DISPATCHEX(&This->element.node.dispex), dispIdMember, riid, lcid, wFlags,
102             pDispParams, pVarResult, pExcepInfo, puArgErr);
103 }
104
105 static HRESULT WINAPI HTMLInputElement_put_type(IHTMLInputElement *iface, BSTR v)
106 {
107     HTMLInputElement *This = HTMLINPUT_THIS(iface);
108     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
109     return E_NOTIMPL;
110 }
111
112 static HRESULT WINAPI HTMLInputElement_get_type(IHTMLInputElement *iface, BSTR *p)
113 {
114     HTMLInputElement *This = HTMLINPUT_THIS(iface);
115     nsAString type_str;
116     const PRUnichar *type;
117     nsresult nsres;
118
119     TRACE("(%p)->(%p)\n", This, p);
120
121     nsAString_Init(&type_str, NULL);
122     nsres = nsIDOMHTMLInputElement_GetType(This->nsinput, &type_str);
123
124     if(NS_SUCCEEDED(nsres)) {
125         nsAString_GetData(&type_str, &type);
126         *p = SysAllocString(type);
127     }else {
128         ERR("GetType failed: %08x\n", nsres);
129     }
130
131     nsAString_Finish(&type_str);
132
133     TRACE("type=%s\n", debugstr_w(*p));
134     return S_OK;
135 }
136
137 static HRESULT WINAPI HTMLInputElement_put_value(IHTMLInputElement *iface, BSTR v)
138 {
139     HTMLInputElement *This = HTMLINPUT_THIS(iface);
140     nsAString val_str;
141     nsresult nsres;
142
143     TRACE("(%p)->(%s)\n", This, debugstr_w(v));
144
145     nsAString_Init(&val_str, v);
146     nsres = nsIDOMHTMLInputElement_SetValue(This->nsinput, &val_str);
147     nsAString_Finish(&val_str);
148     if(NS_FAILED(nsres))
149         ERR("SetValue failed: %08x\n", nsres);
150
151     return S_OK;
152 }
153
154 static HRESULT WINAPI HTMLInputElement_get_value(IHTMLInputElement *iface, BSTR *p)
155 {
156     HTMLInputElement *This = HTMLINPUT_THIS(iface);
157     nsAString value_str;
158     const PRUnichar *value = NULL;
159     nsresult nsres;
160
161     TRACE("(%p)->(%p)\n", This, p);
162
163     nsAString_Init(&value_str, NULL);
164
165     nsres = nsIDOMHTMLInputElement_GetValue(This->nsinput, &value_str);
166     if(NS_SUCCEEDED(nsres)) {
167         nsAString_GetData(&value_str, &value);
168         *p = SysAllocString(value);
169     }else {
170         ERR("GetValue failed: %08x\n", nsres);
171     }
172
173     nsAString_Finish(&value_str);
174
175     TRACE("value=%s\n", debugstr_w(*p));
176     return S_OK;
177 }
178
179 static HRESULT WINAPI HTMLInputElement_put_name(IHTMLInputElement *iface, BSTR v)
180 {
181     HTMLInputElement *This = HTMLINPUT_THIS(iface);
182     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
183     return E_NOTIMPL;
184 }
185
186 static HRESULT WINAPI HTMLInputElement_get_name(IHTMLInputElement *iface, BSTR *p)
187 {
188     HTMLInputElement *This = HTMLINPUT_THIS(iface);
189     nsAString name_str;
190     const PRUnichar *name;
191     nsresult nsres;
192
193     TRACE("(%p)->(%p)\n", This, p);
194
195     nsAString_Init(&name_str, NULL);
196
197     nsres = nsIDOMHTMLInputElement_GetName(This->nsinput, &name_str);
198     if(NS_SUCCEEDED(nsres)) {
199         nsAString_GetData(&name_str, &name);
200         *p = SysAllocString(name);
201     }else {
202         ERR("GetName failed: %08x\n", nsres);
203         return E_FAIL;
204     }
205
206     nsAString_Finish(&name_str);
207
208     TRACE("name=%s\n", debugstr_w(*p));
209     return S_OK;
210 }
211
212 static HRESULT WINAPI HTMLInputElement_put_status(IHTMLInputElement *iface, VARIANT_BOOL v)
213 {
214     HTMLInputElement *This = HTMLINPUT_THIS(iface);
215     FIXME("(%p)->(%x)\n", This, v);
216     return E_NOTIMPL;
217 }
218
219 static HRESULT WINAPI HTMLInputElement_get_status(IHTMLInputElement *iface, VARIANT_BOOL *p)
220 {
221     HTMLInputElement *This = HTMLINPUT_THIS(iface);
222     FIXME("(%p)->(%p)\n", This, p);
223     return E_NOTIMPL;
224 }
225
226 static HRESULT WINAPI HTMLInputElement_put_disabled(IHTMLInputElement *iface, VARIANT_BOOL v)
227 {
228     HTMLInputElement *This = HTMLINPUT_THIS(iface);
229     nsresult nsres;
230
231     TRACE("(%p)->(%x)\n", This, v);
232
233     nsres = nsIDOMHTMLInputElement_SetDisabled(This->nsinput, v != VARIANT_FALSE);
234     if(NS_FAILED(nsres))
235         ERR("SetDisabled failed: %08x\n", nsres);
236
237     return S_OK;
238 }
239
240 static HRESULT WINAPI HTMLInputElement_get_disabled(IHTMLInputElement *iface, VARIANT_BOOL *p)
241 {
242     HTMLInputElement *This = HTMLINPUT_THIS(iface);
243     PRBool disabled = FALSE;
244
245     TRACE("(%p)->(%p)\n", This, p);
246
247     nsIDOMHTMLInputElement_GetDisabled(This->nsinput, &disabled);
248
249     *p = disabled ? VARIANT_TRUE : VARIANT_FALSE;
250     return S_OK;
251 }
252
253 static HRESULT WINAPI HTMLInputElement_get_form(IHTMLInputElement *iface, IHTMLFormElement **p)
254 {
255     HTMLInputElement *This = HTMLINPUT_THIS(iface);
256     FIXME("(%p)->(%p)\n", This, p);
257     return E_NOTIMPL;
258 }
259
260 static HRESULT WINAPI HTMLInputElement_put_size(IHTMLInputElement *iface, LONG v)
261 {
262     HTMLInputElement *This = HTMLINPUT_THIS(iface);
263     FIXME("(%p)->(%d)\n", This, v);
264     return E_NOTIMPL;
265 }
266
267 static HRESULT WINAPI HTMLInputElement_get_size(IHTMLInputElement *iface, LONG *p)
268 {
269     HTMLInputElement *This = HTMLINPUT_THIS(iface);
270     FIXME("(%p)->(%p)\n", This, p);
271     return E_NOTIMPL;
272 }
273
274 static HRESULT WINAPI HTMLInputElement_put_maxLength(IHTMLInputElement *iface, LONG v)
275 {
276     HTMLInputElement *This = HTMLINPUT_THIS(iface);
277     FIXME("(%p)->(%d)\n", This, v);
278     return E_NOTIMPL;
279 }
280
281 static HRESULT WINAPI HTMLInputElement_get_maxLength(IHTMLInputElement *iface, LONG *p)
282 {
283     HTMLInputElement *This = HTMLINPUT_THIS(iface);
284     FIXME("(%p)->(%p)\n", This, p);
285     return E_NOTIMPL;
286 }
287
288 static HRESULT WINAPI HTMLInputElement_select(IHTMLInputElement *iface)
289 {
290     HTMLInputElement *This = HTMLINPUT_THIS(iface);
291     nsresult nsres;
292
293     TRACE("(%p)\n", This);
294
295     nsres = nsIDOMHTMLInputElement_Select(This->nsinput);
296     if(NS_FAILED(nsres)) {
297         ERR("Select failed: %08x\n", nsres);
298         return E_FAIL;
299     }
300
301     return S_OK;
302 }
303
304 static HRESULT WINAPI HTMLInputElement_put_onchange(IHTMLInputElement *iface, VARIANT v)
305 {
306     HTMLInputElement *This = HTMLINPUT_THIS(iface);
307     FIXME("(%p)->()\n", This);
308     return E_NOTIMPL;
309 }
310
311 static HRESULT WINAPI HTMLInputElement_get_onchange(IHTMLInputElement *iface, VARIANT *p)
312 {
313     HTMLInputElement *This = HTMLINPUT_THIS(iface);
314     FIXME("(%p)->(%p)\n", This, p);
315     return E_NOTIMPL;
316 }
317
318 static HRESULT WINAPI HTMLInputElement_put_onselect(IHTMLInputElement *iface, VARIANT v)
319 {
320     HTMLInputElement *This = HTMLINPUT_THIS(iface);
321     FIXME("(%p)->()\n", This);
322     return E_NOTIMPL;
323 }
324
325 static HRESULT WINAPI HTMLInputElement_get_onselect(IHTMLInputElement *iface, VARIANT *p)
326 {
327     HTMLInputElement *This = HTMLINPUT_THIS(iface);
328     FIXME("(%p)->(%p)\n", This, p);
329     return E_NOTIMPL;
330 }
331
332 static HRESULT WINAPI HTMLInputElement_put_defaultValue(IHTMLInputElement *iface, BSTR v)
333 {
334     HTMLInputElement *This = HTMLINPUT_THIS(iface);
335     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
336     return E_NOTIMPL;
337 }
338
339 static HRESULT WINAPI HTMLInputElement_get_defaultValue(IHTMLInputElement *iface, BSTR *p)
340 {
341     HTMLInputElement *This = HTMLINPUT_THIS(iface);
342     FIXME("(%p)->(%p)\n", This, p);
343     return E_NOTIMPL;
344 }
345
346 static HRESULT WINAPI HTMLInputElement_put_readOnly(IHTMLInputElement *iface, VARIANT_BOOL v)
347 {
348     HTMLInputElement *This = HTMLINPUT_THIS(iface);
349     FIXME("(%p)->(%x)\n", This, v);
350     return E_NOTIMPL;
351 }
352
353 static HRESULT WINAPI HTMLInputElement_get_readOnly(IHTMLInputElement *iface, VARIANT_BOOL *p)
354 {
355     HTMLInputElement *This = HTMLINPUT_THIS(iface);
356     FIXME("(%p)->(%p)\n", This, p);
357     return E_NOTIMPL;
358 }
359
360 static HRESULT WINAPI HTMLInputElement_createTextRange(IHTMLInputElement *iface, IHTMLTxtRange **range)
361 {
362     HTMLInputElement *This = HTMLINPUT_THIS(iface);
363     FIXME("(%p)->(%p)\n", This, range);
364     return E_NOTIMPL;
365 }
366
367 static HRESULT WINAPI HTMLInputElement_put_indeterminate(IHTMLInputElement *iface, VARIANT_BOOL v)
368 {
369     HTMLInputElement *This = HTMLINPUT_THIS(iface);
370     FIXME("(%p)->(%x)\n", This, v);
371     return E_NOTIMPL;
372 }
373
374 static HRESULT WINAPI HTMLInputElement_get_indeterminate(IHTMLInputElement *iface, VARIANT_BOOL *p)
375 {
376     HTMLInputElement *This = HTMLINPUT_THIS(iface);
377     FIXME("(%p)->(%p)\n", This, p);
378     return E_NOTIMPL;
379 }
380
381 static HRESULT WINAPI HTMLInputElement_put_defaultChecked(IHTMLInputElement *iface, VARIANT_BOOL v)
382 {
383     HTMLInputElement *This = HTMLINPUT_THIS(iface);
384     nsresult nsres;
385
386     TRACE("(%p)->(%x)\n", This, v);
387
388     nsres = nsIDOMHTMLInputElement_SetDefaultChecked(This->nsinput, v != VARIANT_FALSE);
389     if(NS_FAILED(nsres)) {
390         ERR("SetDefaultChecked failed: %08x\n", nsres);
391         return E_FAIL;
392     }
393
394     return S_OK;
395 }
396
397 static HRESULT WINAPI HTMLInputElement_get_defaultChecked(IHTMLInputElement *iface, VARIANT_BOOL *p)
398 {
399     HTMLInputElement *This = HTMLINPUT_THIS(iface);
400     PRBool default_checked = FALSE;
401     nsresult nsres;
402
403     TRACE("(%p)->(%p)\n", This, p);
404
405     nsres = nsIDOMHTMLInputElement_GetDefaultChecked(This->nsinput, &default_checked);
406     if(NS_FAILED(nsres)) {
407         ERR("GetDefaultChecked failed: %08x\n", nsres);
408         return E_FAIL;
409     }
410
411     *p = default_checked ? VARIANT_TRUE : VARIANT_FALSE;
412     return S_OK;
413 }
414
415 static HRESULT WINAPI HTMLInputElement_put_checked(IHTMLInputElement *iface, VARIANT_BOOL v)
416 {
417     HTMLInputElement *This = HTMLINPUT_THIS(iface);
418     nsresult nsres;
419
420     TRACE("(%p)->(%x)\n", This, v);
421
422     nsres = nsIDOMHTMLInputElement_SetChecked(This->nsinput, v != VARIANT_FALSE);
423     if(NS_FAILED(nsres)) {
424         ERR("SetChecked failed: %08x\n", nsres);
425         return E_FAIL;
426     }
427
428     return S_OK;
429 }
430
431 static HRESULT WINAPI HTMLInputElement_get_checked(IHTMLInputElement *iface, VARIANT_BOOL *p)
432 {
433     HTMLInputElement *This = HTMLINPUT_THIS(iface);
434     PRBool checked;
435     nsresult nsres;
436
437     TRACE("(%p)->(%p)\n", This, p);
438
439     nsres = nsIDOMHTMLInputElement_GetChecked(This->nsinput, &checked);
440     if(NS_FAILED(nsres)) {
441         ERR("GetChecked failed: %08x\n", nsres);
442         return E_FAIL;
443     }
444
445     *p = checked ? VARIANT_TRUE : VARIANT_FALSE;
446     TRACE("checked=%x\n", *p);
447     return S_OK;
448 }
449
450 static HRESULT WINAPI HTMLInputElement_put_border(IHTMLInputElement *iface, VARIANT v)
451 {
452     HTMLInputElement *This = HTMLINPUT_THIS(iface);
453     FIXME("(%p)->()\n", This);
454     return E_NOTIMPL;
455 }
456
457 static HRESULT WINAPI HTMLInputElement_get_border(IHTMLInputElement *iface, VARIANT *p)
458 {
459     HTMLInputElement *This = HTMLINPUT_THIS(iface);
460     FIXME("(%p)->(%p)\n", This, p);
461     return E_NOTIMPL;
462 }
463
464 static HRESULT WINAPI HTMLInputElement_put_vspace(IHTMLInputElement *iface, LONG v)
465 {
466     HTMLInputElement *This = HTMLINPUT_THIS(iface);
467     FIXME("(%p)->(%d)\n", This, v);
468     return E_NOTIMPL;
469 }
470
471 static HRESULT WINAPI HTMLInputElement_get_vspace(IHTMLInputElement *iface, LONG *p)
472 {
473     HTMLInputElement *This = HTMLINPUT_THIS(iface);
474     FIXME("(%p)->(%p)\n", This, p);
475     return E_NOTIMPL;
476 }
477
478 static HRESULT WINAPI HTMLInputElement_put_hspace(IHTMLInputElement *iface, LONG v)
479 {
480     HTMLInputElement *This = HTMLINPUT_THIS(iface);
481     FIXME("(%p)->(%d)\n", This, v);
482     return E_NOTIMPL;
483 }
484
485 static HRESULT WINAPI HTMLInputElement_get_hspace(IHTMLInputElement *iface, LONG *p)
486 {
487     HTMLInputElement *This = HTMLINPUT_THIS(iface);
488     FIXME("(%p)->(%p)\n", This, p);
489     return E_NOTIMPL;
490 }
491
492 static HRESULT WINAPI HTMLInputElement_put_alt(IHTMLInputElement *iface, BSTR v)
493 {
494     HTMLInputElement *This = HTMLINPUT_THIS(iface);
495     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
496     return E_NOTIMPL;
497 }
498
499 static HRESULT WINAPI HTMLInputElement_get_alt(IHTMLInputElement *iface, BSTR *p)
500 {
501     HTMLInputElement *This = HTMLINPUT_THIS(iface);
502     FIXME("(%p)->(%p)\n", This, p);
503     return E_NOTIMPL;
504 }
505
506 static HRESULT WINAPI HTMLInputElement_put_src(IHTMLInputElement *iface, BSTR v)
507 {
508     HTMLInputElement *This = HTMLINPUT_THIS(iface);
509     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
510     return E_NOTIMPL;
511 }
512
513 static HRESULT WINAPI HTMLInputElement_get_src(IHTMLInputElement *iface, BSTR *p)
514 {
515     HTMLInputElement *This = HTMLINPUT_THIS(iface);
516     FIXME("(%p)->(%p)\n", This, p);
517     return E_NOTIMPL;
518 }
519
520 static HRESULT WINAPI HTMLInputElement_put_lowsrc(IHTMLInputElement *iface, BSTR v)
521 {
522     HTMLInputElement *This = HTMLINPUT_THIS(iface);
523     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
524     return E_NOTIMPL;
525 }
526
527 static HRESULT WINAPI HTMLInputElement_get_lowsrc(IHTMLInputElement *iface, BSTR *p)
528 {
529     HTMLInputElement *This = HTMLINPUT_THIS(iface);
530     FIXME("(%p)->(%p)\n", This, p);
531     return E_NOTIMPL;
532 }
533
534 static HRESULT WINAPI HTMLInputElement_put_vrml(IHTMLInputElement *iface, BSTR v)
535 {
536     HTMLInputElement *This = HTMLINPUT_THIS(iface);
537     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
538     return E_NOTIMPL;
539 }
540
541 static HRESULT WINAPI HTMLInputElement_get_vrml(IHTMLInputElement *iface, BSTR *p)
542 {
543     HTMLInputElement *This = HTMLINPUT_THIS(iface);
544     FIXME("(%p)->(%p)\n", This, p);
545     return E_NOTIMPL;
546 }
547
548 static HRESULT WINAPI HTMLInputElement_put_dynsrc(IHTMLInputElement *iface, BSTR v)
549 {
550     HTMLInputElement *This = HTMLINPUT_THIS(iface);
551     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
552     return E_NOTIMPL;
553 }
554
555 static HRESULT WINAPI HTMLInputElement_get_dynsrc(IHTMLInputElement *iface, BSTR *p)
556 {
557     HTMLInputElement *This = HTMLINPUT_THIS(iface);
558     FIXME("(%p)->(%p)\n", This, p);
559     return E_NOTIMPL;
560 }
561
562 static HRESULT WINAPI HTMLInputElement_get_readyState(IHTMLInputElement *iface, BSTR *p)
563 {
564     HTMLInputElement *This = HTMLINPUT_THIS(iface);
565     FIXME("(%p)->(%p)\n", This, p);
566     return E_NOTIMPL;
567 }
568
569 static HRESULT WINAPI HTMLInputElement_get_complete(IHTMLInputElement *iface, VARIANT_BOOL *p)
570 {
571     HTMLInputElement *This = HTMLINPUT_THIS(iface);
572     FIXME("(%p)->(%p)\n", This, p);
573     return E_NOTIMPL;
574 }
575
576 static HRESULT WINAPI HTMLInputElement_put_loop(IHTMLInputElement *iface, VARIANT v)
577 {
578     HTMLInputElement *This = HTMLINPUT_THIS(iface);
579     FIXME("(%p)->()\n", This);
580     return E_NOTIMPL;
581 }
582
583 static HRESULT WINAPI HTMLInputElement_get_loop(IHTMLInputElement *iface, VARIANT *p)
584 {
585     HTMLInputElement *This = HTMLINPUT_THIS(iface);
586     FIXME("(%p)->(%p)\n", This, p);
587     return E_NOTIMPL;
588 }
589
590 static HRESULT WINAPI HTMLInputElement_put_align(IHTMLInputElement *iface, BSTR v)
591 {
592     HTMLInputElement *This = HTMLINPUT_THIS(iface);
593     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
594     return E_NOTIMPL;
595 }
596
597 static HRESULT WINAPI HTMLInputElement_get_align(IHTMLInputElement *iface, BSTR *p)
598 {
599     HTMLInputElement *This = HTMLINPUT_THIS(iface);
600     FIXME("(%p)->(%p)\n", This, p);
601     return E_NOTIMPL;
602 }
603
604 static HRESULT WINAPI HTMLInputElement_put_onload(IHTMLInputElement *iface, VARIANT v)
605 {
606     HTMLInputElement *This = HTMLINPUT_THIS(iface);
607     FIXME("(%p)->()\n", This);
608     return E_NOTIMPL;
609 }
610
611 static HRESULT WINAPI HTMLInputElement_get_onload(IHTMLInputElement *iface, VARIANT *p)
612 {
613     HTMLInputElement *This = HTMLINPUT_THIS(iface);
614     FIXME("(%p)->(%p)\n", This, p);
615     return E_NOTIMPL;
616 }
617
618 static HRESULT WINAPI HTMLInputElement_put_onerror(IHTMLInputElement *iface, VARIANT v)
619 {
620     HTMLInputElement *This = HTMLINPUT_THIS(iface);
621     FIXME("(%p)->()\n", This);
622     return E_NOTIMPL;
623 }
624
625 static HRESULT WINAPI HTMLInputElement_get_onerror(IHTMLInputElement *iface, VARIANT *p)
626 {
627     HTMLInputElement *This = HTMLINPUT_THIS(iface);
628     FIXME("(%p)->(%p)\n", This, p);
629     return E_NOTIMPL;
630 }
631
632 static HRESULT WINAPI HTMLInputElement_put_onabort(IHTMLInputElement *iface, VARIANT v)
633 {
634     HTMLInputElement *This = HTMLINPUT_THIS(iface);
635     FIXME("(%p)->()\n", This);
636     return E_NOTIMPL;
637 }
638
639 static HRESULT WINAPI HTMLInputElement_get_onabort(IHTMLInputElement *iface, VARIANT *p)
640 {
641     HTMLInputElement *This = HTMLINPUT_THIS(iface);
642     FIXME("(%p)->(%p)\n", This, p);
643     return E_NOTIMPL;
644 }
645
646 static HRESULT WINAPI HTMLInputElement_put_width(IHTMLInputElement *iface, LONG v)
647 {
648     HTMLInputElement *This = HTMLINPUT_THIS(iface);
649     FIXME("(%p)->(%d)\n", This, v);
650     return E_NOTIMPL;
651 }
652
653 static HRESULT WINAPI HTMLInputElement_get_width(IHTMLInputElement *iface, LONG *p)
654 {
655     HTMLInputElement *This = HTMLINPUT_THIS(iface);
656     FIXME("(%p)->(%p)\n", This, p);
657     return E_NOTIMPL;
658 }
659
660 static HRESULT WINAPI HTMLInputElement_put_height(IHTMLInputElement *iface, LONG v)
661 {
662     HTMLInputElement *This = HTMLINPUT_THIS(iface);
663     FIXME("(%p)->(%d)\n", This, v);
664     return E_NOTIMPL;
665 }
666
667 static HRESULT WINAPI HTMLInputElement_get_height(IHTMLInputElement *iface, LONG *p)
668 {
669     HTMLInputElement *This = HTMLINPUT_THIS(iface);
670     FIXME("(%p)->(%p)\n", This, p);
671     return E_NOTIMPL;
672 }
673
674 static HRESULT WINAPI HTMLInputElement_put_start(IHTMLInputElement *iface, BSTR v)
675 {
676     HTMLInputElement *This = HTMLINPUT_THIS(iface);
677     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
678     return E_NOTIMPL;
679 }
680
681 static HRESULT WINAPI HTMLInputElement_get_start(IHTMLInputElement *iface, BSTR *p)
682 {
683     HTMLInputElement *This = HTMLINPUT_THIS(iface);
684     FIXME("(%p)->(%p)\n", This, p);
685     return E_NOTIMPL;
686 }
687
688 #undef HTMLINPUT_THIS
689
690 static const IHTMLInputElementVtbl HTMLInputElementVtbl = {
691     HTMLInputElement_QueryInterface,
692     HTMLInputElement_AddRef,
693     HTMLInputElement_Release,
694     HTMLInputElement_GetTypeInfoCount,
695     HTMLInputElement_GetTypeInfo,
696     HTMLInputElement_GetIDsOfNames,
697     HTMLInputElement_Invoke,
698     HTMLInputElement_put_type,
699     HTMLInputElement_get_type,
700     HTMLInputElement_put_value,
701     HTMLInputElement_get_value,
702     HTMLInputElement_put_name,
703     HTMLInputElement_get_name,
704     HTMLInputElement_put_status,
705     HTMLInputElement_get_status,
706     HTMLInputElement_put_disabled,
707     HTMLInputElement_get_disabled,
708     HTMLInputElement_get_form,
709     HTMLInputElement_put_size,
710     HTMLInputElement_get_size,
711     HTMLInputElement_put_maxLength,
712     HTMLInputElement_get_maxLength,
713     HTMLInputElement_select,
714     HTMLInputElement_put_onchange,
715     HTMLInputElement_get_onchange,
716     HTMLInputElement_put_onselect,
717     HTMLInputElement_get_onselect,
718     HTMLInputElement_put_defaultValue,
719     HTMLInputElement_get_defaultValue,
720     HTMLInputElement_put_readOnly,
721     HTMLInputElement_get_readOnly,
722     HTMLInputElement_createTextRange,
723     HTMLInputElement_put_indeterminate,
724     HTMLInputElement_get_indeterminate,
725     HTMLInputElement_put_defaultChecked,
726     HTMLInputElement_get_defaultChecked,
727     HTMLInputElement_put_checked,
728     HTMLInputElement_get_checked,
729     HTMLInputElement_put_border,
730     HTMLInputElement_get_border,
731     HTMLInputElement_put_vspace,
732     HTMLInputElement_get_vspace,
733     HTMLInputElement_put_hspace,
734     HTMLInputElement_get_hspace,
735     HTMLInputElement_put_alt,
736     HTMLInputElement_get_alt,
737     HTMLInputElement_put_src,
738     HTMLInputElement_get_src,
739     HTMLInputElement_put_lowsrc,
740     HTMLInputElement_get_lowsrc,
741     HTMLInputElement_put_vrml,
742     HTMLInputElement_get_vrml,
743     HTMLInputElement_put_dynsrc,
744     HTMLInputElement_get_dynsrc,
745     HTMLInputElement_get_readyState,
746     HTMLInputElement_get_complete,
747     HTMLInputElement_put_loop,
748     HTMLInputElement_get_loop,
749     HTMLInputElement_put_align,
750     HTMLInputElement_get_align,
751     HTMLInputElement_put_onload,
752     HTMLInputElement_get_onload,
753     HTMLInputElement_put_onerror,
754     HTMLInputElement_get_onerror,
755     HTMLInputElement_put_onabort,
756     HTMLInputElement_get_onabort,
757     HTMLInputElement_put_width,
758     HTMLInputElement_get_width,
759     HTMLInputElement_put_height,
760     HTMLInputElement_get_height,
761     HTMLInputElement_put_start,
762     HTMLInputElement_get_start
763 };
764
765 #define HTMLINPUTTEXT_THIS(iface) DEFINE_THIS(HTMLInputElement, HTMLInputTextElement, iface)
766
767 static HRESULT WINAPI HTMLInputTextElement_QueryInterface(IHTMLInputTextElement *iface,
768         REFIID riid, void **ppv)
769 {
770     HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
771
772     return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
773 }
774
775 static ULONG WINAPI HTMLInputTextElement_AddRef(IHTMLInputTextElement *iface)
776 {
777     HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
778
779     return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
780 }
781
782 static ULONG WINAPI HTMLInputTextElement_Release(IHTMLInputTextElement *iface)
783 {
784     HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
785
786     return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
787 }
788
789 static HRESULT WINAPI HTMLInputTextElement_GetTypeInfoCount(IHTMLInputTextElement *iface, UINT *pctinfo)
790 {
791     HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
792     return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->element.node.dispex), pctinfo);
793 }
794
795 static HRESULT WINAPI HTMLInputTextElement_GetTypeInfo(IHTMLInputTextElement *iface, UINT iTInfo,
796         LCID lcid, ITypeInfo **ppTInfo)
797 {
798     HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
799     return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->element.node.dispex), iTInfo, lcid, ppTInfo);
800 }
801
802 static HRESULT WINAPI HTMLInputTextElement_GetIDsOfNames(IHTMLInputTextElement *iface, REFIID riid,
803         LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
804 {
805     HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
806     return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->element.node.dispex), riid, rgszNames, cNames, lcid, rgDispId);
807 }
808
809 static HRESULT WINAPI HTMLInputTextElement_Invoke(IHTMLInputTextElement *iface, DISPID dispIdMember,
810                             REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
811                             VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
812 {
813     HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
814     return IDispatchEx_Invoke(DISPATCHEX(&This->element.node.dispex), dispIdMember, riid, lcid, wFlags, pDispParams,
815             pVarResult, pExcepInfo, puArgErr);
816 }
817
818 static HRESULT WINAPI HTMLInputTextElement_get_type(IHTMLInputTextElement *iface, BSTR *p)
819 {
820     HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
821
822     TRACE("(%p)->(%p)\n", This, p);
823
824     return IHTMLInputElement_get_type(HTMLINPUT(This), p);
825 }
826
827 static HRESULT WINAPI HTMLInputTextElement_put_value(IHTMLInputTextElement *iface, BSTR v)
828 {
829     HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
830
831     TRACE("(%p)->(%s)\n", This, debugstr_w(v));
832
833     return IHTMLInputElement_put_value(HTMLINPUT(This), v);
834 }
835
836 static HRESULT WINAPI HTMLInputTextElement_get_value(IHTMLInputTextElement *iface, BSTR *p)
837 {
838     HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
839
840     TRACE("(%p)->(%p)\n", This, p);
841
842     return IHTMLInputTextElement_get_value(HTMLINPUT(This), p);
843 }
844
845 static HRESULT WINAPI HTMLInputTextElement_put_name(IHTMLInputTextElement *iface, BSTR v)
846 {
847     HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
848
849     TRACE("(%p)->(%s)\n", This, debugstr_w(v));
850
851     return IHTMLInputElement_put_name(HTMLINPUT(This), v);
852 }
853
854 static HRESULT WINAPI HTMLInputTextElement_get_name(IHTMLInputTextElement *iface, BSTR *p)
855 {
856     HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
857
858     TRACE("(%p)->(%p)\n", This, p);
859
860     return IHTMLInputElement_get_name(HTMLINPUT(This), p);
861 }
862
863 static HRESULT WINAPI HTMLInputTextElement_put_status(IHTMLInputTextElement *iface, VARIANT v)
864 {
865     HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
866     FIXME("(%p)->(v)\n", This);
867     return E_NOTIMPL;
868 }
869
870 static HRESULT WINAPI HTMLInputTextElement_get_status(IHTMLInputTextElement *iface, VARIANT *p)
871 {
872     HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
873     TRACE("(%p)->(v)\n", This);
874     return E_NOTIMPL;
875 }
876
877 static HRESULT WINAPI HTMLInputTextElement_put_disabled(IHTMLInputTextElement *iface, VARIANT_BOOL v)
878 {
879     HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
880
881     TRACE("(%p)->(%x)\n", This, v);
882
883     return IHTMLInputElement_put_disabled(HTMLINPUT(This), v);
884 }
885
886 static HRESULT WINAPI HTMLInputTextElement_get_disabled(IHTMLInputTextElement *iface, VARIANT_BOOL *p)
887 {
888     HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
889
890     TRACE("(%p)->(%p)\n", This, p);
891
892     return IHTMLInputElement_get_disabled(HTMLINPUT(This), p);
893 }
894
895 static HRESULT WINAPI HTMLInputTextElement_get_form(IHTMLInputTextElement *iface, IHTMLFormElement **p)
896 {
897     HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
898
899     TRACE("(%p)->(%p)\n", This, p);
900
901     return IHTMLInputElement_get_form(HTMLINPUT(This), p);
902 }
903
904 static HRESULT WINAPI HTMLInputTextElement_put_defaultValue(IHTMLInputTextElement *iface, BSTR v)
905 {
906     HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
907
908     TRACE("(%p)->(%s)\n", This, debugstr_w(v));
909
910     return IHTMLInputElement_put_defaultValue(HTMLINPUT(This), v);
911 }
912
913 static HRESULT WINAPI HTMLInputTextElement_get_defaultValue(IHTMLInputTextElement *iface, BSTR *p)
914 {
915     HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
916
917     TRACE("(%p)->(%p)\n", This, p);
918
919     return IHTMLInputElement_get_defaultValue(HTMLINPUT(This), p);
920 }
921
922 static HRESULT WINAPI HTMLInputTextElement_put_size(IHTMLInputTextElement *iface, LONG v)
923 {
924     HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
925
926     TRACE("(%p)->(%d)\n", This, v);
927
928     return IHTMLInputElement_put_size(HTMLINPUT(This), v);
929 }
930
931 static HRESULT WINAPI HTMLInputTextElement_get_size(IHTMLInputTextElement *iface, LONG *p)
932 {
933     HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
934
935     TRACE("(%p)->(%p)\n", This, p);
936
937     return IHTMLInputElement_get_size(HTMLINPUT(This), p);
938 }
939
940 static HRESULT WINAPI HTMLInputTextElement_put_maxLength(IHTMLInputTextElement *iface, LONG v)
941 {
942     HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
943
944     TRACE("(%p)->(%d)\n", This, v);
945
946     return IHTMLInputElement_put_maxLength(HTMLINPUT(This), v);
947 }
948
949 static HRESULT WINAPI HTMLInputTextElement_get_maxLength(IHTMLInputTextElement *iface, LONG *p)
950 {
951     HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
952
953     TRACE("(%p)->(%p)\n", This, p);
954
955     return IHTMLInputElement_get_maxLength(HTMLINPUT(This), p);
956 }
957
958 static HRESULT WINAPI HTMLInputTextElement_select(IHTMLInputTextElement *iface)
959 {
960     HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
961
962     TRACE("(%p)\n", This);
963
964     return IHTMLInputElement_select(HTMLINPUT(This));
965 }
966
967 static HRESULT WINAPI HTMLInputTextElement_put_onchange(IHTMLInputTextElement *iface, VARIANT v)
968 {
969     HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
970
971     TRACE("(%p)->()\n", This);
972
973     return IHTMLInputElement_put_onchange(HTMLINPUT(This), v);
974 }
975
976 static HRESULT WINAPI HTMLInputTextElement_get_onchange(IHTMLInputTextElement *iface, VARIANT *p)
977 {
978     HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
979
980     TRACE("(%p)->(%p)\n", This, p);
981
982     return IHTMLInputElement_get_onchange(HTMLINPUT(This), p);
983 }
984
985 static HRESULT WINAPI HTMLInputTextElement_put_onselect(IHTMLInputTextElement *iface, VARIANT v)
986 {
987     HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
988
989     TRACE("(%p)->()\n", This);
990
991     return IHTMLInputElement_put_onselect(HTMLINPUT(This), v);
992 }
993
994 static HRESULT WINAPI HTMLInputTextElement_get_onselect(IHTMLInputTextElement *iface, VARIANT *p)
995 {
996     HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
997
998     TRACE("(%p)->(%p)\n", This, p);
999
1000     return IHTMLInputElement_get_onselect(HTMLINPUT(This), p);
1001 }
1002
1003 static HRESULT WINAPI HTMLInputTextElement_put_readOnly(IHTMLInputTextElement *iface, VARIANT_BOOL v)
1004 {
1005     HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
1006
1007     TRACE("(%p)->(%x)\n", This, v);
1008
1009     return IHTMLInputElement_put_readOnly(HTMLINPUT(This), v);
1010 }
1011
1012 static HRESULT WINAPI HTMLInputTextElement_get_readOnly(IHTMLInputTextElement *iface, VARIANT_BOOL *p)
1013 {
1014     HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
1015
1016     TRACE("(%p)->(%p)\n", This, p);
1017
1018     return IHTMLInputElement_get_readOnly(HTMLINPUT(This), p);
1019 }
1020
1021 static HRESULT WINAPI HTMLInputTextElement_createTextRange(IHTMLInputTextElement *iface, IHTMLTxtRange **range)
1022 {
1023     HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
1024
1025     TRACE("(%p)->(%p)\n", This, range);
1026
1027     return IHTMLInputElement_createTextRange(HTMLINPUT(This), range);
1028 }
1029
1030 #undef HTMLINPUT_THIS
1031
1032 static const IHTMLInputTextElementVtbl HTMLInputTextElementVtbl = {
1033     HTMLInputTextElement_QueryInterface,
1034     HTMLInputTextElement_AddRef,
1035     HTMLInputTextElement_Release,
1036     HTMLInputTextElement_GetTypeInfoCount,
1037     HTMLInputTextElement_GetTypeInfo,
1038     HTMLInputTextElement_GetIDsOfNames,
1039     HTMLInputTextElement_Invoke,
1040     HTMLInputTextElement_get_type,
1041     HTMLInputTextElement_put_value,
1042     HTMLInputTextElement_get_value,
1043     HTMLInputTextElement_put_name,
1044     HTMLInputTextElement_get_name,
1045     HTMLInputTextElement_put_status,
1046     HTMLInputTextElement_get_status,
1047     HTMLInputTextElement_put_disabled,
1048     HTMLInputTextElement_get_disabled,
1049     HTMLInputTextElement_get_form,
1050     HTMLInputTextElement_put_defaultValue,
1051     HTMLInputTextElement_get_defaultValue,
1052     HTMLInputTextElement_put_size,
1053     HTMLInputTextElement_get_size,
1054     HTMLInputTextElement_put_maxLength,
1055     HTMLInputTextElement_get_maxLength,
1056     HTMLInputTextElement_select,
1057     HTMLInputTextElement_put_onchange,
1058     HTMLInputTextElement_get_onchange,
1059     HTMLInputTextElement_put_onselect,
1060     HTMLInputTextElement_get_onselect,
1061     HTMLInputTextElement_put_readOnly,
1062     HTMLInputTextElement_get_readOnly,
1063     HTMLInputTextElement_createTextRange
1064 };
1065
1066 #define HTMLINPUT_NODE_THIS(iface) DEFINE_THIS2(HTMLInputElement, element.node, iface)
1067
1068 static HRESULT HTMLInputElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
1069 {
1070     HTMLInputElement *This = HTMLINPUT_NODE_THIS(iface);
1071
1072     *ppv = NULL;
1073
1074     if(IsEqualGUID(&IID_IUnknown, riid)) {
1075         TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
1076         *ppv = HTMLINPUT(This);
1077     }else if(IsEqualGUID(&IID_IDispatch, riid)) {
1078         TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
1079         *ppv = HTMLINPUT(This);
1080     }else if(IsEqualGUID(&IID_IHTMLInputElement, riid)) {
1081         TRACE("(%p)->(IID_IHTMLInputElement %p)\n", This, ppv);
1082         *ppv = HTMLINPUT(This);
1083     }else if(IsEqualGUID(&IID_IHTMLInputTextElement, riid)) {
1084         TRACE("(%p)->(IID_IHTMLInputTextElement %p)\n", This, ppv);
1085         *ppv = HTMLINPUTTEXT(This);
1086     }
1087
1088     if(*ppv) {
1089         IUnknown_AddRef((IUnknown*)*ppv);
1090         return S_OK;
1091     }
1092
1093     return HTMLElement_QI(&This->element.node, riid, ppv);
1094 }
1095
1096 static void HTMLInputElement_destructor(HTMLDOMNode *iface)
1097 {
1098     HTMLInputElement *This = HTMLINPUT_NODE_THIS(iface);
1099
1100     nsIDOMHTMLInputElement_Release(This->nsinput);
1101
1102     HTMLElement_destructor(&This->element.node);
1103 }
1104
1105 static HRESULT HTMLInputElementImpl_put_disabled(HTMLDOMNode *iface, VARIANT_BOOL v)
1106 {
1107     HTMLInputElement *This = HTMLINPUT_NODE_THIS(iface);
1108     return IHTMLInputElement_put_disabled(HTMLINPUT(This), v);
1109 }
1110
1111 static HRESULT HTMLInputElementImpl_get_disabled(HTMLDOMNode *iface, VARIANT_BOOL *p)
1112 {
1113     HTMLInputElement *This = HTMLINPUT_NODE_THIS(iface);
1114     return IHTMLInputElement_get_disabled(HTMLINPUT(This), p);
1115 }
1116
1117 #undef HTMLINPUT_NODE_THIS
1118
1119 static const NodeImplVtbl HTMLInputElementImplVtbl = {
1120     HTMLInputElement_QI,
1121     HTMLInputElement_destructor,
1122     HTMLInputElementImpl_put_disabled,
1123     HTMLInputElementImpl_get_disabled,
1124 };
1125
1126 static const tid_t HTMLInputElement_iface_tids[] = {
1127     IHTMLDOMNode_tid,
1128     IHTMLDOMNode2_tid,
1129     IHTMLElement_tid,
1130     IHTMLElement2_tid,
1131     IHTMLElement3_tid,
1132     IHTMLInputElement_tid,
1133     0
1134 };
1135 static dispex_static_data_t HTMLInputElement_dispex = {
1136     NULL,
1137     DispHTMLInputElement_tid,
1138     NULL,
1139     HTMLInputElement_iface_tids
1140 };
1141
1142 HTMLElement *HTMLInputElement_Create(nsIDOMHTMLElement *nselem)
1143 {
1144     HTMLInputElement *ret = heap_alloc_zero(sizeof(HTMLInputElement));
1145     nsresult nsres;
1146
1147     ret->lpHTMLInputElementVtbl = &HTMLInputElementVtbl;
1148     ret->lpHTMLInputTextElementVtbl = &HTMLInputTextElementVtbl;
1149     ret->element.node.vtbl = &HTMLInputElementImplVtbl;
1150
1151     init_dispex(&ret->element.node.dispex, (IUnknown*)HTMLINPUT(ret), &HTMLInputElement_dispex);
1152     HTMLElement_Init(&ret->element);
1153
1154     nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLInputElement,
1155                                              (void**)&ret->nsinput);
1156     if(NS_FAILED(nsres))
1157         ERR("Could not get nsIDOMHTMLInputElement interface: %08x\n", nsres);
1158
1159     return &ret->element;
1160 }