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

htmlcomment.c
Go to the documentation of this file.
00001 /*
00002  * Copyright 2008 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 
00020 #include <stdarg.h>
00021 
00022 #define COBJMACROS
00023 
00024 #include "windef.h"
00025 #include "winbase.h"
00026 #include "winuser.h"
00027 #include "ole2.h"
00028 
00029 #include "mshtml_private.h"
00030 
00031 #include "wine/debug.h"
00032 
00033 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
00034 
00035 struct HTMLCommentElement {
00036     HTMLElement element;
00037     const IHTMLCommentElementVtbl   *lpIHTMLCommentElementVtbl;
00038 };
00039 
00040 #define HTMLCOMMENT(x)  (&(x)->lpIHTMLCommentElementVtbl)
00041 
00042 #define HTMLCOMMENT_THIS(iface) DEFINE_THIS(HTMLCommentElement, IHTMLCommentElement, iface)
00043 
00044 static HRESULT WINAPI HTMLCommentElement_QueryInterface(IHTMLCommentElement *iface,
00045         REFIID riid, void **ppv)
00046 {
00047     HTMLCommentElement *This = HTMLCOMMENT_THIS(iface);
00048 
00049     return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
00050 }
00051 
00052 static ULONG WINAPI HTMLCommentElement_AddRef(IHTMLCommentElement *iface)
00053 {
00054     HTMLCommentElement *This = HTMLCOMMENT_THIS(iface);
00055 
00056     return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
00057 }
00058 
00059 static ULONG WINAPI HTMLCommentElement_Release(IHTMLCommentElement *iface)
00060 {
00061     HTMLCommentElement *This = HTMLCOMMENT_THIS(iface);
00062 
00063     return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
00064 }
00065 
00066 static HRESULT WINAPI HTMLCommentElement_GetTypeInfoCount(IHTMLCommentElement *iface, UINT *pctinfo)
00067 {
00068     HTMLCommentElement *This = HTMLCOMMENT_THIS(iface);
00069     return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->element.node.dispex), pctinfo);
00070 }
00071 
00072 static HRESULT WINAPI HTMLCommentElement_GetTypeInfo(IHTMLCommentElement *iface, UINT iTInfo,
00073         LCID lcid, ITypeInfo **ppTInfo)
00074 {
00075     HTMLCommentElement *This = HTMLCOMMENT_THIS(iface);
00076     return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->element.node.dispex), iTInfo, lcid, ppTInfo);
00077 }
00078 
00079 static HRESULT WINAPI HTMLCommentElement_GetIDsOfNames(IHTMLCommentElement *iface, REFIID riid,
00080                                                 LPOLESTR *rgszNames, UINT cNames,
00081                                                 LCID lcid, DISPID *rgDispId)
00082 {
00083     HTMLCommentElement *This = HTMLCOMMENT_THIS(iface);
00084     return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->element.node.dispex), riid, rgszNames, cNames, lcid, rgDispId);
00085 }
00086 
00087 static HRESULT WINAPI HTMLCommentElement_Invoke(IHTMLCommentElement *iface, DISPID dispIdMember,
00088                             REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
00089                             VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
00090 {
00091     HTMLCommentElement *This = HTMLCOMMENT_THIS(iface);
00092     return IDispatchEx_Invoke(DISPATCHEX(&This->element.node.dispex), dispIdMember, riid, lcid,
00093             wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
00094 }
00095 
00096 static HRESULT WINAPI HTMLCommentElement_put_text(IHTMLCommentElement *iface, BSTR v)
00097 {
00098     HTMLCommentElement *This = HTMLCOMMENT_THIS(iface);
00099     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
00100     return E_NOTIMPL;
00101 }
00102 
00103 static HRESULT WINAPI HTMLCommentElement_get_text(IHTMLCommentElement *iface, BSTR *p)
00104 {
00105     HTMLCommentElement *This = HTMLCOMMENT_THIS(iface);
00106 
00107     TRACE("(%p)->(%p)\n", This, p);
00108 
00109     return IHTMLElement_get_outerHTML(HTMLELEM(&This->element), p);
00110 }
00111 
00112 static HRESULT WINAPI HTMLCommentElement_put_atomic(IHTMLCommentElement *iface, LONG v)
00113 {
00114     HTMLCommentElement *This = HTMLCOMMENT_THIS(iface);
00115     FIXME("(%p)->(%d)\n", This, v);
00116     return E_NOTIMPL;
00117 }
00118 
00119 static HRESULT WINAPI HTMLCommentElement_get_atomic(IHTMLCommentElement *iface, LONG *p)
00120 {
00121     HTMLCommentElement *This = HTMLCOMMENT_THIS(iface);
00122     FIXME("(%p)->(%p)\n", This, p);
00123     return E_NOTIMPL;
00124 }
00125 
00126 #undef HTMLCOMMENT_THIS
00127 
00128 static const IHTMLCommentElementVtbl HTMLCommentElementVtbl = {
00129     HTMLCommentElement_QueryInterface,
00130     HTMLCommentElement_AddRef,
00131     HTMLCommentElement_Release,
00132     HTMLCommentElement_GetTypeInfoCount,
00133     HTMLCommentElement_GetTypeInfo,
00134     HTMLCommentElement_GetIDsOfNames,
00135     HTMLCommentElement_Invoke,
00136     HTMLCommentElement_put_text,
00137     HTMLCommentElement_get_text,
00138     HTMLCommentElement_put_atomic,
00139     HTMLCommentElement_get_atomic
00140 };
00141 
00142 #define HTMLCOMMENT_NODE_THIS(iface) DEFINE_THIS2(HTMLCommentElement, element.node, iface)
00143 
00144 static HRESULT HTMLCommentElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
00145 {
00146     HTMLCommentElement *This = HTMLCOMMENT_NODE_THIS(iface);
00147 
00148     *ppv =  NULL;
00149 
00150     if(IsEqualGUID(&IID_IHTMLCommentElement, riid)) {
00151         TRACE("(%p)->(IID_IHTMLCommentElement %p)\n", This, ppv);
00152         *ppv = HTMLCOMMENT(This);
00153     }else {
00154         return HTMLElement_QI(&This->element.node, riid, ppv);
00155     }
00156 
00157     IUnknown_AddRef((IUnknown*)*ppv);
00158     return S_OK;
00159 }
00160 
00161 static void HTMLCommentElement_destructor(HTMLDOMNode *iface)
00162 {
00163     HTMLCommentElement *This = HTMLCOMMENT_NODE_THIS(iface);
00164 
00165     HTMLElement_destructor(&This->element.node);
00166 }
00167 
00168 #undef HTMLCOMMENT_NODE_THIS
00169 
00170 static const NodeImplVtbl HTMLCommentElementImplVtbl = {
00171     HTMLCommentElement_QI,
00172     HTMLCommentElement_destructor
00173 };
00174 
00175 static const tid_t HTMLCommentElement_iface_tids[] = {
00176     HTMLELEMENT_TIDS,
00177     IHTMLCommentElement_tid,
00178     0
00179 };
00180 static dispex_static_data_t HTMLCommentElement_dispex = {
00181     NULL,
00182     DispHTMLCommentElement_tid,
00183     NULL,
00184     HTMLCommentElement_iface_tids
00185 };
00186 
00187 HTMLElement *HTMLCommentElement_Create(HTMLDocumentNode *doc, nsIDOMNode *nsnode)
00188 {
00189     HTMLCommentElement *ret = heap_alloc_zero(sizeof(*ret));
00190 
00191     ret->element.node.vtbl = &HTMLCommentElementImplVtbl;
00192     ret->lpIHTMLCommentElementVtbl = &HTMLCommentElementVtbl;
00193 
00194     HTMLElement_Init(&ret->element, doc, NULL, &HTMLCommentElement_dispex);
00195 
00196     nsIDOMNode_AddRef(nsnode);
00197     ret->element.node.nsnode = nsnode;
00198 
00199     return &ret->element;
00200 }

Generated on Sat May 26 2012 04:23:27 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.