urlmon: Add new IE7 QUERYOPTION.
[wine.git] / dlls / mshtml / htmlinput.c
blob5b605b3e3687a414bd12398a9dd2f3a33e34fb57
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 <stdarg.h>
21 #define COBJMACROS
23 #include "windef.h"
24 #include "winbase.h"
25 #include "winuser.h"
26 #include "ole2.h"
28 #include "wine/debug.h"
30 #include "mshtml_private.h"
32 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
34 typedef struct {
35 HTMLElement element;
37 const IHTMLInputElementVtbl *lpHTMLInputElementVtbl;
38 const IHTMLInputTextElementVtbl *lpHTMLInputTextElementVtbl;
40 nsIDOMHTMLInputElement *nsinput;
41 } HTMLInputElement;
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);
74 return E_NOTIMPL;
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);
82 return E_NOTIMPL;
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,
91 lcid, rgDispId);
92 return E_NOTIMPL;
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);
102 return E_NOTIMPL;
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));
109 return E_NOTIMPL;
112 static HRESULT WINAPI HTMLInputElement_get_type(IHTMLInputElement *iface, BSTR *p)
114 HTMLInputElement *This = HTMLINPUT_THIS(iface);
115 nsAString type_str;
116 const PRUnichar *type;
117 nsresult nsres;
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);
127 }else {
128 ERR("GetType failed: %08x\n", nsres);
131 nsAString_Finish(&type_str);
133 TRACE("type=%s\n", debugstr_w(*p));
134 return S_OK;
137 static HRESULT WINAPI HTMLInputElement_put_value(IHTMLInputElement *iface, BSTR v)
139 HTMLInputElement *This = HTMLINPUT_THIS(iface);
140 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
141 return E_NOTIMPL;
144 static HRESULT WINAPI HTMLInputElement_get_value(IHTMLInputElement *iface, BSTR *p)
146 HTMLInputElement *This = HTMLINPUT_THIS(iface);
147 nsAString value_str;
148 const PRUnichar *value = NULL;
149 nsresult nsres;
151 TRACE("(%p)->(%p)\n", This, p);
153 nsAString_Init(&value_str, NULL);
155 nsres = nsIDOMHTMLInputElement_GetValue(This->nsinput, &value_str);
156 if(NS_SUCCEEDED(nsres)) {
157 nsAString_GetData(&value_str, &value);
158 *p = SysAllocString(value);
159 }else {
160 ERR("GetValue failed: %08x\n", nsres);
163 nsAString_Finish(&value_str);
165 TRACE("value=%s\n", debugstr_w(*p));
166 return S_OK;
169 static HRESULT WINAPI HTMLInputElement_put_name(IHTMLInputElement *iface, BSTR v)
171 HTMLInputElement *This = HTMLINPUT_THIS(iface);
172 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
173 return E_NOTIMPL;
176 static HRESULT WINAPI HTMLInputElement_get_name(IHTMLInputElement *iface, BSTR *p)
178 HTMLInputElement *This = HTMLINPUT_THIS(iface);
179 nsAString name_str;
180 const PRUnichar *name;
181 nsresult nsres;
183 TRACE("(%p)->(%p)\n", This, p);
185 nsAString_Init(&name_str, NULL);
187 nsres = nsIDOMHTMLInputElement_GetName(This->nsinput, &name_str);
188 if(NS_SUCCEEDED(nsres)) {
189 nsAString_GetData(&name_str, &name);
190 *p = SysAllocString(name);
191 }else {
192 ERR("GetName failed: %08x\n", nsres);
193 return E_FAIL;
196 nsAString_Finish(&name_str);
198 TRACE("name=%s\n", debugstr_w(*p));
199 return S_OK;
202 static HRESULT WINAPI HTMLInputElement_put_status(IHTMLInputElement *iface, VARIANT_BOOL v)
204 HTMLInputElement *This = HTMLINPUT_THIS(iface);
205 FIXME("(%p)->(%x)\n", This, v);
206 return E_NOTIMPL;
209 static HRESULT WINAPI HTMLInputElement_get_status(IHTMLInputElement *iface, VARIANT_BOOL *p)
211 HTMLInputElement *This = HTMLINPUT_THIS(iface);
212 FIXME("(%p)->(%p)\n", This, p);
213 return E_NOTIMPL;
216 static HRESULT WINAPI HTMLInputElement_put_disabled(IHTMLInputElement *iface, VARIANT_BOOL v)
218 HTMLInputElement *This = HTMLINPUT_THIS(iface);
219 FIXME("(%p)->(%x)\n", This, v);
220 return E_NOTIMPL;
223 static HRESULT WINAPI HTMLInputElement_get_disabled(IHTMLInputElement *iface, VARIANT_BOOL *p)
225 HTMLInputElement *This = HTMLINPUT_THIS(iface);
226 PRBool disabled = FALSE;
228 TRACE("(%p)->(%p)\n", This, p);
230 nsIDOMHTMLInputElement_GetDisabled(This->nsinput, &disabled);
232 *p = disabled ? VARIANT_TRUE : VARIANT_FALSE;
233 return S_OK;
236 static HRESULT WINAPI HTMLInputElement_get_form(IHTMLInputElement *iface, IHTMLFormElement **p)
238 HTMLInputElement *This = HTMLINPUT_THIS(iface);
239 FIXME("(%p)->(%p)\n", This, p);
240 return E_NOTIMPL;
243 static HRESULT WINAPI HTMLInputElement_put_size(IHTMLInputElement *iface, long v)
245 HTMLInputElement *This = HTMLINPUT_THIS(iface);
246 FIXME("(%p)->(%ld)\n", This, v);
247 return E_NOTIMPL;
250 static HRESULT WINAPI HTMLInputElement_get_size(IHTMLInputElement *iface, long *p)
252 HTMLInputElement *This = HTMLINPUT_THIS(iface);
253 FIXME("(%p)->(%p)\n", This, p);
254 return E_NOTIMPL;
257 static HRESULT WINAPI HTMLInputElement_put_maxLength(IHTMLInputElement *iface, long v)
259 HTMLInputElement *This = HTMLINPUT_THIS(iface);
260 FIXME("(%p)->(%ld)\n", This, v);
261 return E_NOTIMPL;
264 static HRESULT WINAPI HTMLInputElement_get_maxLength(IHTMLInputElement *iface, long *p)
266 HTMLInputElement *This = HTMLINPUT_THIS(iface);
267 FIXME("(%p)->(%p)\n", This, p);
268 return E_NOTIMPL;
271 static HRESULT WINAPI HTMLInputElement_select(IHTMLInputElement *iface)
273 HTMLInputElement *This = HTMLINPUT_THIS(iface);
274 FIXME("(%p)\n", This);
275 return E_NOTIMPL;
278 static HRESULT WINAPI HTMLInputElement_put_onchange(IHTMLInputElement *iface, VARIANT v)
280 HTMLInputElement *This = HTMLINPUT_THIS(iface);
281 FIXME("(%p)->()\n", This);
282 return E_NOTIMPL;
285 static HRESULT WINAPI HTMLInputElement_get_onchange(IHTMLInputElement *iface, VARIANT *p)
287 HTMLInputElement *This = HTMLINPUT_THIS(iface);
288 FIXME("(%p)->(%p)\n", This, p);
289 return E_NOTIMPL;
292 static HRESULT WINAPI HTMLInputElement_put_onselect(IHTMLInputElement *iface, VARIANT v)
294 HTMLInputElement *This = HTMLINPUT_THIS(iface);
295 FIXME("(%p)->()\n", This);
296 return E_NOTIMPL;
299 static HRESULT WINAPI HTMLInputElement_get_onselect(IHTMLInputElement *iface, VARIANT *p)
301 HTMLInputElement *This = HTMLINPUT_THIS(iface);
302 FIXME("(%p)->(%p)\n", This, p);
303 return E_NOTIMPL;
306 static HRESULT WINAPI HTMLInputElement_put_defaultValue(IHTMLInputElement *iface, BSTR v)
308 HTMLInputElement *This = HTMLINPUT_THIS(iface);
309 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
310 return E_NOTIMPL;
313 static HRESULT WINAPI HTMLInputElement_get_defaultValue(IHTMLInputElement *iface, BSTR *p)
315 HTMLInputElement *This = HTMLINPUT_THIS(iface);
316 FIXME("(%p)->(%p)\n", This, p);
317 return E_NOTIMPL;
320 static HRESULT WINAPI HTMLInputElement_put_readOnly(IHTMLInputElement *iface, VARIANT_BOOL v)
322 HTMLInputElement *This = HTMLINPUT_THIS(iface);
323 FIXME("(%p)->(%x)\n", This, v);
324 return E_NOTIMPL;
327 static HRESULT WINAPI HTMLInputElement_get_readOnly(IHTMLInputElement *iface, VARIANT_BOOL *p)
329 HTMLInputElement *This = HTMLINPUT_THIS(iface);
330 FIXME("(%p)->(%p)\n", This, p);
331 return E_NOTIMPL;
334 static HRESULT WINAPI HTMLInputElement_createTextRange(IHTMLInputElement *iface, IHTMLTxtRange **range)
336 HTMLInputElement *This = HTMLINPUT_THIS(iface);
337 FIXME("(%p)->(%p)\n", This, range);
338 return E_NOTIMPL;
341 static HRESULT WINAPI HTMLInputElement_put_indeterminate(IHTMLInputElement *iface, VARIANT_BOOL v)
343 HTMLInputElement *This = HTMLINPUT_THIS(iface);
344 FIXME("(%p)->(%x)\n", This, v);
345 return E_NOTIMPL;
348 static HRESULT WINAPI HTMLInputElement_get_indeterminate(IHTMLInputElement *iface, VARIANT_BOOL *p)
350 HTMLInputElement *This = HTMLINPUT_THIS(iface);
351 FIXME("(%p)->(%p)\n", This, p);
352 return E_NOTIMPL;
355 static HRESULT WINAPI HTMLInputElement_put_defaultChecked(IHTMLInputElement *iface, VARIANT_BOOL v)
357 HTMLInputElement *This = HTMLINPUT_THIS(iface);
358 FIXME("(%p)->(%x)\n", This, v);
359 return E_NOTIMPL;
362 static HRESULT WINAPI HTMLInputElement_get_defaultChecked(IHTMLInputElement *iface, VARIANT_BOOL *p)
364 HTMLInputElement *This = HTMLINPUT_THIS(iface);
365 FIXME("(%p)->(%p)\n", This, p);
366 return E_NOTIMPL;
369 static HRESULT WINAPI HTMLInputElement_put_checked(IHTMLInputElement *iface, VARIANT_BOOL v)
371 HTMLInputElement *This = HTMLINPUT_THIS(iface);
372 FIXME("(%p)->(%x)\n", This, v);
373 return E_NOTIMPL;
376 static HRESULT WINAPI HTMLInputElement_get_checked(IHTMLInputElement *iface, VARIANT_BOOL *p)
378 HTMLInputElement *This = HTMLINPUT_THIS(iface);
379 PRBool checked;
380 nsresult nsres;
382 TRACE("(%p)->(%p)\n", This, p);
384 nsres = nsIDOMHTMLInputElement_GetChecked(This->nsinput, &checked);
385 if(NS_FAILED(nsres)) {
386 ERR("GetChecked failed: %08x\n", nsres);
387 return E_FAIL;
390 *p = checked ? VARIANT_TRUE : VARIANT_FALSE;
391 TRACE("checked=%x\n", *p);
392 return S_OK;
395 static HRESULT WINAPI HTMLInputElement_put_border(IHTMLInputElement *iface, VARIANT v)
397 HTMLInputElement *This = HTMLINPUT_THIS(iface);
398 FIXME("(%p)->()\n", This);
399 return E_NOTIMPL;
402 static HRESULT WINAPI HTMLInputElement_get_border(IHTMLInputElement *iface, VARIANT *p)
404 HTMLInputElement *This = HTMLINPUT_THIS(iface);
405 FIXME("(%p)->(%p)\n", This, p);
406 return E_NOTIMPL;
409 static HRESULT WINAPI HTMLInputElement_put_vspace(IHTMLInputElement *iface, long v)
411 HTMLInputElement *This = HTMLINPUT_THIS(iface);
412 FIXME("(%p)->(%ld)\n", This, v);
413 return E_NOTIMPL;
416 static HRESULT WINAPI HTMLInputElement_get_vspace(IHTMLInputElement *iface, long *p)
418 HTMLInputElement *This = HTMLINPUT_THIS(iface);
419 FIXME("(%p)->(%p)\n", This, p);
420 return E_NOTIMPL;
423 static HRESULT WINAPI HTMLInputElement_put_hspace(IHTMLInputElement *iface, long v)
425 HTMLInputElement *This = HTMLINPUT_THIS(iface);
426 FIXME("(%p)->(%ld)\n", This, v);
427 return E_NOTIMPL;
430 static HRESULT WINAPI HTMLInputElement_get_hspace(IHTMLInputElement *iface, long *p)
432 HTMLInputElement *This = HTMLINPUT_THIS(iface);
433 FIXME("(%p)->(%p)\n", This, p);
434 return E_NOTIMPL;
437 static HRESULT WINAPI HTMLInputElement_put_alt(IHTMLInputElement *iface, BSTR v)
439 HTMLInputElement *This = HTMLINPUT_THIS(iface);
440 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
441 return E_NOTIMPL;
444 static HRESULT WINAPI HTMLInputElement_get_alt(IHTMLInputElement *iface, BSTR *p)
446 HTMLInputElement *This = HTMLINPUT_THIS(iface);
447 FIXME("(%p)->(%p)\n", This, p);
448 return E_NOTIMPL;
451 static HRESULT WINAPI HTMLInputElement_put_src(IHTMLInputElement *iface, BSTR v)
453 HTMLInputElement *This = HTMLINPUT_THIS(iface);
454 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
455 return E_NOTIMPL;
458 static HRESULT WINAPI HTMLInputElement_get_src(IHTMLInputElement *iface, BSTR *p)
460 HTMLInputElement *This = HTMLINPUT_THIS(iface);
461 FIXME("(%p)->(%p)\n", This, p);
462 return E_NOTIMPL;
465 static HRESULT WINAPI HTMLInputElement_put_lowsrc(IHTMLInputElement *iface, BSTR v)
467 HTMLInputElement *This = HTMLINPUT_THIS(iface);
468 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
469 return E_NOTIMPL;
472 static HRESULT WINAPI HTMLInputElement_get_lowsrc(IHTMLInputElement *iface, BSTR *p)
474 HTMLInputElement *This = HTMLINPUT_THIS(iface);
475 FIXME("(%p)->(%p)\n", This, p);
476 return E_NOTIMPL;
479 static HRESULT WINAPI HTMLInputElement_put_vrml(IHTMLInputElement *iface, BSTR v)
481 HTMLInputElement *This = HTMLINPUT_THIS(iface);
482 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
483 return E_NOTIMPL;
486 static HRESULT WINAPI HTMLInputElement_get_vrml(IHTMLInputElement *iface, BSTR *p)
488 HTMLInputElement *This = HTMLINPUT_THIS(iface);
489 FIXME("(%p)->(%p)\n", This, p);
490 return E_NOTIMPL;
493 static HRESULT WINAPI HTMLInputElement_put_dynsrc(IHTMLInputElement *iface, BSTR v)
495 HTMLInputElement *This = HTMLINPUT_THIS(iface);
496 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
497 return E_NOTIMPL;
500 static HRESULT WINAPI HTMLInputElement_get_dynsrc(IHTMLInputElement *iface, BSTR *p)
502 HTMLInputElement *This = HTMLINPUT_THIS(iface);
503 FIXME("(%p)->(%p)\n", This, p);
504 return E_NOTIMPL;
507 static HRESULT WINAPI HTMLInputElement_get_readyState(IHTMLInputElement *iface, BSTR *p)
509 HTMLInputElement *This = HTMLINPUT_THIS(iface);
510 FIXME("(%p)->(%p)\n", This, p);
511 return E_NOTIMPL;
514 static HRESULT WINAPI HTMLInputElement_get_complete(IHTMLInputElement *iface, VARIANT_BOOL *p)
516 HTMLInputElement *This = HTMLINPUT_THIS(iface);
517 FIXME("(%p)->(%p)\n", This, p);
518 return E_NOTIMPL;
521 static HRESULT WINAPI HTMLInputElement_put_loop(IHTMLInputElement *iface, VARIANT v)
523 HTMLInputElement *This = HTMLINPUT_THIS(iface);
524 FIXME("(%p)->()\n", This);
525 return E_NOTIMPL;
528 static HRESULT WINAPI HTMLInputElement_get_loop(IHTMLInputElement *iface, VARIANT *p)
530 HTMLInputElement *This = HTMLINPUT_THIS(iface);
531 FIXME("(%p)->(%p)\n", This, p);
532 return E_NOTIMPL;
535 static HRESULT WINAPI HTMLInputElement_put_align(IHTMLInputElement *iface, BSTR v)
537 HTMLInputElement *This = HTMLINPUT_THIS(iface);
538 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
539 return E_NOTIMPL;
542 static HRESULT WINAPI HTMLInputElement_get_align(IHTMLInputElement *iface, BSTR *p)
544 HTMLInputElement *This = HTMLINPUT_THIS(iface);
545 FIXME("(%p)->(%p)\n", This, p);
546 return E_NOTIMPL;
549 static HRESULT WINAPI HTMLInputElement_put_onload(IHTMLInputElement *iface, VARIANT v)
551 HTMLInputElement *This = HTMLINPUT_THIS(iface);
552 FIXME("(%p)->()\n", This);
553 return E_NOTIMPL;
556 static HRESULT WINAPI HTMLInputElement_get_onload(IHTMLInputElement *iface, VARIANT *p)
558 HTMLInputElement *This = HTMLINPUT_THIS(iface);
559 FIXME("(%p)->(%p)\n", This, p);
560 return E_NOTIMPL;
563 static HRESULT WINAPI HTMLInputElement_put_onerror(IHTMLInputElement *iface, VARIANT v)
565 HTMLInputElement *This = HTMLINPUT_THIS(iface);
566 FIXME("(%p)->()\n", This);
567 return E_NOTIMPL;
570 static HRESULT WINAPI HTMLInputElement_get_onerror(IHTMLInputElement *iface, VARIANT *p)
572 HTMLInputElement *This = HTMLINPUT_THIS(iface);
573 FIXME("(%p)->(%p)\n", This, p);
574 return E_NOTIMPL;
577 static HRESULT WINAPI HTMLInputElement_put_onabort(IHTMLInputElement *iface, VARIANT v)
579 HTMLInputElement *This = HTMLINPUT_THIS(iface);
580 FIXME("(%p)->()\n", This);
581 return E_NOTIMPL;
584 static HRESULT WINAPI HTMLInputElement_get_onabort(IHTMLInputElement *iface, VARIANT *p)
586 HTMLInputElement *This = HTMLINPUT_THIS(iface);
587 FIXME("(%p)->(%p)\n", This, p);
588 return E_NOTIMPL;
591 static HRESULT WINAPI HTMLInputElement_put_width(IHTMLInputElement *iface, long v)
593 HTMLInputElement *This = HTMLINPUT_THIS(iface);
594 FIXME("(%p)->(%ld)\n", This, v);
595 return E_NOTIMPL;
598 static HRESULT WINAPI HTMLInputElement_get_width(IHTMLInputElement *iface, long *p)
600 HTMLInputElement *This = HTMLINPUT_THIS(iface);
601 FIXME("(%p)->(%p)\n", This, p);
602 return E_NOTIMPL;
605 static HRESULT WINAPI HTMLInputElement_put_height(IHTMLInputElement *iface, long v)
607 HTMLInputElement *This = HTMLINPUT_THIS(iface);
608 FIXME("(%p)->(%ld)\n", This, v);
609 return E_NOTIMPL;
612 static HRESULT WINAPI HTMLInputElement_get_height(IHTMLInputElement *iface, long *p)
614 HTMLInputElement *This = HTMLINPUT_THIS(iface);
615 FIXME("(%p)->(%p)\n", This, p);
616 return E_NOTIMPL;
619 static HRESULT WINAPI HTMLInputElement_put_start(IHTMLInputElement *iface, BSTR v)
621 HTMLInputElement *This = HTMLINPUT_THIS(iface);
622 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
623 return E_NOTIMPL;
626 static HRESULT WINAPI HTMLInputElement_get_start(IHTMLInputElement *iface, BSTR *p)
628 HTMLInputElement *This = HTMLINPUT_THIS(iface);
629 FIXME("(%p)->(%p)\n", This, p);
630 return E_NOTIMPL;
633 #undef HTMLINPUT_THIS
635 static const IHTMLInputElementVtbl HTMLInputElementVtbl = {
636 HTMLInputElement_QueryInterface,
637 HTMLInputElement_AddRef,
638 HTMLInputElement_Release,
639 HTMLInputElement_GetTypeInfoCount,
640 HTMLInputElement_GetTypeInfo,
641 HTMLInputElement_GetIDsOfNames,
642 HTMLInputElement_Invoke,
643 HTMLInputElement_put_type,
644 HTMLInputElement_get_type,
645 HTMLInputElement_put_value,
646 HTMLInputElement_get_value,
647 HTMLInputElement_put_name,
648 HTMLInputElement_get_name,
649 HTMLInputElement_put_status,
650 HTMLInputElement_get_status,
651 HTMLInputElement_put_disabled,
652 HTMLInputElement_get_disabled,
653 HTMLInputElement_get_form,
654 HTMLInputElement_put_size,
655 HTMLInputElement_get_size,
656 HTMLInputElement_put_maxLength,
657 HTMLInputElement_get_maxLength,
658 HTMLInputElement_select,
659 HTMLInputElement_put_onchange,
660 HTMLInputElement_get_onchange,
661 HTMLInputElement_put_onselect,
662 HTMLInputElement_get_onselect,
663 HTMLInputElement_put_defaultValue,
664 HTMLInputElement_get_defaultValue,
665 HTMLInputElement_put_readOnly,
666 HTMLInputElement_get_readOnly,
667 HTMLInputElement_createTextRange,
668 HTMLInputElement_put_indeterminate,
669 HTMLInputElement_get_indeterminate,
670 HTMLInputElement_put_defaultChecked,
671 HTMLInputElement_get_defaultChecked,
672 HTMLInputElement_put_checked,
673 HTMLInputElement_get_checked,
674 HTMLInputElement_put_border,
675 HTMLInputElement_get_border,
676 HTMLInputElement_put_vspace,
677 HTMLInputElement_get_vspace,
678 HTMLInputElement_put_hspace,
679 HTMLInputElement_get_hspace,
680 HTMLInputElement_put_alt,
681 HTMLInputElement_get_alt,
682 HTMLInputElement_put_src,
683 HTMLInputElement_get_src,
684 HTMLInputElement_put_lowsrc,
685 HTMLInputElement_get_lowsrc,
686 HTMLInputElement_put_vrml,
687 HTMLInputElement_get_vrml,
688 HTMLInputElement_put_dynsrc,
689 HTMLInputElement_get_dynsrc,
690 HTMLInputElement_get_readyState,
691 HTMLInputElement_get_complete,
692 HTMLInputElement_put_loop,
693 HTMLInputElement_get_loop,
694 HTMLInputElement_put_align,
695 HTMLInputElement_get_align,
696 HTMLInputElement_put_onload,
697 HTMLInputElement_get_onload,
698 HTMLInputElement_put_onerror,
699 HTMLInputElement_get_onerror,
700 HTMLInputElement_put_onabort,
701 HTMLInputElement_get_onabort,
702 HTMLInputElement_put_width,
703 HTMLInputElement_get_width,
704 HTMLInputElement_put_height,
705 HTMLInputElement_get_height,
706 HTMLInputElement_put_start,
707 HTMLInputElement_get_start
710 #define HTMLINPUTTEXT_THIS(iface) DEFINE_THIS(HTMLInputElement, HTMLInputTextElement, iface)
712 static HRESULT WINAPI HTMLInputTextElement_QueryInterface(IHTMLInputTextElement *iface,
713 REFIID riid, void **ppv)
715 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
717 return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
720 static ULONG WINAPI HTMLInputTextElement_AddRef(IHTMLInputTextElement *iface)
722 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
724 return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
727 static ULONG WINAPI HTMLInputTextElement_Release(IHTMLInputTextElement *iface)
729 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
731 return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
734 static HRESULT WINAPI HTMLInputTextElement_GetTypeInfoCount(IHTMLInputTextElement *iface, UINT *pctinfo)
736 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
737 FIXME("(%p)->(%p)\n", This, pctinfo);
738 return E_NOTIMPL;
741 static HRESULT WINAPI HTMLInputTextElement_GetTypeInfo(IHTMLInputTextElement *iface, UINT iTInfo,
742 LCID lcid, ITypeInfo **ppTInfo)
744 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
745 FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
746 return E_NOTIMPL;
749 static HRESULT WINAPI HTMLInputTextElement_GetIDsOfNames(IHTMLInputTextElement *iface, REFIID riid,
750 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
752 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
753 FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
754 lcid, rgDispId);
755 return E_NOTIMPL;
758 static HRESULT WINAPI HTMLInputTextElement_Invoke(IHTMLInputTextElement *iface, DISPID dispIdMember,
759 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
760 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
762 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
763 FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
764 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
765 return E_NOTIMPL;
768 static HRESULT WINAPI HTMLInputTextElement_get_type(IHTMLInputTextElement *iface, BSTR *p)
770 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
772 TRACE("(%p)->(%p)\n", This, p);
774 return IHTMLInputElement_get_type(HTMLINPUT(This), p);
777 static HRESULT WINAPI HTMLInputTextElement_put_value(IHTMLInputTextElement *iface, BSTR v)
779 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
781 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
783 return IHTMLInputElement_put_value(HTMLINPUT(This), v);
786 static HRESULT WINAPI HTMLInputTextElement_get_value(IHTMLInputTextElement *iface, BSTR *p)
788 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
790 TRACE("(%p)->(%p)\n", This, p);
792 return IHTMLInputTextElement_get_value(HTMLINPUT(This), p);
795 static HRESULT WINAPI HTMLInputTextElement_put_name(IHTMLInputTextElement *iface, BSTR v)
797 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
799 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
801 return IHTMLInputElement_put_name(HTMLINPUT(This), v);
804 static HRESULT WINAPI HTMLInputTextElement_get_name(IHTMLInputTextElement *iface, BSTR *p)
806 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
808 TRACE("(%p)->(%p)\n", This, p);
810 return IHTMLInputElement_get_name(HTMLINPUT(This), p);
813 static HRESULT WINAPI HTMLInputTextElement_put_status(IHTMLInputTextElement *iface, VARIANT v)
815 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
816 FIXME("(%p)->(v)\n", This);
817 return E_NOTIMPL;
820 static HRESULT WINAPI HTMLInputTextElement_get_status(IHTMLInputTextElement *iface, VARIANT *p)
822 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
823 TRACE("(%p)->(v)\n", This);
824 return E_NOTIMPL;
827 static HRESULT WINAPI HTMLInputTextElement_put_disabled(IHTMLInputTextElement *iface, VARIANT_BOOL v)
829 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
831 TRACE("(%p)->(%x)\n", This, v);
833 return IHTMLInputElement_put_disabled(HTMLINPUT(This), v);
836 static HRESULT WINAPI HTMLInputTextElement_get_disabled(IHTMLInputTextElement *iface, VARIANT_BOOL *p)
838 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
840 TRACE("(%p)->(%p)\n", This, p);
842 return IHTMLInputElement_get_disabled(HTMLINPUT(This), p);
845 static HRESULT WINAPI HTMLInputTextElement_get_form(IHTMLInputTextElement *iface, IHTMLFormElement **p)
847 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
849 TRACE("(%p)->(%p)\n", This, p);
851 return IHTMLInputElement_get_form(HTMLINPUT(This), p);
854 static HRESULT WINAPI HTMLInputTextElement_put_defaultValue(IHTMLInputTextElement *iface, BSTR v)
856 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
858 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
860 return IHTMLInputElement_put_defaultValue(HTMLINPUT(This), v);
863 static HRESULT WINAPI HTMLInputTextElement_get_defaultValue(IHTMLInputTextElement *iface, BSTR *p)
865 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
867 TRACE("(%p)->(%p)\n", This, p);
869 return IHTMLInputElement_get_defaultValue(HTMLINPUT(This), p);
872 static HRESULT WINAPI HTMLInputTextElement_put_size(IHTMLInputTextElement *iface, long v)
874 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
876 TRACE("(%p)->(%ld)\n", This, v);
878 return IHTMLInputElement_put_size(HTMLINPUT(This), v);
881 static HRESULT WINAPI HTMLInputTextElement_get_size(IHTMLInputTextElement *iface, long *p)
883 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
885 TRACE("(%p)->(%p)\n", This, p);
887 return IHTMLInputElement_get_size(HTMLINPUT(This), p);
890 static HRESULT WINAPI HTMLInputTextElement_put_maxLength(IHTMLInputTextElement *iface, long v)
892 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
894 TRACE("(%p)->(%ld)\n", This, v);
896 return IHTMLInputElement_put_maxLength(HTMLINPUT(This), v);
899 static HRESULT WINAPI HTMLInputTextElement_get_maxLength(IHTMLInputTextElement *iface, long *p)
901 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
903 TRACE("(%p)->(%p)\n", This, p);
905 return IHTMLInputElement_get_maxLength(HTMLINPUT(This), p);
908 static HRESULT WINAPI HTMLInputTextElement_select(IHTMLInputTextElement *iface)
910 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
912 TRACE("(%p)\n", This);
914 return IHTMLInputElement_select(HTMLINPUT(This));
917 static HRESULT WINAPI HTMLInputTextElement_put_onchange(IHTMLInputTextElement *iface, VARIANT v)
919 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
921 TRACE("(%p)->()\n", This);
923 return IHTMLInputElement_put_onchange(HTMLINPUT(This), v);
926 static HRESULT WINAPI HTMLInputTextElement_get_onchange(IHTMLInputTextElement *iface, VARIANT *p)
928 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
930 TRACE("(%p)->(%p)\n", This, p);
932 return IHTMLInputElement_get_onchange(HTMLINPUT(This), p);
935 static HRESULT WINAPI HTMLInputTextElement_put_onselect(IHTMLInputTextElement *iface, VARIANT v)
937 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
939 TRACE("(%p)->()\n", This);
941 return IHTMLInputElement_put_onselect(HTMLINPUT(This), v);
944 static HRESULT WINAPI HTMLInputTextElement_get_onselect(IHTMLInputTextElement *iface, VARIANT *p)
946 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
948 TRACE("(%p)->(%p)\n", This, p);
950 return IHTMLInputElement_get_onselect(HTMLINPUT(This), p);
953 static HRESULT WINAPI HTMLInputTextElement_put_readOnly(IHTMLInputTextElement *iface, VARIANT_BOOL v)
955 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
957 TRACE("(%p)->(%x)\n", This, v);
959 return IHTMLInputElement_put_readOnly(HTMLINPUT(This), v);
962 static HRESULT WINAPI HTMLInputTextElement_get_readOnly(IHTMLInputTextElement *iface, VARIANT_BOOL *p)
964 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
966 TRACE("(%p)->(%p)\n", This, p);
968 return IHTMLInputElement_get_readOnly(HTMLINPUT(This), p);
971 static HRESULT WINAPI HTMLInputTextElement_createTextRange(IHTMLInputTextElement *iface, IHTMLTxtRange **range)
973 HTMLInputElement *This = HTMLINPUTTEXT_THIS(iface);
975 TRACE("(%p)->(%p)\n", This, range);
977 return IHTMLInputElement_createTextRange(HTMLINPUT(This), range);
980 #undef HTMLINPUT_THIS
982 static const IHTMLInputTextElementVtbl HTMLInputTextElementVtbl = {
983 HTMLInputTextElement_QueryInterface,
984 HTMLInputTextElement_AddRef,
985 HTMLInputTextElement_Release,
986 HTMLInputTextElement_GetTypeInfoCount,
987 HTMLInputTextElement_GetTypeInfo,
988 HTMLInputTextElement_GetIDsOfNames,
989 HTMLInputTextElement_Invoke,
990 HTMLInputTextElement_get_type,
991 HTMLInputTextElement_put_value,
992 HTMLInputTextElement_get_value,
993 HTMLInputTextElement_put_name,
994 HTMLInputTextElement_get_name,
995 HTMLInputTextElement_put_status,
996 HTMLInputTextElement_get_status,
997 HTMLInputTextElement_put_disabled,
998 HTMLInputTextElement_get_disabled,
999 HTMLInputTextElement_get_form,
1000 HTMLInputTextElement_put_defaultValue,
1001 HTMLInputTextElement_get_defaultValue,
1002 HTMLInputTextElement_put_size,
1003 HTMLInputTextElement_get_size,
1004 HTMLInputTextElement_put_maxLength,
1005 HTMLInputTextElement_get_maxLength,
1006 HTMLInputTextElement_select,
1007 HTMLInputTextElement_put_onchange,
1008 HTMLInputTextElement_get_onchange,
1009 HTMLInputTextElement_put_onselect,
1010 HTMLInputTextElement_get_onselect,
1011 HTMLInputTextElement_put_readOnly,
1012 HTMLInputTextElement_get_readOnly,
1013 HTMLInputTextElement_createTextRange
1016 #define HTMLINPUT_NODE_THIS(iface) DEFINE_THIS2(HTMLInputElement, element.node, iface)
1018 static HRESULT HTMLInputElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
1020 HTMLInputElement *This = HTMLINPUT_NODE_THIS(iface);
1022 *ppv = NULL;
1024 if(IsEqualGUID(&IID_IUnknown, riid)) {
1025 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
1026 *ppv = HTMLINPUT(This);
1027 }else if(IsEqualGUID(&IID_IDispatch, riid)) {
1028 TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
1029 *ppv = HTMLINPUT(This);
1030 }else if(IsEqualGUID(&IID_IHTMLInputElement, riid)) {
1031 TRACE("(%p)->(IID_IHTMLInputElement %p)\n", This, ppv);
1032 *ppv = HTMLINPUT(This);
1033 }else if(IsEqualGUID(&IID_IHTMLInputTextElement, riid)) {
1034 TRACE("(%p)->(IID_IHTMLInputTextElement %p)\n", This, ppv);
1035 *ppv = HTMLINPUT(This);
1038 if(*ppv) {
1039 IUnknown_AddRef((IUnknown*)*ppv);
1040 return S_OK;
1043 return HTMLElement_QI(&This->element.node, riid, ppv);
1046 static void HTMLInputElement_destructor(HTMLDOMNode *iface)
1048 HTMLInputElement *This = HTMLINPUT_NODE_THIS(iface);
1050 nsIDOMHTMLInputElement_Release(This->nsinput);
1052 HTMLElement_destructor(&This->element.node);
1055 #undef HTMLINPUT_NODE_THIS
1057 static const NodeImplVtbl HTMLInputElementImplVtbl = {
1058 HTMLInputElement_QI,
1059 HTMLInputElement_destructor
1062 static const tid_t HTMLInputElement_iface_tids[] = {
1063 IHTMLDOMNode_tid,
1064 IHTMLDOMNode2_tid,
1065 IHTMLElement_tid,
1066 IHTMLElement2_tid,
1067 IHTMLInputElement_tid,
1070 static dispex_static_data_t HTMLInputElement_dispex = {
1071 NULL,
1072 DispHTMLInputElement_tid,
1073 NULL,
1074 HTMLInputElement_iface_tids
1077 HTMLElement *HTMLInputElement_Create(nsIDOMHTMLElement *nselem)
1079 HTMLInputElement *ret = heap_alloc_zero(sizeof(HTMLInputElement));
1080 nsresult nsres;
1082 ret->lpHTMLInputElementVtbl = &HTMLInputElementVtbl;
1083 ret->element.node.vtbl = &HTMLInputElementImplVtbl;
1085 init_dispex(&ret->element.node.dispex, (IUnknown*)HTMLINPUT(ret), &HTMLInputElement_dispex);
1086 HTMLElement_Init(&ret->element);
1088 nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLInputElement,
1089 (void**)&ret->nsinput);
1090 if(NS_FAILED(nsres))
1091 ERR("Could not get nsIDOMHTMLInputElement interface: %08x\n", nsres);
1093 return &ret->element;