2 * Copyright 2008 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
28 #include "wine/debug.h"
30 #include "mshtml_private.h"
32 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
37 const IHTMLImgElementVtbl *lpHTMLImgElementVtbl;
40 #define HTMLIMG(x) ((IHTMLImgElement*) &(x)->lpHTMLImgElementVtbl)
42 #define HTMLIMG_THIS(iface) DEFINE_THIS(HTMLImgElement, HTMLImgElement, iface)
44 static HRESULT WINAPI HTMLImgElement_QueryInterface(IHTMLImgElement *iface, REFIID riid, void **ppv)
46 HTMLImgElement *This = HTMLIMG_THIS(iface);
48 return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
51 static ULONG WINAPI HTMLImgElement_AddRef(IHTMLImgElement *iface)
53 HTMLImgElement *This = HTMLIMG_THIS(iface);
55 return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
58 static ULONG WINAPI HTMLImgElement_Release(IHTMLImgElement *iface)
60 HTMLImgElement *This = HTMLIMG_THIS(iface);
62 return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
65 static HRESULT WINAPI HTMLImgElement_GetTypeInfoCount(IHTMLImgElement *iface, UINT *pctinfo)
67 HTMLImgElement *This = HTMLIMG_THIS(iface);
68 FIXME("(%p)->(%p)\n", This, pctinfo);
72 static HRESULT WINAPI HTMLImgElement_GetTypeInfo(IHTMLImgElement *iface, UINT iTInfo,
73 LCID lcid, ITypeInfo **ppTInfo)
75 HTMLImgElement *This = HTMLIMG_THIS(iface);
76 FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
80 static HRESULT WINAPI HTMLImgElement_GetIDsOfNames(IHTMLImgElement *iface, REFIID riid,
81 LPOLESTR *rgszNames, UINT cNames,
82 LCID lcid, DISPID *rgDispId)
84 HTMLImgElement *This = HTMLIMG_THIS(iface);
85 FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
90 static HRESULT WINAPI HTMLImgElement_Invoke(IHTMLImgElement *iface, DISPID dispIdMember,
91 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
92 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
94 HTMLImgElement *This = HTMLIMG_THIS(iface);
95 FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
96 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
100 static HRESULT WINAPI HTMLImgElement_put_isMap(IHTMLImgElement *iface, VARIANT_BOOL v)
102 HTMLImgElement *This = HTMLIMG_THIS(iface);
103 FIXME("(%p)->(%x)\n", This, v);
107 static HRESULT WINAPI HTMLImgElement_get_isMap(IHTMLImgElement *iface, VARIANT_BOOL *p)
109 HTMLImgElement *This = HTMLIMG_THIS(iface);
110 FIXME("(%p)->(%p)\n", This, p);
114 static HRESULT WINAPI HTMLImgElement_put_useMap(IHTMLImgElement *iface, BSTR v)
116 HTMLImgElement *This = HTMLIMG_THIS(iface);
117 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
121 static HRESULT WINAPI HTMLImgElement_get_useMap(IHTMLImgElement *iface, BSTR *p)
123 HTMLImgElement *This = HTMLIMG_THIS(iface);
124 FIXME("(%p)->(%p)\n", This, p);
128 static HRESULT WINAPI HTMLImgElement_get_mimeType(IHTMLImgElement *iface, BSTR *p)
130 HTMLImgElement *This = HTMLIMG_THIS(iface);
131 FIXME("(%p)->(%p)\n", This, p);
135 static HRESULT WINAPI HTMLImgElement_get_fileSize(IHTMLImgElement *iface, BSTR *p)
137 HTMLImgElement *This = HTMLIMG_THIS(iface);
138 FIXME("(%p)->(%p)\n", This, p);
142 static HRESULT WINAPI HTMLImgElement_get_fileCreatedDate(IHTMLImgElement *iface, BSTR *p)
144 HTMLImgElement *This = HTMLIMG_THIS(iface);
145 FIXME("(%p)->(%p)\n", This, p);
149 static HRESULT WINAPI HTMLImgElement_get_fileModifiedDate(IHTMLImgElement *iface, BSTR *p)
151 HTMLImgElement *This = HTMLIMG_THIS(iface);
152 FIXME("(%p)->(%p)\n", This, p);
156 static HRESULT WINAPI HTMLImgElement_get_fileUpdatedDate(IHTMLImgElement *iface, BSTR *p)
158 HTMLImgElement *This = HTMLIMG_THIS(iface);
159 FIXME("(%p)->(%p)\n", This, p);
163 static HRESULT WINAPI HTMLImgElement_get_protocol(IHTMLImgElement *iface, BSTR *p)
165 HTMLImgElement *This = HTMLIMG_THIS(iface);
166 FIXME("(%p)->(%p)\n", This, p);
170 static HRESULT WINAPI HTMLImgElement_get_href(IHTMLImgElement *iface, BSTR *p)
172 HTMLImgElement *This = HTMLIMG_THIS(iface);
173 FIXME("(%p)->(%p)\n", This, p);
177 static HRESULT WINAPI HTMLImgElement_get_nameProp(IHTMLImgElement *iface, BSTR *p)
179 HTMLImgElement *This = HTMLIMG_THIS(iface);
180 FIXME("(%p)->(%p)\n", This, p);
184 static HRESULT WINAPI HTMLImgElement_put_border(IHTMLImgElement *iface, VARIANT v)
186 HTMLImgElement *This = HTMLIMG_THIS(iface);
187 FIXME("(%p)->()\n", This);
191 static HRESULT WINAPI HTMLImgElement_get_border(IHTMLImgElement *iface, VARIANT *p)
193 HTMLImgElement *This = HTMLIMG_THIS(iface);
194 FIXME("(%p)->(%p)\n", This, p);
198 static HRESULT WINAPI HTMLImgElement_put_vspace(IHTMLImgElement *iface, long v)
200 HTMLImgElement *This = HTMLIMG_THIS(iface);
201 FIXME("(%p)->(%ld)\n", This, v);
205 static HRESULT WINAPI HTMLImgElement_get_vspace(IHTMLImgElement *iface, long *p)
207 HTMLImgElement *This = HTMLIMG_THIS(iface);
208 FIXME("(%p)->(%p)\n", This, p);
212 static HRESULT WINAPI HTMLImgElement_put_hspace(IHTMLImgElement *iface, long v)
214 HTMLImgElement *This = HTMLIMG_THIS(iface);
215 FIXME("(%p)->(%ld)\n", This, v);
219 static HRESULT WINAPI HTMLImgElement_get_hspace(IHTMLImgElement *iface, long *p)
221 HTMLImgElement *This = HTMLIMG_THIS(iface);
222 FIXME("(%p)->(%p)\n", This, p);
226 static HRESULT WINAPI HTMLImgElement_put_alt(IHTMLImgElement *iface, BSTR v)
228 HTMLImgElement *This = HTMLIMG_THIS(iface);
229 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
233 static HRESULT WINAPI HTMLImgElement_get_alt(IHTMLImgElement *iface, BSTR *p)
235 HTMLImgElement *This = HTMLIMG_THIS(iface);
236 FIXME("(%p)->(%p)\n", This, p);
240 static HRESULT WINAPI HTMLImgElement_put_src(IHTMLImgElement *iface, BSTR v)
242 HTMLImgElement *This = HTMLIMG_THIS(iface);
243 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
247 static HRESULT WINAPI HTMLImgElement_get_src(IHTMLImgElement *iface, BSTR *p)
249 HTMLImgElement *This = HTMLIMG_THIS(iface);
250 FIXME("(%p)->(%p)\n", This, p);
254 static HRESULT WINAPI HTMLImgElement_put_lowsrc(IHTMLImgElement *iface, BSTR v)
256 HTMLImgElement *This = HTMLIMG_THIS(iface);
257 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
261 static HRESULT WINAPI HTMLImgElement_get_lowsrc(IHTMLImgElement *iface, BSTR *p)
263 HTMLImgElement *This = HTMLIMG_THIS(iface);
264 FIXME("(%p)->(%p)\n", This, p);
268 static HRESULT WINAPI HTMLImgElement_put_vrml(IHTMLImgElement *iface, BSTR v)
270 HTMLImgElement *This = HTMLIMG_THIS(iface);
271 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
275 static HRESULT WINAPI HTMLImgElement_get_vrml(IHTMLImgElement *iface, BSTR *p)
277 HTMLImgElement *This = HTMLIMG_THIS(iface);
278 FIXME("(%p)->(%p)\n", This, p);
282 static HRESULT WINAPI HTMLImgElement_put_dynsrc(IHTMLImgElement *iface, BSTR v)
284 HTMLImgElement *This = HTMLIMG_THIS(iface);
285 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
289 static HRESULT WINAPI HTMLImgElement_get_dynsrc(IHTMLImgElement *iface, BSTR *p)
291 HTMLImgElement *This = HTMLIMG_THIS(iface);
292 FIXME("(%p)->(%p)\n", This, p);
296 static HRESULT WINAPI HTMLImgElement_get_readyState(IHTMLImgElement *iface, BSTR *p)
298 HTMLImgElement *This = HTMLIMG_THIS(iface);
299 FIXME("(%p)->(%p)\n", This, p);
303 static HRESULT WINAPI HTMLImgElement_get_complete(IHTMLImgElement *iface, VARIANT_BOOL *p)
305 HTMLImgElement *This = HTMLIMG_THIS(iface);
306 FIXME("(%p)->(%p)\n", This, p);
310 static HRESULT WINAPI HTMLImgElement_put_loop(IHTMLImgElement *iface, VARIANT v)
312 HTMLImgElement *This = HTMLIMG_THIS(iface);
313 FIXME("(%p)->()\n", This);
317 static HRESULT WINAPI HTMLImgElement_get_loop(IHTMLImgElement *iface, VARIANT *p)
319 HTMLImgElement *This = HTMLIMG_THIS(iface);
320 FIXME("(%p)->(%p)\n", This, p);
324 static HRESULT WINAPI HTMLImgElement_put_align(IHTMLImgElement *iface, BSTR v)
326 HTMLImgElement *This = HTMLIMG_THIS(iface);
327 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
331 static HRESULT WINAPI HTMLImgElement_get_align(IHTMLImgElement *iface, BSTR *p)
333 HTMLImgElement *This = HTMLIMG_THIS(iface);
334 FIXME("(%p)->(%p)\n", This, p);
338 static HRESULT WINAPI HTMLImgElement_put_onload(IHTMLImgElement *iface, VARIANT v)
340 HTMLImgElement *This = HTMLIMG_THIS(iface);
341 FIXME("(%p)->()\n", This);
345 static HRESULT WINAPI HTMLImgElement_get_onload(IHTMLImgElement *iface, VARIANT *p)
347 HTMLImgElement *This = HTMLIMG_THIS(iface);
348 FIXME("(%p)->(%p)\n", This, p);
352 static HRESULT WINAPI HTMLImgElement_put_onerror(IHTMLImgElement *iface, VARIANT v)
354 HTMLImgElement *This = HTMLIMG_THIS(iface);
355 FIXME("(%p)->()\n", This);
359 static HRESULT WINAPI HTMLImgElement_get_onerror(IHTMLImgElement *iface, VARIANT *p)
361 HTMLImgElement *This = HTMLIMG_THIS(iface);
362 FIXME("(%p)->(%p)\n", This, p);
366 static HRESULT WINAPI HTMLImgElement_put_onabort(IHTMLImgElement *iface, VARIANT v)
368 HTMLImgElement *This = HTMLIMG_THIS(iface);
369 FIXME("(%p)->()\n", This);
373 static HRESULT WINAPI HTMLImgElement_get_onabort(IHTMLImgElement *iface, VARIANT *p)
375 HTMLImgElement *This = HTMLIMG_THIS(iface);
376 FIXME("(%p)->(%p)\n", This, p);
380 static HRESULT WINAPI HTMLImgElement_put_name(IHTMLImgElement *iface, BSTR v)
382 HTMLImgElement *This = HTMLIMG_THIS(iface);
383 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
387 static HRESULT WINAPI HTMLImgElement_get_name(IHTMLImgElement *iface, BSTR *p)
389 HTMLImgElement *This = HTMLIMG_THIS(iface);
390 FIXME("(%p)->(%p)\n", This, p);
394 static HRESULT WINAPI HTMLImgElement_put_width(IHTMLImgElement *iface, long v)
396 HTMLImgElement *This = HTMLIMG_THIS(iface);
397 FIXME("(%p)->(%ld)\n", This, v);
401 static HRESULT WINAPI HTMLImgElement_get_width(IHTMLImgElement *iface, long *p)
403 HTMLImgElement *This = HTMLIMG_THIS(iface);
404 FIXME("(%p)->(%p)\n", This, p);
408 static HRESULT WINAPI HTMLImgElement_put_height(IHTMLImgElement *iface, long v)
410 HTMLImgElement *This = HTMLIMG_THIS(iface);
411 FIXME("(%p)->(%ld)\n", This, v);
415 static HRESULT WINAPI HTMLImgElement_get_height(IHTMLImgElement *iface, long *p)
417 HTMLImgElement *This = HTMLIMG_THIS(iface);
418 FIXME("(%p)->(%p)\n", This, p);
422 static HRESULT WINAPI HTMLImgElement_put_start(IHTMLImgElement *iface, BSTR v)
424 HTMLImgElement *This = HTMLIMG_THIS(iface);
425 FIXME("(%p)->()\n", This);
429 static HRESULT WINAPI HTMLImgElement_get_start(IHTMLImgElement *iface, BSTR *p)
431 HTMLImgElement *This = HTMLIMG_THIS(iface);
432 FIXME("(%p)->(%p)\n", This, p);
438 static const IHTMLImgElementVtbl HTMLImgElementVtbl = {
439 HTMLImgElement_QueryInterface,
440 HTMLImgElement_AddRef,
441 HTMLImgElement_Release,
442 HTMLImgElement_GetTypeInfoCount,
443 HTMLImgElement_GetTypeInfo,
444 HTMLImgElement_GetIDsOfNames,
445 HTMLImgElement_Invoke,
446 HTMLImgElement_put_isMap,
447 HTMLImgElement_get_isMap,
448 HTMLImgElement_put_useMap,
449 HTMLImgElement_get_useMap,
450 HTMLImgElement_get_mimeType,
451 HTMLImgElement_get_fileSize,
452 HTMLImgElement_get_fileCreatedDate,
453 HTMLImgElement_get_fileModifiedDate,
454 HTMLImgElement_get_fileUpdatedDate,
455 HTMLImgElement_get_protocol,
456 HTMLImgElement_get_href,
457 HTMLImgElement_get_nameProp,
458 HTMLImgElement_put_border,
459 HTMLImgElement_get_border,
460 HTMLImgElement_put_vspace,
461 HTMLImgElement_get_vspace,
462 HTMLImgElement_put_hspace,
463 HTMLImgElement_get_hspace,
464 HTMLImgElement_put_alt,
465 HTMLImgElement_get_alt,
466 HTMLImgElement_put_src,
467 HTMLImgElement_get_src,
468 HTMLImgElement_put_lowsrc,
469 HTMLImgElement_get_lowsrc,
470 HTMLImgElement_put_vrml,
471 HTMLImgElement_get_vrml,
472 HTMLImgElement_put_dynsrc,
473 HTMLImgElement_get_dynsrc,
474 HTMLImgElement_get_readyState,
475 HTMLImgElement_get_complete,
476 HTMLImgElement_put_loop,
477 HTMLImgElement_get_loop,
478 HTMLImgElement_put_align,
479 HTMLImgElement_get_align,
480 HTMLImgElement_put_onload,
481 HTMLImgElement_get_onload,
482 HTMLImgElement_put_onerror,
483 HTMLImgElement_get_onerror,
484 HTMLImgElement_put_onabort,
485 HTMLImgElement_get_onabort,
486 HTMLImgElement_put_name,
487 HTMLImgElement_get_name,
488 HTMLImgElement_put_width,
489 HTMLImgElement_get_width,
490 HTMLImgElement_put_height,
491 HTMLImgElement_get_height,
492 HTMLImgElement_put_start,
493 HTMLImgElement_get_start
496 #define HTMLIMG_NODE_THIS(iface) DEFINE_THIS2(HTMLImgElement, element.node, iface)
498 static HRESULT HTMLImgElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
500 HTMLImgElement *This = HTMLIMG_NODE_THIS(iface);
504 if(IsEqualGUID(&IID_IHTMLImgElement, riid)) {
505 TRACE("(%p)->(IID_IHTMLImgElement %p)\n", This, ppv);
506 *ppv = HTMLIMG(This);
508 return HTMLElement_QI(&This->element.node, riid, ppv);
511 IUnknown_AddRef((IUnknown*)*ppv);
515 static void HTMLImgElement_destructor(HTMLDOMNode *iface)
517 HTMLImgElement *This = HTMLIMG_NODE_THIS(iface);
519 HTMLElement_destructor(&This->element.node);
522 #undef HTMLIMG_NODE_THIS
524 static const NodeImplVtbl HTMLImgElementImplVtbl = {
526 HTMLImgElement_destructor
529 static const tid_t HTMLImgElement_iface_tids[] = {
537 static dispex_static_data_t HTMLImgElement_dispex = {
541 HTMLImgElement_iface_tids
544 HTMLElement *HTMLImgElement_Create(nsIDOMHTMLElement *nselem)
546 HTMLImgElement *ret = heap_alloc_zero(sizeof(HTMLImgElement));
548 ret->lpHTMLImgElementVtbl = &HTMLImgElementVtbl;
549 ret->element.node.vtbl = &HTMLImgElementImplVtbl;
551 init_dispex(&ret->element.node.dispex, (IUnknown*)HTMLIMG(ret), &HTMLImgElement_dispex);
552 HTMLElement_Init(&ret->element);
554 return &ret->element;