ReactOS  0.4.13-dev-464-g6b95727
htmlinput.c
Go to the documentation of this file.
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 "mshtml_private.h"
20 
21 #include <limits.h>
22 
23 typedef struct {
25 
26  IHTMLInputElement IHTMLInputElement_iface;
27  IHTMLInputTextElement IHTMLInputTextElement_iface;
28 
31 
32 static const WCHAR forW[] = {'f','o','r',0};
33 
34 static inline HTMLInputElement *impl_from_IHTMLInputElement(IHTMLInputElement *iface)
35 {
36  return CONTAINING_RECORD(iface, HTMLInputElement, IHTMLInputElement_iface);
37 }
38 
39 static inline HTMLInputElement *impl_from_IHTMLInputTextElement(IHTMLInputTextElement *iface)
40 {
41  return CONTAINING_RECORD(iface, HTMLInputElement, IHTMLInputTextElement_iface);
42 }
43 
44 static HRESULT WINAPI HTMLInputElement_QueryInterface(IHTMLInputElement *iface,
45  REFIID riid, void **ppv)
46 {
48 
49  return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
50 }
51 
52 static ULONG WINAPI HTMLInputElement_AddRef(IHTMLInputElement *iface)
53 {
55 
56  return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
57 }
58 
59 static ULONG WINAPI HTMLInputElement_Release(IHTMLInputElement *iface)
60 {
62 
63  return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
64 }
65 
66 static HRESULT WINAPI HTMLInputElement_GetTypeInfoCount(IHTMLInputElement *iface, UINT *pctinfo)
67 {
69 
70  return IDispatchEx_GetTypeInfoCount(&This->element.node.event_target.dispex.IDispatchEx_iface, pctinfo);
71 }
72 
73 static HRESULT WINAPI HTMLInputElement_GetTypeInfo(IHTMLInputElement *iface, UINT iTInfo,
74  LCID lcid, ITypeInfo **ppTInfo)
75 {
77 
78  return IDispatchEx_GetTypeInfo(&This->element.node.event_target.dispex.IDispatchEx_iface, iTInfo, lcid,
79  ppTInfo);
80 }
81 
82 static HRESULT WINAPI HTMLInputElement_GetIDsOfNames(IHTMLInputElement *iface, REFIID riid,
83  LPOLESTR *rgszNames, UINT cNames,
84  LCID lcid, DISPID *rgDispId)
85 {
87 
88  return IDispatchEx_GetIDsOfNames(&This->element.node.event_target.dispex.IDispatchEx_iface, riid, rgszNames,
89  cNames, lcid, rgDispId);
90 }
91 
92 static HRESULT WINAPI HTMLInputElement_Invoke(IHTMLInputElement *iface, DISPID dispIdMember,
93  REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
94  VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
95 {
97 
98  return IDispatchEx_Invoke(&This->element.node.event_target.dispex.IDispatchEx_iface, dispIdMember, riid,
99  lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
100 }
101 
102 static HRESULT WINAPI HTMLInputElement_put_type(IHTMLInputElement *iface, BSTR v)
103 {
105  nsAString type_str;
106  nsresult nsres;
107 
108  TRACE("(%p)->(%s)\n", This, debugstr_w(v));
109 
110  /*
111  * FIXME:
112  * On IE setting type works only on dynamically created elements before adding them to DOM tree.
113  */
114  nsAString_InitDepend(&type_str, v);
115  nsres = nsIDOMHTMLInputElement_SetType(This->nsinput, &type_str);
116  nsAString_Finish(&type_str);
117  if(NS_FAILED(nsres)) {
118  ERR("SetType failed: %08x\n", nsres);
119  return E_FAIL;
120  }
121 
122  return S_OK;
123 }
124 
125 static HRESULT WINAPI HTMLInputElement_get_type(IHTMLInputElement *iface, BSTR *p)
126 {
128  nsAString type_str;
129  nsresult nsres;
130 
131  TRACE("(%p)->(%p)\n", This, p);
132 
133  nsAString_Init(&type_str, NULL);
134  nsres = nsIDOMHTMLInputElement_GetType(This->nsinput, &type_str);
135  return return_nsstr(nsres, &type_str, p);
136 }
137 
138 static HRESULT WINAPI HTMLInputElement_put_value(IHTMLInputElement *iface, BSTR v)
139 {
141  nsAString val_str;
142  nsresult nsres;
143 
144  TRACE("(%p)->(%s)\n", This, debugstr_w(v));
145 
146  nsAString_InitDepend(&val_str, v);
147  nsres = nsIDOMHTMLInputElement_SetValue(This->nsinput, &val_str);
148  nsAString_Finish(&val_str);
149  if(NS_FAILED(nsres))
150  ERR("SetValue failed: %08x\n", nsres);
151 
152  return S_OK;
153 }
154 
155 static HRESULT WINAPI HTMLInputElement_get_value(IHTMLInputElement *iface, BSTR *p)
156 {
159  nsresult nsres;
160 
161  TRACE("(%p)->(%p)\n", This, p);
162 
164  nsres = nsIDOMHTMLInputElement_GetValue(This->nsinput, &value_str);
165  return return_nsstr(nsres, &value_str, p);
166 }
167 
168 static HRESULT WINAPI HTMLInputElement_put_name(IHTMLInputElement *iface, BSTR v)
169 {
171  nsAString name_str;
172  nsresult nsres;
173 
174  TRACE("(%p)->(%s)\n", This, debugstr_w(v));
175 
176  nsAString_InitDepend(&name_str, v);
177  nsres = nsIDOMHTMLInputElement_SetName(This->nsinput, &name_str);
178  nsAString_Finish(&name_str);
179  if(NS_FAILED(nsres)) {
180  ERR("SetName failed: %08x\n", nsres);
181  return E_FAIL;
182  }
183 
184  return S_OK;
185 }
186 
187 static HRESULT WINAPI HTMLInputElement_get_name(IHTMLInputElement *iface, BSTR *p)
188 {
190  nsAString name_str;
191  nsresult nsres;
192 
193  TRACE("(%p)->(%p)\n", This, p);
194 
195  nsAString_Init(&name_str, NULL);
196  nsres = nsIDOMHTMLInputElement_GetName(This->nsinput, &name_str);
197  return return_nsstr(nsres, &name_str, p);
198 }
199 
200 static HRESULT WINAPI HTMLInputElement_put_status(IHTMLInputElement *iface, VARIANT_BOOL v)
201 {
203  FIXME("(%p)->(%x)\n", This, v);
204  return E_NOTIMPL;
205 }
206 
207 static HRESULT WINAPI HTMLInputElement_get_status(IHTMLInputElement *iface, VARIANT_BOOL *p)
208 {
210  FIXME("(%p)->(%p)\n", This, p);
211  return E_NOTIMPL;
212 }
213 
214 static HRESULT WINAPI HTMLInputElement_put_disabled(IHTMLInputElement *iface, VARIANT_BOOL v)
215 {
217  nsresult nsres;
218 
219  TRACE("(%p)->(%x)\n", This, v);
220 
221  nsres = nsIDOMHTMLInputElement_SetDisabled(This->nsinput, v != VARIANT_FALSE);
222  if(NS_FAILED(nsres))
223  ERR("SetDisabled failed: %08x\n", nsres);
224 
225  return S_OK;
226 }
227 
228 static HRESULT WINAPI HTMLInputElement_get_disabled(IHTMLInputElement *iface, VARIANT_BOOL *p)
229 {
231  cpp_bool disabled = FALSE;
232 
233  TRACE("(%p)->(%p)\n", This, p);
234 
235  nsIDOMHTMLInputElement_GetDisabled(This->nsinput, &disabled);
236 
237  *p = disabled ? VARIANT_TRUE : VARIANT_FALSE;
238  return S_OK;
239 }
240 
241 static HRESULT WINAPI HTMLInputElement_get_form(IHTMLInputElement *iface, IHTMLFormElement **p)
242 {
244  nsIDOMHTMLFormElement *nsform;
245  nsIDOMNode *form_node;
246  HTMLDOMNode *node;
247  HRESULT hres;
248  nsresult nsres;
249 
250  TRACE("(%p)->(%p)\n", This, p);
251 
252  nsres = nsIDOMHTMLInputElement_GetForm(This->nsinput, &nsform);
253  if (NS_FAILED(nsres) || nsform == NULL) {
254  ERR("GetForm failed: %08x, nsform: %p\n", nsres, nsform);
255  *p = NULL;
256  return E_FAIL;
257  }
258 
259  nsres = nsIDOMHTMLFormElement_QueryInterface(nsform, &IID_nsIDOMNode, (void**)&form_node);
260  nsIDOMHTMLFormElement_Release(nsform);
261  assert(nsres == NS_OK);
262 
263  hres = get_node(This->element.node.doc, form_node, TRUE, &node);
264  nsIDOMNode_Release(form_node);
265  if (FAILED(hres))
266  return hres;
267 
268  hres = IHTMLDOMNode_QueryInterface(&node->IHTMLDOMNode_iface, &IID_IHTMLElement, (void**)p);
269 
271  return hres;
272 }
273 
274 static HRESULT WINAPI HTMLInputElement_put_size(IHTMLInputElement *iface, LONG v)
275 {
277  UINT32 val = v;
278  nsresult nsres;
279 
280  TRACE("(%p)->(%d)\n", This, v);
281  if (v <= 0)
283 
284  nsres = nsIDOMHTMLInputElement_SetSize(This->nsinput, val);
285  if (NS_FAILED(nsres)) {
286  ERR("Set Size(%u) failed: %08x\n", val, nsres);
287  return E_FAIL;
288  }
289  return S_OK;
290 }
291 
292 static HRESULT WINAPI HTMLInputElement_get_size(IHTMLInputElement *iface, LONG *p)
293 {
295  UINT32 val;
296  nsresult nsres;
297 
298  TRACE("(%p)->(%p)\n", This, p);
299  if (p == NULL)
300  return E_INVALIDARG;
301 
302  nsres = nsIDOMHTMLInputElement_GetSize(This->nsinput, &val);
303  if (NS_FAILED(nsres)) {
304  ERR("Get Size failed: %08x\n", nsres);
305  return E_FAIL;
306  }
307  *p = val;
308  return S_OK;
309 }
310 
311 static HRESULT WINAPI HTMLInputElement_put_maxLength(IHTMLInputElement *iface, LONG v)
312 {
314  nsresult nsres;
315 
316  TRACE("(%p)->(%d)\n", This, v);
317 
318  nsres = nsIDOMHTMLInputElement_SetMaxLength(This->nsinput, v);
319  if(NS_FAILED(nsres)) {
320  /* FIXME: Gecko throws an error on negative values, while MSHTML should accept them */
321  FIXME("SetMaxLength failed\n");
322  return E_FAIL;
323  }
324 
325  return S_OK;
326 }
327 
328 static HRESULT WINAPI HTMLInputElement_get_maxLength(IHTMLInputElement *iface, LONG *p)
329 {
331  LONG max_length;
332  nsresult nsres;
333 
334  TRACE("(%p)->(%p)\n", This, p);
335 
336  nsres = nsIDOMHTMLInputElement_GetMaxLength(This->nsinput, &max_length);
337  assert(nsres == NS_OK);
338 
339  /* Gecko reports -1 as default value, while MSHTML uses INT_MAX */
340  *p = max_length == -1 ? INT_MAX : max_length;
341  return S_OK;
342 }
343 
344 static HRESULT WINAPI HTMLInputElement_select(IHTMLInputElement *iface)
345 {
347  nsresult nsres;
348 
349  TRACE("(%p)\n", This);
350 
351  nsres = nsIDOMHTMLInputElement_Select(This->nsinput);
352  if(NS_FAILED(nsres)) {
353  ERR("Select failed: %08x\n", nsres);
354  return E_FAIL;
355  }
356 
357  return S_OK;
358 }
359 
360 static HRESULT WINAPI HTMLInputElement_put_onchange(IHTMLInputElement *iface, VARIANT v)
361 {
363 
364  TRACE("(%p)->()\n", This);
365 
366  return set_node_event(&This->element.node, EVENTID_CHANGE, &v);
367 }
368 
369 static HRESULT WINAPI HTMLInputElement_get_onchange(IHTMLInputElement *iface, VARIANT *p)
370 {
372 
373  TRACE("(%p)->(%p)\n", This, p);
374 
375  return get_node_event(&This->element.node, EVENTID_CHANGE, p);
376 }
377 
378 static HRESULT WINAPI HTMLInputElement_put_onselect(IHTMLInputElement *iface, VARIANT v)
379 {
381  FIXME("(%p)->()\n", This);
382  return E_NOTIMPL;
383 }
384 
385 static HRESULT WINAPI HTMLInputElement_get_onselect(IHTMLInputElement *iface, VARIANT *p)
386 {
388  FIXME("(%p)->(%p)\n", This, p);
389  return E_NOTIMPL;
390 }
391 
392 static HRESULT WINAPI HTMLInputElement_put_defaultValue(IHTMLInputElement *iface, BSTR v)
393 {
395  nsAString nsstr;
396  nsresult nsres;
397 
398  TRACE("(%p)->(%s)\n", This, debugstr_w(v));
399 
400  nsAString_InitDepend(&nsstr, v);
401  nsres = nsIDOMHTMLInputElement_SetDefaultValue(This->nsinput, &nsstr);
402  nsAString_Finish(&nsstr);
403  if(NS_FAILED(nsres)) {
404  ERR("SetValue failed: %08x\n", nsres);
405  return E_FAIL;
406  }
407 
408  return S_OK;
409 }
410 
411 static HRESULT WINAPI HTMLInputElement_get_defaultValue(IHTMLInputElement *iface, BSTR *p)
412 {
414  nsAString nsstr;
415  nsresult nsres;
416 
417  TRACE("(%p)->(%p)\n", This, p);
418 
419  nsAString_Init(&nsstr, NULL);
420  nsres = nsIDOMHTMLInputElement_GetDefaultValue(This->nsinput, &nsstr);
421  return return_nsstr(nsres, &nsstr, p);
422 }
423 
424 static HRESULT WINAPI HTMLInputElement_put_readOnly(IHTMLInputElement *iface, VARIANT_BOOL v)
425 {
427  nsresult nsres;
428 
429  TRACE("(%p)->(%x)\n", This, v);
430 
431  nsres = nsIDOMHTMLInputElement_SetReadOnly(This->nsinput, v != VARIANT_FALSE);
432  if (NS_FAILED(nsres)) {
433  ERR("Set ReadOnly Failed: %08x\n", nsres);
434  return E_FAIL;
435  }
436  return S_OK;
437 }
438 
439 static HRESULT WINAPI HTMLInputElement_get_readOnly(IHTMLInputElement *iface, VARIANT_BOOL *p)
440 {
442  nsresult nsres;
443  cpp_bool b;
444 
445  TRACE("(%p)->(%p)\n", This, p);
446 
447  nsres = nsIDOMHTMLInputElement_GetReadOnly(This->nsinput, &b);
448  if (NS_FAILED(nsres)) {
449  ERR("Get ReadOnly Failed: %08x\n", nsres);
450  return E_FAIL;
451  }
452  *p = b ? VARIANT_TRUE : VARIANT_FALSE;
453  return S_OK;
454 }
455 
456 static HRESULT WINAPI HTMLInputElement_createTextRange(IHTMLInputElement *iface, IHTMLTxtRange **range)
457 {
459  FIXME("(%p)->(%p)\n", This, range);
460  return E_NOTIMPL;
461 }
462 
464 {
466  FIXME("(%p)->(%x)\n", This, v);
467  return E_NOTIMPL;
468 }
469 
471 {
473  FIXME("(%p)->(%p)\n", This, p);
474  return E_NOTIMPL;
475 }
476 
478 {
480  nsresult nsres;
481 
482  TRACE("(%p)->(%x)\n", This, v);
483 
484  nsres = nsIDOMHTMLInputElement_SetDefaultChecked(This->nsinput, v != VARIANT_FALSE);
485  if(NS_FAILED(nsres)) {
486  ERR("SetDefaultChecked failed: %08x\n", nsres);
487  return E_FAIL;
488  }
489 
490  return S_OK;
491 }
492 
494 {
496  cpp_bool default_checked = FALSE;
497  nsresult nsres;
498 
499  TRACE("(%p)->(%p)\n", This, p);
500 
501  nsres = nsIDOMHTMLInputElement_GetDefaultChecked(This->nsinput, &default_checked);
502  if(NS_FAILED(nsres)) {
503  ERR("GetDefaultChecked failed: %08x\n", nsres);
504  return E_FAIL;
505  }
506 
507  *p = default_checked ? VARIANT_TRUE : VARIANT_FALSE;
508  return S_OK;
509 }
510 
511 static HRESULT WINAPI HTMLInputElement_put_checked(IHTMLInputElement *iface, VARIANT_BOOL v)
512 {
514  nsresult nsres;
515 
516  TRACE("(%p)->(%x)\n", This, v);
517 
518  nsres = nsIDOMHTMLInputElement_SetChecked(This->nsinput, v != VARIANT_FALSE);
519  if(NS_FAILED(nsres)) {
520  ERR("SetChecked failed: %08x\n", nsres);
521  return E_FAIL;
522  }
523 
524  return S_OK;
525 }
526 
527 static HRESULT WINAPI HTMLInputElement_get_checked(IHTMLInputElement *iface, VARIANT_BOOL *p)
528 {
530  cpp_bool checked;
531  nsresult nsres;
532 
533  TRACE("(%p)->(%p)\n", This, p);
534 
535  nsres = nsIDOMHTMLInputElement_GetChecked(This->nsinput, &checked);
536  if(NS_FAILED(nsres)) {
537  ERR("GetChecked failed: %08x\n", nsres);
538  return E_FAIL;
539  }
540 
541  *p = checked ? VARIANT_TRUE : VARIANT_FALSE;
542  TRACE("checked=%x\n", *p);
543  return S_OK;
544 }
545 
546 static HRESULT WINAPI HTMLInputElement_put_border(IHTMLInputElement *iface, VARIANT v)
547 {
549  FIXME("(%p)->()\n", This);
550  return E_NOTIMPL;
551 }
552 
553 static HRESULT WINAPI HTMLInputElement_get_border(IHTMLInputElement *iface, VARIANT *p)
554 {
556  FIXME("(%p)->(%p)\n", This, p);
557  return E_NOTIMPL;
558 }
559 
560 static HRESULT WINAPI HTMLInputElement_put_vspace(IHTMLInputElement *iface, LONG v)
561 {
563  FIXME("(%p)->(%d)\n", This, v);
564  return E_NOTIMPL;
565 }
566 
567 static HRESULT WINAPI HTMLInputElement_get_vspace(IHTMLInputElement *iface, LONG *p)
568 {
570  FIXME("(%p)->(%p)\n", This, p);
571  return E_NOTIMPL;
572 }
573 
574 static HRESULT WINAPI HTMLInputElement_put_hspace(IHTMLInputElement *iface, LONG v)
575 {
577  FIXME("(%p)->(%d)\n", This, v);
578  return E_NOTIMPL;
579 }
580 
581 static HRESULT WINAPI HTMLInputElement_get_hspace(IHTMLInputElement *iface, LONG *p)
582 {
584  FIXME("(%p)->(%p)\n", This, p);
585  return E_NOTIMPL;
586 }
587 
588 static HRESULT WINAPI HTMLInputElement_put_alt(IHTMLInputElement *iface, BSTR v)
589 {
591  FIXME("(%p)->(%s)\n", This, debugstr_w(v));
592  return E_NOTIMPL;
593 }
594 
595 static HRESULT WINAPI HTMLInputElement_get_alt(IHTMLInputElement *iface, BSTR *p)
596 {
598  FIXME("(%p)->(%p)\n", This, p);
599  return E_NOTIMPL;
600 }
601 
602 static HRESULT WINAPI HTMLInputElement_put_src(IHTMLInputElement *iface, BSTR v)
603 {
605  nsAString nsstr;
606  nsresult nsres;
607 
608  TRACE("(%p)->(%s)\n", This, debugstr_w(v));
609 
610  nsAString_InitDepend(&nsstr, v);
611  nsres = nsIDOMHTMLInputElement_SetSrc(This->nsinput, &nsstr);
612  nsAString_Finish(&nsstr);
613  if(NS_FAILED(nsres))
614  ERR("SetSrc failed: %08x\n", nsres);
615 
616  return S_OK;
617 }
618 
619 static HRESULT WINAPI HTMLInputElement_get_src(IHTMLInputElement *iface, BSTR *p)
620 {
622  const PRUnichar *src;
623  nsAString src_str;
624  nsresult nsres;
625  HRESULT hres;
626 
627  TRACE("(%p)->(%p)\n", This, p);
628 
629  nsAString_Init(&src_str, NULL);
630  nsres = nsIDOMHTMLInputElement_GetSrc(This->nsinput, &src_str);
631  if(NS_FAILED(nsres)) {
632  ERR("GetSrc failed: %08x\n", nsres);
633  return E_FAIL;
634  }
635 
636  nsAString_GetData(&src_str, &src);
637  hres = nsuri_to_url(src, FALSE, p);
638  nsAString_Finish(&src_str);
639 
640  return hres;
641 }
642 
643 static HRESULT WINAPI HTMLInputElement_put_lowsrc(IHTMLInputElement *iface, BSTR v)
644 {
646  FIXME("(%p)->(%s)\n", This, debugstr_w(v));
647  return E_NOTIMPL;
648 }
649 
650 static HRESULT WINAPI HTMLInputElement_get_lowsrc(IHTMLInputElement *iface, BSTR *p)
651 {
653  FIXME("(%p)->(%p)\n", This, p);
654  return E_NOTIMPL;
655 }
656 
657 static HRESULT WINAPI HTMLInputElement_put_vrml(IHTMLInputElement *iface, BSTR v)
658 {
660  FIXME("(%p)->(%s)\n", This, debugstr_w(v));
661  return E_NOTIMPL;
662 }
663 
664 static HRESULT WINAPI HTMLInputElement_get_vrml(IHTMLInputElement *iface, BSTR *p)
665 {
667  FIXME("(%p)->(%p)\n", This, p);
668  return E_NOTIMPL;
669 }
670 
671 static HRESULT WINAPI HTMLInputElement_put_dynsrc(IHTMLInputElement *iface, BSTR v)
672 {
674  FIXME("(%p)->(%s)\n", This, debugstr_w(v));
675  return E_NOTIMPL;
676 }
677 
678 static HRESULT WINAPI HTMLInputElement_get_dynsrc(IHTMLInputElement *iface, BSTR *p)
679 {
681  FIXME("(%p)->(%p)\n", This, p);
682  return E_NOTIMPL;
683 }
684 
685 static HRESULT WINAPI HTMLInputElement_get_readyState(IHTMLInputElement *iface, BSTR *p)
686 {
688  FIXME("(%p)->(%p)\n", This, p);
689  return E_NOTIMPL;
690 }
691 
692 static HRESULT WINAPI HTMLInputElement_get_complete(IHTMLInputElement *iface, VARIANT_BOOL *p)
693 {
695  FIXME("(%p)->(%p)\n", This, p);
696  return E_NOTIMPL;
697 }
698 
699 static HRESULT WINAPI HTMLInputElement_put_loop(IHTMLInputElement *iface, VARIANT v)
700 {
702  FIXME("(%p)->()\n", This);
703  return E_NOTIMPL;
704 }
705 
706 static HRESULT WINAPI HTMLInputElement_get_loop(IHTMLInputElement *iface, VARIANT *p)
707 {
709  FIXME("(%p)->(%p)\n", This, p);
710  return E_NOTIMPL;
711 }
712 
713 static HRESULT WINAPI HTMLInputElement_put_align(IHTMLInputElement *iface, BSTR v)
714 {
716  FIXME("(%p)->(%s)\n", This, debugstr_w(v));
717  return E_NOTIMPL;
718 }
719 
720 static HRESULT WINAPI HTMLInputElement_get_align(IHTMLInputElement *iface, BSTR *p)
721 {
723  FIXME("(%p)->(%p)\n", This, p);
724  return E_NOTIMPL;
725 }
726 
727 static HRESULT WINAPI HTMLInputElement_put_onload(IHTMLInputElement *iface, VARIANT v)
728 {
730  FIXME("(%p)->()\n", This);
731  return E_NOTIMPL;
732 }
733 
734 static HRESULT WINAPI HTMLInputElement_get_onload(IHTMLInputElement *iface, VARIANT *p)
735 {
737  FIXME("(%p)->(%p)\n", This, p);
738  return E_NOTIMPL;
739 }
740 
741 static HRESULT WINAPI HTMLInputElement_put_onerror(IHTMLInputElement *iface, VARIANT v)
742 {
744  FIXME("(%p)->()\n", This);
745  return E_NOTIMPL;
746 }
747 
748 static HRESULT WINAPI HTMLInputElement_get_onerror(IHTMLInputElement *iface, VARIANT *p)
749 {
751  FIXME("(%p)->(%p)\n", This, p);
752  return E_NOTIMPL;
753 }
754 
755 static HRESULT WINAPI HTMLInputElement_put_onabort(IHTMLInputElement *iface, VARIANT v)
756 {
758  FIXME("(%p)->()\n", This);
759  return E_NOTIMPL;
760 }
761 
762 static HRESULT WINAPI HTMLInputElement_get_onabort(IHTMLInputElement *iface, VARIANT *p)
763 {
765  FIXME("(%p)->(%p)\n", This, p);
766  return E_NOTIMPL;
767 }
768 
769 static HRESULT WINAPI HTMLInputElement_put_width(IHTMLInputElement *iface, LONG v)
770 {
772  FIXME("(%p)->(%d)\n", This, v);
773  return E_NOTIMPL;
774 }
775 
776 static HRESULT WINAPI HTMLInputElement_get_width(IHTMLInputElement *iface, LONG *p)
777 {
779  FIXME("(%p)->(%p)\n", This, p);
780  return E_NOTIMPL;
781 }
782 
783 static HRESULT WINAPI HTMLInputElement_put_height(IHTMLInputElement *iface, LONG v)
784 {
786  FIXME("(%p)->(%d)\n", This, v);
787  return E_NOTIMPL;
788 }
789 
790 static HRESULT WINAPI HTMLInputElement_get_height(IHTMLInputElement *iface, LONG *p)
791 {
793  FIXME("(%p)->(%p)\n", This, p);
794  return E_NOTIMPL;
795 }
796 
797 static HRESULT WINAPI HTMLInputElement_put_start(IHTMLInputElement *iface, BSTR v)
798 {
800  FIXME("(%p)->(%s)\n", This, debugstr_w(v));
801  return E_NOTIMPL;
802 }
803 
804 static HRESULT WINAPI HTMLInputElement_get_start(IHTMLInputElement *iface, BSTR *p)
805 {
807  FIXME("(%p)->(%p)\n", This, p);
808  return E_NOTIMPL;
809 }
810 
811 static const IHTMLInputElementVtbl HTMLInputElementVtbl = {
884 };
885 
886 static HRESULT WINAPI HTMLInputTextElement_QueryInterface(IHTMLInputTextElement *iface,
887  REFIID riid, void **ppv)
888 {
890 
891  return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
892 }
893 
894 static ULONG WINAPI HTMLInputTextElement_AddRef(IHTMLInputTextElement *iface)
895 {
897 
898  return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
899 }
900 
901 static ULONG WINAPI HTMLInputTextElement_Release(IHTMLInputTextElement *iface)
902 {
904 
905  return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
906 }
907 
908 static HRESULT WINAPI HTMLInputTextElement_GetTypeInfoCount(IHTMLInputTextElement *iface, UINT *pctinfo)
909 {
911  return IDispatchEx_GetTypeInfoCount(&This->element.node.event_target.dispex.IDispatchEx_iface, pctinfo);
912 }
913 
914 static HRESULT WINAPI HTMLInputTextElement_GetTypeInfo(IHTMLInputTextElement *iface, UINT iTInfo,
915  LCID lcid, ITypeInfo **ppTInfo)
916 {
918  return IDispatchEx_GetTypeInfo(&This->element.node.event_target.dispex.IDispatchEx_iface, iTInfo, lcid,
919  ppTInfo);
920 }
921 
922 static HRESULT WINAPI HTMLInputTextElement_GetIDsOfNames(IHTMLInputTextElement *iface, REFIID riid,
923  LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
924 {
926  return IDispatchEx_GetIDsOfNames(&This->element.node.event_target.dispex.IDispatchEx_iface, riid, rgszNames,
927  cNames, lcid, rgDispId);
928 }
929 
930 static HRESULT WINAPI HTMLInputTextElement_Invoke(IHTMLInputTextElement *iface, DISPID dispIdMember,
931  REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
932  VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
933 {
935  return IDispatchEx_Invoke(&This->element.node.event_target.dispex.IDispatchEx_iface, dispIdMember, riid,
936  lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
937 }
938 
939 static HRESULT WINAPI HTMLInputTextElement_get_type(IHTMLInputTextElement *iface, BSTR *p)
940 {
942 
943  TRACE("(%p)->(%p)\n", This, p);
944 
945  return IHTMLInputElement_get_type(&This->IHTMLInputElement_iface, p);
946 }
947 
948 static HRESULT WINAPI HTMLInputTextElement_put_value(IHTMLInputTextElement *iface, BSTR v)
949 {
951 
952  TRACE("(%p)->(%s)\n", This, debugstr_w(v));
953 
954  return IHTMLInputElement_put_value(&This->IHTMLInputElement_iface, v);
955 }
956 
957 static HRESULT WINAPI HTMLInputTextElement_get_value(IHTMLInputTextElement *iface, BSTR *p)
958 {
960 
961  TRACE("(%p)->(%p)\n", This, p);
962 
963  return IHTMLInputElement_get_value(&This->IHTMLInputElement_iface, p);
964 }
965 
966 static HRESULT WINAPI HTMLInputTextElement_put_name(IHTMLInputTextElement *iface, BSTR v)
967 {
969 
970  TRACE("(%p)->(%s)\n", This, debugstr_w(v));
971 
972  return IHTMLInputElement_put_name(&This->IHTMLInputElement_iface, v);
973 }
974 
975 static HRESULT WINAPI HTMLInputTextElement_get_name(IHTMLInputTextElement *iface, BSTR *p)
976 {
978 
979  TRACE("(%p)->(%p)\n", This, p);
980 
981  return IHTMLInputElement_get_name(&This->IHTMLInputElement_iface, p);
982 }
983 
984 static HRESULT WINAPI HTMLInputTextElement_put_status(IHTMLInputTextElement *iface, VARIANT v)
985 {
987  FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
988  return E_NOTIMPL;
989 }
990 
991 static HRESULT WINAPI HTMLInputTextElement_get_status(IHTMLInputTextElement *iface, VARIANT *p)
992 {
994  TRACE("(%p)->(%p)\n", This, p);
995  return E_NOTIMPL;
996 }
997 
998 static HRESULT WINAPI HTMLInputTextElement_put_disabled(IHTMLInputTextElement *iface, VARIANT_BOOL v)
999 {
1001 
1002  TRACE("(%p)->(%x)\n", This, v);
1003 
1004  return IHTMLInputElement_put_disabled(&This->IHTMLInputElement_iface, v);
1005 }
1006 
1007 static HRESULT WINAPI HTMLInputTextElement_get_disabled(IHTMLInputTextElement *iface, VARIANT_BOOL *p)
1008 {
1010 
1011  TRACE("(%p)->(%p)\n", This, p);
1012 
1013  return IHTMLInputElement_get_disabled(&This->IHTMLInputElement_iface, p);
1014 }
1015 
1016 static HRESULT WINAPI HTMLInputTextElement_get_form(IHTMLInputTextElement *iface, IHTMLFormElement **p)
1017 {
1019 
1020  TRACE("(%p)->(%p)\n", This, p);
1021 
1022  return IHTMLInputElement_get_form(&This->IHTMLInputElement_iface, p);
1023 }
1024 
1025 static HRESULT WINAPI HTMLInputTextElement_put_defaultValue(IHTMLInputTextElement *iface, BSTR v)
1026 {
1028 
1029  TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1030 
1031  return IHTMLInputElement_put_defaultValue(&This->IHTMLInputElement_iface, v);
1032 }
1033 
1034 static HRESULT WINAPI HTMLInputTextElement_get_defaultValue(IHTMLInputTextElement *iface, BSTR *p)
1035 {
1037 
1038  TRACE("(%p)->(%p)\n", This, p);
1039 
1040  return IHTMLInputElement_get_defaultValue(&This->IHTMLInputElement_iface, p);
1041 }
1042 
1043 static HRESULT WINAPI HTMLInputTextElement_put_size(IHTMLInputTextElement *iface, LONG v)
1044 {
1046 
1047  TRACE("(%p)->(%d)\n", This, v);
1048 
1049  return IHTMLInputElement_put_size(&This->IHTMLInputElement_iface, v);
1050 }
1051 
1052 static HRESULT WINAPI HTMLInputTextElement_get_size(IHTMLInputTextElement *iface, LONG *p)
1053 {
1055 
1056  TRACE("(%p)->(%p)\n", This, p);
1057 
1058  return IHTMLInputElement_get_size(&This->IHTMLInputElement_iface, p);
1059 }
1060 
1061 static HRESULT WINAPI HTMLInputTextElement_put_maxLength(IHTMLInputTextElement *iface, LONG v)
1062 {
1064 
1065  TRACE("(%p)->(%d)\n", This, v);
1066 
1067  return IHTMLInputElement_put_maxLength(&This->IHTMLInputElement_iface, v);
1068 }
1069 
1070 static HRESULT WINAPI HTMLInputTextElement_get_maxLength(IHTMLInputTextElement *iface, LONG *p)
1071 {
1073 
1074  TRACE("(%p)->(%p)\n", This, p);
1075 
1076  return IHTMLInputElement_get_maxLength(&This->IHTMLInputElement_iface, p);
1077 }
1078 
1079 static HRESULT WINAPI HTMLInputTextElement_select(IHTMLInputTextElement *iface)
1080 {
1082 
1083  TRACE("(%p)\n", This);
1084 
1085  return IHTMLInputElement_select(&This->IHTMLInputElement_iface);
1086 }
1087 
1088 static HRESULT WINAPI HTMLInputTextElement_put_onchange(IHTMLInputTextElement *iface, VARIANT v)
1089 {
1091 
1092  TRACE("(%p)->()\n", This);
1093 
1094  return IHTMLInputElement_put_onchange(&This->IHTMLInputElement_iface, v);
1095 }
1096 
1097 static HRESULT WINAPI HTMLInputTextElement_get_onchange(IHTMLInputTextElement *iface, VARIANT *p)
1098 {
1100 
1101  TRACE("(%p)->(%p)\n", This, p);
1102 
1103  return IHTMLInputElement_get_onchange(&This->IHTMLInputElement_iface, p);
1104 }
1105 
1106 static HRESULT WINAPI HTMLInputTextElement_put_onselect(IHTMLInputTextElement *iface, VARIANT v)
1107 {
1109 
1110  TRACE("(%p)->()\n", This);
1111 
1112  return IHTMLInputElement_put_onselect(&This->IHTMLInputElement_iface, v);
1113 }
1114 
1115 static HRESULT WINAPI HTMLInputTextElement_get_onselect(IHTMLInputTextElement *iface, VARIANT *p)
1116 {
1118 
1119  TRACE("(%p)->(%p)\n", This, p);
1120 
1121  return IHTMLInputElement_get_onselect(&This->IHTMLInputElement_iface, p);
1122 }
1123 
1124 static HRESULT WINAPI HTMLInputTextElement_put_readOnly(IHTMLInputTextElement *iface, VARIANT_BOOL v)
1125 {
1127 
1128  TRACE("(%p)->(%x)\n", This, v);
1129 
1130  return IHTMLInputElement_put_readOnly(&This->IHTMLInputElement_iface, v);
1131 }
1132 
1133 static HRESULT WINAPI HTMLInputTextElement_get_readOnly(IHTMLInputTextElement *iface, VARIANT_BOOL *p)
1134 {
1136 
1137  TRACE("(%p)->(%p)\n", This, p);
1138 
1139  return IHTMLInputElement_get_readOnly(&This->IHTMLInputElement_iface, p);
1140 }
1141 
1142 static HRESULT WINAPI HTMLInputTextElement_createTextRange(IHTMLInputTextElement *iface, IHTMLTxtRange **range)
1143 {
1145 
1146  TRACE("(%p)->(%p)\n", This, range);
1147 
1148  return IHTMLInputElement_createTextRange(&This->IHTMLInputElement_iface, range);
1149 }
1150 
1151 static const IHTMLInputTextElementVtbl HTMLInputTextElementVtbl = {
1183 };
1184 
1186 {
1187  return CONTAINING_RECORD(iface, HTMLInputElement, element.node);
1188 }
1189 
1191 {
1193 
1194  *ppv = NULL;
1195 
1196  if(IsEqualGUID(&IID_IUnknown, riid)) {
1197  TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
1198  *ppv = &This->IHTMLInputElement_iface;
1199  }else if(IsEqualGUID(&IID_IDispatch, riid)) {
1200  TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
1201  *ppv = &This->IHTMLInputElement_iface;
1202  }else if(IsEqualGUID(&IID_IHTMLInputElement, riid)) {
1203  TRACE("(%p)->(IID_IHTMLInputElement %p)\n", This, ppv);
1204  *ppv = &This->IHTMLInputElement_iface;
1205  }else if(IsEqualGUID(&IID_IHTMLInputTextElement, riid)) {
1206  TRACE("(%p)->(IID_IHTMLInputTextElement %p)\n", This, ppv);
1207  *ppv = &This->IHTMLInputTextElement_iface;
1208  }
1209 
1210  if(*ppv) {
1211  IUnknown_AddRef((IUnknown*)*ppv);
1212  return S_OK;
1213  }
1214 
1215  return HTMLElement_QI(&This->element.node, riid, ppv);
1216 }
1217 
1218 #ifndef __REACTOS__
1220 #else
1221 static HRESULT HTMLInputElementImpl_fire_event(HTMLDOMNode *iface, DWORD eid, BOOL *handled)
1222 #endif
1223 {
1225 
1226  if(eid == EVENTID_CLICK) {
1227  nsresult nsres;
1228 
1229  *handled = TRUE;
1230 
1231  nsres = nsIDOMHTMLElement_Click(This->element.nselem);
1232  if(NS_FAILED(nsres)) {
1233  ERR("Click failed: %08x\n", nsres);
1234  return E_FAIL;
1235  }
1236  }
1237 
1238  return S_OK;
1239 }
1240 
1242 {
1244  return IHTMLInputElement_put_disabled(&This->IHTMLInputElement_iface, v);
1245 }
1246 
1248 {
1250  return IHTMLInputElement_get_disabled(&This->IHTMLInputElement_iface, p);
1251 }
1252 
1254 {
1256  const PRUnichar *type;
1257  nsAString nsstr;
1258  nsresult nsres;
1259  BOOL ret = FALSE;
1260 
1261  static const WCHAR buttonW[] = {'b','u','t','t','o','n',0};
1262  static const WCHAR hiddenW[] = {'h','i','d','d','e','n',0};
1263  static const WCHAR passwordW[] = {'p','a','s','s','w','o','r','d',0};
1264  static const WCHAR resetW[] = {'r','e','s','e','t',0};
1265  static const WCHAR submitW[] = {'s','u','b','m','i','t',0};
1266  static const WCHAR textW[] = {'t','e','x','t',0};
1267 
1268  nsAString_Init(&nsstr, NULL);
1269  nsres = nsIDOMHTMLInputElement_GetType(This->nsinput, &nsstr);
1270  if(NS_SUCCEEDED(nsres)) {
1271  nsAString_GetData(&nsstr, &type);
1272  ret = !strcmpW(type, buttonW) || !strcmpW(type, hiddenW) || !strcmpW(type, passwordW)
1273  || !strcmpW(type, resetW) || !strcmpW(type, submitW) || !strcmpW(type, textW);
1274  }
1275  nsAString_Finish(&nsstr);
1276  return ret;
1277 }
1278 
1280 {
1282 
1283  if(This->nsinput)
1284  note_cc_edge((nsISupports*)This->nsinput, "This->nsinput", cb);
1285 }
1286 
1288 {
1290 
1291  if(This->nsinput) {
1292  nsIDOMHTMLInputElement *nsinput = This->nsinput;
1293 
1294  This->nsinput = NULL;
1295  nsIDOMHTMLInputElement_Release(nsinput);
1296  }
1297 }
1298 
1306  NULL,
1310  NULL,
1311  NULL,
1312  NULL,
1313  NULL,
1314  NULL,
1318 };
1319 
1322  IHTMLInputElement_tid,
1323  0
1324 };
1326  NULL,
1327  DispHTMLInputElement_tid,
1328  NULL,
1330 };
1331 
1333 {
1335  nsresult nsres;
1336 
1337  ret = heap_alloc_zero(sizeof(HTMLInputElement));
1338  if(!ret)
1339  return E_OUTOFMEMORY;
1340 
1341  ret->IHTMLInputElement_iface.lpVtbl = &HTMLInputElementVtbl;
1342  ret->IHTMLInputTextElement_iface.lpVtbl = &HTMLInputTextElementVtbl;
1343  ret->element.node.vtbl = &HTMLInputElementImplVtbl;
1344 
1345  HTMLElement_Init(&ret->element, doc, nselem, &HTMLInputElement_dispex);
1346 
1347  nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLInputElement, (void**)&ret->nsinput);
1348  assert(nsres == NS_OK);
1349 
1350  *elem = &ret->element;
1351  return S_OK;
1352 }
1353 
1354 typedef struct {
1356 
1357  IHTMLLabelElement IHTMLLabelElement_iface;
1359 
1360 static inline HTMLLabelElement *impl_from_IHTMLLabelElement(IHTMLLabelElement *iface)
1361 {
1362  return CONTAINING_RECORD(iface, HTMLLabelElement, IHTMLLabelElement_iface);
1363 }
1364 
1365 static HRESULT WINAPI HTMLLabelElement_QueryInterface(IHTMLLabelElement *iface,
1366  REFIID riid, void **ppv)
1367 {
1369 
1370  return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
1371 }
1372 
1373 static ULONG WINAPI HTMLLabelElement_AddRef(IHTMLLabelElement *iface)
1374 {
1376 
1377  return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
1378 }
1379 
1380 static ULONG WINAPI HTMLLabelElement_Release(IHTMLLabelElement *iface)
1381 {
1383 
1384  return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
1385 }
1386 
1387 static HRESULT WINAPI HTMLLabelElement_GetTypeInfoCount(IHTMLLabelElement *iface, UINT *pctinfo)
1388 {
1390 
1391  return IDispatchEx_GetTypeInfoCount(&This->element.node.event_target.dispex.IDispatchEx_iface, pctinfo);
1392 }
1393 
1394 static HRESULT WINAPI HTMLLabelElement_GetTypeInfo(IHTMLLabelElement *iface, UINT iTInfo,
1395  LCID lcid, ITypeInfo **ppTInfo)
1396 {
1398 
1399  return IDispatchEx_GetTypeInfo(&This->element.node.event_target.dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
1400 }
1401 
1402 static HRESULT WINAPI HTMLLabelElement_GetIDsOfNames(IHTMLLabelElement *iface, REFIID riid,
1403  LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
1404 {
1406 
1407  return IDispatchEx_GetIDsOfNames(&This->element.node.event_target.dispex.IDispatchEx_iface, riid, rgszNames,
1408  cNames, lcid, rgDispId);
1409 }
1410 
1411 static HRESULT WINAPI HTMLLabelElement_Invoke(IHTMLLabelElement *iface, DISPID dispIdMember,
1412  REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
1413  VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
1414 {
1416 
1417  return IDispatchEx_Invoke(&This->element.node.event_target.dispex.IDispatchEx_iface, dispIdMember, riid,
1418  lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
1419 }
1420 
1421 static HRESULT WINAPI HTMLLabelElement_put_htmlFor(IHTMLLabelElement *iface, BSTR v)
1422 {
1424  nsAString for_str, val_str;
1425  nsresult nsres;
1426 
1427  TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1428 
1429  nsAString_InitDepend(&for_str, forW);
1430  nsAString_InitDepend(&val_str, v);
1431  nsres = nsIDOMHTMLElement_SetAttribute(This->element.nselem, &for_str, &val_str);
1432  nsAString_Finish(&for_str);
1433  nsAString_Finish(&val_str);
1434  if(NS_FAILED(nsres)) {
1435  ERR("SetAttribute failed: %08x\n", nsres);
1436  return E_FAIL;
1437  }
1438 
1439  return S_OK;
1440 }
1441 
1442 static HRESULT WINAPI HTMLLabelElement_get_htmlFor(IHTMLLabelElement *iface, BSTR *p)
1443 {
1445 
1446  TRACE("(%p)->(%p)\n", This, p);
1447 
1448  return elem_string_attr_getter(&This->element, forW, FALSE, p);
1449 }
1450 
1451 static HRESULT WINAPI HTMLLabelElement_put_accessKey(IHTMLLabelElement *iface, BSTR v)
1452 {
1454  FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1455  return E_NOTIMPL;
1456 }
1457 
1458 static HRESULT WINAPI HTMLLabelElement_get_accessKey(IHTMLLabelElement *iface, BSTR *p)
1459 {
1461  FIXME("(%p)->(%p)\n", This, p);
1462  return E_NOTIMPL;
1463 }
1464 
1465 static const IHTMLLabelElementVtbl HTMLLabelElementVtbl = {
1477 };
1478 
1480 {
1481  return CONTAINING_RECORD(iface, HTMLLabelElement, element.node);
1482 }
1483 
1485 {
1487 
1488  *ppv = NULL;
1489 
1490  if(IsEqualGUID(&IID_IUnknown, riid)) {
1491  TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
1492  *ppv = &This->IHTMLLabelElement_iface;
1493  }else if(IsEqualGUID(&IID_IHTMLLabelElement, riid)) {
1494  TRACE("(%p)->(IID_IHTMLLabelElement %p)\n", This, ppv);
1495  *ppv = &This->IHTMLLabelElement_iface;
1496  }else {
1497  return HTMLElement_QI(&This->element.node, riid, ppv);
1498  }
1499 
1500  IUnknown_AddRef((IUnknown*)*ppv);
1501  return S_OK;
1502 }
1503 
1511 };
1512 
1515  IHTMLLabelElement_tid,
1516  0
1517 };
1518 
1520  NULL,
1521  DispHTMLLabelElement_tid,
1522  NULL,
1524 };
1525 
1527 {
1529 
1530  ret = heap_alloc_zero(sizeof(*ret));
1531  if(!ret)
1532  return E_OUTOFMEMORY;
1533 
1534  ret->IHTMLLabelElement_iface.lpVtbl = &HTMLLabelElementVtbl;
1535  ret->element.node.vtbl = &HTMLLabelElementImplVtbl;
1536 
1537  HTMLElement_Init(&ret->element, doc, nselem, &HTMLLabelElement_dispex);
1538  *elem = &ret->element;
1539  return S_OK;
1540 }
1541 
1542 typedef struct {
1544 
1545  IHTMLButtonElement IHTMLButtonElement_iface;
1546 
1549 
1550 static inline HTMLButtonElement *impl_from_IHTMLButtonElement(IHTMLButtonElement *iface)
1551 {
1552  return CONTAINING_RECORD(iface, HTMLButtonElement, IHTMLButtonElement_iface);
1553 }
1554 
1555 static HRESULT WINAPI HTMLButtonElement_QueryInterface(IHTMLButtonElement *iface,
1556  REFIID riid, void **ppv)
1557 {
1559 
1560  return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
1561 }
1562 
1563 static ULONG WINAPI HTMLButtonElement_AddRef(IHTMLButtonElement *iface)
1564 {
1566 
1567  return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
1568 }
1569 
1570 static ULONG WINAPI HTMLButtonElement_Release(IHTMLButtonElement *iface)
1571 {
1573 
1574  return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
1575 }
1576 
1577 static HRESULT WINAPI HTMLButtonElement_GetTypeInfoCount(IHTMLButtonElement *iface, UINT *pctinfo)
1578 {
1580 
1581  return IDispatchEx_GetTypeInfoCount(&This->element.node.event_target.dispex.IDispatchEx_iface, pctinfo);
1582 }
1583 
1584 static HRESULT WINAPI HTMLButtonElement_GetTypeInfo(IHTMLButtonElement *iface, UINT iTInfo,
1585  LCID lcid, ITypeInfo **ppTInfo)
1586 {
1588 
1589  return IDispatchEx_GetTypeInfo(&This->element.node.event_target.dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
1590 }
1591 
1592 static HRESULT WINAPI HTMLButtonElement_GetIDsOfNames(IHTMLButtonElement *iface, REFIID riid,
1593  LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
1594 {
1596 
1597  return IDispatchEx_GetIDsOfNames(&This->element.node.event_target.dispex.IDispatchEx_iface, riid, rgszNames,
1598  cNames, lcid, rgDispId);
1599 }
1600 
1601 static HRESULT WINAPI HTMLButtonElement_Invoke(IHTMLButtonElement *iface, DISPID dispIdMember,
1602  REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
1603  VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
1604 {
1606 
1607  return IDispatchEx_Invoke(&This->element.node.event_target.dispex.IDispatchEx_iface, dispIdMember, riid,
1608  lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
1609 }
1610 
1611 static HRESULT WINAPI HTMLButtonElement_get_type(IHTMLButtonElement *iface, BSTR *p)
1612 {
1614  FIXME("(%p)->(%p)\n", This, p);
1615  return E_NOTIMPL;
1616 }
1617 
1618 static HRESULT WINAPI HTMLButtonElement_put_value(IHTMLButtonElement *iface, BSTR v)
1619 {
1621  FIXME("(%p)->(%s)\n", This, debugstr_w(v));
1622  return E_NOTIMPL;
1623 }
1624 
1625 static HRESULT WINAPI HTMLButtonElement_get_value(IHTMLButtonElement *iface, BSTR *p)
1626 {
1628  FIXME("(%p)->(%p)\n", This, p);
1629  return E_NOTIMPL;
1630 }
1631 
1632 static HRESULT WINAPI HTMLButtonElement_put_name(IHTMLButtonElement *iface, BSTR v)
1633 {
1635  nsAString name_str;
1636  nsresult nsres;
1637 
1638  TRACE("(%p)->(%s)\n", This, debugstr_w(v));
1639 
1640  nsAString_InitDepend(&name_str, v);
1641  nsres = nsIDOMHTMLButtonElement_SetName(This->nsbutton, &name_str);
1642  nsAString_Finish(&name_str);
1643  if(NS_FAILED(nsres)) {
1644  ERR("SetName failed: %08x\n", nsres);
1645  return E_FAIL;
1646  }
1647 
1648  return S_OK;
1649 }
1650 
1651 static HRESULT WINAPI HTMLButtonElement_get_name(IHTMLButtonElement *iface, BSTR *p)
1652 {
1654  nsAString name_str;
1655  nsresult nsres;
1656 
1657  TRACE("(%p)->(%p)\n", This, p);
1658 
1659  nsAString_Init(&name_str, NULL);
1660  nsres = nsIDOMHTMLButtonElement_GetName(This->nsbutton, &name_str);
1661  return return_nsstr(nsres, &name_str, p);
1662 }
1663 
1664 static HRESULT WINAPI HTMLButtonElement_put_status(IHTMLButtonElement *iface, VARIANT v)
1665 {
1667  FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
1668  return E_NOTIMPL;
1669 }
1670 
1671 static HRESULT WINAPI HTMLButtonElement_get_status(IHTMLButtonElement *iface, VARIANT *p)
1672 {
1674  FIXME("(%p)->(%p)\n", This, p);
1675  return E_NOTIMPL;
1676 }
1677 
1678 static HRESULT WINAPI HTMLButtonElement_put_disabled(IHTMLButtonElement *iface, VARIANT_BOOL v)
1679 {
1681  nsresult nsres;
1682 
1683  TRACE("(%p)->(%x)\n", This, v);
1684 
1685  nsres = nsIDOMHTMLButtonElement_SetDisabled(This->nsbutton, !!v);
1686  if(NS_FAILED(nsres)) {
1687  ERR("SetDisabled failed: %08x\n", nsres);
1688  return E_FAIL;
1689  }
1690 
1691  return S_OK;
1692 }
1693 
1694 static HRESULT WINAPI HTMLButtonElement_get_disabled(IHTMLButtonElement *iface, VARIANT_BOOL *p)
1695 {
1697  cpp_bool disabled;
1698  nsresult nsres;
1699 
1700  TRACE("(%p)->(%p)\n", This, p);
1701 
1702  nsres = nsIDOMHTMLButtonElement_GetDisabled(This->nsbutton, &disabled);
1703  if(NS_FAILED(nsres)) {
1704  ERR("GetDisabled failed: %08x\n", nsres);
1705  return E_FAIL;
1706  }
1707 
1708  *p = disabled ? VARIANT_TRUE : VARIANT_FALSE;
1709  return S_OK;
1710 }
1711 
1712 static HRESULT WINAPI HTMLButtonElement_get_form(IHTMLButtonElement *iface, IHTMLFormElement **p)
1713 {
1715  FIXME("(%p)->(%p)\n", This, p);
1716  return E_NOTIMPL;
1717 }
1718 
1719 static HRESULT WINAPI HTMLButtonElement_createTextRange(IHTMLButtonElement *iface, IHTMLTxtRange **range)
1720 {
1722  FIXME("(%p)->(%p)\n", This, range);
1723  return E_NOTIMPL;
1724 }
1725 
1726 static const IHTMLButtonElementVtbl HTMLButtonElementVtbl = {
1745 };
1746 
1748 {
1749  return CONTAINING_RECORD(iface, HTMLButtonElement, element.node);
1750 }
1751 
1753 {
1755 
1756  *ppv = NULL;
1757 
1758  if(IsEqualGUID(&IID_IUnknown, riid)) {
1759  TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
1760  *ppv = &This->IHTMLButtonElement_iface;
1761  }else if(IsEqualGUID(&IID_IHTMLButtonElement, riid)) {
1762  TRACE("(%p)->(IID_IHTMLButtonElement %p)\n", This, ppv);
1763  *ppv = &This->IHTMLButtonElement_iface;
1764  }else {
1765  return HTMLElement_QI(&This->element.node, riid, ppv);
1766  }
1767 
1768  IUnknown_AddRef((IUnknown*)*ppv);
1769  return S_OK;
1770 }
1771 
1773 {
1775  return IHTMLButtonElement_put_disabled(&This->IHTMLButtonElement_iface, v);
1776 }
1777 
1779 {
1781  return IHTMLButtonElement_get_disabled(&This->IHTMLButtonElement_iface, p);
1782 }
1783 
1785 {
1786  return TRUE;
1787 }
1788 
1790 {
1792 
1793  if(This->nsbutton)
1794  note_cc_edge((nsISupports*)This->nsbutton, "This->nsbutton", cb);
1795 }
1796 
1798 {
1800 
1801  if(This->nsbutton) {
1802  nsIDOMHTMLButtonElement *nsbutton = This->nsbutton;
1803 
1804  This->nsbutton = NULL;
1805  nsIDOMHTMLButtonElement_Release(nsbutton);
1806  }
1807 }
1808 
1816  NULL,
1817  NULL,
1820  NULL,
1821  NULL,
1822  NULL,
1823  NULL,
1824  NULL,
1828 };
1829 
1832  IHTMLButtonElement_tid,
1833  0
1834 };
1835 
1837  NULL,
1838  DispHTMLButtonElement_tid,
1839  NULL,
1841 };
1842 
1844 {
1846  nsresult nsres;
1847 
1848  ret = heap_alloc_zero(sizeof(*ret));
1849  if(!ret)
1850  return E_OUTOFMEMORY;
1851 
1852  ret->IHTMLButtonElement_iface.lpVtbl = &HTMLButtonElementVtbl;
1853  ret->element.node.vtbl = &HTMLButtonElementImplVtbl;
1854 
1855  HTMLElement_Init(&ret->element, doc, nselem, &HTMLButtonElement_dispex);
1856 
1857  nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLButtonElement, (void**)&ret->nsbutton);
1858  assert(nsres == NS_OK);
1859 
1860  *elem = &ret->element;
1861  return S_OK;
1862 }
static HRESULT WINAPI HTMLInputElement_get_value(IHTMLInputElement *iface, BSTR *p)
Definition: htmlinput.c:155
IHTMLButtonElement IHTMLButtonElement_iface
Definition: htmlinput.c:1545
static HRESULT WINAPI HTMLInputTextElement_get_status(IHTMLInputTextElement *iface, VARIANT *p)
Definition: htmlinput.c:991
static HRESULT WINAPI HTMLInputElement_select(IHTMLInputElement *iface)
Definition: htmlinput.c:344
static HRESULT WINAPI HTMLInputTextElement_select(IHTMLInputTextElement *iface)
Definition: htmlinput.c:1079
static HRESULT WINAPI HTMLLabelElement_put_accessKey(IHTMLLabelElement *iface, BSTR v)
Definition: htmlinput.c:1451
static ULONG WINAPI HTMLButtonElement_AddRef(IHTMLButtonElement *iface)
Definition: htmlinput.c:1563
#define REFIID
Definition: guiddef.h:113
#define TRUE
Definition: types.h:120
static HRESULT WINAPI HTMLInputTextElement_put_disabled(IHTMLInputTextElement *iface, VARIANT_BOOL v)
Definition: htmlinput.c:998
static HRESULT WINAPI HTMLInputElement_QueryInterface(IHTMLInputElement *iface, REFIID riid, void **ppv)
Definition: htmlinput.c:44
static HTMLButtonElement * impl_from_IHTMLButtonElement(IHTMLButtonElement *iface)
Definition: htmlinput.c:1550
static const WCHAR hiddenW[]
Definition: htmlbody.c:591
static HTMLInputElement * impl_from_IHTMLInputElement(IHTMLInputElement *iface)
Definition: htmlinput.c:34
static HRESULT WINAPI HTMLInputTextElement_createTextRange(IHTMLInputTextElement *iface, IHTMLTxtRange **range)
Definition: htmlinput.c:1142
#define INT_MAX
Definition: limits.h:40
static HRESULT WINAPI HTMLInputElement_put_hspace(IHTMLInputElement *iface, LONG v)
Definition: htmlinput.c:574
HRESULT HTMLButtonElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
Definition: htmlinput.c:1843
static void HTMLButtonElement_unlink(HTMLDOMNode *iface)
Definition: htmlinput.c:1797
static dispex_static_data_t HTMLLabelElement_dispex
Definition: htmlinput.c:1519
static BOOL HTMLInputElement_is_text_edit(HTMLDOMNode *iface)
Definition: htmlinput.c:1253
static HRESULT HTMLInputElementImpl_get_disabled(HTMLDOMNode *iface, VARIANT_BOOL *p)
Definition: htmlinput.c:1247
static HRESULT WINAPI HTMLLabelElement_get_accessKey(IHTMLLabelElement *iface, BSTR *p)
Definition: htmlinput.c:1458
HRESULT HTMLElement_handle_event(HTMLDOMNode *iface, DWORD eid, nsIDOMEvent *event, BOOL *prevent_default)
Definition: htmlelem.c:3815
const cpc_entry_t HTMLElement_cpc[]
Definition: htmlelem.c:3847
static HRESULT WINAPI HTMLButtonElement_GetTypeInfoCount(IHTMLButtonElement *iface, UINT *pctinfo)
Definition: htmlinput.c:1577
static HRESULT HTMLButtonElementImpl_get_disabled(HTMLDOMNode *iface, VARIANT_BOOL *p)
Definition: htmlinput.c:1778
static ULONG WINAPI HTMLInputTextElement_AddRef(IHTMLInputTextElement *iface)
Definition: htmlinput.c:894
REFIID riid
Definition: precomp.h:44
HTMLElement element
Definition: htmlinput.c:1543
static const IHTMLInputTextElementVtbl HTMLInputTextElementVtbl
Definition: htmlinput.c:1151
tid_t
Definition: ieframe.h:311
static HRESULT WINAPI HTMLInputTextElement_put_value(IHTMLInputTextElement *iface, BSTR v)
Definition: htmlinput.c:948
static const WCHAR buttonW[]
Definition: htmlelem.c:24
HRESULT HTMLElement_get_attr_col(HTMLDOMNode *iface, HTMLAttributeCollection **ac)
Definition: htmlelem.c:4827
static HRESULT WINAPI HTMLInputElement_get_loop(IHTMLInputElement *iface, VARIANT *p)
Definition: htmlinput.c:706
IHTMLLabelElement IHTMLLabelElement_iface
Definition: htmlinput.c:1357
nsIDOMHTMLInputElement * nsinput
Definition: htmlinput.c:29
static HRESULT WINAPI HTMLInputTextElement_put_onchange(IHTMLInputTextElement *iface, VARIANT v)
Definition: htmlinput.c:1088
static const NodeImplVtbl HTMLInputElementImplVtbl
Definition: htmlinput.c:1299
REFIID LPVOID * ppv
Definition: atlbase.h:39
static HRESULT WINAPI HTMLButtonElement_get_disabled(IHTMLButtonElement *iface, VARIANT_BOOL *p)
Definition: htmlinput.c:1694
HRESULT HTMLElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
Definition: htmlelem.c:3738
static HRESULT WINAPI HTMLButtonElement_QueryInterface(IHTMLButtonElement *iface, REFIID riid, void **ppv)
Definition: htmlinput.c:1555
static dispex_static_data_t HTMLInputElement_dispex
Definition: htmlinput.c:1325
static HRESULT WINAPI HTMLInputElement_get_alt(IHTMLInputElement *iface, BSTR *p)
Definition: htmlinput.c:595
static HRESULT WINAPI HTMLInputElement_put_vspace(IHTMLInputElement *iface, LONG v)
Definition: htmlinput.c:560
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define assert(x)
Definition: debug.h:53
HRESULT HTMLLabelElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
Definition: htmlinput.c:1526
static HRESULT WINAPI HTMLInputElement_put_onselect(IHTMLInputElement *iface, VARIANT v)
Definition: htmlinput.c:378
static HTMLLabelElement * label_from_HTMLDOMNode(HTMLDOMNode *iface)
Definition: htmlinput.c:1479
DWORD LCID
Definition: nls.h:13
static HRESULT set_node_event(HTMLDOMNode *node, eventid_t eid, VARIANT *var)
Definition: htmlevent.h:80
static HRESULT WINAPI HTMLInputTextElement_get_maxLength(IHTMLInputTextElement *iface, LONG *p)
Definition: htmlinput.c:1070
static HRESULT WINAPI HTMLInputTextElement_get_size(IHTMLInputTextElement *iface, LONG *p)
Definition: htmlinput.c:1052
OLECHAR * BSTR
Definition: compat.h:1934
static const IHTMLButtonElementVtbl HTMLButtonElementVtbl
Definition: htmlinput.c:1726
static LPOLESTR
Definition: stg_prop.c:27
static HRESULT WINAPI HTMLInputElement_get_status(IHTMLInputElement *iface, VARIANT_BOOL *p)
Definition: htmlinput.c:207
#define E_FAIL
Definition: ddrawi.h:102
static const tid_t HTMLInputElement_iface_tids[]
Definition: htmlinput.c:1320
static HRESULT HTMLInputElementImpl_put_disabled(HTMLDOMNode *iface, VARIANT_BOOL v)
Definition: htmlinput.c:1241
IHTMLInputElement IHTMLInputElement_iface
Definition: htmlinput.c:26
short VARIANT_BOOL
Definition: compat.h:1931
static HRESULT WINAPI HTMLInputElement_get_onchange(IHTMLInputElement *iface, VARIANT *p)
Definition: htmlinput.c:369
static HRESULT WINAPI HTMLInputElement_get_width(IHTMLInputElement *iface, LONG *p)
Definition: htmlinput.c:776
static HRESULT WINAPI HTMLInputElement_get_lowsrc(IHTMLInputElement *iface, BSTR *p)
Definition: htmlinput.c:650
static const tid_t HTMLButtonElement_iface_tids[]
Definition: htmlinput.c:1830
static ULONG WINAPI HTMLButtonElement_Release(IHTMLButtonElement *iface)
Definition: htmlinput.c:1570
static HRESULT HTMLButtonElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
Definition: htmlinput.c:1752
static HRESULT WINAPI HTMLInputElement_put_src(IHTMLInputElement *iface, BSTR v)
Definition: htmlinput.c:602
static HRESULT WINAPI HTMLInputTextElement_put_onselect(IHTMLInputTextElement *iface, VARIANT v)
Definition: htmlinput.c:1106
static HRESULT WINAPI HTMLInputElement_put_align(IHTMLInputElement *iface, BSTR v)
Definition: htmlinput.c:713
static HRESULT WINAPI HTMLLabelElement_put_htmlFor(IHTMLLabelElement *iface, BSTR v)
Definition: htmlinput.c:1421
#define NS_OK
struct node node
static HRESULT WINAPI HTMLInputElement_get_name(IHTMLInputElement *iface, BSTR *p)
Definition: htmlinput.c:187
static HRESULT WINAPI HTMLInputTextElement_put_status(IHTMLInputTextElement *iface, VARIANT v)
Definition: htmlinput.c:984
static void node_release(HTMLDOMNode *node)
#define HTMLELEMENT_TIDS
static HRESULT WINAPI HTMLInputElement_put_name(IHTMLInputElement *iface, BSTR v)
Definition: htmlinput.c:168
static HRESULT WINAPI HTMLLabelElement_GetTypeInfo(IHTMLLabelElement *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: htmlinput.c:1394
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static HRESULT WINAPI HTMLInputTextElement_get_disabled(IHTMLInputTextElement *iface, VARIANT_BOOL *p)
Definition: htmlinput.c:1007
static HTMLInputElement * impl_from_HTMLDOMNode(HTMLDOMNode *iface)
Definition: htmlinput.c:1185
static HRESULT WINAPI HTMLInputElement_put_alt(IHTMLInputElement *iface, BSTR v)
Definition: htmlinput.c:588
static HRESULT WINAPI HTMLButtonElement_get_value(IHTMLButtonElement *iface, BSTR *p)
Definition: htmlinput.c:1625
unsigned int UINT32
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
static HRESULT WINAPI HTMLInputElement_get_checked(IHTMLInputElement *iface, VARIANT_BOOL *p)
Definition: htmlinput.c:527
static HRESULT WINAPI HTMLButtonElement_put_name(IHTMLButtonElement *iface, BSTR v)
Definition: htmlinput.c:1632
static HRESULT WINAPI HTMLInputTextElement_get_name(IHTMLInputTextElement *iface, BSTR *p)
Definition: htmlinput.c:975
#define debugstr_w
Definition: kernel32.h:32
static HRESULT WINAPI HTMLInputElement_get_src(IHTMLInputElement *iface, BSTR *p)
Definition: htmlinput.c:619
static HRESULT get_node_event(HTMLDOMNode *node, eventid_t eid, VARIANT *var)
Definition: htmlevent.h:85
static size_t elem
Definition: string.c:68
static HRESULT WINAPI HTMLInputElement_put_start(IHTMLInputElement *iface, BSTR v)
Definition: htmlinput.c:797
HRESULT nsuri_to_url(LPCWSTR, BOOL, BSTR *) DECLSPEC_HIDDEN
Definition: nsio.c:175
#define FIXME(fmt,...)
Definition: debug.h:110
static HRESULT WINAPI HTMLButtonElement_get_form(IHTMLButtonElement *iface, IHTMLFormElement **p)
Definition: htmlinput.c:1712
static HRESULT WINAPI HTMLInputElement_get_height(IHTMLInputElement *iface, LONG *p)
Definition: htmlinput.c:790
static HRESULT WINAPI HTMLButtonElement_get_status(IHTMLButtonElement *iface, VARIANT *p)
Definition: htmlinput.c:1671
static HRESULT HTMLInputElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
Definition: htmlinput.c:1190
static HRESULT WINAPI HTMLInputElement_put_disabled(IHTMLInputElement *iface, VARIANT_BOOL v)
Definition: htmlinput.c:214
#define E_INVALIDARG
Definition: ddrawi.h:101
static HRESULT WINAPI HTMLInputTextElement_get_value(IHTMLInputTextElement *iface, BSTR *p)
Definition: htmlinput.c:957
smooth NULL
Definition: ftsmooth.c:416
static HRESULT WINAPI HTMLInputElement_put_indeterminate(IHTMLInputElement *iface, VARIANT_BOOL v)
Definition: htmlinput.c:463
static HRESULT HTMLLabelElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
Definition: htmlinput.c:1484
static HRESULT WINAPI HTMLInputElement_GetTypeInfo(IHTMLInputElement *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: htmlinput.c:73
static const NodeImplVtbl HTMLLabelElementImplVtbl
Definition: htmlinput.c:1504
static ULONG WINAPI HTMLInputElement_Release(IHTMLInputElement *iface)
Definition: htmlinput.c:59
static HRESULT WINAPI HTMLInputElement_put_maxLength(IHTMLInputElement *iface, LONG v)
Definition: htmlinput.c:311
static const WCHAR forW[]
Definition: htmlinput.c:32
static HRESULT WINAPI HTMLButtonElement_get_type(IHTMLButtonElement *iface, BSTR *p)
Definition: htmlinput.c:1611
static HRESULT WINAPI HTMLInputElement_get_type(IHTMLInputElement *iface, BSTR *p)
Definition: htmlinput.c:125
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
static HRESULT WINAPI HTMLInputElement_get_onselect(IHTMLInputElement *iface, VARIANT *p)
Definition: htmlinput.c:385
#define b
Definition: ke_i.h:79
GLuint GLfloat * val
Definition: glext.h:7180
#define NS_FAILED(res)
static HRESULT HTMLButtonElementImpl_put_disabled(HTMLDOMNode *iface, VARIANT_BOOL v)
Definition: htmlinput.c:1772
static HRESULT WINAPI HTMLInputElement_put_defaultValue(IHTMLInputElement *iface, BSTR v)
Definition: htmlinput.c:392
static void HTMLInputElement_unlink(HTMLDOMNode *iface)
Definition: htmlinput.c:1287
static HRESULT WINAPI HTMLInputTextElement_GetTypeInfoCount(IHTMLInputTextElement *iface, UINT *pctinfo)
Definition: htmlinput.c:908
HRESULT return_nsstr(nsresult, nsAString *, BSTR *) DECLSPEC_HIDDEN
Definition: nsembed.c:841
static HRESULT WINAPI HTMLInputTextElement_put_defaultValue(IHTMLInputTextElement *iface, BSTR v)
Definition: htmlinput.c:1025
unsigned char cpp_bool
Definition: atl.c:39
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
static HRESULT WINAPI HTMLButtonElement_createTextRange(IHTMLButtonElement *iface, IHTMLTxtRange **range)
Definition: htmlinput.c:1719
static HRESULT WINAPI HTMLInputElement_get_hspace(IHTMLInputElement *iface, LONG *p)
Definition: htmlinput.c:581
static HTMLButtonElement * button_from_HTMLDOMNode(HTMLDOMNode *iface)
Definition: htmlinput.c:1747
__wchar_t WCHAR
Definition: xmlstorage.h:180
static const WCHAR submitW[]
Definition: htmlevent.c:118
LONG HRESULT
Definition: typedefs.h:77
static HRESULT WINAPI HTMLInputElement_put_onchange(IHTMLInputElement *iface, VARIANT v)
Definition: htmlinput.c:360
static HRESULT WINAPI HTMLInputElement_put_status(IHTMLInputElement *iface, VARIANT_BOOL v)
Definition: htmlinput.c:200
const GUID IID_IUnknown
static HRESULT WINAPI HTMLInputTextElement_Invoke(IHTMLInputTextElement *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: htmlinput.c:930
IHTMLInputTextElement IHTMLInputTextElement_iface
Definition: htmlinput.c:27
#define WINAPI
Definition: msvc.h:8
unsigned short WORD
Definition: ntddk_ex.h:93
void HTMLElement_destructor(HTMLDOMNode *iface)
Definition: htmlelem.c:3764
unsigned long DWORD
Definition: ntddk_ex.h:95
static const tid_t HTMLLabelElement_iface_tids[]
Definition: htmlinput.c:1513
static HRESULT WINAPI HTMLInputElement_get_complete(IHTMLInputElement *iface, VARIANT_BOOL *p)
Definition: htmlinput.c:692
static HRESULT WINAPI HTMLLabelElement_get_htmlFor(IHTMLLabelElement *iface, BSTR *p)
Definition: htmlinput.c:1442
#define NS_SUCCEEDED(res)
static DWORD cb
Definition: integrity.c:41
static HRESULT WINAPI HTMLInputElement_get_readOnly(IHTMLInputElement *iface, VARIANT_BOOL *p)
Definition: htmlinput.c:439
static HRESULT WINAPI HTMLInputElement_get_defaultChecked(IHTMLInputElement *iface, VARIANT_BOOL *p)
Definition: htmlinput.c:493
static HRESULT WINAPI HTMLInputElement_get_disabled(IHTMLInputElement *iface, VARIANT_BOOL *p)
Definition: htmlinput.c:228
static ULONG WINAPI HTMLLabelElement_AddRef(IHTMLLabelElement *iface)
Definition: htmlinput.c:1373
static const IHTMLInputElementVtbl HTMLInputElementVtbl
Definition: htmlinput.c:811
static HRESULT WINAPI HTMLInputElement_put_vrml(IHTMLInputElement *iface, BSTR v)
Definition: htmlinput.c:657
const GUID IID_IDispatch
static ULONG WINAPI HTMLInputTextElement_Release(IHTMLInputTextElement *iface)
Definition: htmlinput.c:901
static dispex_static_data_t HTMLButtonElement_dispex
Definition: htmlinput.c:1836
int ret
HRESULT HTMLInputElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
Definition: htmlinput.c:1332
static HRESULT WINAPI HTMLInputElement_put_width(IHTMLInputElement *iface, LONG v)
Definition: htmlinput.c:769
static HRESULT WINAPI HTMLInputTextElement_get_form(IHTMLInputTextElement *iface, IHTMLFormElement **p)
Definition: htmlinput.c:1016
static HRESULT WINAPI HTMLInputElement_get_defaultValue(IHTMLInputElement *iface, BSTR *p)
Definition: htmlinput.c:411
static HRESULT WINAPI HTMLButtonElement_GetTypeInfo(IHTMLButtonElement *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: htmlinput.c:1584
static const NodeImplVtbl HTMLButtonElementImplVtbl
Definition: htmlinput.c:1809
HTMLElement element
Definition: htmlinput.c:1355
static HRESULT WINAPI HTMLInputElement_Invoke(IHTMLInputElement *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: htmlinput.c:92
static HRESULT WINAPI HTMLLabelElement_QueryInterface(IHTMLLabelElement *iface, REFIID riid, void **ppv)
Definition: htmlinput.c:1365
static HRESULT WINAPI HTMLInputElement_put_lowsrc(IHTMLInputElement *iface, BSTR v)
Definition: htmlinput.c:643
void HTMLElement_Init(HTMLElement *This, HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, dispex_static_data_t *dispex_data)
Definition: htmlelem.c:4008
static HRESULT WINAPI HTMLInputElement_createTextRange(IHTMLInputElement *iface, IHTMLTxtRange **range)
Definition: htmlinput.c:456
UINT32 nsAString_GetData(const nsAString *, const PRUnichar **) DECLSPEC_HIDDEN
Definition: nsembed.c:831
GLenum src
Definition: glext.h:6340
static const IHTMLLabelElementVtbl HTMLLabelElementVtbl
Definition: htmlinput.c:1465
static const WCHAR resetW[]
Definition: dialog.c:4555
static const WCHAR textW[]
Definition: itemdlg.c:1559
static void HTMLInputElement_traverse(HTMLDOMNode *iface, nsCycleCollectionTraversalCallback *cb)
Definition: htmlinput.c:1279
static HTMLInputElement * impl_from_IHTMLInputTextElement(IHTMLInputTextElement *iface)
Definition: htmlinput.c:39
static HRESULT WINAPI HTMLInputElement_put_readOnly(IHTMLInputElement *iface, VARIANT_BOOL v)
Definition: htmlinput.c:424
static BOOL HTMLButtonElement_is_text_edit(HTMLDOMNode *iface)
Definition: htmlinput.c:1784
GLenum GLint * range
Definition: glext.h:7539
static HRESULT WINAPI HTMLInputElement_get_size(IHTMLInputElement *iface, LONG *p)
Definition: htmlinput.c:292
static HRESULT WINAPI HTMLInputElement_get_border(IHTMLInputElement *iface, VARIANT *p)
Definition: htmlinput.c:553
static void HTMLButtonElement_traverse(HTMLDOMNode *iface, nsCycleCollectionTraversalCallback *cb)
Definition: htmlinput.c:1789
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:519
#define ERR(fmt,...)
Definition: debug.h:109
static HRESULT WINAPI HTMLLabelElement_Invoke(IHTMLLabelElement *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: htmlinput.c:1411
HRESULT elem_string_attr_getter(HTMLElement *elem, const WCHAR *name, BOOL use_null, BSTR *p)
Definition: htmlelem.c:162
HRESULT HTMLElement_clone(HTMLDOMNode *iface, nsIDOMNode *nsnode, HTMLDOMNode **ret)
Definition: htmlelem.c:3793
static HRESULT WINAPI HTMLInputElement_get_readyState(IHTMLInputElement *iface, BSTR *p)
Definition: htmlinput.c:685
struct stdole::EXCEPINFO EXCEPINFO
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
#define S_OK
Definition: intsafe.h:59
static VARIANTARG static DISPID
Definition: ordinal.c:49
static HRESULT WINAPI HTMLButtonElement_put_status(IHTMLButtonElement *iface, VARIANT v)
Definition: htmlinput.c:1664
static HRESULT WINAPI HTMLLabelElement_GetIDsOfNames(IHTMLLabelElement *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: htmlinput.c:1402
static HRESULT WINAPI HTMLInputElement_get_vrml(IHTMLInputElement *iface, BSTR *p)
Definition: htmlinput.c:664
static HRESULT WINAPI HTMLInputElement_put_type(IHTMLInputElement *iface, BSTR v)
Definition: htmlinput.c:102
static UNICODE_STRING value_str
Definition: reg.c:1328
static HRESULT WINAPI HTMLInputTextElement_QueryInterface(IHTMLInputTextElement *iface, REFIID riid, void **ppv)
Definition: htmlinput.c:886
const GLdouble * v
Definition: gl.h:2040
static HRESULT WINAPI HTMLInputElement_get_indeterminate(IHTMLInputElement *iface, VARIANT_BOOL *p)
Definition: htmlinput.c:470
static HRESULT WINAPI HTMLLabelElement_GetTypeInfoCount(IHTMLLabelElement *iface, UINT *pctinfo)
Definition: htmlinput.c:1387
static HRESULT WINAPI HTMLInputElement_get_start(IHTMLInputElement *iface, BSTR *p)
Definition: htmlinput.c:804
static HRESULT WINAPI HTMLInputTextElement_put_name(IHTMLInputTextElement *iface, BSTR v)
Definition: htmlinput.c:966
static HRESULT WINAPI HTMLButtonElement_get_name(IHTMLButtonElement *iface, BSTR *p)
Definition: htmlinput.c:1651
HRESULT get_node(HTMLDocumentNode *This, nsIDOMNode *nsnode, BOOL create, HTMLDOMNode **ret)
Definition: htmlnode.c:1339
struct nsCycleCollectionTraversalCallback nsCycleCollectionTraversalCallback
eventid_t
Definition: htmlevent.h:21
#define E_NOTIMPL
Definition: ddrawi.h:99
static HRESULT WINAPI HTMLInputElement_GetTypeInfoCount(IHTMLInputElement *iface, UINT *pctinfo)
Definition: htmlinput.c:66
static HRESULT WINAPI HTMLInputTextElement_GetIDsOfNames(IHTMLInputTextElement *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: htmlinput.c:922
static HRESULT WINAPI HTMLButtonElement_GetIDsOfNames(IHTMLButtonElement *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: htmlinput.c:1592
static HRESULT WINAPI HTMLInputElement_put_size(IHTMLInputElement *iface, LONG v)
Definition: htmlinput.c:274
void nsAString_InitDepend(nsAString *, const PRUnichar *) DECLSPEC_HIDDEN
Definition: nsembed.c:826
unsigned int UINT
Definition: ndis.h:50
static HRESULT WINAPI HTMLInputElement_put_onload(IHTMLInputElement *iface, VARIANT v)
Definition: htmlinput.c:727
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
nsIDOMHTMLButtonElement * nsbutton
Definition: htmlinput.c:1547
static HRESULT WINAPI HTMLButtonElement_Invoke(IHTMLButtonElement *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: htmlinput.c:1601
HTMLElement element
Definition: htmlinput.c:24
static HRESULT WINAPI HTMLInputElement_get_align(IHTMLInputElement *iface, BSTR *p)
Definition: htmlinput.c:720
BOOL nsAString_Init(nsAString *, const PRUnichar *) DECLSPEC_HIDDEN
Definition: nsembed.c:817
static HRESULT WINAPI HTMLInputElement_get_maxLength(IHTMLInputElement *iface, LONG *p)
Definition: htmlinput.c:328
static HRESULT WINAPI HTMLInputElement_put_border(IHTMLInputElement *iface, VARIANT v)
Definition: htmlinput.c:546
static HRESULT WINAPI HTMLInputElement_GetIDsOfNames(IHTMLInputElement *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: htmlinput.c:82
void nsAString_Finish(nsAString *) DECLSPEC_HIDDEN
Definition: nsembed.c:836
static HRESULT WINAPI HTMLInputTextElement_get_onchange(IHTMLInputTextElement *iface, VARIANT *p)
Definition: htmlinput.c:1097
static HRESULT WINAPI HTMLInputTextElement_get_readOnly(IHTMLInputTextElement *iface, VARIANT_BOOL *p)
Definition: htmlinput.c:1133
static HRESULT WINAPI HTMLInputElement_get_onerror(IHTMLInputElement *iface, VARIANT *p)
Definition: htmlinput.c:748
static HRESULT WINAPI HTMLInputElement_put_checked(IHTMLInputElement *iface, VARIANT_BOOL v)
Definition: htmlinput.c:511
WINE_UNICODE_INLINE int strcmpW(const WCHAR *str1, const WCHAR *str2)
Definition: unicode.h:229
struct stdole::DISPPARAMS DISPPARAMS
static HRESULT WINAPI HTMLInputElement_put_dynsrc(IHTMLInputElement *iface, BSTR v)
Definition: htmlinput.c:671
static HRESULT WINAPI HTMLInputElement_put_defaultChecked(IHTMLInputElement *iface, VARIANT_BOOL v)
Definition: htmlinput.c:477
HRESULT nsresult
Definition: nsiface.idl:39
static HRESULT WINAPI HTMLInputElement_put_onerror(IHTMLInputElement *iface, VARIANT v)
Definition: htmlinput.c:741
WCHAR PRUnichar
Definition: nsiface.idl:48
unsigned int ULONG
Definition: retypes.h:1
#define CTL_E_INVALIDPROPERTYVALUE
Definition: olectl.h:292
static ULONG WINAPI HTMLLabelElement_Release(IHTMLLabelElement *iface)
Definition: htmlinput.c:1380
static HRESULT WINAPI HTMLInputTextElement_put_size(IHTMLInputTextElement *iface, LONG v)
Definition: htmlinput.c:1043
static HRESULT WINAPI HTMLInputElement_get_onabort(IHTMLInputElement *iface, VARIANT *p)
Definition: htmlinput.c:762
static HRESULT HTMLInputElementImpl_fire_event(HTMLDOMNode *iface, eventid_t eid, BOOL *handled)
Definition: htmlinput.c:1219
static HRESULT WINAPI HTMLButtonElement_put_value(IHTMLButtonElement *iface, BSTR v)
Definition: htmlinput.c:1618
GLfloat GLfloat p
Definition: glext.h:8902
static HRESULT WINAPI HTMLInputTextElement_GetTypeInfo(IHTMLInputTextElement *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: htmlinput.c:914
static HRESULT WINAPI HTMLInputTextElement_get_type(IHTMLInputTextElement *iface, BSTR *p)
Definition: htmlinput.c:939
static HRESULT WINAPI HTMLInputElement_put_height(IHTMLInputElement *iface, LONG v)
Definition: htmlinput.c:783
static HRESULT WINAPI HTMLInputElement_put_loop(IHTMLInputElement *iface, VARIANT v)
Definition: htmlinput.c:699
static HRESULT WINAPI HTMLInputElement_get_vspace(IHTMLInputElement *iface, LONG *p)
Definition: htmlinput.c:567
static HRESULT WINAPI HTMLInputElement_get_onload(IHTMLInputElement *iface, VARIANT *p)
Definition: htmlinput.c:734
static ULONG WINAPI HTMLInputElement_AddRef(IHTMLInputElement *iface)
Definition: htmlinput.c:52
static HTMLLabelElement * impl_from_IHTMLLabelElement(IHTMLLabelElement *iface)
Definition: htmlinput.c:1360
static HRESULT WINAPI HTMLInputElement_put_onabort(IHTMLInputElement *iface, VARIANT v)
Definition: htmlinput.c:755
static HRESULT WINAPI HTMLInputTextElement_get_defaultValue(IHTMLInputTextElement *iface, BSTR *p)
Definition: htmlinput.c:1034
static HRESULT WINAPI HTMLButtonElement_put_disabled(IHTMLButtonElement *iface, VARIANT_BOOL v)
Definition: htmlinput.c:1678
static HRESULT WINAPI HTMLInputTextElement_put_readOnly(IHTMLInputTextElement *iface, VARIANT_BOOL v)
Definition: htmlinput.c:1124
static HRESULT WINAPI HTMLInputElement_put_value(IHTMLInputElement *iface, BSTR v)
Definition: htmlinput.c:138
static HRESULT WINAPI HTMLInputTextElement_put_maxLength(IHTMLInputTextElement *iface, LONG v)
Definition: htmlinput.c:1061
static HRESULT WINAPI HTMLInputTextElement_get_onselect(IHTMLInputTextElement *iface, VARIANT *p)
Definition: htmlinput.c:1115
Definition: dlist.c:348
static HRESULT WINAPI HTMLInputElement_get_form(IHTMLInputElement *iface, IHTMLFormElement **p)
Definition: htmlinput.c:241
static HRESULT WINAPI HTMLInputElement_get_dynsrc(IHTMLInputElement *iface, BSTR *p)
Definition: htmlinput.c:678