ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

htmlstyle3.c
Go to the documentation of this file.
00001 /*
00002  * Copyright 2009 Alistair Leslie-Hughes
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Lesser General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2.1 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Lesser General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Lesser General Public
00015  * License along with this library; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
00017  */
00018 
00019 #include <stdarg.h>
00020 
00021 #define COBJMACROS
00022 
00023 #include "windef.h"
00024 #include "winbase.h"
00025 #include "winuser.h"
00026 #include "ole2.h"
00027 
00028 #include "mshtml_private.h"
00029 #include "htmlstyle.h"
00030 
00031 #include "wine/debug.h"
00032 #include "wine/unicode.h"
00033 
00034 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
00035 
00036 #define HTMLSTYLE3_THIS(iface) DEFINE_THIS(HTMLStyle, HTMLStyle3, iface)
00037 
00038 static HRESULT WINAPI HTMLStyle3_QueryInterface(IHTMLStyle3 *iface, REFIID riid, void **ppv)
00039 {
00040     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00041 
00042     return IHTMLStyle_QueryInterface(HTMLSTYLE(This), riid, ppv);
00043 }
00044 
00045 static ULONG WINAPI HTMLStyle3_AddRef(IHTMLStyle3 *iface)
00046 {
00047     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00048 
00049     return IHTMLStyle_AddRef(HTMLSTYLE(This));
00050 }
00051 
00052 static ULONG WINAPI HTMLStyle3_Release(IHTMLStyle3 *iface)
00053 {
00054     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00055 
00056     return IHTMLStyle_Release(HTMLSTYLE(This));
00057 }
00058 
00059 static HRESULT WINAPI HTMLStyle3_GetTypeInfoCount(IHTMLStyle3 *iface, UINT *pctinfo)
00060 {
00061     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00062     return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->dispex), pctinfo);
00063 }
00064 
00065 static HRESULT WINAPI HTMLStyle3_GetTypeInfo(IHTMLStyle3 *iface, UINT iTInfo,
00066                                               LCID lcid, ITypeInfo **ppTInfo)
00067 {
00068     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00069     return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->dispex), iTInfo, lcid, ppTInfo);
00070 }
00071 
00072 static HRESULT WINAPI HTMLStyle3_GetIDsOfNames(IHTMLStyle3 *iface, REFIID riid,
00073                                                 LPOLESTR *rgszNames, UINT cNames,
00074                                                 LCID lcid, DISPID *rgDispId)
00075 {
00076     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00077     return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->dispex), riid, rgszNames, cNames, lcid, rgDispId);
00078 }
00079 
00080 static HRESULT WINAPI HTMLStyle3_Invoke(IHTMLStyle3 *iface, DISPID dispIdMember,
00081                             REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
00082                             VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
00083 {
00084     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00085     return IDispatchEx_Invoke(DISPATCHEX(&This->dispex), dispIdMember, riid, lcid,
00086             wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
00087 }
00088 
00089 static HRESULT WINAPI HTMLStyle3_put_layoutFlow(IHTMLStyle3 *iface, BSTR v)
00090 {
00091     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00092     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
00093     return E_NOTIMPL;
00094 }
00095 
00096 static HRESULT WINAPI HTMLStyle3_get_layoutFlow(IHTMLStyle3 *iface, BSTR *p)
00097 {
00098     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00099     FIXME("(%p)->(%p)\n", This, p);
00100     return E_NOTIMPL;
00101 }
00102 
00103 static HRESULT WINAPI HTMLStyle3_put_zoom(IHTMLStyle3 *iface, VARIANT v)
00104 {
00105     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00106 
00107     TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
00108 
00109     /* zoom property is IE CSS extension that is mostly used as a hack to workaround IE bugs.
00110      * The value is set to 1 then. We can safely ignore setting zoom to 1. */
00111     if(V_VT(&v) == VT_I4 && V_I4(&v) == 1)
00112         return S_OK;
00113 
00114     FIXME("stub for %s\n", debugstr_variant(&v));
00115     return E_NOTIMPL;
00116 }
00117 
00118 static HRESULT WINAPI HTMLStyle3_get_zoom(IHTMLStyle3 *iface, VARIANT *p)
00119 {
00120     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00121     FIXME("(%p)->(%p)\n", This, p);
00122     return E_NOTIMPL;
00123 }
00124 
00125 static HRESULT WINAPI HTMLStyle3_put_wordWrap(IHTMLStyle3 *iface, BSTR v)
00126 {
00127     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00128 
00129     TRACE("(%p)->(%s)\n", This, debugstr_w(v));
00130 
00131     return set_nsstyle_attr(This->nsstyle, STYLEID_WORD_WRAP, v, 0);
00132 }
00133 
00134 static HRESULT WINAPI HTMLStyle3_get_wordWrap(IHTMLStyle3 *iface, BSTR *p)
00135 {
00136     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00137 
00138     TRACE("(%p)->(%p)\n", This, p);
00139 
00140     return get_nsstyle_attr(This->nsstyle, STYLEID_WORD_WRAP, p);
00141 }
00142 
00143 static HRESULT WINAPI HTMLStyle3_put_textUnderlinePosition(IHTMLStyle3 *iface, BSTR v)
00144 {
00145     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00146     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
00147     return E_NOTIMPL;
00148 }
00149 
00150 static HRESULT WINAPI HTMLStyle3_get_textUnderlinePosition(IHTMLStyle3 *iface, BSTR *p)
00151 {
00152     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00153     FIXME("(%p)->(%p)\n", This, p);
00154     return E_NOTIMPL;
00155 }
00156 
00157 static HRESULT WINAPI HTMLStyle3_put_scrollbarBaseColor(IHTMLStyle3 *iface, VARIANT v)
00158 {
00159     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00160     FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
00161     return E_NOTIMPL;
00162 }
00163 
00164 static HRESULT WINAPI HTMLStyle3_get_scrollbarBaseColor(IHTMLStyle3 *iface, VARIANT *p)
00165 {
00166     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00167     FIXME("(%p)->(%p)\n", This, p);
00168     return E_NOTIMPL;
00169 }
00170 
00171 static HRESULT WINAPI HTMLStyle3_put_scrollbarFaceColor(IHTMLStyle3 *iface, VARIANT v)
00172 {
00173     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00174     FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
00175     return E_NOTIMPL;
00176 }
00177 
00178 static HRESULT WINAPI HTMLStyle3_get_scrollbarFaceColor(IHTMLStyle3 *iface, VARIANT *p)
00179 {
00180     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00181     FIXME("(%p)->(%p)\n", This, p);
00182     return E_NOTIMPL;
00183 }
00184 
00185 static HRESULT WINAPI HTMLStyle3_put_scrollbar3dLightColor(IHTMLStyle3 *iface, VARIANT v)
00186 {
00187     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00188     FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
00189     return E_NOTIMPL;
00190 }
00191 
00192 static HRESULT WINAPI HTMLStyle3_get_scrollbar3dLightColor(IHTMLStyle3 *iface, VARIANT *p)
00193 {
00194     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00195     FIXME("(%p)->(%p)\n", This, p);
00196     return E_NOTIMPL;
00197 }
00198 
00199 static HRESULT WINAPI HTMLStyle3_put_scrollbarShadowColor(IHTMLStyle3 *iface, VARIANT v)
00200 {
00201     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00202     FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
00203     return E_NOTIMPL;
00204 }
00205 
00206 static HRESULT WINAPI HTMLStyle3_get_scrollbarShadowColor(IHTMLStyle3 *iface, VARIANT *p)
00207 {
00208     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00209     FIXME("(%p)->(%p)\n", This, p);
00210     return E_NOTIMPL;
00211 }
00212 
00213 static HRESULT WINAPI HTMLStyle3_put_scrollbarHighlightColor(IHTMLStyle3 *iface, VARIANT v)
00214 {
00215     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00216     FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
00217     return E_NOTIMPL;
00218 }
00219 
00220 static HRESULT WINAPI HTMLStyle3_get_scrollbarHighlightColor(IHTMLStyle3 *iface, VARIANT *p)
00221 {
00222     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00223     FIXME("(%p)->(%p)\n", This, p);
00224     return E_NOTIMPL;
00225 }
00226 
00227 static HRESULT WINAPI HTMLStyle3_put_scrollbarDarkShadowColor(IHTMLStyle3 *iface, VARIANT v)
00228 {
00229     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00230     FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
00231     return E_NOTIMPL;
00232 }
00233 
00234 static HRESULT WINAPI HTMLStyle3_get_scrollbarDarkShadowColor(IHTMLStyle3 *iface, VARIANT *p)
00235 {
00236     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00237     FIXME("(%p)->(%p)\n", This, p);
00238     return E_NOTIMPL;
00239 }
00240 
00241 static HRESULT WINAPI HTMLStyle3_put_scrollbarArrowColor(IHTMLStyle3 *iface, VARIANT v)
00242 {
00243     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00244     FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
00245     return E_NOTIMPL;
00246 }
00247 
00248 static HRESULT WINAPI HTMLStyle3_get_scrollbarArrowColor(IHTMLStyle3 *iface, VARIANT *p)
00249 {
00250     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00251     FIXME("(%p)->(%p)\n", This, p);
00252     return E_NOTIMPL;
00253 }
00254 
00255 static HRESULT WINAPI HTMLStyle3_put_scrollbarTrackColor(IHTMLStyle3 *iface, VARIANT v)
00256 {
00257     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00258     FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
00259     return E_NOTIMPL;
00260 }
00261 
00262 static HRESULT WINAPI HTMLStyle3_get_scrollbarTrackColor(IHTMLStyle3 *iface, VARIANT *p)
00263 {
00264     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00265     FIXME("(%p)->(%p)\n", This, p);
00266     return E_NOTIMPL;
00267 }
00268 
00269 static HRESULT WINAPI HTMLStyle3_put_writingMode(IHTMLStyle3 *iface, BSTR v)
00270 {
00271     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00272     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
00273     return E_NOTIMPL;
00274 }
00275 
00276 static HRESULT WINAPI HTMLStyle3_get_writingMode(IHTMLStyle3 *iface, BSTR *p)
00277 {
00278     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00279     FIXME("(%p)->(%p)\n", This, p);
00280     return E_NOTIMPL;
00281 }
00282 
00283 static HRESULT WINAPI HTMLStyle3_put_textAlignLast(IHTMLStyle3 *iface, BSTR v)
00284 {
00285     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00286     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
00287     return E_NOTIMPL;
00288 }
00289 
00290 static HRESULT WINAPI HTMLStyle3_get_textAlignLast(IHTMLStyle3 *iface, BSTR *p)
00291 {
00292     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00293     FIXME("(%p)->(%p)\n", This, p);
00294     return E_NOTIMPL;
00295 }
00296 
00297 static HRESULT WINAPI HTMLStyle3_put_textKashidaSpace(IHTMLStyle3 *iface, VARIANT v)
00298 {
00299     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00300     FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
00301     return E_NOTIMPL;
00302 }
00303 
00304 static HRESULT WINAPI HTMLStyle3_get_textKashidaSpace(IHTMLStyle3 *iface, VARIANT *p)
00305 {
00306     HTMLStyle *This = HTMLSTYLE3_THIS(iface);
00307     FIXME("(%p)->(%p)\n", This, p);
00308     return E_NOTIMPL;
00309 }
00310 
00311 static const IHTMLStyle3Vtbl HTMLStyle3Vtbl = {
00312     HTMLStyle3_QueryInterface,
00313     HTMLStyle3_AddRef,
00314     HTMLStyle3_Release,
00315     HTMLStyle3_GetTypeInfoCount,
00316     HTMLStyle3_GetTypeInfo,
00317     HTMLStyle3_GetIDsOfNames,
00318     HTMLStyle3_Invoke,
00319     HTMLStyle3_put_layoutFlow,
00320     HTMLStyle3_get_layoutFlow,
00321     HTMLStyle3_put_zoom,
00322     HTMLStyle3_get_zoom,
00323     HTMLStyle3_put_wordWrap,
00324     HTMLStyle3_get_wordWrap,
00325     HTMLStyle3_put_textUnderlinePosition,
00326     HTMLStyle3_get_textUnderlinePosition,
00327     HTMLStyle3_put_scrollbarBaseColor,
00328     HTMLStyle3_get_scrollbarBaseColor,
00329     HTMLStyle3_put_scrollbarFaceColor,
00330     HTMLStyle3_get_scrollbarFaceColor,
00331     HTMLStyle3_put_scrollbar3dLightColor,
00332     HTMLStyle3_get_scrollbar3dLightColor,
00333     HTMLStyle3_put_scrollbarShadowColor,
00334     HTMLStyle3_get_scrollbarShadowColor,
00335     HTMLStyle3_put_scrollbarHighlightColor,
00336     HTMLStyle3_get_scrollbarHighlightColor,
00337     HTMLStyle3_put_scrollbarDarkShadowColor,
00338     HTMLStyle3_get_scrollbarDarkShadowColor,
00339     HTMLStyle3_put_scrollbarArrowColor,
00340     HTMLStyle3_get_scrollbarArrowColor,
00341     HTMLStyle3_put_scrollbarTrackColor,
00342     HTMLStyle3_get_scrollbarTrackColor,
00343     HTMLStyle3_put_writingMode,
00344     HTMLStyle3_get_writingMode,
00345     HTMLStyle3_put_textAlignLast,
00346     HTMLStyle3_get_textAlignLast,
00347     HTMLStyle3_put_textKashidaSpace,
00348     HTMLStyle3_get_textKashidaSpace
00349 };
00350 
00351 /*
00352  * IHTMLStyle4 Interface
00353  */
00354 #define HTMLSTYLE4_THIS(iface) DEFINE_THIS(HTMLStyle, HTMLStyle4, iface)
00355 
00356 static HRESULT WINAPI HTMLStyle4_QueryInterface(IHTMLStyle4 *iface, REFIID riid, void **ppv)
00357 {
00358     HTMLStyle *This = HTMLSTYLE4_THIS(iface);
00359 
00360     return IHTMLStyle_QueryInterface(HTMLSTYLE(This), riid, ppv);
00361 }
00362 
00363 static ULONG WINAPI HTMLStyle4_AddRef(IHTMLStyle4 *iface)
00364 {
00365     HTMLStyle *This = HTMLSTYLE4_THIS(iface);
00366 
00367     return IHTMLStyle_AddRef(HTMLSTYLE(This));
00368 }
00369 
00370 static ULONG WINAPI HTMLStyle4_Release(IHTMLStyle4 *iface)
00371 {
00372     HTMLStyle *This = HTMLSTYLE4_THIS(iface);
00373 
00374     return IHTMLStyle_Release(HTMLSTYLE(This));
00375 }
00376 
00377 static HRESULT WINAPI HTMLStyle4_GetTypeInfoCount(IHTMLStyle4 *iface, UINT *pctinfo)
00378 {
00379     HTMLStyle *This = HTMLSTYLE4_THIS(iface);
00380     return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->dispex), pctinfo);
00381 }
00382 
00383 static HRESULT WINAPI HTMLStyle4_GetTypeInfo(IHTMLStyle4 *iface, UINT iTInfo,
00384                                               LCID lcid, ITypeInfo **ppTInfo)
00385 {
00386     HTMLStyle *This = HTMLSTYLE4_THIS(iface);
00387     return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->dispex), iTInfo, lcid, ppTInfo);
00388 }
00389 
00390 static HRESULT WINAPI HTMLStyle4_GetIDsOfNames(IHTMLStyle4 *iface, REFIID riid,
00391                                                 LPOLESTR *rgszNames, UINT cNames,
00392                                                 LCID lcid, DISPID *rgDispId)
00393 {
00394     HTMLStyle *This = HTMLSTYLE4_THIS(iface);
00395     return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->dispex), riid, rgszNames, cNames, lcid, rgDispId);
00396 }
00397 
00398 static HRESULT WINAPI HTMLStyle4_Invoke(IHTMLStyle4 *iface, DISPID dispIdMember,
00399                             REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
00400                             VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
00401 {
00402     HTMLStyle *This = HTMLSTYLE4_THIS(iface);
00403     return IDispatchEx_Invoke(DISPATCHEX(&This->dispex), dispIdMember, riid, lcid,
00404             wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
00405 }
00406 
00407 static HRESULT WINAPI HTMLStyle4_put_textOverflow(IHTMLStyle4 *iface, BSTR v)
00408 {
00409     HTMLStyle *This = HTMLSTYLE4_THIS(iface);
00410     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
00411     return E_NOTIMPL;
00412 }
00413 
00414 static HRESULT WINAPI HTMLStyle4_get_textOverflow(IHTMLStyle4 *iface, BSTR *p)
00415 {
00416     HTMLStyle *This = HTMLSTYLE4_THIS(iface);
00417     FIXME("(%p)->(%p)\n", This, p);
00418     return E_NOTIMPL;
00419 }
00420 
00421 static HRESULT WINAPI HTMLStyle4_put_minHeight(IHTMLStyle4 *iface, VARIANT v)
00422 {
00423     HTMLStyle *This = HTMLSTYLE4_THIS(iface);
00424 
00425     TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
00426 
00427     return set_nsstyle_attr_var(This->nsstyle, STYLEID_MIN_HEIGHT, &v, 0);
00428 }
00429 
00430 static HRESULT WINAPI HTMLStyle4_get_minHeight(IHTMLStyle4 *iface, VARIANT *p)
00431 {
00432     HTMLStyle *This = HTMLSTYLE4_THIS(iface);
00433 
00434     TRACE("(%p)->(%p)\n", This, p);
00435 
00436     return get_nsstyle_attr_var(This->nsstyle, STYLEID_MIN_HEIGHT, p, 0);
00437 }
00438 
00439 static const IHTMLStyle4Vtbl HTMLStyle4Vtbl = {
00440     HTMLStyle4_QueryInterface,
00441     HTMLStyle4_AddRef,
00442     HTMLStyle4_Release,
00443     HTMLStyle4_GetTypeInfoCount,
00444     HTMLStyle4_GetTypeInfo,
00445     HTMLStyle4_GetIDsOfNames,
00446     HTMLStyle4_Invoke,
00447     HTMLStyle4_put_textOverflow,
00448     HTMLStyle4_get_textOverflow,
00449     HTMLStyle4_put_minHeight,
00450     HTMLStyle4_get_minHeight
00451 };
00452 
00453 void HTMLStyle3_Init(HTMLStyle *This)
00454 {
00455     This->lpHTMLStyle3Vtbl = &HTMLStyle3Vtbl;
00456     This->lpHTMLStyle4Vtbl = &HTMLStyle4Vtbl;
00457 }

Generated on Sun May 27 2012 04:25:00 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.