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

htmldoc5.c
Go to the documentation of this file.
00001 /*
00002  * Copyright 2007 Jacek Caban for CodeWeavers
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 "config.h"
00020 
00021 #include <stdarg.h>
00022 #include <stdio.h>
00023 
00024 #define COBJMACROS
00025 
00026 #include "windef.h"
00027 #include "winbase.h"
00028 #include "winuser.h"
00029 #include "ole2.h"
00030 
00031 #include "wine/debug.h"
00032 
00033 #include "mshtml_private.h"
00034 
00035 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
00036 
00037 #define HTMLDOC5_THIS(iface) DEFINE_THIS(HTMLDocument, HTMLDocument5, iface)
00038 
00039 static HRESULT WINAPI HTMLDocument5_QueryInterface(IHTMLDocument5 *iface,
00040         REFIID riid, void **ppv)
00041 {
00042     HTMLDocument *This = HTMLDOC5_THIS(iface);
00043     return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppv);
00044 }
00045 
00046 static ULONG WINAPI HTMLDocument5_AddRef(IHTMLDocument5 *iface)
00047 {
00048     HTMLDocument *This = HTMLDOC5_THIS(iface);
00049     return IHTMLDocument2_AddRef(HTMLDOC(This));
00050 }
00051 
00052 static ULONG WINAPI HTMLDocument5_Release(IHTMLDocument5 *iface)
00053 {
00054     HTMLDocument *This = HTMLDOC5_THIS(iface);
00055     return IHTMLDocument2_Release(HTMLDOC(This));
00056 }
00057 
00058 static HRESULT WINAPI HTMLDocument5_GetTypeInfoCount(IHTMLDocument5 *iface, UINT *pctinfo)
00059 {
00060     HTMLDocument *This = HTMLDOC5_THIS(iface);
00061     return IDispatchEx_GetTypeInfoCount(DISPATCHEX(This), pctinfo);
00062 }
00063 
00064 static HRESULT WINAPI HTMLDocument5_GetTypeInfo(IHTMLDocument5 *iface, UINT iTInfo,
00065         LCID lcid, ITypeInfo **ppTInfo)
00066 {
00067     HTMLDocument *This = HTMLDOC5_THIS(iface);
00068     return IDispatchEx_GetTypeInfo(DISPATCHEX(This), iTInfo, lcid, ppTInfo);
00069 }
00070 
00071 static HRESULT WINAPI HTMLDocument5_GetIDsOfNames(IHTMLDocument5 *iface, REFIID riid,
00072         LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
00073 {
00074     HTMLDocument *This = HTMLDOC5_THIS(iface);
00075     return IDispatchEx_GetIDsOfNames(DISPATCHEX(This), riid, rgszNames, cNames, lcid, rgDispId);
00076 }
00077 
00078 static HRESULT WINAPI HTMLDocument5_Invoke(IHTMLDocument5 *iface, DISPID dispIdMember,
00079                             REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
00080                             VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
00081 {
00082     HTMLDocument *This = HTMLDOC5_THIS(iface);
00083     return IDispatchEx_Invoke(DISPATCHEX(This), dispIdMember, riid, lcid, wFlags, pDispParams,
00084             pVarResult, pExcepInfo, puArgErr);
00085 }
00086 
00087 static HRESULT WINAPI HTMLDocument5_put_onmousewheel(IHTMLDocument5 *iface, VARIANT v)
00088 {
00089     HTMLDocument *This = HTMLDOC5_THIS(iface);
00090     FIXME("(%p)->(v)\n", This);
00091     return E_NOTIMPL;
00092 }
00093 
00094 static HRESULT WINAPI HTMLDocument5_get_onmousewheel(IHTMLDocument5 *iface, VARIANT *p)
00095 {
00096     HTMLDocument *This = HTMLDOC5_THIS(iface);
00097     FIXME("(%p)->(%p)\n", This, p);
00098     return E_NOTIMPL;
00099 }
00100 
00101 static HRESULT WINAPI HTMLDocument5_get_doctype(IHTMLDocument5 *iface, IHTMLDOMNode **p)
00102 {
00103     HTMLDocument *This = HTMLDOC5_THIS(iface);
00104     FIXME("(%p)->(%p)\n", This, p);
00105     return E_NOTIMPL;
00106 }
00107 
00108 static HRESULT WINAPI HTMLDocument5_get_implementation(IHTMLDocument5 *iface, IHTMLDOMImplementation **p)
00109 {
00110     HTMLDocument *This = HTMLDOC5_THIS(iface);
00111     FIXME("(%p)->(%p)\n", This, p);
00112     return E_NOTIMPL;
00113 }
00114 
00115 static HRESULT WINAPI HTMLDocument5_createAttribute(IHTMLDocument5 *iface, BSTR bstrattrName,
00116         IHTMLDOMAttribute **ppattribute)
00117 {
00118     HTMLDocument *This = HTMLDOC5_THIS(iface);
00119     FIXME("(%p)->(%s %p)\n", This, debugstr_w(bstrattrName), ppattribute);
00120     return E_NOTIMPL;
00121 }
00122 
00123 static HRESULT WINAPI HTMLDocument5_createComment(IHTMLDocument5 *iface, BSTR bstrdata,
00124         IHTMLDOMNode **ppRetNode)
00125 {
00126     HTMLDocument *This = HTMLDOC5_THIS(iface);
00127     nsIDOMComment *nscomment;
00128     HTMLDOMNode *node;
00129     nsAString str;
00130     nsresult nsres;
00131 
00132     TRACE("(%p)->(%s %p)\n", This, debugstr_w(bstrdata), ppRetNode);
00133 
00134     if(!This->doc_node->nsdoc) {
00135         WARN("NULL nsdoc\n");
00136         return E_UNEXPECTED;
00137     }
00138 
00139     nsAString_InitDepend(&str, bstrdata);
00140     nsres = nsIDOMHTMLDocument_CreateComment(This->doc_node->nsdoc, &str, &nscomment);
00141     nsAString_Finish(&str);
00142     if(NS_FAILED(nsres)) {
00143         ERR("CreateTextNode failed: %08x\n", nsres);
00144         return E_FAIL;
00145     }
00146 
00147     node = &HTMLCommentElement_Create(This->doc_node, (nsIDOMNode*)nscomment)->node;
00148     nsIDOMElement_Release(nscomment);
00149 
00150     *ppRetNode = HTMLDOMNODE(node);
00151     IHTMLDOMNode_AddRef(HTMLDOMNODE(node));
00152     return S_OK;
00153 }
00154 
00155 static HRESULT WINAPI HTMLDocument5_put_onfocusin(IHTMLDocument5 *iface, VARIANT v)
00156 {
00157     HTMLDocument *This = HTMLDOC5_THIS(iface);
00158     FIXME("(%p)->(v)\n", This);
00159     return E_NOTIMPL;
00160 }
00161 
00162 static HRESULT WINAPI HTMLDocument5_get_onfocusin(IHTMLDocument5 *iface, VARIANT *p)
00163 {
00164     HTMLDocument *This = HTMLDOC5_THIS(iface);
00165     FIXME("(%p)->(%p)\n", This, p);
00166     return E_NOTIMPL;
00167 }
00168 
00169 static HRESULT WINAPI HTMLDocument5_put_onfocusout(IHTMLDocument5 *iface, VARIANT v)
00170 {
00171     HTMLDocument *This = HTMLDOC5_THIS(iface);
00172     FIXME("(%p)->(v)\n", This);
00173     return E_NOTIMPL;
00174 }
00175 
00176 static HRESULT WINAPI HTMLDocument5_get_onfocusout(IHTMLDocument5 *iface, VARIANT *p)
00177 {
00178     HTMLDocument *This = HTMLDOC5_THIS(iface);
00179     FIXME("(%p)->(%p)\n", This, p);
00180     return E_NOTIMPL;
00181 }
00182 
00183 static HRESULT WINAPI HTMLDocument5_put_onactivate(IHTMLDocument5 *iface, VARIANT v)
00184 {
00185     HTMLDocument *This = HTMLDOC5_THIS(iface);
00186     FIXME("(%p)->(v)\n", This);
00187     return E_NOTIMPL;
00188 }
00189 
00190 static HRESULT WINAPI HTMLDocument5_get_onactivate(IHTMLDocument5 *iface, VARIANT *p)
00191 {
00192     HTMLDocument *This = HTMLDOC5_THIS(iface);
00193     FIXME("(%p)->(%p)\n", This, p);
00194     return E_NOTIMPL;
00195 }
00196 
00197 static HRESULT WINAPI HTMLDocument5_put_ondeactivate(IHTMLDocument5 *iface, VARIANT v)
00198 {
00199     HTMLDocument *This = HTMLDOC5_THIS(iface);
00200     FIXME("(%p)->(v)\n", This);
00201     return E_NOTIMPL;
00202 }
00203 
00204 static HRESULT WINAPI HTMLDocument5_get_ondeactivate(IHTMLDocument5 *iface, VARIANT *p)
00205 {
00206     HTMLDocument *This = HTMLDOC5_THIS(iface);
00207     FIXME("(%p)->(%p)\n", This, p);
00208     return E_NOTIMPL;
00209 }
00210 
00211 static HRESULT WINAPI HTMLDocument5_put_onbeforeactivate(IHTMLDocument5 *iface, VARIANT v)
00212 {
00213     HTMLDocument *This = HTMLDOC5_THIS(iface);
00214     FIXME("(%p)->(v)\n", This);
00215     return E_NOTIMPL;
00216 }
00217 
00218 static HRESULT WINAPI HTMLDocument5_get_onbeforeactivate(IHTMLDocument5 *iface, VARIANT *p)
00219 {
00220     HTMLDocument *This = HTMLDOC5_THIS(iface);
00221     FIXME("(%p)->(%p)\n", This, p);
00222     return E_NOTIMPL;
00223 }
00224 
00225 static HRESULT WINAPI HTMLDocument5_put_onbeforedeactivate(IHTMLDocument5 *iface, VARIANT v)
00226 {
00227     HTMLDocument *This = HTMLDOC5_THIS(iface);
00228     FIXME("(%p)->(v)\n", This);
00229     return E_NOTIMPL;
00230 }
00231 
00232 static HRESULT WINAPI HTMLDocument5_get_onbeforedeactivate(IHTMLDocument5 *iface, VARIANT *p)
00233 {
00234     HTMLDocument *This = HTMLDOC5_THIS(iface);
00235     FIXME("(%p)->(%p)\n", This, p);
00236     return E_NOTIMPL;
00237 }
00238 
00239 static HRESULT WINAPI HTMLDocument5_get_compatMode(IHTMLDocument5 *iface, BSTR *p)
00240 {
00241     HTMLDocument *This = HTMLDOC5_THIS(iface);
00242     nsIDOMNSHTMLDocument *nshtmldoc;
00243     nsAString mode_str;
00244     const PRUnichar *mode;
00245     nsresult nsres;
00246 
00247     TRACE("(%p)->(%p)\n", This, p);
00248 
00249     if(!This->doc_node->nsdoc) {
00250         WARN("NULL nsdoc\n");
00251         return E_UNEXPECTED;
00252     }
00253 
00254     nsres = nsIDOMHTMLDocument_QueryInterface(This->doc_node->nsdoc, &IID_nsIDOMNSHTMLDocument, (void**)&nshtmldoc);
00255     if(NS_FAILED(nsres)) {
00256         ERR("Could not get nsIDOMNSHTMLDocument: %08x\n", nsres);
00257         return S_OK;
00258     }
00259 
00260     nsAString_Init(&mode_str, NULL);
00261     nsIDOMNSHTMLDocument_GetCompatMode(nshtmldoc, &mode_str);
00262     nsIDOMNSHTMLDocument_Release(nshtmldoc);
00263 
00264     nsAString_GetData(&mode_str, &mode);
00265     *p = SysAllocString(mode);
00266     nsAString_Finish(&mode_str);
00267 
00268     return S_OK;
00269 }
00270 
00271 #undef HTMLDOC5_THIS
00272 
00273 static const IHTMLDocument5Vtbl HTMLDocument5Vtbl = {
00274     HTMLDocument5_QueryInterface,
00275     HTMLDocument5_AddRef,
00276     HTMLDocument5_Release,
00277     HTMLDocument5_GetTypeInfoCount,
00278     HTMLDocument5_GetTypeInfo,
00279     HTMLDocument5_GetIDsOfNames,
00280     HTMLDocument5_Invoke,
00281     HTMLDocument5_put_onmousewheel,
00282     HTMLDocument5_get_onmousewheel,
00283     HTMLDocument5_get_doctype,
00284     HTMLDocument5_get_implementation,
00285     HTMLDocument5_createAttribute,
00286     HTMLDocument5_createComment,
00287     HTMLDocument5_put_onfocusin,
00288     HTMLDocument5_get_onfocusin,
00289     HTMLDocument5_put_onfocusout,
00290     HTMLDocument5_get_onfocusout,
00291     HTMLDocument5_put_onactivate,
00292     HTMLDocument5_get_onactivate,
00293     HTMLDocument5_put_ondeactivate,
00294     HTMLDocument5_get_ondeactivate,
00295     HTMLDocument5_put_onbeforeactivate,
00296     HTMLDocument5_get_onbeforeactivate,
00297     HTMLDocument5_put_onbeforedeactivate,
00298     HTMLDocument5_get_onbeforedeactivate,
00299     HTMLDocument5_get_compatMode
00300 };
00301 
00302 #define HTMLDOC6_THIS(iface) DEFINE_THIS(HTMLDocument, HTMLDocument6, iface)
00303 
00304 static HRESULT WINAPI HTMLDocument6_QueryInterface(IHTMLDocument6 *iface,
00305         REFIID riid, void **ppv)
00306 {
00307     HTMLDocument *This = HTMLDOC6_THIS(iface);
00308     return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppv);
00309 }
00310 
00311 static ULONG WINAPI HTMLDocument6_AddRef(IHTMLDocument6 *iface)
00312 {
00313     HTMLDocument *This = HTMLDOC6_THIS(iface);
00314     return IHTMLDocument2_AddRef(HTMLDOC(This));
00315 }
00316 
00317 static ULONG WINAPI HTMLDocument6_Release(IHTMLDocument6 *iface)
00318 {
00319     HTMLDocument *This = HTMLDOC6_THIS(iface);
00320     return IHTMLDocument2_Release(HTMLDOC(This));
00321 }
00322 
00323 static HRESULT WINAPI HTMLDocument6_GetTypeInfoCount(IHTMLDocument6 *iface, UINT *pctinfo)
00324 {
00325     HTMLDocument *This = HTMLDOC6_THIS(iface);
00326     return IDispatchEx_GetTypeInfoCount(DISPATCHEX(This), pctinfo);
00327 }
00328 
00329 static HRESULT WINAPI HTMLDocument6_GetTypeInfo(IHTMLDocument6 *iface, UINT iTInfo,
00330         LCID lcid, ITypeInfo **ppTInfo)
00331 {
00332     HTMLDocument *This = HTMLDOC6_THIS(iface);
00333     return IDispatchEx_GetTypeInfo(DISPATCHEX(This), iTInfo, lcid, ppTInfo);
00334 }
00335 
00336 static HRESULT WINAPI HTMLDocument6_GetIDsOfNames(IHTMLDocument6 *iface, REFIID riid,
00337         LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
00338 {
00339     HTMLDocument *This = HTMLDOC6_THIS(iface);
00340     return IDispatchEx_GetIDsOfNames(DISPATCHEX(This), riid, rgszNames, cNames, lcid, rgDispId);
00341 }
00342 
00343 static HRESULT WINAPI HTMLDocument6_Invoke(IHTMLDocument6 *iface, DISPID dispIdMember,
00344                             REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
00345                             VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
00346 {
00347     HTMLDocument *This = HTMLDOC6_THIS(iface);
00348     return IDispatchEx_Invoke(DISPATCHEX(This), dispIdMember, riid, lcid, wFlags, pDispParams,
00349             pVarResult, pExcepInfo, puArgErr);
00350 }
00351 
00352 static HRESULT WINAPI HTMLDocument6_get_compatible(IHTMLDocument6 *iface,
00353         IHTMLDocumentCompatibleInfoCollection **p)
00354 {
00355     HTMLDocument *This = HTMLDOC6_THIS(iface);
00356     FIXME("(%p)->(%p)\n", This, p);
00357     return E_NOTIMPL;
00358 }
00359 
00360 static HRESULT WINAPI HTMLDocument6_get_documentMode(IHTMLDocument6 *iface,
00361         VARIANT *p)
00362 {
00363     HTMLDocument *This = HTMLDOC6_THIS(iface);
00364     FIXME("(%p)->(%p)\n", This, p);
00365     return E_NOTIMPL;
00366 }
00367 
00368 static HRESULT WINAPI HTMLDocument6_get_onstorage(IHTMLDocument6 *iface,
00369         VARIANT *p)
00370 {
00371     HTMLDocument *This = HTMLDOC6_THIS(iface);
00372     FIXME("(%p)->(%p)\n", This, p);
00373     return E_NOTIMPL;
00374 }
00375 
00376 static HRESULT WINAPI HTMLDocument6_put_onstorage(IHTMLDocument6 *iface,
00377         VARIANT p)
00378 {
00379     HTMLDocument *This = HTMLDOC6_THIS(iface);
00380     FIXME("(%p)->(v)\n", This);
00381     return E_NOTIMPL;
00382 }
00383 
00384 static HRESULT WINAPI HTMLDocument6_get_onstoragecommit(IHTMLDocument6 *iface,
00385         VARIANT *p)
00386 {
00387     HTMLDocument *This = HTMLDOC6_THIS(iface);
00388     FIXME("(%p)->(%p)\n", This, p);
00389     return E_NOTIMPL;
00390 }
00391 
00392 static HRESULT WINAPI HTMLDocument6_put_onstoragecommit(IHTMLDocument6 *iface,
00393         VARIANT p)
00394 {
00395     HTMLDocument *This = HTMLDOC6_THIS(iface);
00396     FIXME("(%p)->(v)\n", This);
00397     return E_NOTIMPL;
00398 }
00399 
00400 static HRESULT WINAPI HTMLDocument6_getElementById(IHTMLDocument6 *iface,
00401         BSTR bstrId, IHTMLElement2 **p)
00402 {
00403     HTMLDocument *This = HTMLDOC6_THIS(iface);
00404     FIXME("(%p)->(%s %p)\n", This, debugstr_w(bstrId), p);
00405     return E_NOTIMPL;
00406 }
00407 
00408 static HRESULT WINAPI HTMLDocument6_updateSettings(IHTMLDocument6 *iface)
00409 {
00410     HTMLDocument *This = HTMLDOC6_THIS(iface);
00411     FIXME("(%p)->()\n", This);
00412     return E_NOTIMPL;
00413 }
00414 
00415 #undef HTMLDOC6_THIS
00416 
00417 static const IHTMLDocument6Vtbl HTMLDocument6Vtbl = {
00418     HTMLDocument6_QueryInterface,
00419     HTMLDocument6_AddRef,
00420     HTMLDocument6_Release,
00421     HTMLDocument6_GetTypeInfoCount,
00422     HTMLDocument6_GetTypeInfo,
00423     HTMLDocument6_GetIDsOfNames,
00424     HTMLDocument6_Invoke,
00425     HTMLDocument6_get_compatible,
00426     HTMLDocument6_get_documentMode,
00427     HTMLDocument6_put_onstorage,
00428     HTMLDocument6_get_onstorage,
00429     HTMLDocument6_put_onstoragecommit,
00430     HTMLDocument6_get_onstoragecommit,
00431     HTMLDocument6_getElementById,
00432     HTMLDocument6_updateSettings
00433 };
00434 
00435 void HTMLDocument_HTMLDocument5_Init(HTMLDocument *This)
00436 {
00437     This->lpHTMLDocument5Vtbl = &HTMLDocument5Vtbl;
00438     This->lpHTMLDocument6Vtbl = &HTMLDocument6Vtbl;
00439 }

Generated on Sun May 27 2012 04:24:54 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.