2 * Copyright 2012 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 IHTMLTableCell IHTMLTableCell_iface
;
40 static inline HTMLTableCell
*impl_from_IHTMLTableCell(IHTMLTableCell
*iface
)
42 return CONTAINING_RECORD(iface
, HTMLTableCell
, IHTMLTableCell_iface
);
45 static HRESULT WINAPI
HTMLTableCell_QueryInterface(IHTMLTableCell
*iface
, REFIID riid
, void **ppv
)
47 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
49 return IHTMLDOMNode_QueryInterface(&This
->element
.node
.IHTMLDOMNode_iface
, riid
, ppv
);
52 static ULONG WINAPI
HTMLTableCell_AddRef(IHTMLTableCell
*iface
)
54 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
56 return IHTMLDOMNode_AddRef(&This
->element
.node
.IHTMLDOMNode_iface
);
59 static ULONG WINAPI
HTMLTableCell_Release(IHTMLTableCell
*iface
)
61 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
63 return IHTMLDOMNode_Release(&This
->element
.node
.IHTMLDOMNode_iface
);
66 static HRESULT WINAPI
HTMLTableCell_GetTypeInfoCount(IHTMLTableCell
*iface
, UINT
*pctinfo
)
68 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
69 return IDispatchEx_GetTypeInfoCount(&This
->element
.node
.dispex
.IDispatchEx_iface
, pctinfo
);
72 static HRESULT WINAPI
HTMLTableCell_GetTypeInfo(IHTMLTableCell
*iface
, UINT iTInfo
,
73 LCID lcid
, ITypeInfo
**ppTInfo
)
75 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
76 return IDispatchEx_GetTypeInfo(&This
->element
.node
.dispex
.IDispatchEx_iface
, iTInfo
, lcid
,
80 static HRESULT WINAPI
HTMLTableCell_GetIDsOfNames(IHTMLTableCell
*iface
, REFIID riid
,
81 LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
83 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
84 return IDispatchEx_GetIDsOfNames(&This
->element
.node
.dispex
.IDispatchEx_iface
, riid
, rgszNames
,
85 cNames
, lcid
, rgDispId
);
88 static HRESULT WINAPI
HTMLTableCell_Invoke(IHTMLTableCell
*iface
, DISPID dispIdMember
, REFIID riid
,
89 LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
, VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
,
92 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
93 return IDispatchEx_Invoke(&This
->element
.node
.dispex
.IDispatchEx_iface
, dispIdMember
, riid
,
94 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
97 static HRESULT WINAPI
HTMLTableCell_put_rowSpan(IHTMLTableCell
*iface
, LONG v
)
99 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
100 FIXME("(%p)->(%d)\n", This
, v
);
104 static HRESULT WINAPI
HTMLTableCell_get_rowSpan(IHTMLTableCell
*iface
, LONG
*p
)
106 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
107 FIXME("(%p)->(%p)\n", This
, p
);
111 static HRESULT WINAPI
HTMLTableCell_put_colSpan(IHTMLTableCell
*iface
, LONG v
)
113 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
114 FIXME("(%p)->(%d)\n", This
, v
);
118 static HRESULT WINAPI
HTMLTableCell_get_colSpan(IHTMLTableCell
*iface
, LONG
*p
)
120 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
121 FIXME("(%p)->(%p)\n", This
, p
);
125 static HRESULT WINAPI
HTMLTableCell_put_align(IHTMLTableCell
*iface
, BSTR v
)
127 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
128 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
132 static HRESULT WINAPI
HTMLTableCell_get_align(IHTMLTableCell
*iface
, BSTR
*p
)
134 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
135 FIXME("(%p)->(%p)\n", This
, p
);
139 static HRESULT WINAPI
HTMLTableCell_put_vAlign(IHTMLTableCell
*iface
, BSTR v
)
141 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
142 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
146 static HRESULT WINAPI
HTMLTableCell_get_vAlign(IHTMLTableCell
*iface
, BSTR
*p
)
148 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
149 FIXME("(%p)->(%p)\n", This
, p
);
153 static HRESULT WINAPI
HTMLTableCell_put_bgColor(IHTMLTableCell
*iface
, VARIANT v
)
155 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
156 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
160 static HRESULT WINAPI
HTMLTableCell_get_bgColor(IHTMLTableCell
*iface
, VARIANT
*p
)
162 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
163 FIXME("(%p)->(%p)\n", This
, p
);
167 static HRESULT WINAPI
HTMLTableCell_put_noWrap(IHTMLTableCell
*iface
, VARIANT_BOOL v
)
169 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
170 FIXME("(%p)->(%x)\n", This
, v
);
174 static HRESULT WINAPI
HTMLTableCell_get_noWrap(IHTMLTableCell
*iface
, VARIANT_BOOL
*p
)
176 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
177 FIXME("(%p)->(%p)\n", This
, p
);
181 static HRESULT WINAPI
HTMLTableCell_put_background(IHTMLTableCell
*iface
, BSTR v
)
183 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
184 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
188 static HRESULT WINAPI
HTMLTableCell_get_background(IHTMLTableCell
*iface
, BSTR
*p
)
190 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
191 FIXME("(%p)->(%p)\n", This
, p
);
195 static HRESULT WINAPI
HTMLTableCell_put_borderColor(IHTMLTableCell
*iface
, VARIANT v
)
197 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
198 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
202 static HRESULT WINAPI
HTMLTableCell_get_borderColor(IHTMLTableCell
*iface
, VARIANT
*p
)
204 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
205 FIXME("(%p)->(%p)\n", This
, p
);
209 static HRESULT WINAPI
HTMLTableCell_put_borderColorLight(IHTMLTableCell
*iface
, VARIANT v
)
211 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
212 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
216 static HRESULT WINAPI
HTMLTableCell_get_borderColorLight(IHTMLTableCell
*iface
, VARIANT
*p
)
218 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
219 FIXME("(%p)->(%p)\n", This
, p
);
223 static HRESULT WINAPI
HTMLTableCell_put_borderColorDark(IHTMLTableCell
*iface
, VARIANT v
)
225 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
226 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
230 static HRESULT WINAPI
HTMLTableCell_get_borderColorDark(IHTMLTableCell
*iface
, VARIANT
*p
)
232 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
233 FIXME("(%p)->(%p)\n", This
, p
);
237 static HRESULT WINAPI
HTMLTableCell_put_width(IHTMLTableCell
*iface
, VARIANT v
)
239 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
240 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
244 static HRESULT WINAPI
HTMLTableCell_get_width(IHTMLTableCell
*iface
, VARIANT
*p
)
246 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
247 FIXME("(%p)->(%p)\n", This
, p
);
251 static HRESULT WINAPI
HTMLTableCell_put_height(IHTMLTableCell
*iface
, VARIANT v
)
253 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
254 FIXME("(%p)->(%s)\n", This
, debugstr_variant(&v
));
258 static HRESULT WINAPI
HTMLTableCell_get_height(IHTMLTableCell
*iface
, VARIANT
*p
)
260 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
261 FIXME("(%p)->(%p)\n", This
, p
);
265 static HRESULT WINAPI
HTMLTableCell_get_cellIndex(IHTMLTableCell
*iface
, LONG
*p
)
267 HTMLTableCell
*This
= impl_from_IHTMLTableCell(iface
);
268 FIXME("(%p)->(%p)\n", This
, p
);
272 static const IHTMLTableCellVtbl HTMLTableCellVtbl
= {
273 HTMLTableCell_QueryInterface
,
274 HTMLTableCell_AddRef
,
275 HTMLTableCell_Release
,
276 HTMLTableCell_GetTypeInfoCount
,
277 HTMLTableCell_GetTypeInfo
,
278 HTMLTableCell_GetIDsOfNames
,
279 HTMLTableCell_Invoke
,
280 HTMLTableCell_put_rowSpan
,
281 HTMLTableCell_get_rowSpan
,
282 HTMLTableCell_put_colSpan
,
283 HTMLTableCell_get_colSpan
,
284 HTMLTableCell_put_align
,
285 HTMLTableCell_get_align
,
286 HTMLTableCell_put_vAlign
,
287 HTMLTableCell_get_vAlign
,
288 HTMLTableCell_put_bgColor
,
289 HTMLTableCell_get_bgColor
,
290 HTMLTableCell_put_noWrap
,
291 HTMLTableCell_get_noWrap
,
292 HTMLTableCell_put_background
,
293 HTMLTableCell_get_background
,
294 HTMLTableCell_put_borderColor
,
295 HTMLTableCell_get_borderColor
,
296 HTMLTableCell_put_borderColorLight
,
297 HTMLTableCell_get_borderColorLight
,
298 HTMLTableCell_put_borderColorDark
,
299 HTMLTableCell_get_borderColorDark
,
300 HTMLTableCell_put_width
,
301 HTMLTableCell_get_width
,
302 HTMLTableCell_put_height
,
303 HTMLTableCell_get_height
,
304 HTMLTableCell_get_cellIndex
307 static inline HTMLTableCell
*impl_from_HTMLDOMNode(HTMLDOMNode
*iface
)
309 return CONTAINING_RECORD(iface
, HTMLTableCell
, element
.node
);
312 static HRESULT
HTMLTableCell_QI(HTMLDOMNode
*iface
, REFIID riid
, void **ppv
)
314 HTMLTableCell
*This
= impl_from_HTMLDOMNode(iface
);
316 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
317 TRACE("(%p)->(IID_IUnknown %p)\n", This
, ppv
);
318 *ppv
= &This
->IHTMLTableCell_iface
;
319 }else if(IsEqualGUID(&IID_IDispatch
, riid
)) {
320 TRACE("(%p)->(IID_IDispatch %p)\n", This
, ppv
);
321 *ppv
= &This
->IHTMLTableCell_iface
;
322 }else if(IsEqualGUID(&IID_IHTMLTableCell
, riid
)) {
323 TRACE("(%p)->(IID_IHTMLTableCell %p)\n", This
, ppv
);
324 *ppv
= &This
->IHTMLTableCell_iface
;
326 return HTMLElement_QI(&This
->element
.node
, riid
, ppv
);
329 IUnknown_AddRef((IUnknown
*)*ppv
);
333 static void HTMLTableCell_destructor(HTMLDOMNode
*iface
)
335 HTMLTableCell
*This
= impl_from_HTMLDOMNode(iface
);
337 HTMLElement_destructor(&This
->element
.node
);
340 static const NodeImplVtbl HTMLTableCellImplVtbl
= {
342 HTMLTableCell_destructor
,
344 HTMLElement_get_attr_col
347 static const tid_t HTMLTableCell_iface_tids
[] = {
353 static dispex_static_data_t HTMLTableCell_dispex
= {
355 DispHTMLTableCell_tid
,
357 HTMLTableCell_iface_tids
360 HRESULT
HTMLTableCell_Create(HTMLDocumentNode
*doc
, nsIDOMHTMLElement
*nselem
, HTMLElement
**elem
)
364 ret
= heap_alloc_zero(sizeof(*ret
));
366 return E_OUTOFMEMORY
;
368 ret
->IHTMLTableCell_iface
.lpVtbl
= &HTMLTableCellVtbl
;
369 ret
->element
.node
.vtbl
= &HTMLTableCellImplVtbl
;
371 HTMLElement_Init(&ret
->element
, doc
, nselem
, &HTMLTableCell_dispex
);
373 *elem
= &ret
->element
;