d3d: Limit d3d8 and d3d9 vshader constants to 256.
[wine/multimedia.git] / dlls / mshtml / htmlstyle3.c
blobce1d56e197d71d7d907af409285e944bca501440
1 /*
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
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 "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));
93 return E_NOTIMPL;
96 static HRESULT WINAPI HTMLStyle3_get_layoutFlow(IHTMLStyle3 *iface, BSTR *p)
98 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
99 FIXME("(%p)->(%p)\n", This, p);
100 return E_NOTIMPL;
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));
107 return E_NOTIMPL;
110 static HRESULT WINAPI HTMLStyle3_get_zoom(IHTMLStyle3 *iface, VARIANT *p)
112 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
113 FIXME("(%p)->(%p)\n", This, p);
114 return E_NOTIMPL;
117 static HRESULT WINAPI HTMLStyle3_put_wordWrap(IHTMLStyle3 *iface, BSTR v)
119 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
120 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
121 return E_NOTIMPL;
124 static HRESULT WINAPI HTMLStyle3_get_wordWrap(IHTMLStyle3 *iface, BSTR *p)
126 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
127 FIXME("(%p)->(%p)\n", This, p);
128 return E_NOTIMPL;
131 static HRESULT WINAPI HTMLStyle3_put_textUnderlinePosition(IHTMLStyle3 *iface, BSTR v)
133 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
134 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
135 return E_NOTIMPL;
138 static HRESULT WINAPI HTMLStyle3_get_textUnderlinePosition(IHTMLStyle3 *iface, BSTR *p)
140 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
141 FIXME("(%p)->(%p)\n", This, p);
142 return E_NOTIMPL;
145 static HRESULT WINAPI HTMLStyle3_put_scrollbarBaseColor(IHTMLStyle3 *iface, VARIANT v)
147 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
148 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
149 return E_NOTIMPL;
152 static HRESULT WINAPI HTMLStyle3_get_scrollbarBaseColor(IHTMLStyle3 *iface, VARIANT *p)
154 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
155 FIXME("(%p)->(%p)\n", This, p);
156 return E_NOTIMPL;
159 static HRESULT WINAPI HTMLStyle3_put_scrollbarFaceColor(IHTMLStyle3 *iface, VARIANT v)
161 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
162 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
163 return E_NOTIMPL;
166 static HRESULT WINAPI HTMLStyle3_get_scrollbarFaceColor(IHTMLStyle3 *iface, VARIANT *p)
168 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
169 FIXME("(%p)->(%p)\n", This, p);
170 return E_NOTIMPL;
173 static HRESULT WINAPI HTMLStyle3_put_scrollbar3dLightColor(IHTMLStyle3 *iface, VARIANT v)
175 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
176 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
177 return E_NOTIMPL;
180 static HRESULT WINAPI HTMLStyle3_get_scrollbar3dLightColor(IHTMLStyle3 *iface, VARIANT *p)
182 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
183 FIXME("(%p)->(%p)\n", This, p);
184 return E_NOTIMPL;
187 static HRESULT WINAPI HTMLStyle3_put_scrollbarShadowColor(IHTMLStyle3 *iface, VARIANT v)
189 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
190 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
191 return E_NOTIMPL;
194 static HRESULT WINAPI HTMLStyle3_get_scrollbarShadowColor(IHTMLStyle3 *iface, VARIANT *p)
196 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
197 FIXME("(%p)->(%p)\n", This, p);
198 return E_NOTIMPL;
201 static HRESULT WINAPI HTMLStyle3_put_scrollbarHighlightColor(IHTMLStyle3 *iface, VARIANT v)
203 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
204 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
205 return E_NOTIMPL;
208 static HRESULT WINAPI HTMLStyle3_get_scrollbarHighlightColor(IHTMLStyle3 *iface, VARIANT *p)
210 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
211 FIXME("(%p)->(%p)\n", This, p);
212 return E_NOTIMPL;
215 static HRESULT WINAPI HTMLStyle3_put_scrollbarDarkShadowColor(IHTMLStyle3 *iface, VARIANT v)
217 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
218 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
219 return E_NOTIMPL;
222 static HRESULT WINAPI HTMLStyle3_get_scrollbarDarkShadowColor(IHTMLStyle3 *iface, VARIANT *p)
224 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
225 FIXME("(%p)->(%p)\n", This, p);
226 return E_NOTIMPL;
229 static HRESULT WINAPI HTMLStyle3_put_scrollbarArrowColor(IHTMLStyle3 *iface, VARIANT v)
231 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
232 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
233 return E_NOTIMPL;
236 static HRESULT WINAPI HTMLStyle3_get_scrollbarArrowColor(IHTMLStyle3 *iface, VARIANT *p)
238 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
239 FIXME("(%p)->(%p)\n", This, p);
240 return E_NOTIMPL;
243 static HRESULT WINAPI HTMLStyle3_put_scrollbarTrackColor(IHTMLStyle3 *iface, VARIANT v)
245 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
246 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
247 return E_NOTIMPL;
250 static HRESULT WINAPI HTMLStyle3_get_scrollbarTrackColor(IHTMLStyle3 *iface, VARIANT *p)
252 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
253 FIXME("(%p)->(%p)\n", This, p);
254 return E_NOTIMPL;
257 static HRESULT WINAPI HTMLStyle3_put_writingMode(IHTMLStyle3 *iface, BSTR v)
259 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
260 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
261 return E_NOTIMPL;
264 static HRESULT WINAPI HTMLStyle3_get_writingMode(IHTMLStyle3 *iface, BSTR *p)
266 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
267 FIXME("(%p)->(%p)\n", This, p);
268 return E_NOTIMPL;
271 static HRESULT WINAPI HTMLStyle3_put_textAlignLast(IHTMLStyle3 *iface, BSTR v)
273 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
274 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
275 return E_NOTIMPL;
278 static HRESULT WINAPI HTMLStyle3_get_textAlignLast(IHTMLStyle3 *iface, BSTR *p)
280 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
281 FIXME("(%p)->(%p)\n", This, p);
282 return E_NOTIMPL;
285 static HRESULT WINAPI HTMLStyle3_put_textKashidaSpace(IHTMLStyle3 *iface, VARIANT v)
287 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
288 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
289 return E_NOTIMPL;
292 static HRESULT WINAPI HTMLStyle3_get_textKashidaSpace(IHTMLStyle3 *iface, VARIANT *p)
294 HTMLStyle *This = HTMLSTYLE3_THIS(iface);
295 FIXME("(%p)->(%p)\n", This, p);
296 return E_NOTIMPL;
299 static const IHTMLStyle3Vtbl HTMLStyle3Vtbl = {
300 HTMLStyle3_QueryInterface,
301 HTMLStyle3_AddRef,
302 HTMLStyle3_Release,
303 HTMLStyle3_GetTypeInfoCount,
304 HTMLStyle3_GetTypeInfo,
305 HTMLStyle3_GetIDsOfNames,
306 HTMLStyle3_Invoke,
307 HTMLStyle3_put_layoutFlow,
308 HTMLStyle3_get_layoutFlow,
309 HTMLStyle3_put_zoom,
310 HTMLStyle3_get_zoom,
311 HTMLStyle3_put_wordWrap,
312 HTMLStyle3_get_wordWrap,
313 HTMLStyle3_put_textUnderlinePosition,
314 HTMLStyle3_get_textUnderlinePosition,
315 HTMLStyle3_put_scrollbarBaseColor,
316 HTMLStyle3_get_scrollbarBaseColor,
317 HTMLStyle3_put_scrollbarFaceColor,
318 HTMLStyle3_get_scrollbarFaceColor,
319 HTMLStyle3_put_scrollbar3dLightColor,
320 HTMLStyle3_get_scrollbar3dLightColor,
321 HTMLStyle3_put_scrollbarShadowColor,
322 HTMLStyle3_get_scrollbarShadowColor,
323 HTMLStyle3_put_scrollbarHighlightColor,
324 HTMLStyle3_get_scrollbarHighlightColor,
325 HTMLStyle3_put_scrollbarDarkShadowColor,
326 HTMLStyle3_get_scrollbarDarkShadowColor,
327 HTMLStyle3_put_scrollbarArrowColor,
328 HTMLStyle3_get_scrollbarArrowColor,
329 HTMLStyle3_put_scrollbarTrackColor,
330 HTMLStyle3_get_scrollbarTrackColor,
331 HTMLStyle3_put_writingMode,
332 HTMLStyle3_get_writingMode,
333 HTMLStyle3_put_textAlignLast,
334 HTMLStyle3_get_textAlignLast,
335 HTMLStyle3_put_textKashidaSpace,
336 HTMLStyle3_get_textKashidaSpace
340 * IHTMLStyle4 Interface
342 #define HTMLSTYLE4_THIS(iface) DEFINE_THIS(HTMLStyle, HTMLStyle4, iface)
344 static HRESULT WINAPI HTMLStyle4_QueryInterface(IHTMLStyle4 *iface, REFIID riid, void **ppv)
346 HTMLStyle *This = HTMLSTYLE4_THIS(iface);
348 return IHTMLStyle_QueryInterface(HTMLSTYLE(This), riid, ppv);
351 static ULONG WINAPI HTMLStyle4_AddRef(IHTMLStyle4 *iface)
353 HTMLStyle *This = HTMLSTYLE4_THIS(iface);
355 return IHTMLStyle_AddRef(HTMLSTYLE(This));
358 static ULONG WINAPI HTMLStyle4_Release(IHTMLStyle4 *iface)
360 HTMLStyle *This = HTMLSTYLE4_THIS(iface);
362 return IHTMLStyle_Release(HTMLSTYLE(This));
365 static HRESULT WINAPI HTMLStyle4_GetTypeInfoCount(IHTMLStyle4 *iface, UINT *pctinfo)
367 HTMLStyle *This = HTMLSTYLE4_THIS(iface);
368 return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->dispex), pctinfo);
371 static HRESULT WINAPI HTMLStyle4_GetTypeInfo(IHTMLStyle4 *iface, UINT iTInfo,
372 LCID lcid, ITypeInfo **ppTInfo)
374 HTMLStyle *This = HTMLSTYLE4_THIS(iface);
375 return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->dispex), iTInfo, lcid, ppTInfo);
378 static HRESULT WINAPI HTMLStyle4_GetIDsOfNames(IHTMLStyle4 *iface, REFIID riid,
379 LPOLESTR *rgszNames, UINT cNames,
380 LCID lcid, DISPID *rgDispId)
382 HTMLStyle *This = HTMLSTYLE4_THIS(iface);
383 return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->dispex), riid, rgszNames, cNames, lcid, rgDispId);
386 static HRESULT WINAPI HTMLStyle4_Invoke(IHTMLStyle4 *iface, DISPID dispIdMember,
387 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
388 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
390 HTMLStyle *This = HTMLSTYLE4_THIS(iface);
391 return IDispatchEx_Invoke(DISPATCHEX(&This->dispex), dispIdMember, riid, lcid,
392 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
395 static HRESULT WINAPI HTMLStyle4_put_textOverflow(IHTMLStyle4 *iface, BSTR v)
397 HTMLStyle *This = HTMLSTYLE4_THIS(iface);
398 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
399 return E_NOTIMPL;
402 static HRESULT WINAPI HTMLStyle4_get_textOverflow(IHTMLStyle4 *iface, BSTR *p)
404 HTMLStyle *This = HTMLSTYLE4_THIS(iface);
405 FIXME("(%p)->(%p)\n", This, p);
406 return E_NOTIMPL;
409 static HRESULT WINAPI HTMLStyle4_put_minHeight(IHTMLStyle4 *iface, VARIANT v)
411 HTMLStyle *This = HTMLSTYLE4_THIS(iface);
413 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
415 return set_nsstyle_attr_var(This->nsstyle, STYLEID_MIN_HEIGHT, &v, 0);
418 static HRESULT WINAPI HTMLStyle4_get_minHeight(IHTMLStyle4 *iface, VARIANT *p)
420 HTMLStyle *This = HTMLSTYLE4_THIS(iface);
422 TRACE("(%p)->(%p)\n", This, p);
424 return get_nsstyle_attr_var(This->nsstyle, STYLEID_MIN_HEIGHT, p, 0);
427 static const IHTMLStyle4Vtbl HTMLStyle4Vtbl = {
428 HTMLStyle4_QueryInterface,
429 HTMLStyle4_AddRef,
430 HTMLStyle4_Release,
431 HTMLStyle4_GetTypeInfoCount,
432 HTMLStyle4_GetTypeInfo,
433 HTMLStyle4_GetIDsOfNames,
434 HTMLStyle4_Invoke,
435 HTMLStyle4_put_textOverflow,
436 HTMLStyle4_get_textOverflow,
437 HTMLStyle4_put_minHeight,
438 HTMLStyle4_get_minHeight
441 void HTMLStyle3_Init(HTMLStyle *This)
443 This->lpHTMLStyle3Vtbl = &HTMLStyle3Vtbl;
444 This->lpHTMLStyle4Vtbl = &HTMLStyle4Vtbl;