2 * Copyright 2009 Alistair Leslie-Hughes
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 "mshtml_private.h"
29 #include "htmlstyle.h"
31 #include "wine/debug.h"
32 #include "wine/unicode.h"
34 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
36 #define HTMLSTYLE3_THIS(iface) DEFINE_THIS(HTMLStyle, HTMLStyle3, iface)
38 static HRESULT WINAPI HTMLStyle3_QueryInterface(IHTMLStyle3 *iface, REFIID riid, void **ppv)
40 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
42 return IHTMLStyle_QueryInterface(HTMLSTYLE(This), riid, ppv);
45 static ULONG WINAPI HTMLStyle3_AddRef(IHTMLStyle3 *iface)
47 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
49 return IHTMLStyle_AddRef(HTMLSTYLE(This));
52 static ULONG WINAPI HTMLStyle3_Release(IHTMLStyle3 *iface)
54 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
56 return IHTMLStyle_Release(HTMLSTYLE(This));
59 static HRESULT WINAPI HTMLStyle3_GetTypeInfoCount(IHTMLStyle3 *iface, UINT *pctinfo)
61 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
62 return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->dispex), pctinfo);
65 static HRESULT WINAPI HTMLStyle3_GetTypeInfo(IHTMLStyle3 *iface, UINT iTInfo,
66 LCID lcid, ITypeInfo **ppTInfo)
68 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
69 return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->dispex), iTInfo, lcid, ppTInfo);
72 static HRESULT WINAPI HTMLStyle3_GetIDsOfNames(IHTMLStyle3 *iface, REFIID riid,
73 LPOLESTR *rgszNames, UINT cNames,
74 LCID lcid, DISPID *rgDispId)
76 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
77 return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->dispex), riid, rgszNames, cNames, lcid, rgDispId);
80 static HRESULT WINAPI HTMLStyle3_Invoke(IHTMLStyle3 *iface, DISPID dispIdMember,
81 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
82 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
84 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
85 return IDispatchEx_Invoke(DISPATCHEX(&This->dispex), dispIdMember, riid, lcid,
86 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
89 static HRESULT WINAPI HTMLStyle3_put_layoutFlow(IHTMLStyle3 *iface, BSTR v)
91 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
92 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
96 static HRESULT WINAPI HTMLStyle3_get_layoutFlow(IHTMLStyle3 *iface, BSTR *p)
98 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
99 FIXME("(%p)->(%p)\n", This, p);
103 static HRESULT WINAPI HTMLStyle3_put_zoom(IHTMLStyle3 *iface, VARIANT v)
105 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
106 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
110 static HRESULT WINAPI HTMLStyle3_get_zoom(IHTMLStyle3 *iface, VARIANT *p)
112 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
113 FIXME("(%p)->(%p)\n", This, p);
117 static HRESULT WINAPI HTMLStyle3_put_wordWrap(IHTMLStyle3 *iface, BSTR v)
119 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
121 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
123 return set_nsstyle_attr(This->nsstyle, STYLEID_WORD_WRAP, v, 0);
126 static HRESULT WINAPI HTMLStyle3_get_wordWrap(IHTMLStyle3 *iface, BSTR *p)
128 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
130 TRACE("(%p)->(%p)\n", This, p);
132 return get_nsstyle_attr(This->nsstyle, STYLEID_WORD_WRAP, p);
135 static HRESULT WINAPI HTMLStyle3_put_textUnderlinePosition(IHTMLStyle3 *iface, BSTR v)
137 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
138 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
142 static HRESULT WINAPI HTMLStyle3_get_textUnderlinePosition(IHTMLStyle3 *iface, BSTR *p)
144 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
145 FIXME("(%p)->(%p)\n", This, p);
149 static HRESULT WINAPI HTMLStyle3_put_scrollbarBaseColor(IHTMLStyle3 *iface, VARIANT v)
151 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
152 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
156 static HRESULT WINAPI HTMLStyle3_get_scrollbarBaseColor(IHTMLStyle3 *iface, VARIANT *p)
158 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
159 FIXME("(%p)->(%p)\n", This, p);
163 static HRESULT WINAPI HTMLStyle3_put_scrollbarFaceColor(IHTMLStyle3 *iface, VARIANT v)
165 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
166 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
170 static HRESULT WINAPI HTMLStyle3_get_scrollbarFaceColor(IHTMLStyle3 *iface, VARIANT *p)
172 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
173 FIXME("(%p)->(%p)\n", This, p);
177 static HRESULT WINAPI HTMLStyle3_put_scrollbar3dLightColor(IHTMLStyle3 *iface, VARIANT v)
179 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
180 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
184 static HRESULT WINAPI HTMLStyle3_get_scrollbar3dLightColor(IHTMLStyle3 *iface, VARIANT *p)
186 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
187 FIXME("(%p)->(%p)\n", This, p);
191 static HRESULT WINAPI HTMLStyle3_put_scrollbarShadowColor(IHTMLStyle3 *iface, VARIANT v)
193 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
194 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
198 static HRESULT WINAPI HTMLStyle3_get_scrollbarShadowColor(IHTMLStyle3 *iface, VARIANT *p)
200 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
201 FIXME("(%p)->(%p)\n", This, p);
205 static HRESULT WINAPI HTMLStyle3_put_scrollbarHighlightColor(IHTMLStyle3 *iface, VARIANT v)
207 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
208 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
212 static HRESULT WINAPI HTMLStyle3_get_scrollbarHighlightColor(IHTMLStyle3 *iface, VARIANT *p)
214 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
215 FIXME("(%p)->(%p)\n", This, p);
219 static HRESULT WINAPI HTMLStyle3_put_scrollbarDarkShadowColor(IHTMLStyle3 *iface, VARIANT v)
221 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
222 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
226 static HRESULT WINAPI HTMLStyle3_get_scrollbarDarkShadowColor(IHTMLStyle3 *iface, VARIANT *p)
228 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
229 FIXME("(%p)->(%p)\n", This, p);
233 static HRESULT WINAPI HTMLStyle3_put_scrollbarArrowColor(IHTMLStyle3 *iface, VARIANT v)
235 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
236 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
240 static HRESULT WINAPI HTMLStyle3_get_scrollbarArrowColor(IHTMLStyle3 *iface, VARIANT *p)
242 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
243 FIXME("(%p)->(%p)\n", This, p);
247 static HRESULT WINAPI HTMLStyle3_put_scrollbarTrackColor(IHTMLStyle3 *iface, VARIANT v)
249 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
250 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
254 static HRESULT WINAPI HTMLStyle3_get_scrollbarTrackColor(IHTMLStyle3 *iface, VARIANT *p)
256 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
257 FIXME("(%p)->(%p)\n", This, p);
261 static HRESULT WINAPI HTMLStyle3_put_writingMode(IHTMLStyle3 *iface, BSTR v)
263 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
264 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
268 static HRESULT WINAPI HTMLStyle3_get_writingMode(IHTMLStyle3 *iface, BSTR *p)
270 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
271 FIXME("(%p)->(%p)\n", This, p);
275 static HRESULT WINAPI HTMLStyle3_put_textAlignLast(IHTMLStyle3 *iface, BSTR v)
277 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
278 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
282 static HRESULT WINAPI HTMLStyle3_get_textAlignLast(IHTMLStyle3 *iface, BSTR *p)
284 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
285 FIXME("(%p)->(%p)\n", This, p);
289 static HRESULT WINAPI HTMLStyle3_put_textKashidaSpace(IHTMLStyle3 *iface, VARIANT v)
291 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
292 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
296 static HRESULT WINAPI HTMLStyle3_get_textKashidaSpace(IHTMLStyle3 *iface, VARIANT *p)
298 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
299 FIXME("(%p)->(%p)\n", This, p);
303 static const IHTMLStyle3Vtbl HTMLStyle3Vtbl = {
304 HTMLStyle3_QueryInterface,
307 HTMLStyle3_GetTypeInfoCount,
308 HTMLStyle3_GetTypeInfo,
309 HTMLStyle3_GetIDsOfNames,
311 HTMLStyle3_put_layoutFlow,
312 HTMLStyle3_get_layoutFlow,
315 HTMLStyle3_put_wordWrap,
316 HTMLStyle3_get_wordWrap,
317 HTMLStyle3_put_textUnderlinePosition,
318 HTMLStyle3_get_textUnderlinePosition,
319 HTMLStyle3_put_scrollbarBaseColor,
320 HTMLStyle3_get_scrollbarBaseColor,
321 HTMLStyle3_put_scrollbarFaceColor,
322 HTMLStyle3_get_scrollbarFaceColor,
323 HTMLStyle3_put_scrollbar3dLightColor,
324 HTMLStyle3_get_scrollbar3dLightColor,
325 HTMLStyle3_put_scrollbarShadowColor,
326 HTMLStyle3_get_scrollbarShadowColor,
327 HTMLStyle3_put_scrollbarHighlightColor,
328 HTMLStyle3_get_scrollbarHighlightColor,
329 HTMLStyle3_put_scrollbarDarkShadowColor,
330 HTMLStyle3_get_scrollbarDarkShadowColor,
331 HTMLStyle3_put_scrollbarArrowColor,
332 HTMLStyle3_get_scrollbarArrowColor,
333 HTMLStyle3_put_scrollbarTrackColor,
334 HTMLStyle3_get_scrollbarTrackColor,
335 HTMLStyle3_put_writingMode,
336 HTMLStyle3_get_writingMode,
337 HTMLStyle3_put_textAlignLast,
338 HTMLStyle3_get_textAlignLast,
339 HTMLStyle3_put_textKashidaSpace,
340 HTMLStyle3_get_textKashidaSpace
344 * IHTMLStyle4 Interface
346 #define HTMLSTYLE4_THIS(iface) DEFINE_THIS(HTMLStyle, HTMLStyle4, iface)
348 static HRESULT WINAPI HTMLStyle4_QueryInterface(IHTMLStyle4 *iface, REFIID riid, void **ppv)
350 HTMLStyle *This = HTMLSTYLE4_THIS(iface);
352 return IHTMLStyle_QueryInterface(HTMLSTYLE(This), riid, ppv);
355 static ULONG WINAPI HTMLStyle4_AddRef(IHTMLStyle4 *iface)
357 HTMLStyle *This = HTMLSTYLE4_THIS(iface);
359 return IHTMLStyle_AddRef(HTMLSTYLE(This));
362 static ULONG WINAPI HTMLStyle4_Release(IHTMLStyle4 *iface)
364 HTMLStyle *This = HTMLSTYLE4_THIS(iface);
366 return IHTMLStyle_Release(HTMLSTYLE(This));
369 static HRESULT WINAPI HTMLStyle4_GetTypeInfoCount(IHTMLStyle4 *iface, UINT *pctinfo)
371 HTMLStyle *This = HTMLSTYLE4_THIS(iface);
372 return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->dispex), pctinfo);
375 static HRESULT WINAPI HTMLStyle4_GetTypeInfo(IHTMLStyle4 *iface, UINT iTInfo,
376 LCID lcid, ITypeInfo **ppTInfo)
378 HTMLStyle *This = HTMLSTYLE4_THIS(iface);
379 return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->dispex), iTInfo, lcid, ppTInfo);
382 static HRESULT WINAPI HTMLStyle4_GetIDsOfNames(IHTMLStyle4 *iface, REFIID riid,
383 LPOLESTR *rgszNames, UINT cNames,
384 LCID lcid, DISPID *rgDispId)
386 HTMLStyle *This = HTMLSTYLE4_THIS(iface);
387 return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->dispex), riid, rgszNames, cNames, lcid, rgDispId);
390 static HRESULT WINAPI HTMLStyle4_Invoke(IHTMLStyle4 *iface, DISPID dispIdMember,
391 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
392 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
394 HTMLStyle *This = HTMLSTYLE4_THIS(iface);
395 return IDispatchEx_Invoke(DISPATCHEX(&This->dispex), dispIdMember, riid, lcid,
396 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
399 static HRESULT WINAPI HTMLStyle4_put_textOverflow(IHTMLStyle4 *iface, BSTR v)
401 HTMLStyle *This = HTMLSTYLE4_THIS(iface);
402 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
406 static HRESULT WINAPI HTMLStyle4_get_textOverflow(IHTMLStyle4 *iface, BSTR *p)
408 HTMLStyle *This = HTMLSTYLE4_THIS(iface);
409 FIXME("(%p)->(%p)\n", This, p);
413 static HRESULT WINAPI HTMLStyle4_put_minHeight(IHTMLStyle4 *iface, VARIANT v)
415 HTMLStyle *This = HTMLSTYLE4_THIS(iface);
417 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
419 return set_nsstyle_attr_var(This->nsstyle, STYLEID_MIN_HEIGHT, &v, 0);
422 static HRESULT WINAPI HTMLStyle4_get_minHeight(IHTMLStyle4 *iface, VARIANT *p)
424 HTMLStyle *This = HTMLSTYLE4_THIS(iface);
426 TRACE("(%p)->(%p)\n", This, p);
428 return get_nsstyle_attr_var(This->nsstyle, STYLEID_MIN_HEIGHT, p, 0);
431 static const IHTMLStyle4Vtbl HTMLStyle4Vtbl = {
432 HTMLStyle4_QueryInterface,
435 HTMLStyle4_GetTypeInfoCount,
436 HTMLStyle4_GetTypeInfo,
437 HTMLStyle4_GetIDsOfNames,
439 HTMLStyle4_put_textOverflow,
440 HTMLStyle4_get_textOverflow,
441 HTMLStyle4_put_minHeight,
442 HTMLStyle4_get_minHeight
445 void HTMLStyle3_Init(HTMLStyle *This)
447 This->lpHTMLStyle3Vtbl = &HTMLStyle3Vtbl;
448 This->lpHTMLStyle4Vtbl = &HTMLStyle4Vtbl;