winemine: Updated Slovenian translation.
[wine/gsoc_dplay.git] / dlls / mshtml / htmltable.c
blob66d55d06cfe80523e95e1f8fc12c1c8c61ae5c23
1 /*
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
19 #include <stdarg.h>
21 #define COBJMACROS
23 #include "windef.h"
24 #include "winbase.h"
25 #include "winuser.h"
26 #include "ole2.h"
28 #include "wine/debug.h"
30 #include "mshtml_private.h"
32 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
34 typedef struct {
35 HTMLElement element;
37 const IHTMLTableVtbl *lpHTMLTableVtbl;
39 ConnectionPoint cp;
40 } HTMLTable;
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);
72 return E_NOTIMPL;
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);
80 return E_NOTIMPL;
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,
89 lcid, rgDispId);
90 return E_NOTIMPL;
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);
100 return E_NOTIMPL;
103 static HRESULT WINAPI HTMLTable_put_cols(IHTMLTable *iface, long v)
105 HTMLTable *This = HTMLTABLE_THIS(iface);
106 FIXME("(%p)->(%ld)\n", This, v);
107 return E_NOTIMPL;
110 static HRESULT WINAPI HTMLTable_get_cols(IHTMLTable *iface, long *p)
112 HTMLTable *This = HTMLTABLE_THIS(iface);
113 FIXME("(%p)->(%p)\n", This, p);
114 return E_NOTIMPL;
117 static HRESULT WINAPI HTMLTable_put_border(IHTMLTable *iface, VARIANT v)
119 HTMLTable *This = HTMLTABLE_THIS(iface);
120 FIXME("(%p)->(v)\n", This);
121 return E_NOTIMPL;
124 static HRESULT WINAPI HTMLTable_get_border(IHTMLTable *iface, VARIANT *p)
126 HTMLTable *This = HTMLTABLE_THIS(iface);
127 FIXME("(%p)->(%p)\n", This, p);
128 return E_NOTIMPL;
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));
135 return E_NOTIMPL;
138 static HRESULT WINAPI HTMLTable_get_frame(IHTMLTable *iface, BSTR *p)
140 HTMLTable *This = HTMLTABLE_THIS(iface);
141 FIXME("(%p)->(%p)\n", This, p);
142 return E_NOTIMPL;
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));
149 return E_NOTIMPL;
152 static HRESULT WINAPI HTMLTable_get_rules(IHTMLTable *iface, BSTR *p)
154 HTMLTable *This = HTMLTABLE_THIS(iface);
155 FIXME("(%p)->(%p)\n", This, p);
156 return E_NOTIMPL;
159 static HRESULT WINAPI HTMLTable_put_cellSpacing(IHTMLTable *iface, VARIANT v)
161 HTMLTable *This = HTMLTABLE_THIS(iface);
162 FIXME("(%p)->(v)\n", This);
163 return E_NOTIMPL;
166 static HRESULT WINAPI HTMLTable_get_cellSpacing(IHTMLTable *iface, VARIANT *p)
168 HTMLTable *This = HTMLTABLE_THIS(iface);
169 FIXME("(%p)->(%p)\n", This, p);
170 return E_NOTIMPL;
173 static HRESULT WINAPI HTMLTable_put_cellPadding(IHTMLTable *iface, VARIANT v)
175 HTMLTable *This = HTMLTABLE_THIS(iface);
176 FIXME("(%p)->(v)\n", This);
177 return E_NOTIMPL;
180 static HRESULT WINAPI HTMLTable_get_cellPadding(IHTMLTable *iface, VARIANT *p)
182 HTMLTable *This = HTMLTABLE_THIS(iface);
183 FIXME("(%p)->(%p)\n", This, p);
184 return E_NOTIMPL;
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));
191 return E_NOTIMPL;
194 static HRESULT WINAPI HTMLTable_get_background(IHTMLTable *iface, BSTR *p)
196 HTMLTable *This = HTMLTABLE_THIS(iface);
197 FIXME("(%p)->(%p)\n", This, p);
198 return E_NOTIMPL;
201 static HRESULT WINAPI HTMLTable_put_bgColor(IHTMLTable *iface, VARIANT v)
203 HTMLTable *This = HTMLTABLE_THIS(iface);
204 FIXME("(%p)->(v)\n", This);
205 return E_NOTIMPL;
208 static HRESULT WINAPI HTMLTable_get_bgColor(IHTMLTable *iface, VARIANT *p)
210 HTMLTable *This = HTMLTABLE_THIS(iface);
211 FIXME("(%p)->(%p)\n", This, p);
212 return E_NOTIMPL;
215 static HRESULT WINAPI HTMLTable_put_borderColor(IHTMLTable *iface, VARIANT v)
217 HTMLTable *This = HTMLTABLE_THIS(iface);
218 FIXME("(%p)->(v)\n", This);
219 return E_NOTIMPL;
222 static HRESULT WINAPI HTMLTable_get_borderColor(IHTMLTable *iface, VARIANT *p)
224 HTMLTable *This = HTMLTABLE_THIS(iface);
225 FIXME("(%p)->(%p)\n", This, p);
226 return E_NOTIMPL;
229 static HRESULT WINAPI HTMLTable_put_borderColorLight(IHTMLTable *iface, VARIANT v)
231 HTMLTable *This = HTMLTABLE_THIS(iface);
232 FIXME("(%p)->(v)\n", This);
233 return E_NOTIMPL;
236 static HRESULT WINAPI HTMLTable_get_borderColorLight(IHTMLTable *iface, VARIANT *p)
238 HTMLTable *This = HTMLTABLE_THIS(iface);
239 FIXME("(%p)->(%p)\n", This, p);
240 return E_NOTIMPL;
243 static HRESULT WINAPI HTMLTable_put_borderColorDark(IHTMLTable *iface, VARIANT v)
245 HTMLTable *This = HTMLTABLE_THIS(iface);
246 FIXME("(%p)->(v)\n", This);
247 return E_NOTIMPL;
250 static HRESULT WINAPI HTMLTable_get_borderColorDark(IHTMLTable *iface, VARIANT *p)
252 HTMLTable *This = HTMLTABLE_THIS(iface);
253 FIXME("(%p)->(%p)\n", This, p);
254 return E_NOTIMPL;
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));
261 return E_NOTIMPL;
264 static HRESULT WINAPI HTMLTable_get_align(IHTMLTable *iface, BSTR *p)
266 HTMLTable *This = HTMLTABLE_THIS(iface);
267 FIXME("(%p)->(%p)\n", This, p);
268 return E_NOTIMPL;
271 static HRESULT WINAPI HTMLTable_refresh(IHTMLTable *iface)
273 HTMLTable *This = HTMLTABLE_THIS(iface);
274 FIXME("(%p)\n", This);
275 return E_NOTIMPL;
278 static HRESULT WINAPI HTMLTable_get_rows(IHTMLTable *iface, IHTMLElementCollection **p)
280 HTMLTable *This = HTMLTABLE_THIS(iface);
281 FIXME("(%p)->(%p)\n", This, p);
282 return E_NOTIMPL;
285 static HRESULT WINAPI HTMLTable_put_width(IHTMLTable *iface, VARIANT v)
287 HTMLTable *This = HTMLTABLE_THIS(iface);
288 FIXME("(%p)->(v)\n", This);
289 return E_NOTIMPL;
292 static HRESULT WINAPI HTMLTable_get_width(IHTMLTable *iface, VARIANT *p)
294 HTMLTable *This = HTMLTABLE_THIS(iface);
295 FIXME("(%p)->(%p)\n", This, p);
296 return E_NOTIMPL;
299 static HRESULT WINAPI HTMLTable_put_height(IHTMLTable *iface, VARIANT v)
301 HTMLTable *This = HTMLTABLE_THIS(iface);
302 FIXME("(%p)->(v)\n", This);
303 return E_NOTIMPL;
306 static HRESULT WINAPI HTMLTable_get_height(IHTMLTable *iface, VARIANT *p)
308 HTMLTable *This = HTMLTABLE_THIS(iface);
309 FIXME("(%p)->(%p)\n", This, p);
310 return E_NOTIMPL;
313 static HRESULT WINAPI HTMLTable_put_dataPageSize(IHTMLTable *iface, long v)
315 HTMLTable *This = HTMLTABLE_THIS(iface);
316 FIXME("(%p)->(%ld)\n", This, v);
317 return E_NOTIMPL;
320 static HRESULT WINAPI HTMLTable_get_dataPageSize(IHTMLTable *iface, long *p)
322 HTMLTable *This = HTMLTABLE_THIS(iface);
323 FIXME("(%p)->(%p)\n", This, p);
324 return E_NOTIMPL;
327 static HRESULT WINAPI HTMLTable_nextPage(IHTMLTable *iface)
329 HTMLTable *This = HTMLTABLE_THIS(iface);
330 FIXME("(%p)\n", This);
331 return E_NOTIMPL;
334 static HRESULT WINAPI HTMLTable_previousPage(IHTMLTable *iface)
336 HTMLTable *This = HTMLTABLE_THIS(iface);
337 FIXME("(%p)\n", This);
338 return E_NOTIMPL;
341 static HRESULT WINAPI HTMLTable_get_tHead(IHTMLTable *iface, IHTMLTableSection **p)
343 HTMLTable *This = HTMLTABLE_THIS(iface);
344 FIXME("(%p)->(%p)\n", This, p);
345 return E_NOTIMPL;
348 static HRESULT WINAPI HTMLTable_get_tFoot(IHTMLTable *iface, IHTMLTableSection **p)
350 HTMLTable *This = HTMLTABLE_THIS(iface);
351 FIXME("(%p)->(%p)\n", This, p);
352 return E_NOTIMPL;
355 static HRESULT WINAPI HTMLTable_get_tBodies(IHTMLTable *iface, IHTMLElementCollection **p)
357 HTMLTable *This = HTMLTABLE_THIS(iface);
358 FIXME("(%p)->(%p)\n", This, p);
359 return E_NOTIMPL;
362 static HRESULT WINAPI HTMLTable_get_caption(IHTMLTable *iface, IHTMLTableCaption **p)
364 HTMLTable *This = HTMLTABLE_THIS(iface);
365 FIXME("(%p)->(%p)\n", This, p);
366 return E_NOTIMPL;
369 static HRESULT WINAPI HTMLTable_createTHead(IHTMLTable *iface, IDispatch **head)
371 HTMLTable *This = HTMLTABLE_THIS(iface);
372 FIXME("(%p)->(%p)\n", This, head);
373 return E_NOTIMPL;
376 static HRESULT WINAPI HTMLTable_deleteTHead(IHTMLTable *iface)
378 HTMLTable *This = HTMLTABLE_THIS(iface);
379 FIXME("(%p)\n", This);
380 return E_NOTIMPL;
383 static HRESULT WINAPI HTMLTable_createTFoot(IHTMLTable *iface, IDispatch **foot)
385 HTMLTable *This = HTMLTABLE_THIS(iface);
386 FIXME("(%p)->(%p)\n", This, foot);
387 return E_NOTIMPL;
390 static HRESULT WINAPI HTMLTable_deleteTFoot(IHTMLTable *iface)
392 HTMLTable *This = HTMLTABLE_THIS(iface);
393 FIXME("(%p)\n", This);
394 return E_NOTIMPL;
397 static HRESULT WINAPI HTMLTable_createCaption(IHTMLTable *iface, IHTMLTableCaption **caption)
399 HTMLTable *This = HTMLTABLE_THIS(iface);
400 FIXME("(%p)->(%p)\n", This, caption);
401 return E_NOTIMPL;
404 static HRESULT WINAPI HTMLTable_deleteCaption(IHTMLTable *iface)
406 HTMLTable *This = HTMLTABLE_THIS(iface);
407 FIXME("(%p)\n", This);
408 return E_NOTIMPL;
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);
415 return E_NOTIMPL;
418 static HRESULT WINAPI HTMLTable_deleteRow(IHTMLTable *iface, long index)
420 HTMLTable *This = HTMLTABLE_THIS(iface);
421 FIXME("(%p)->(%ld)\n", This, index);
422 return E_NOTIMPL;
425 static HRESULT WINAPI HTMLTable_get_readyState(IHTMLTable *iface, BSTR *p)
427 HTMLTable *This = HTMLTABLE_THIS(iface);
428 FIXME("(%p)->(%p)\n", This, p);
429 return E_NOTIMPL;
432 static HRESULT WINAPI HTMLTable_put_onreadystatechange(IHTMLTable *iface, VARIANT v)
434 HTMLTable *This = HTMLTABLE_THIS(iface);
435 FIXME("(%p)->(v)\n", This);
436 return E_NOTIMPL;
439 static HRESULT WINAPI HTMLTable_get_onreadystatechange(IHTMLTable *iface, VARIANT *p)
441 HTMLTable *This = HTMLTABLE_THIS(iface);
442 FIXME("(%p)->(%p)\n", This, p);
443 return E_NOTIMPL;
446 #undef HTMLTABLE_THIS
448 static const IHTMLTableVtbl HTMLTableVtbl = {
449 HTMLTable_QueryInterface,
450 HTMLTable_AddRef,
451 HTMLTable_Release,
452 HTMLTable_GetTypeInfoCount,
453 HTMLTable_GetTypeInfo,
454 HTMLTable_GetIDsOfNames,
455 HTMLTable_Invoke,
456 HTMLTable_put_cols,
457 HTMLTable_get_cols,
458 HTMLTable_put_border,
459 HTMLTable_get_border,
460 HTMLTable_put_frame,
461 HTMLTable_get_frame,
462 HTMLTable_put_rules,
463 HTMLTable_get_rules,
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,
478 HTMLTable_put_align,
479 HTMLTable_get_align,
480 HTMLTable_refresh,
481 HTMLTable_get_rows,
482 HTMLTable_put_width,
483 HTMLTable_get_width,
484 HTMLTable_put_height,
485 HTMLTable_get_height,
486 HTMLTable_put_dataPageSize,
487 HTMLTable_get_dataPageSize,
488 HTMLTable_nextPage,
489 HTMLTable_previousPage,
490 HTMLTable_get_tHead,
491 HTMLTable_get_tFoot,
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,
500 HTMLTable_insertRow,
501 HTMLTable_deleteRow,
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);
513 *ppv = NULL;
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);
526 if(*ppv) {
527 IUnknown_AddRef((IUnknown*)*ppv);
528 return S_OK;
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 = {
543 HTMLTable_QI,
544 HTMLTable_destructor
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;