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
28 #include "wine/debug.h"
30 #include "mshtml_private.h"
32 WINE_DEFAULT_DEBUG_CHANNEL(mshtml
);
37 const IHTMLTableVtbl
*lpHTMLTableVtbl
;
42 #define HTMLTABLE(x) ((IHTMLTable*) &(x)->lpHTMLTableVtbl)
44 #define HTMLTABLE_THIS(iface) DEFINE_THIS(HTMLTable, HTMLTable, iface)
46 static HRESULT WINAPI
HTMLTable_QueryInterface(IHTMLTable
*iface
,
47 REFIID riid
, void **ppv
)
49 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
51 return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This
->element
.node
), riid
, ppv
);
54 static ULONG WINAPI
HTMLTable_AddRef(IHTMLTable
*iface
)
56 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
58 return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This
->element
.node
));
61 static ULONG WINAPI
HTMLTable_Release(IHTMLTable
*iface
)
63 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
65 return IHTMLDOMNode_Release(HTMLDOMNODE(&This
->element
.node
));
68 static HRESULT WINAPI
HTMLTable_GetTypeInfoCount(IHTMLTable
*iface
, UINT
*pctinfo
)
70 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
71 FIXME("(%p)->(%p)\n", This
, pctinfo
);
75 static HRESULT WINAPI
HTMLTable_GetTypeInfo(IHTMLTable
*iface
, UINT iTInfo
,
76 LCID lcid
, ITypeInfo
**ppTInfo
)
78 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
79 FIXME("(%p)->(%u %u %p)\n", This
, iTInfo
, lcid
, ppTInfo
);
83 static HRESULT WINAPI
HTMLTable_GetIDsOfNames(IHTMLTable
*iface
, REFIID riid
,
84 LPOLESTR
*rgszNames
, UINT cNames
,
85 LCID lcid
, DISPID
*rgDispId
)
87 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
88 FIXME("(%p)->(%s %p %u %u %p)\n", This
, debugstr_guid(riid
), rgszNames
, cNames
,
93 static HRESULT WINAPI
HTMLTable_Invoke(IHTMLTable
*iface
, DISPID dispIdMember
,
94 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
95 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
97 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
98 FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This
, dispIdMember
, debugstr_guid(riid
),
99 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
103 static HRESULT WINAPI
HTMLTable_put_cols(IHTMLTable
*iface
, long v
)
105 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
106 FIXME("(%p)->(%ld)\n", This
, v
);
110 static HRESULT WINAPI
HTMLTable_get_cols(IHTMLTable
*iface
, long *p
)
112 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
113 FIXME("(%p)->(%p)\n", This
, p
);
117 static HRESULT WINAPI
HTMLTable_put_border(IHTMLTable
*iface
, VARIANT v
)
119 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
120 FIXME("(%p)->(v)\n", This
);
124 static HRESULT WINAPI
HTMLTable_get_border(IHTMLTable
*iface
, VARIANT
*p
)
126 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
127 FIXME("(%p)->(%p)\n", This
, p
);
131 static HRESULT WINAPI
HTMLTable_put_frame(IHTMLTable
*iface
, BSTR v
)
133 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
134 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
138 static HRESULT WINAPI
HTMLTable_get_frame(IHTMLTable
*iface
, BSTR
*p
)
140 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
141 FIXME("(%p)->(%p)\n", This
, p
);
145 static HRESULT WINAPI
HTMLTable_put_rules(IHTMLTable
*iface
, BSTR v
)
147 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
148 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
152 static HRESULT WINAPI
HTMLTable_get_rules(IHTMLTable
*iface
, BSTR
*p
)
154 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
155 FIXME("(%p)->(%p)\n", This
, p
);
159 static HRESULT WINAPI
HTMLTable_put_cellSpacing(IHTMLTable
*iface
, VARIANT v
)
161 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
162 FIXME("(%p)->(v)\n", This
);
166 static HRESULT WINAPI
HTMLTable_get_cellSpacing(IHTMLTable
*iface
, VARIANT
*p
)
168 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
169 FIXME("(%p)->(%p)\n", This
, p
);
173 static HRESULT WINAPI
HTMLTable_put_cellPadding(IHTMLTable
*iface
, VARIANT v
)
175 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
176 FIXME("(%p)->(v)\n", This
);
180 static HRESULT WINAPI
HTMLTable_get_cellPadding(IHTMLTable
*iface
, VARIANT
*p
)
182 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
183 FIXME("(%p)->(%p)\n", This
, p
);
187 static HRESULT WINAPI
HTMLTable_put_background(IHTMLTable
*iface
, BSTR v
)
189 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
190 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
194 static HRESULT WINAPI
HTMLTable_get_background(IHTMLTable
*iface
, BSTR
*p
)
196 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
197 FIXME("(%p)->(%p)\n", This
, p
);
201 static HRESULT WINAPI
HTMLTable_put_bgColor(IHTMLTable
*iface
, VARIANT v
)
203 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
204 FIXME("(%p)->(v)\n", This
);
208 static HRESULT WINAPI
HTMLTable_get_bgColor(IHTMLTable
*iface
, VARIANT
*p
)
210 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
211 FIXME("(%p)->(%p)\n", This
, p
);
215 static HRESULT WINAPI
HTMLTable_put_borderColor(IHTMLTable
*iface
, VARIANT v
)
217 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
218 FIXME("(%p)->(v)\n", This
);
222 static HRESULT WINAPI
HTMLTable_get_borderColor(IHTMLTable
*iface
, VARIANT
*p
)
224 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
225 FIXME("(%p)->(%p)\n", This
, p
);
229 static HRESULT WINAPI
HTMLTable_put_borderColorLight(IHTMLTable
*iface
, VARIANT v
)
231 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
232 FIXME("(%p)->(v)\n", This
);
236 static HRESULT WINAPI
HTMLTable_get_borderColorLight(IHTMLTable
*iface
, VARIANT
*p
)
238 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
239 FIXME("(%p)->(%p)\n", This
, p
);
243 static HRESULT WINAPI
HTMLTable_put_borderColorDark(IHTMLTable
*iface
, VARIANT v
)
245 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
246 FIXME("(%p)->(v)\n", This
);
250 static HRESULT WINAPI
HTMLTable_get_borderColorDark(IHTMLTable
*iface
, VARIANT
*p
)
252 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
253 FIXME("(%p)->(%p)\n", This
, p
);
257 static HRESULT WINAPI
HTMLTable_put_align(IHTMLTable
*iface
, BSTR v
)
259 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
260 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
264 static HRESULT WINAPI
HTMLTable_get_align(IHTMLTable
*iface
, BSTR
*p
)
266 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
267 FIXME("(%p)->(%p)\n", This
, p
);
271 static HRESULT WINAPI
HTMLTable_refresh(IHTMLTable
*iface
)
273 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
274 FIXME("(%p)\n", This
);
278 static HRESULT WINAPI
HTMLTable_get_rows(IHTMLTable
*iface
, IHTMLElementCollection
**p
)
280 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
281 FIXME("(%p)->(%p)\n", This
, p
);
285 static HRESULT WINAPI
HTMLTable_put_width(IHTMLTable
*iface
, VARIANT v
)
287 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
288 FIXME("(%p)->(v)\n", This
);
292 static HRESULT WINAPI
HTMLTable_get_width(IHTMLTable
*iface
, VARIANT
*p
)
294 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
295 FIXME("(%p)->(%p)\n", This
, p
);
299 static HRESULT WINAPI
HTMLTable_put_height(IHTMLTable
*iface
, VARIANT v
)
301 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
302 FIXME("(%p)->(v)\n", This
);
306 static HRESULT WINAPI
HTMLTable_get_height(IHTMLTable
*iface
, VARIANT
*p
)
308 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
309 FIXME("(%p)->(%p)\n", This
, p
);
313 static HRESULT WINAPI
HTMLTable_put_dataPageSize(IHTMLTable
*iface
, long v
)
315 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
316 FIXME("(%p)->(%ld)\n", This
, v
);
320 static HRESULT WINAPI
HTMLTable_get_dataPageSize(IHTMLTable
*iface
, long *p
)
322 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
323 FIXME("(%p)->(%p)\n", This
, p
);
327 static HRESULT WINAPI
HTMLTable_nextPage(IHTMLTable
*iface
)
329 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
330 FIXME("(%p)\n", This
);
334 static HRESULT WINAPI
HTMLTable_previousPage(IHTMLTable
*iface
)
336 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
337 FIXME("(%p)\n", This
);
341 static HRESULT WINAPI
HTMLTable_get_tHead(IHTMLTable
*iface
, IHTMLTableSection
**p
)
343 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
344 FIXME("(%p)->(%p)\n", This
, p
);
348 static HRESULT WINAPI
HTMLTable_get_tFoot(IHTMLTable
*iface
, IHTMLTableSection
**p
)
350 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
351 FIXME("(%p)->(%p)\n", This
, p
);
355 static HRESULT WINAPI
HTMLTable_get_tBodies(IHTMLTable
*iface
, IHTMLElementCollection
**p
)
357 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
358 FIXME("(%p)->(%p)\n", This
, p
);
362 static HRESULT WINAPI
HTMLTable_get_caption(IHTMLTable
*iface
, IHTMLTableCaption
**p
)
364 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
365 FIXME("(%p)->(%p)\n", This
, p
);
369 static HRESULT WINAPI
HTMLTable_createTHead(IHTMLTable
*iface
, IDispatch
**head
)
371 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
372 FIXME("(%p)->(%p)\n", This
, head
);
376 static HRESULT WINAPI
HTMLTable_deleteTHead(IHTMLTable
*iface
)
378 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
379 FIXME("(%p)\n", This
);
383 static HRESULT WINAPI
HTMLTable_createTFoot(IHTMLTable
*iface
, IDispatch
**foot
)
385 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
386 FIXME("(%p)->(%p)\n", This
, foot
);
390 static HRESULT WINAPI
HTMLTable_deleteTFoot(IHTMLTable
*iface
)
392 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
393 FIXME("(%p)\n", This
);
397 static HRESULT WINAPI
HTMLTable_createCaption(IHTMLTable
*iface
, IHTMLTableCaption
**caption
)
399 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
400 FIXME("(%p)->(%p)\n", This
, caption
);
404 static HRESULT WINAPI
HTMLTable_deleteCaption(IHTMLTable
*iface
)
406 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
407 FIXME("(%p)\n", This
);
411 static HRESULT WINAPI
HTMLTable_insertRow(IHTMLTable
*iface
, long index
, IDispatch
**row
)
413 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
414 FIXME("(%p)->(%ld %p)\n", This
, index
, row
);
418 static HRESULT WINAPI
HTMLTable_deleteRow(IHTMLTable
*iface
, long index
)
420 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
421 FIXME("(%p)->(%ld)\n", This
, index
);
425 static HRESULT WINAPI
HTMLTable_get_readyState(IHTMLTable
*iface
, BSTR
*p
)
427 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
428 FIXME("(%p)->(%p)\n", This
, p
);
432 static HRESULT WINAPI
HTMLTable_put_onreadystatechange(IHTMLTable
*iface
, VARIANT v
)
434 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
435 FIXME("(%p)->(v)\n", This
);
439 static HRESULT WINAPI
HTMLTable_get_onreadystatechange(IHTMLTable
*iface
, VARIANT
*p
)
441 HTMLTable
*This
= HTMLTABLE_THIS(iface
);
442 FIXME("(%p)->(%p)\n", This
, p
);
446 #undef HTMLTABLE_THIS
448 static const IHTMLTableVtbl HTMLTableVtbl
= {
449 HTMLTable_QueryInterface
,
452 HTMLTable_GetTypeInfoCount
,
453 HTMLTable_GetTypeInfo
,
454 HTMLTable_GetIDsOfNames
,
458 HTMLTable_put_border
,
459 HTMLTable_get_border
,
464 HTMLTable_put_cellSpacing
,
465 HTMLTable_get_cellSpacing
,
466 HTMLTable_put_cellPadding
,
467 HTMLTable_get_cellPadding
,
468 HTMLTable_put_background
,
469 HTMLTable_get_background
,
470 HTMLTable_put_bgColor
,
471 HTMLTable_get_bgColor
,
472 HTMLTable_put_borderColor
,
473 HTMLTable_get_borderColor
,
474 HTMLTable_put_borderColorLight
,
475 HTMLTable_get_borderColorLight
,
476 HTMLTable_put_borderColorDark
,
477 HTMLTable_get_borderColorDark
,
484 HTMLTable_put_height
,
485 HTMLTable_get_height
,
486 HTMLTable_put_dataPageSize
,
487 HTMLTable_get_dataPageSize
,
489 HTMLTable_previousPage
,
492 HTMLTable_get_tBodies
,
493 HTMLTable_get_caption
,
494 HTMLTable_createTHead
,
495 HTMLTable_deleteTHead
,
496 HTMLTable_createTFoot
,
497 HTMLTable_deleteTFoot
,
498 HTMLTable_createCaption
,
499 HTMLTable_deleteCaption
,
502 HTMLTable_get_readyState
,
503 HTMLTable_put_onreadystatechange
,
504 HTMLTable_get_onreadystatechange
507 #define HTMLTABLE_NODE_THIS(iface) DEFINE_THIS2(HTMLTable, element.node, iface)
509 static HRESULT
HTMLTable_QI(HTMLDOMNode
*iface
, REFIID riid
, void **ppv
)
511 HTMLTable
*This
= HTMLTABLE_NODE_THIS(iface
);
515 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
516 TRACE("(%p)->(IID_IUnknown %p)\n", This
, ppv
);
517 *ppv
= HTMLTABLE(This
);
518 }else if(IsEqualGUID(&IID_IDispatch
, riid
)) {
519 TRACE("(%p)->(IID_IDispatch %p)\n", This
, ppv
);
520 *ppv
= HTMLTABLE(This
);
521 }else if(IsEqualGUID(&IID_IHTMLTable
, riid
)) {
522 TRACE("(%p)->(IID_IHTMLTable %p)\n", This
, ppv
);
523 *ppv
= HTMLTABLE(This
);
527 IUnknown_AddRef((IUnknown
*)*ppv
);
531 return HTMLElement_QI(&This
->element
.node
, riid
, ppv
);
534 static void HTMLTable_destructor(HTMLDOMNode
*iface
)
536 HTMLTable
*This
= HTMLTABLE_NODE_THIS(iface
);
537 HTMLElement_destructor(&This
->element
.node
);
540 #undef HTMLTABLE_NODE_THIS
542 static const NodeImplVtbl HTMLTableImplVtbl
= {
547 HTMLElement
*HTMLTable_Create(nsIDOMHTMLElement
*nselem
)
549 HTMLTable
*ret
= heap_alloc(sizeof(HTMLTable
));
551 HTMLElement_Init(&ret
->element
);
553 ret
->element
.node
.vtbl
= &HTMLTableImplVtbl
;
554 ret
->lpHTMLTableVtbl
= &HTMLTableVtbl
;
556 ConnectionPoint_Init(&ret
->cp
, &ret
->element
.cp_container
, &DIID_HTMLTableEvents
);
558 return &ret
->element
;