ReactOS 0.4.15-dev-5664-g3bf4ef6
htmlselect.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
21typedef struct {
23
24 IHTMLSelectElement IHTMLSelectElement_iface;
25
28
29static inline HTMLSelectElement *impl_from_IHTMLSelectElement(IHTMLSelectElement *iface)
30{
31 return CONTAINING_RECORD(iface, HTMLSelectElement, IHTMLSelectElement_iface);
32}
33
35{
37 nsIDOMNode *nsnode;
38 nsresult nsres;
40
41 nsres = nsIDOMHTMLSelectElement_GetOptions(This->nsselect, &nscol);
42 if(NS_FAILED(nsres)) {
43 ERR("GetOptions failed: %08x\n", nsres);
44 return E_FAIL;
45 }
46
47 nsres = nsIDOMHTMLOptionsCollection_Item(nscol, i, &nsnode);
48 nsIDOMHTMLOptionsCollection_Release(nscol);
49 if(NS_FAILED(nsres)) {
50 ERR("Item failed: %08x\n", nsres);
51 return E_FAIL;
52 }
53
54 if(nsnode) {
56
57 hres = get_node(This->element.node.doc, nsnode, TRUE, &node);
58 nsIDOMNode_Release(nsnode);
59 if(FAILED(hres))
60 return hres;
61
62 *ret = (IDispatch*)&node->IHTMLDOMNode_iface;
63 }else {
64 *ret = NULL;
65 }
66 return S_OK;
67}
68
69static HRESULT WINAPI HTMLSelectElement_QueryInterface(IHTMLSelectElement *iface,
70 REFIID riid, void **ppv)
71{
73
74 return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
75}
76
77static ULONG WINAPI HTMLSelectElement_AddRef(IHTMLSelectElement *iface)
78{
80
81 return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
82}
83
84static ULONG WINAPI HTMLSelectElement_Release(IHTMLSelectElement *iface)
85{
87
88 return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
89}
90
91static HRESULT WINAPI HTMLSelectElement_GetTypeInfoCount(IHTMLSelectElement *iface, UINT *pctinfo)
92{
94
95 return IDispatchEx_GetTypeInfoCount(&This->element.node.event_target.dispex.IDispatchEx_iface, pctinfo);
96}
97
98static HRESULT WINAPI HTMLSelectElement_GetTypeInfo(IHTMLSelectElement *iface, UINT iTInfo,
99 LCID lcid, ITypeInfo **ppTInfo)
100{
102
103 return IDispatchEx_GetTypeInfo(&This->element.node.event_target.dispex.IDispatchEx_iface, iTInfo, lcid,
104 ppTInfo);
105}
106
107static HRESULT WINAPI HTMLSelectElement_GetIDsOfNames(IHTMLSelectElement *iface, REFIID riid,
108 LPOLESTR *rgszNames, UINT cNames,
109 LCID lcid, DISPID *rgDispId)
110{
112
113 return IDispatchEx_GetIDsOfNames(&This->element.node.event_target.dispex.IDispatchEx_iface, riid, rgszNames,
114 cNames, lcid, rgDispId);
115}
116
117static HRESULT WINAPI HTMLSelectElement_Invoke(IHTMLSelectElement *iface, DISPID dispIdMember,
118 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
119 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
120{
122
123 return IDispatchEx_Invoke(&This->element.node.event_target.dispex.IDispatchEx_iface, dispIdMember, riid,
124 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
125}
126
127static HRESULT WINAPI HTMLSelectElement_put_size(IHTMLSelectElement *iface, LONG v)
128{
130 nsresult nsres;
131
132 TRACE("(%p)->(%d)\n", This, v);
133 if(v < 0)
135
136 nsres = nsIDOMHTMLSelectElement_SetSize(This->nsselect, v);
137 if(NS_FAILED(nsres)) {
138 ERR("SetSize failed: %08x\n", nsres);
139 return E_FAIL;
140 }
141 return S_OK;
142}
143
144static HRESULT WINAPI HTMLSelectElement_get_size(IHTMLSelectElement *iface, LONG *p)
145{
147 DWORD val;
148 nsresult nsres;
149
150 TRACE("(%p)->(%p)\n", This, p);
151 if(!p)
152 return E_INVALIDARG;
153
154 nsres = nsIDOMHTMLSelectElement_GetSize(This->nsselect, &val);
155 if(NS_FAILED(nsres)) {
156 ERR("GetSize failed: %08x\n", nsres);
157 return E_FAIL;
158 }
159 *p = val;
160 return S_OK;
161}
162
164{
166 nsresult nsres;
167
168 TRACE("(%p)->(%x)\n", This, v);
169
170 nsres = nsIDOMHTMLSelectElement_SetMultiple(This->nsselect, !!v);
171 assert(nsres == NS_OK);
172 return S_OK;
173}
174
175static HRESULT WINAPI HTMLSelectElement_get_multiple(IHTMLSelectElement *iface, VARIANT_BOOL *p)
176{
179 nsresult nsres;
180
181 TRACE("(%p)->(%p)\n", This, p);
182
183 nsres = nsIDOMHTMLSelectElement_GetMultiple(This->nsselect, &val);
184 assert(nsres == NS_OK);
185
186 *p = val ? VARIANT_TRUE : VARIANT_FALSE;
187 return S_OK;
188}
189
190static HRESULT WINAPI HTMLSelectElement_put_name(IHTMLSelectElement *iface, BSTR v)
191{
194 nsresult nsres;
195
196 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
198 nsres = nsIDOMHTMLSelectElement_SetName(This->nsselect, &str);
200
201 if(NS_FAILED(nsres)) {
202 ERR("SetName failed: %08x\n", nsres);
203 return E_FAIL;
204 }
205 return S_OK;
206}
207
208static HRESULT WINAPI HTMLSelectElement_get_name(IHTMLSelectElement *iface, BSTR *p)
209{
211 nsAString name_str;
212 nsresult nsres;
213
214 TRACE("(%p)->(%p)\n", This, p);
215
216 nsAString_Init(&name_str, NULL);
217 nsres = nsIDOMHTMLSelectElement_GetName(This->nsselect, &name_str);
218
219 return return_nsstr(nsres, &name_str, p);
220}
221
222static HRESULT WINAPI HTMLSelectElement_get_options(IHTMLSelectElement *iface, IDispatch **p)
223{
225
226 TRACE("(%p)->(%p)\n", This, p);
227
228 *p = (IDispatch*)&This->IHTMLSelectElement_iface;
229 IDispatch_AddRef(*p);
230 return S_OK;
231}
232
233static HRESULT WINAPI HTMLSelectElement_put_onchange(IHTMLSelectElement *iface, VARIANT v)
234{
236
237 TRACE("(%p)->()\n", This);
238
239 return set_node_event(&This->element.node, EVENTID_CHANGE, &v);
240}
241
242static HRESULT WINAPI HTMLSelectElement_get_onchange(IHTMLSelectElement *iface, VARIANT *p)
243{
245 FIXME("(%p)->(%p)\n", This, p);
246 return E_NOTIMPL;
247}
248
249static HRESULT WINAPI HTMLSelectElement_put_selectedIndex(IHTMLSelectElement *iface, LONG v)
250{
252 nsresult nsres;
253
254 TRACE("(%p)->(%d)\n", This, v);
255
256 nsres = nsIDOMHTMLSelectElement_SetSelectedIndex(This->nsselect, v);
257 if(NS_FAILED(nsres))
258 ERR("SetSelectedIndex failed: %08x\n", nsres);
259
260 return S_OK;
261}
262
263static HRESULT WINAPI HTMLSelectElement_get_selectedIndex(IHTMLSelectElement *iface, LONG *p)
264{
266 nsresult nsres;
267
268 TRACE("(%p)->(%p)\n", This, p);
269
270 nsres = nsIDOMHTMLSelectElement_GetSelectedIndex(This->nsselect, p);
271 if(NS_FAILED(nsres)) {
272 ERR("GetSelectedIndex failed: %08x\n", nsres);
273 return E_FAIL;
274 }
275
276 return S_OK;
277}
278
279static HRESULT WINAPI HTMLSelectElement_get_type(IHTMLSelectElement *iface, BSTR *p)
280{
282 nsAString type_str;
283 nsresult nsres;
284
285 TRACE("(%p)->(%p)\n", This, p);
286
287 nsAString_Init(&type_str, NULL);
288 nsres = nsIDOMHTMLSelectElement_GetType(This->nsselect, &type_str);
289 return return_nsstr(nsres, &type_str, p);
290}
291
292static HRESULT WINAPI HTMLSelectElement_put_value(IHTMLSelectElement *iface, BSTR v)
293{
296 nsresult nsres;
297
298 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
299
301 nsres = nsIDOMHTMLSelectElement_SetValue(This->nsselect, &value_str);
303 if(NS_FAILED(nsres))
304 ERR("SetValue failed: %08x\n", nsres);
305
306 return S_OK;
307}
308
309static HRESULT WINAPI HTMLSelectElement_get_value(IHTMLSelectElement *iface, BSTR *p)
310{
313 nsresult nsres;
314
315 TRACE("(%p)->(%p)\n", This, p);
316
318 nsres = nsIDOMHTMLSelectElement_GetValue(This->nsselect, &value_str);
319 return return_nsstr(nsres, &value_str, p);
320}
321
323{
325 nsresult nsres;
326
327 TRACE("(%p)->(%x)\n", This, v);
328
329 nsres = nsIDOMHTMLSelectElement_SetDisabled(This->nsselect, v != VARIANT_FALSE);
330 if(NS_FAILED(nsres)) {
331 ERR("SetDisabled failed: %08x\n", nsres);
332 return E_FAIL;
333 }
334
335 return S_OK;
336}
337
338static HRESULT WINAPI HTMLSelectElement_get_disabled(IHTMLSelectElement *iface, VARIANT_BOOL *p)
339{
341 cpp_bool disabled = FALSE;
342 nsresult nsres;
343
344 TRACE("(%p)->(%p)\n", This, p);
345
346 nsres = nsIDOMHTMLSelectElement_GetDisabled(This->nsselect, &disabled);
347 if(NS_FAILED(nsres)) {
348 ERR("GetDisabled failed: %08x\n", nsres);
349 return E_FAIL;
350 }
351
352 *p = disabled ? VARIANT_TRUE : VARIANT_FALSE;
353 return S_OK;
354}
355
356static HRESULT WINAPI HTMLSelectElement_get_form(IHTMLSelectElement *iface, IHTMLFormElement **p)
357{
359 nsIDOMHTMLFormElement *nsform;
360 nsIDOMNode *form_node;
363 nsresult nsres;
364
365 TRACE("(%p)->(%p)\n", This, p);
366
367 if(!p)
368 return E_POINTER;
369
370 nsres = nsIDOMHTMLSelectElement_GetForm(This->nsselect, &nsform);
371 if (NS_FAILED(nsres)) {
372 ERR("GetForm failed: %08x, nsform: %p\n", nsres, nsform);
373 *p = NULL;
374 return E_FAIL;
375 }
376 if (nsform == NULL) {
377 TRACE("nsform not found\n");
378 *p = NULL;
379 return S_OK;
380 }
381
382 nsres = nsIDOMHTMLFormElement_QueryInterface(nsform, &IID_nsIDOMNode, (void**)&form_node);
383 nsIDOMHTMLFormElement_Release(nsform);
384 assert(nsres == NS_OK);
385
386 hres = get_node(This->element.node.doc, form_node, TRUE, &node);
387 nsIDOMNode_Release(form_node);
388 if (FAILED(hres))
389 return hres;
390
391 hres = IHTMLDOMNode_QueryInterface(&node->IHTMLDOMNode_iface, &IID_IHTMLElement, (void**)p);
392
394 return hres;
395}
396
397static HRESULT WINAPI HTMLSelectElement_add(IHTMLSelectElement *iface, IHTMLElement *element,
399{
401 nsIWritableVariant *nsvariant;
402 HTMLElement *element_obj;
403 nsresult nsres;
404
405 TRACE("(%p)->(%p %s)\n", This, element, debugstr_variant(&before));
406
408 if(!element_obj) {
409 FIXME("External IHTMLElement implementation?\n");
410 return E_INVALIDARG;
411 }
412
413 nsvariant = create_nsvariant();
414 if(!nsvariant)
415 return E_FAIL;
416
417 switch(V_VT(&before)) {
418 case VT_EMPTY:
419 case VT_ERROR:
420 nsres = nsIWritableVariant_SetAsEmpty(nsvariant);
421 break;
422 case VT_I2:
423 nsres = nsIWritableVariant_SetAsInt16(nsvariant, V_I2(&before));
424 break;
425 default:
426 FIXME("unhandled before %s\n", debugstr_variant(&before));
427 nsIWritableVariant_Release(nsvariant);
428 return E_NOTIMPL;
429 }
430
431 if(NS_SUCCEEDED(nsres))
432 nsres = nsIDOMHTMLSelectElement_Add(This->nsselect, element_obj->nselem, (nsIVariant*)nsvariant);
433 nsIWritableVariant_Release(nsvariant);
434 if(NS_FAILED(nsres)) {
435 ERR("Add failed: %08x\n", nsres);
436 return E_FAIL;
437 }
438
439 return S_OK;
440}
441
442static HRESULT WINAPI HTMLSelectElement_remove(IHTMLSelectElement *iface, LONG index)
443{
445 nsresult nsres;
446 TRACE("(%p)->(%d)\n", This, index);
447 if(index < 0)
448 return E_INVALIDARG;
449
450 nsres = nsIDOMHTMLSelectElement_select_Remove(This->nsselect, index);
451 if(NS_FAILED(nsres)) {
452 ERR("Remove failed: %08x\n", nsres);
453 return E_FAIL;
454 }
455 return S_OK;
456}
457
458static HRESULT WINAPI HTMLSelectElement_put_length(IHTMLSelectElement *iface, LONG v)
459{
461 nsresult nsres;
462
463 TRACE("(%p)->(%d)\n", This, v);
464
465 nsres = nsIDOMHTMLSelectElement_SetLength(This->nsselect, v);
466 if(NS_FAILED(nsres))
467 ERR("SetLength failed: %08x\n", nsres);
468
469 return S_OK;
470}
471
472static HRESULT WINAPI HTMLSelectElement_get_length(IHTMLSelectElement *iface, LONG *p)
473{
475 UINT32 length = 0;
476 nsresult nsres;
477
478 TRACE("(%p)->(%p)\n", This, p);
479
480 nsres = nsIDOMHTMLSelectElement_GetLength(This->nsselect, &length);
481 if(NS_FAILED(nsres))
482 ERR("GetLength failed: %08x\n", nsres);
483
484 *p = length;
485
486 TRACE("ret %d\n", *p);
487 return S_OK;
488}
489
490static HRESULT WINAPI HTMLSelectElement_get__newEnum(IHTMLSelectElement *iface, IUnknown **p)
491{
493 FIXME("(%p)->(%p)\n", This, p);
494 return E_NOTIMPL;
495}
496
497static HRESULT WINAPI HTMLSelectElement_item(IHTMLSelectElement *iface, VARIANT name,
498 VARIANT index, IDispatch **pdisp)
499{
501
502 TRACE("(%p)->(%s %s %p)\n", This, debugstr_variant(&name), debugstr_variant(&index), pdisp);
503
504 if(!pdisp)
505 return E_POINTER;
506 *pdisp = NULL;
507
508 if(V_VT(&name) == VT_I4) {
509 if(V_I4(&name) < 0)
510 return E_INVALIDARG;
511 return htmlselect_item(This, V_I4(&name), pdisp);
512 }
513
514 FIXME("Unsupported args\n");
515 return E_NOTIMPL;
516}
517
518static HRESULT WINAPI HTMLSelectElement_tags(IHTMLSelectElement *iface, VARIANT tagName,
519 IDispatch **pdisp)
520{
522 FIXME("(%p)->(v %p)\n", This, pdisp);
523 return E_NOTIMPL;
524}
525
526static const IHTMLSelectElementVtbl HTMLSelectElementVtbl = {
558};
559
561{
562 return CONTAINING_RECORD(iface, HTMLSelectElement, element.node);
563}
564
566{
568
569 *ppv = NULL;
570
572 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
573 *ppv = &This->IHTMLSelectElement_iface;
574 }else if(IsEqualGUID(&IID_IDispatch, riid)) {
575 TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
576 *ppv = &This->IHTMLSelectElement_iface;
577 }else if(IsEqualGUID(&IID_IHTMLSelectElement, riid)) {
578 TRACE("(%p)->(IID_IHTMLSelectElement %p)\n", This, ppv);
579 *ppv = &This->IHTMLSelectElement_iface;
580 }
581
582 if(*ppv) {
583 IUnknown_AddRef((IUnknown*)*ppv);
584 return S_OK;
585 }
586
587 return HTMLElement_QI(&This->element.node, riid, ppv);
588}
589
591{
593 return IHTMLSelectElement_put_disabled(&This->IHTMLSelectElement_iface, v);
594}
595
597{
599 return IHTMLSelectElement_get_disabled(&This->IHTMLSelectElement_iface, p);
600}
601
602#define DISPID_OPTIONCOL_0 MSHTML_DISPID_CUSTOM_MIN
603
605{
606 const WCHAR *ptr;
607 DWORD idx = 0;
608
609 for(ptr = name; *ptr && isdigitW(*ptr); ptr++) {
610 idx = idx*10 + (*ptr-'0');
612 WARN("too big idx\n");
613 return DISP_E_UNKNOWNNAME;
614 }
615 }
616 if(*ptr)
617 return DISP_E_UNKNOWNNAME;
618
619 *dispid = DISPID_OPTIONCOL_0 + idx;
620 return S_OK;
621}
622
624 VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller)
625{
627
628 TRACE("(%p)->(%x %x %x %p %p %p %p)\n", This, id, lcid, flags, params, res, ei, caller);
629
630 switch(flags) {
632 IDispatch *ret;
634
636 if(FAILED(hres))
637 return hres;
638
639 if(ret) {
641 V_DISPATCH(res) = ret;
642 }else {
643 V_VT(res) = VT_NULL;
644 }
645 break;
646 }
647
648 default:
649 FIXME("unimplemented flags %x\n", flags);
650 return E_NOTIMPL;
651 }
652
653 return S_OK;
654}
655
657{
659
660 if(This->nsselect)
661 note_cc_edge((nsISupports*)This->nsselect, "This->nsselect", cb);
662}
663
665{
667
668 if(This->nsselect) {
669 nsIDOMHTMLSelectElement *nsselect = This->nsselect;
670
671 This->nsselect = NULL;
672 nsIDOMHTMLSelectElement_Release(nsselect);
673 }
674}
675
683 NULL,
684 NULL,
687 NULL,
688 NULL,
691 NULL,
694};
695
698 IHTMLSelectElement_tid,
699 0
700};
701
703 NULL,
704 DispHTMLSelectElement_tid,
705 NULL,
707};
708
710{
712 nsresult nsres;
713
714 ret = heap_alloc_zero(sizeof(HTMLSelectElement));
715 if(!ret)
716 return E_OUTOFMEMORY;
717
718 ret->IHTMLSelectElement_iface.lpVtbl = &HTMLSelectElementVtbl;
719 ret->element.node.vtbl = &HTMLSelectElementImplVtbl;
720
721 HTMLElement_Init(&ret->element, doc, nselem, &HTMLSelectElement_dispex);
722
723 nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLSelectElement,
724 (void**)&ret->nsselect);
725 assert(nsres == NS_OK);
726
727 *elem = &ret->element;
728 return S_OK;
729}
unsigned int UINT32
const GUID IID_IUnknown
#define FIXME(fmt,...)
Definition: debug.h:111
#define WARN(fmt,...)
Definition: debug.h:112
#define ERR(fmt,...)
Definition: debug.h:110
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
unsigned int idx
Definition: utils.c:41
unsigned char cpp_bool
Definition: atl.c:38
OLECHAR * BSTR
Definition: compat.h:2293
short VARIANT_BOOL
Definition: compat.h:2290
@ VT_NULL
Definition: compat.h:2296
@ VT_ERROR
Definition: compat.h:2305
@ VT_I4
Definition: compat.h:2298
@ VT_I2
Definition: compat.h:2297
@ VT_EMPTY
Definition: compat.h:2295
@ VT_DISPATCH
Definition: compat.h:2304
#define assert(x)
Definition: debug.h:53
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
const GLdouble * v
Definition: gl.h:2040
GLuint res
Definition: glext.h:9613
GLuint index
Definition: glext.h:6031
GLenum const GLfloat * params
Definition: glext.h:5645
GLbitfield flags
Definition: glext.h:7161
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
GLuint GLfloat * val
Definition: glext.h:7180
GLfloat GLfloat p
Definition: glext.h:8902
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
HRESULT HTMLElement_clone(HTMLDOMNode *iface, nsIDOMNode *nsnode, HTMLDOMNode **ret)
Definition: htmlelem.c:3793
void HTMLElement_destructor(HTMLDOMNode *iface)
Definition: htmlelem.c:3764
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
HTMLElement * unsafe_impl_from_IHTMLElement(IHTMLElement *iface)
Definition: htmlelem.c:1962
void HTMLElement_Init(HTMLElement *This, HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, dispex_static_data_t *dispex_data)
Definition: htmlelem.c:4008
HRESULT HTMLElement_get_attr_col(HTMLDOMNode *iface, HTMLAttributeCollection **ac)
Definition: htmlelem.c:4827
HRESULT HTMLElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
Definition: htmlelem.c:3738
@ EVENTID_CHANGE
Definition: htmlevent.h:25
static HRESULT set_node_event(HTMLDOMNode *node, eventid_t eid, VARIANT *var)
Definition: htmlevent.h:80
HRESULT get_node(HTMLDocumentNode *This, nsIDOMNode *nsnode, BOOL create, HTMLDOMNode **ret)
Definition: htmlnode.c:1339
static HRESULT WINAPI HTMLSelectElement_get_options(IHTMLSelectElement *iface, IDispatch **p)
Definition: htmlselect.c:222
static HRESULT WINAPI HTMLSelectElement_remove(IHTMLSelectElement *iface, LONG index)
Definition: htmlselect.c:442
static HRESULT WINAPI HTMLSelectElement_GetTypeInfoCount(IHTMLSelectElement *iface, UINT *pctinfo)
Definition: htmlselect.c:91
static HRESULT HTMLSelectElement_invoke(HTMLDOMNode *iface, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params, VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller)
Definition: htmlselect.c:623
static HRESULT WINAPI HTMLSelectElement_put_name(IHTMLSelectElement *iface, BSTR v)
Definition: htmlselect.c:190
static HRESULT WINAPI HTMLSelectElement_get_disabled(IHTMLSelectElement *iface, VARIANT_BOOL *p)
Definition: htmlselect.c:338
static const IHTMLSelectElementVtbl HTMLSelectElementVtbl
Definition: htmlselect.c:526
static HRESULT WINAPI HTMLSelectElement_get_name(IHTMLSelectElement *iface, BSTR *p)
Definition: htmlselect.c:208
static HRESULT WINAPI HTMLSelectElement_get_length(IHTMLSelectElement *iface, LONG *p)
Definition: htmlselect.c:472
static ULONG WINAPI HTMLSelectElement_AddRef(IHTMLSelectElement *iface)
Definition: htmlselect.c:77
static dispex_static_data_t HTMLSelectElement_dispex
Definition: htmlselect.c:702
static HRESULT WINAPI HTMLSelectElement_get_type(IHTMLSelectElement *iface, BSTR *p)
Definition: htmlselect.c:279
static HRESULT HTMLSelectElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
Definition: htmlselect.c:565
HRESULT HTMLSelectElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
Definition: htmlselect.c:709
static void HTMLSelectElement_traverse(HTMLDOMNode *iface, nsCycleCollectionTraversalCallback *cb)
Definition: htmlselect.c:656
static HRESULT WINAPI HTMLSelectElement_put_selectedIndex(IHTMLSelectElement *iface, LONG v)
Definition: htmlselect.c:249
static HRESULT WINAPI HTMLSelectElement_GetIDsOfNames(IHTMLSelectElement *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: htmlselect.c:107
static HRESULT htmlselect_item(HTMLSelectElement *This, int i, IDispatch **ret)
Definition: htmlselect.c:34
static ULONG WINAPI HTMLSelectElement_Release(IHTMLSelectElement *iface)
Definition: htmlselect.c:84
static HRESULT WINAPI HTMLSelectElement_add(IHTMLSelectElement *iface, IHTMLElement *element, VARIANT before)
Definition: htmlselect.c:397
static void HTMLSelectElement_unlink(HTMLDOMNode *iface)
Definition: htmlselect.c:664
static HTMLSelectElement * impl_from_IHTMLSelectElement(IHTMLSelectElement *iface)
Definition: htmlselect.c:29
static HRESULT WINAPI HTMLSelectElement_get_size(IHTMLSelectElement *iface, LONG *p)
Definition: htmlselect.c:144
static HRESULT WINAPI HTMLSelectElement_get__newEnum(IHTMLSelectElement *iface, IUnknown **p)
Definition: htmlselect.c:490
static HRESULT HTMLSelectElementImpl_get_disabled(HTMLDOMNode *iface, VARIANT_BOOL *p)
Definition: htmlselect.c:596
static HTMLSelectElement * impl_from_HTMLDOMNode(HTMLDOMNode *iface)
Definition: htmlselect.c:560
static HRESULT WINAPI HTMLSelectElement_put_length(IHTMLSelectElement *iface, LONG v)
Definition: htmlselect.c:458
static HRESULT WINAPI HTMLSelectElement_tags(IHTMLSelectElement *iface, VARIANT tagName, IDispatch **pdisp)
Definition: htmlselect.c:518
static HRESULT WINAPI HTMLSelectElement_get_onchange(IHTMLSelectElement *iface, VARIANT *p)
Definition: htmlselect.c:242
static HRESULT WINAPI HTMLSelectElement_put_multiple(IHTMLSelectElement *iface, VARIANT_BOOL v)
Definition: htmlselect.c:163
static HRESULT WINAPI HTMLSelectElement_get_multiple(IHTMLSelectElement *iface, VARIANT_BOOL *p)
Definition: htmlselect.c:175
static HRESULT HTMLSelectElement_get_dispid(HTMLDOMNode *iface, BSTR name, DWORD flags, DISPID *dispid)
Definition: htmlselect.c:604
static HRESULT WINAPI HTMLSelectElement_put_onchange(IHTMLSelectElement *iface, VARIANT v)
Definition: htmlselect.c:233
static HRESULT WINAPI HTMLSelectElement_item(IHTMLSelectElement *iface, VARIANT name, VARIANT index, IDispatch **pdisp)
Definition: htmlselect.c:497
static HRESULT WINAPI HTMLSelectElement_put_value(IHTMLSelectElement *iface, BSTR v)
Definition: htmlselect.c:292
static HRESULT WINAPI HTMLSelectElement_get_form(IHTMLSelectElement *iface, IHTMLFormElement **p)
Definition: htmlselect.c:356
static const tid_t HTMLSelectElement_tids[]
Definition: htmlselect.c:696
static HRESULT HTMLSelectElementImpl_put_disabled(HTMLDOMNode *iface, VARIANT_BOOL v)
Definition: htmlselect.c:590
static HRESULT WINAPI HTMLSelectElement_QueryInterface(IHTMLSelectElement *iface, REFIID riid, void **ppv)
Definition: htmlselect.c:69
static HRESULT WINAPI HTMLSelectElement_get_selectedIndex(IHTMLSelectElement *iface, LONG *p)
Definition: htmlselect.c:263
static const NodeImplVtbl HTMLSelectElementImplVtbl
Definition: htmlselect.c:676
#define DISPID_OPTIONCOL_0
Definition: htmlselect.c:602
static HRESULT WINAPI HTMLSelectElement_Invoke(IHTMLSelectElement *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: htmlselect.c:117
static HRESULT WINAPI HTMLSelectElement_GetTypeInfo(IHTMLSelectElement *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: htmlselect.c:98
static HRESULT WINAPI HTMLSelectElement_put_size(IHTMLSelectElement *iface, LONG v)
Definition: htmlselect.c:127
static HRESULT WINAPI HTMLSelectElement_put_disabled(IHTMLSelectElement *iface, VARIANT_BOOL v)
Definition: htmlselect.c:322
static HRESULT WINAPI HTMLSelectElement_get_value(IHTMLSelectElement *iface, BSTR *p)
Definition: htmlselect.c:309
tid_t
Definition: ieframe.h:311
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define FAILED(hr)
Definition: intsafe.h:51
#define debugstr_w
Definition: kernel32.h:32
unsigned int ULONG
Definition: retypes.h:1
static PVOID ptr
Definition: dispmode.c:27
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
HRESULT hres
Definition: protocol.c:465
static HMODULE MODULEINFO DWORD cb
Definition: module.c:33
static size_t elem
Definition: string.c:68
static UNICODE_STRING value_str
Definition: reg.c:1328
static LPOLESTR
Definition: stg_prop.c:27
static VARIANTARG static DISPID
Definition: ordinal.c:49
#define NS_OK
void nsAString_Finish(nsAString *) DECLSPEC_HIDDEN
Definition: nsembed.c:836
#define MSHTML_CUSTOM_DISPID_CNT
#define HTMLELEMENT_TIDS
void nsAString_InitDepend(nsAString *, const PRUnichar *) DECLSPEC_HIDDEN
Definition: nsembed.c:826
BOOL nsAString_Init(nsAString *, const PRUnichar *) DECLSPEC_HIDDEN
Definition: nsembed.c:817
static void node_release(HTMLDOMNode *node)
struct nsCycleCollectionTraversalCallback nsCycleCollectionTraversalCallback
#define NS_SUCCEEDED(res)
#define NS_FAILED(res)
HRESULT return_nsstr(nsresult, nsAString *, BSTR *) DECLSPEC_HIDDEN
Definition: nsembed.c:841
nsIWritableVariant * create_nsvariant(void) DECLSPEC_HIDDEN
Definition: nsembed.c:882
unsigned int UINT
Definition: ndis.h:50
#define V_VT(A)
Definition: oleauto.h:211
#define V_I4(A)
Definition: oleauto.h:247
#define V_DISPATCH(A)
Definition: oleauto.h:239
#define DISPATCH_PROPERTYGET
Definition: oleauto.h:1007
#define V_I2(A)
Definition: oleauto.h:245
#define CTL_E_INVALIDPROPERTYVALUE
Definition: olectl.h:292
const GUID IID_IDispatch
long LONG
Definition: pedump.c:60
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
#define isdigitW(n)
Definition: unicode.h:50
const WCHAR * str
DWORD LCID
Definition: nls.h:13
#define TRACE(s)
Definition: solgame.cpp:4
nsIDOMHTMLElement * nselem
nsIDOMHTMLSelectElement * nsselect
Definition: htmlselect.c:26
HTMLElement element
Definition: htmlselect.c:22
IHTMLSelectElement IHTMLSelectElement_iface
Definition: htmlselect.c:24
Definition: name.c:39
__inline int before(__u32 seq1, __u32 seq2)
Definition: tcpcore.h:2390
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
Definition: dlist.c:348
int ret
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531
#define WINAPI
Definition: msvc.h:6
#define E_POINTER
Definition: winerror.h:2365
#define DISP_E_UNKNOWNNAME
Definition: winerror.h:2515
__wchar_t WCHAR
Definition: xmlstorage.h:180