2 * Copyright 2007 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
32 #include "wine/debug.h"
34 #include "mshtml_private.h"
36 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
41 const IHTMLTableVtbl *lpHTMLTableVtbl;
46 #define HTMLTABLE(x) ((IHTMLTable*) &(x)->lpHTMLTableVtbl)
48 #define HTMLTABLE_THIS(iface) DEFINE_THIS(HTMLTable, HTMLTable, iface)
50 static HRESULT WINAPI HTMLTable_QueryInterface(IHTMLTable *iface,
51 REFIID riid, void **ppv)
53 HTMLTable *This = HTMLTABLE_THIS(iface);
55 return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
58 static ULONG WINAPI HTMLTable_AddRef(IHTMLTable *iface)
60 HTMLTable *This = HTMLTABLE_THIS(iface);
62 return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
65 static ULONG WINAPI HTMLTable_Release(IHTMLTable *iface)
67 HTMLTable *This = HTMLTABLE_THIS(iface);
69 return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
72 static HRESULT WINAPI HTMLTable_GetTypeInfoCount(IHTMLTable *iface, UINT *pctinfo)
74 HTMLTable *This = HTMLTABLE_THIS(iface);
75 FIXME("(%p)->(%p)\n", This, pctinfo);
79 static HRESULT WINAPI HTMLTable_GetTypeInfo(IHTMLTable *iface, UINT iTInfo,
80 LCID lcid, ITypeInfo **ppTInfo)
82 HTMLTable *This = HTMLTABLE_THIS(iface);
83 FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
87 static HRESULT WINAPI HTMLTable_GetIDsOfNames(IHTMLTable *iface, REFIID riid,
88 LPOLESTR *rgszNames, UINT cNames,
89 LCID lcid, DISPID *rgDispId)
91 HTMLTable *This = HTMLTABLE_THIS(iface);
92 FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
97 static HRESULT WINAPI HTMLTable_Invoke(IHTMLTable *iface, DISPID dispIdMember,
98 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
99 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
101 HTMLTable *This = HTMLTABLE_THIS(iface);
102 FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
103 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
107 static HRESULT WINAPI HTMLTable_put_cols(IHTMLTable *iface, long v)
109 HTMLTable *This = HTMLTABLE_THIS(iface);
110 FIXME("(%p)->(%ld)\n", This, v);
114 static HRESULT WINAPI HTMLTable_get_cols(IHTMLTable *iface, long *p)
116 HTMLTable *This = HTMLTABLE_THIS(iface);
117 FIXME("(%p)->(%p)\n", This, p);
121 static HRESULT WINAPI HTMLTable_put_border(IHTMLTable *iface, VARIANT v)
123 HTMLTable *This = HTMLTABLE_THIS(iface);
124 FIXME("(%p)->(v)\n", This);
128 static HRESULT WINAPI HTMLTable_get_border(IHTMLTable *iface, VARIANT *p)
130 HTMLTable *This = HTMLTABLE_THIS(iface);
131 FIXME("(%p)->(%p)\n", This, p);
135 static HRESULT WINAPI HTMLTable_put_frame(IHTMLTable *iface, BSTR v)
137 HTMLTable *This = HTMLTABLE_THIS(iface);
138 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
142 static HRESULT WINAPI HTMLTable_get_frame(IHTMLTable *iface, BSTR *p)
144 HTMLTable *This = HTMLTABLE_THIS(iface);
145 FIXME("(%p)->(%p)\n", This, p);
149 static HRESULT WINAPI HTMLTable_put_rules(IHTMLTable *iface, BSTR v)
151 HTMLTable *This = HTMLTABLE_THIS(iface);
152 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
156 static HRESULT WINAPI HTMLTable_get_rules(IHTMLTable *iface, BSTR *p)
158 HTMLTable *This = HTMLTABLE_THIS(iface);
159 FIXME("(%p)->(%p)\n", This, p);
163 static HRESULT WINAPI HTMLTable_put_cellSpacing(IHTMLTable *iface, VARIANT v)
165 HTMLTable *This = HTMLTABLE_THIS(iface);
166 FIXME("(%p)->(v)\n", This);
170 static HRESULT WINAPI HTMLTable_get_cellSpacing(IHTMLTable *iface, VARIANT *p)
172 HTMLTable *This = HTMLTABLE_THIS(iface);
173 FIXME("(%p)->(%p)\n", This, p);
177 static HRESULT WINAPI HTMLTable_put_cellPadding(IHTMLTable *iface, VARIANT v)
179 HTMLTable *This = HTMLTABLE_THIS(iface);
180 FIXME("(%p)->(v)\n", This);
184 static HRESULT WINAPI HTMLTable_get_cellPadding(IHTMLTable *iface, VARIANT *p)
186 HTMLTable *This = HTMLTABLE_THIS(iface);
187 FIXME("(%p)->(%p)\n", This, p);
191 static HRESULT WINAPI HTMLTable_put_background(IHTMLTable *iface, BSTR v)
193 HTMLTable *This = HTMLTABLE_THIS(iface);
194 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
198 static HRESULT WINAPI HTMLTable_get_background(IHTMLTable *iface, BSTR *p)
200 HTMLTable *This = HTMLTABLE_THIS(iface);
201 FIXME("(%p)->(%p)\n", This, p);
205 static HRESULT WINAPI HTMLTable_put_bgColor(IHTMLTable *iface, VARIANT v)
207 HTMLTable *This = HTMLTABLE_THIS(iface);
208 FIXME("(%p)->(v)\n", This);
212 static HRESULT WINAPI HTMLTable_get_bgColor(IHTMLTable *iface, VARIANT *p)
214 HTMLTable *This = HTMLTABLE_THIS(iface);
215 FIXME("(%p)->(%p)\n", This, p);
219 static HRESULT WINAPI HTMLTable_put_borderColor(IHTMLTable *iface, VARIANT v)
221 HTMLTable *This = HTMLTABLE_THIS(iface);
222 FIXME("(%p)->(v)\n", This);
226 static HRESULT WINAPI HTMLTable_get_borderColor(IHTMLTable *iface, VARIANT *p)
228 HTMLTable *This = HTMLTABLE_THIS(iface);
229 FIXME("(%p)->(%p)\n", This, p);
233 static HRESULT WINAPI HTMLTable_put_borderColorLight(IHTMLTable *iface, VARIANT v)
235 HTMLTable *This = HTMLTABLE_THIS(iface);
236 FIXME("(%p)->(v)\n", This);
240 static HRESULT WINAPI HTMLTable_get_borderColorLight(IHTMLTable *iface, VARIANT *p)
242 HTMLTable *This = HTMLTABLE_THIS(iface);
243 FIXME("(%p)->(%p)\n", This, p);
247 static HRESULT WINAPI HTMLTable_put_borderColorDark(IHTMLTable *iface, VARIANT v)
249 HTMLTable *This = HTMLTABLE_THIS(iface);
250 FIXME("(%p)->(v)\n", This);
254 static HRESULT WINAPI HTMLTable_get_borderColorDark(IHTMLTable *iface, VARIANT *p)
256 HTMLTable *This = HTMLTABLE_THIS(iface);
257 FIXME("(%p)->(%p)\n", This, p);
261 static HRESULT WINAPI HTMLTable_put_align(IHTMLTable *iface, BSTR v)
263 HTMLTable *This = HTMLTABLE_THIS(iface);
264 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
268 static HRESULT WINAPI HTMLTable_get_align(IHTMLTable *iface, BSTR *p)
270 HTMLTable *This = HTMLTABLE_THIS(iface);
271 FIXME("(%p)->(%p)\n", This, p);
275 static HRESULT WINAPI HTMLTable_refresh(IHTMLTable *iface)
277 HTMLTable *This = HTMLTABLE_THIS(iface);
278 FIXME("(%p)\n", This);
282 static HRESULT WINAPI HTMLTable_get_rows(IHTMLTable *iface, IHTMLElementCollection **p)
284 HTMLTable *This = HTMLTABLE_THIS(iface);
285 FIXME("(%p)->(%p)\n", This, p);
289 static HRESULT WINAPI HTMLTable_put_width(IHTMLTable *iface, VARIANT v)
291 HTMLTable *This = HTMLTABLE_THIS(iface);
292 FIXME("(%p)->(v)\n", This);
296 static HRESULT WINAPI HTMLTable_get_width(IHTMLTable *iface, VARIANT *p)
298 HTMLTable *This = HTMLTABLE_THIS(iface);
299 FIXME("(%p)->(%p)\n", This, p);
303 static HRESULT WINAPI HTMLTable_put_height(IHTMLTable *iface, VARIANT v)
305 HTMLTable *This = HTMLTABLE_THIS(iface);
306 FIXME("(%p)->(v)\n", This);
310 static HRESULT WINAPI HTMLTable_get_height(IHTMLTable *iface, VARIANT *p)
312 HTMLTable *This = HTMLTABLE_THIS(iface);
313 FIXME("(%p)->(%p)\n", This, p);
317 static HRESULT WINAPI HTMLTable_put_dataPageSize(IHTMLTable *iface, long v)
319 HTMLTable *This = HTMLTABLE_THIS(iface);
320 FIXME("(%p)->(%ld)\n", This, v);
324 static HRESULT WINAPI HTMLTable_get_dataPageSize(IHTMLTable *iface, long *p)
326 HTMLTable *This = HTMLTABLE_THIS(iface);
327 FIXME("(%p)->(%p)\n", This, p);
331 static HRESULT WINAPI HTMLTable_nextPage(IHTMLTable *iface)
333 HTMLTable *This = HTMLTABLE_THIS(iface);
334 FIXME("(%p)\n", This);
338 static HRESULT WINAPI HTMLTable_previousPage(IHTMLTable *iface)
340 HTMLTable *This = HTMLTABLE_THIS(iface);
341 FIXME("(%p)\n", This);
345 static HRESULT WINAPI HTMLTable_get_tHead(IHTMLTable *iface, IHTMLTableSection **p)
347 HTMLTable *This = HTMLTABLE_THIS(iface);
348 FIXME("(%p)->(%p)\n", This, p);
352 static HRESULT WINAPI HTMLTable_get_tFoot(IHTMLTable *iface, IHTMLTableSection **p)
354 HTMLTable *This = HTMLTABLE_THIS(iface);
355 FIXME("(%p)->(%p)\n", This, p);
359 static HRESULT WINAPI HTMLTable_get_tBodies(IHTMLTable *iface, IHTMLElementCollection **p)
361 HTMLTable *This = HTMLTABLE_THIS(iface);
362 FIXME("(%p)->(%p)\n", This, p);
366 static HRESULT WINAPI HTMLTable_get_caption(IHTMLTable *iface, IHTMLTableCaption **p)
368 HTMLTable *This = HTMLTABLE_THIS(iface);
369 FIXME("(%p)->(%p)\n", This, p);
373 static HRESULT WINAPI HTMLTable_createTHead(IHTMLTable *iface, IDispatch **head)
375 HTMLTable *This = HTMLTABLE_THIS(iface);
376 FIXME("(%p)->(%p)\n", This, head);
380 static HRESULT WINAPI HTMLTable_deleteTHead(IHTMLTable *iface)
382 HTMLTable *This = HTMLTABLE_THIS(iface);
383 FIXME("(%p)\n", This);
387 static HRESULT WINAPI HTMLTable_createTFoot(IHTMLTable *iface, IDispatch **foot)
389 HTMLTable *This = HTMLTABLE_THIS(iface);
390 FIXME("(%p)->(%p)\n", This, foot);
394 static HRESULT WINAPI HTMLTable_deleteTFoot(IHTMLTable *iface)
396 HTMLTable *This = HTMLTABLE_THIS(iface);
397 FIXME("(%p)\n", This);
401 static HRESULT WINAPI HTMLTable_createCaption(IHTMLTable *iface, IHTMLTableCaption **caption)
403 HTMLTable *This = HTMLTABLE_THIS(iface);
404 FIXME("(%p)->(%p)\n", This, caption);
408 static HRESULT WINAPI HTMLTable_deleteCaption(IHTMLTable *iface)
410 HTMLTable *This = HTMLTABLE_THIS(iface);
411 FIXME("(%p)\n", This);
415 static HRESULT WINAPI HTMLTable_insertRow(IHTMLTable *iface, long index, IDispatch **row)
417 HTMLTable *This = HTMLTABLE_THIS(iface);
418 FIXME("(%p)->(%ld %p)\n", This, index, row);
422 static HRESULT WINAPI HTMLTable_deleteRow(IHTMLTable *iface, long index)
424 HTMLTable *This = HTMLTABLE_THIS(iface);
425 FIXME("(%p)->(%ld)\n", This, index);
429 static HRESULT WINAPI HTMLTable_get_readyState(IHTMLTable *iface, BSTR *p)
431 HTMLTable *This = HTMLTABLE_THIS(iface);
432 FIXME("(%p)->(%p)\n", This, p);
436 static HRESULT WINAPI HTMLTable_put_onreadystatechange(IHTMLTable *iface, VARIANT v)
438 HTMLTable *This = HTMLTABLE_THIS(iface);
439 FIXME("(%p)->(v)\n", This);
443 static HRESULT WINAPI HTMLTable_get_onreadystatechange(IHTMLTable *iface, VARIANT *p)
445 HTMLTable *This = HTMLTABLE_THIS(iface);
446 FIXME("(%p)->(%p)\n", This, p);
450 #undef HTMLTABLE_THIS
452 static const IHTMLTableVtbl HTMLTableVtbl = {
453 HTMLTable_QueryInterface,
456 HTMLTable_GetTypeInfoCount,
457 HTMLTable_GetTypeInfo,
458 HTMLTable_GetIDsOfNames,
462 HTMLTable_put_border,
463 HTMLTable_get_border,
468 HTMLTable_put_cellSpacing,
469 HTMLTable_get_cellSpacing,
470 HTMLTable_put_cellPadding,
471 HTMLTable_get_cellPadding,
472 HTMLTable_put_background,
473 HTMLTable_get_background,
474 HTMLTable_put_bgColor,
475 HTMLTable_get_bgColor,
476 HTMLTable_put_borderColor,
477 HTMLTable_get_borderColor,
478 HTMLTable_put_borderColorLight,
479 HTMLTable_get_borderColorLight,
480 HTMLTable_put_borderColorDark,
481 HTMLTable_get_borderColorDark,
488 HTMLTable_put_height,
489 HTMLTable_get_height,
490 HTMLTable_put_dataPageSize,
491 HTMLTable_get_dataPageSize,
493 HTMLTable_previousPage,
496 HTMLTable_get_tBodies,
497 HTMLTable_get_caption,
498 HTMLTable_createTHead,
499 HTMLTable_deleteTHead,
500 HTMLTable_createTFoot,
501 HTMLTable_deleteTFoot,
502 HTMLTable_createCaption,
503 HTMLTable_deleteCaption,
506 HTMLTable_get_readyState,
507 HTMLTable_put_onreadystatechange,
508 HTMLTable_get_onreadystatechange
511 #define HTMLTABLE_NODE_THIS(iface) DEFINE_THIS2(HTMLTable, element.node, iface)
513 static HRESULT HTMLTable_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
515 HTMLTable *This = HTMLTABLE_NODE_THIS(iface);
519 if(IsEqualGUID(&IID_IUnknown, riid)) {
520 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
521 *ppv = HTMLTABLE(This);
522 }else if(IsEqualGUID(&IID_IDispatch, riid)) {
523 TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
524 *ppv = HTMLTABLE(This);
525 }else if(IsEqualGUID(&IID_IHTMLTable, riid)) {
526 TRACE("(%p)->(IID_IHTMLTable %p)\n", This, ppv);
527 *ppv = HTMLTABLE(This);
531 IUnknown_AddRef((IUnknown*)*ppv);
535 return HTMLElement_QI(&This->element.node, riid, ppv);
538 static void HTMLTable_destructor(HTMLDOMNode *iface)
540 HTMLTable *This = HTMLTABLE_NODE_THIS(iface);
541 HTMLElement_destructor(&This->element.node);
544 #undef HTMLTABLE_NODE_THIS
546 static const NodeImplVtbl HTMLTableImplVtbl = {
551 HTMLElement *HTMLTable_Create(nsIDOMHTMLElement *nselem)
553 HTMLTable *ret = heap_alloc(sizeof(HTMLTable));
555 HTMLElement_Init(&ret->element);
557 ret->element.node.vtbl = &HTMLTableImplVtbl;
558 ret->lpHTMLTableVtbl = &HTMLTableVtbl;
560 ConnectionPoint_Init(&ret->cp, &ret->element.cp_container, &DIID_HTMLTableEvents);
562 return &ret->element;