~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Wine Cross Reference
wine/dlls/mshtml/htmlcomment.c

Version: ~ [ wine-1.5.31 ] ~ [ wine-1.5.30 ] ~ [ wine-1.5.29 ] ~ [ wine-1.5.28 ] ~ [ wine-1.5.27 ] ~ [ wine-1.5.26 ] ~ [ wine-1.5.25 ] ~ [ wine-1.5.24 ] ~ [ wine-1.5.23 ] ~ [ wine-1.5.22 ] ~ [ wine-1.5.21 ] ~ [ wine-1.5.20 ] ~ [ wine-1.5.19 ] ~ [ wine-1.5.18 ] ~ [ wine-1.5.17 ] ~ [ wine-1.5.16 ] ~ [ wine-1.5.15 ] ~ [ wine-1.5.14 ] ~ [ wine-1.5.13 ] ~ [ wine-1.5.12 ] ~ [ wine-1.5.11 ] ~ [ wine-1.5.10 ] ~ [ wine-1.5.9 ] ~ [ wine-1.5.8 ] ~ [ wine-1.5.7 ] ~ [ wine-1.4.1 ] ~ [ wine-1.5.6 ] ~ [ wine-1.5.5 ] ~ [ wine-1.5.4 ] ~ [ wine-1.5.3 ] ~ [ wine-1.5.2 ] ~ [ wine-1.5.1 ] ~ [ wine-1.5.0 ] ~ [ wine-1.4 ] ~ [ wine-1.4-rc6 ] ~ [ wine-1.4-rc5 ] ~ [ wine-1.4-rc4 ] ~ [ wine-1.4-rc3 ] ~ [ wine-1.4-rc2 ] ~ [ wine-1.4-rc1 ] ~ [ wine-1.3.37 ] ~ [ wine-1.3.36 ] ~ [ wine-1.3.35 ] ~ [ wine-1.3.34 ] ~ [ wine-1.3.33 ] ~ [ wine-1.3.32 ] ~ [ wine-1.3.31 ] ~ [ wine-1.3.30 ] ~ [ wine-1.3.29 ] ~ [ wine-1.3.28 ] ~ [ wine-1.3.27 ] ~ [ wine-1.3.26 ] ~ [ wine-1.3.25 ] ~ [ wine-1.3.24 ] ~ [ wine-1.3.23 ] ~ [ wine-1.3.22 ] ~ [ wine-1.3.21 ] ~ [ wine-1.3.20 ] ~ [ wine-1.3.19 ] ~ [ wine-1.3.18 ] ~ [ wine-1.2.3 ] ~ [ wine-1.3.17 ] ~ [ wine-1.3.16 ] ~ [ wine-1.3.15 ] ~ [ wine-1.3.14 ] ~ [ wine-1.3.13 ] ~ [ wine-1.3.12 ] ~ [ wine-1.3.11 ] ~ [ wine-1.3.10 ] ~ [ wine-1.3.9 ] ~ [ wine-1.2.2 ] ~ [ wine-1.3.8 ] ~ [ wine-1.3.7 ] ~ [ wine-1.3.6 ] ~ [ wine-1.3.5 ] ~ [ wine-1.2.1 ] ~ [ wine-1.3.4 ] ~ [ wine-1.3.3 ] ~ [ wine-1.3.2 ] ~ [ wine-1.3.1 ] ~ [ wine-1.3.0 ] ~ [ wine-1.2 ] ~ [ wine-1.2-rc7 ] ~ [ wine-1.2-rc6 ] ~ [ wine-1.2-rc5 ] ~ [ wine-1.2-rc4 ] ~ [ wine-1.2-rc3 ] ~ [ wine-1.2-rc2 ] ~ [ wine-1.2-rc1 ] ~ [ wine-1.1.44 ] ~ [ wine-1.1.43 ] ~ [ wine-1.1.42 ] ~ [ wine-1.1.41 ] ~ [ wine-1.1.40 ] ~ [ wine-1.1.39 ] ~ [ wine-1.1.38 ] ~ [ wine-1.1.37 ] ~ [ wine-1.1.36 ] ~ [ wine-1.1.35 ] ~ [ wine-1.1.34 ] ~ [ wine-1.1.33 ] ~ [ wine-1.1.32 ] ~ [ wine-1.1.31 ] ~ [ wine-1.1.30 ] ~ [ wine-1.1.29 ] ~ [ wine-1.1.28 ] ~ [ wine-1.1.27 ] ~ [ wine-1.1.26 ] ~ [ wine-1.1.25 ] ~ [ wine-1.1.24 ] ~ [ wine-1.1.23 ] ~ [ wine-1.1.22 ] ~ [ wine-1.1.21 ] ~ [ wine-1.1.20 ] ~ [ wine-1.1.19 ] ~ [ wine-1.1.18 ] ~ [ wine-1.1.17 ] ~ [ wine-1.1.16 ] ~ [ wine-1.1.15 ] ~ [ wine-1.1.14 ] ~ [ wine-1.1.13 ] ~ [ wine-1.1.12 ] ~ [ wine-1.1.11 ] ~ [ wine-1.1.10 ] ~ [ wine-1.1.9 ] ~ [ wine-1.1.8 ] ~ [ wine-1.1.7 ] ~ [ wine-1.0.1 ] ~ [ wine-1.1.6 ] ~ [ wine-1.1.5 ] ~ [ wine-1.1.4 ] ~ [ wine-1.1.3 ] ~ [ wine-1.1.2 ] ~ [ wine-1.1.1 ] ~ [ wine-1.1.0 ] ~ [ wine-1.0 ] ~

  1 /*
  2  * Copyright 2008 Jacek Caban for CodeWeavers
  3  *
  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.
  8  *
  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.
 13  *
 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
 17  */
 18 
 19 
 20 #include <stdarg.h>
 21 
 22 #define COBJMACROS
 23 
 24 #include "windef.h"
 25 #include "winbase.h"
 26 #include "winuser.h"
 27 #include "ole2.h"
 28 
 29 #include "mshtml_private.h"
 30 
 31 #include "wine/debug.h"
 32 
 33 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
 34 
 35 struct HTMLCommentElement {
 36     HTMLElement element;
 37     IHTMLCommentElement IHTMLCommentElement_iface;
 38 };
 39 
 40 static inline HTMLCommentElement *impl_from_IHTMLCommentElement(IHTMLCommentElement *iface)
 41 {
 42     return CONTAINING_RECORD(iface, HTMLCommentElement, IHTMLCommentElement_iface);
 43 }
 44 
 45 static HRESULT WINAPI HTMLCommentElement_QueryInterface(IHTMLCommentElement *iface,
 46         REFIID riid, void **ppv)
 47 {
 48     HTMLCommentElement *This = impl_from_IHTMLCommentElement(iface);
 49 
 50     return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
 51 }
 52 
 53 static ULONG WINAPI HTMLCommentElement_AddRef(IHTMLCommentElement *iface)
 54 {
 55     HTMLCommentElement *This = impl_from_IHTMLCommentElement(iface);
 56 
 57     return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
 58 }
 59 
 60 static ULONG WINAPI HTMLCommentElement_Release(IHTMLCommentElement *iface)
 61 {
 62     HTMLCommentElement *This = impl_from_IHTMLCommentElement(iface);
 63 
 64     return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
 65 }
 66 
 67 static HRESULT WINAPI HTMLCommentElement_GetTypeInfoCount(IHTMLCommentElement *iface, UINT *pctinfo)
 68 {
 69     HTMLCommentElement *This = impl_from_IHTMLCommentElement(iface);
 70     return IDispatchEx_GetTypeInfoCount(&This->element.node.dispex.IDispatchEx_iface, pctinfo);
 71 }
 72 
 73 static HRESULT WINAPI HTMLCommentElement_GetTypeInfo(IHTMLCommentElement *iface, UINT iTInfo,
 74         LCID lcid, ITypeInfo **ppTInfo)
 75 {
 76     HTMLCommentElement *This = impl_from_IHTMLCommentElement(iface);
 77     return IDispatchEx_GetTypeInfo(&This->element.node.dispex.IDispatchEx_iface, iTInfo, lcid,
 78             ppTInfo);
 79 }
 80 
 81 static HRESULT WINAPI HTMLCommentElement_GetIDsOfNames(IHTMLCommentElement *iface, REFIID riid,
 82                                                 LPOLESTR *rgszNames, UINT cNames,
 83                                                 LCID lcid, DISPID *rgDispId)
 84 {
 85     HTMLCommentElement *This = impl_from_IHTMLCommentElement(iface);
 86     return IDispatchEx_GetIDsOfNames(&This->element.node.dispex.IDispatchEx_iface, riid, rgszNames,
 87             cNames, lcid, rgDispId);
 88 }
 89 
 90 static HRESULT WINAPI HTMLCommentElement_Invoke(IHTMLCommentElement *iface, DISPID dispIdMember,
 91                             REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
 92                             VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 93 {
 94     HTMLCommentElement *This = impl_from_IHTMLCommentElement(iface);
 95     return IDispatchEx_Invoke(&This->element.node.dispex.IDispatchEx_iface, dispIdMember, riid,
 96             lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
 97 }
 98 
 99 static HRESULT WINAPI HTMLCommentElement_put_text(IHTMLCommentElement *iface, BSTR v)
100 {
101     HTMLCommentElement *This = impl_from_IHTMLCommentElement(iface);
102     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
103     return E_NOTIMPL;
104 }
105 
106 static HRESULT WINAPI HTMLCommentElement_get_text(IHTMLCommentElement *iface, BSTR *p)
107 {
108     HTMLCommentElement *This = impl_from_IHTMLCommentElement(iface);
109 
110     TRACE("(%p)->(%p)\n", This, p);
111 
112     return IHTMLElement_get_outerHTML(&This->element.IHTMLElement_iface, p);
113 }
114 
115 static HRESULT WINAPI HTMLCommentElement_put_atomic(IHTMLCommentElement *iface, LONG v)
116 {
117     HTMLCommentElement *This = impl_from_IHTMLCommentElement(iface);
118     FIXME("(%p)->(%d)\n", This, v);
119     return E_NOTIMPL;
120 }
121 
122 static HRESULT WINAPI HTMLCommentElement_get_atomic(IHTMLCommentElement *iface, LONG *p)
123 {
124     HTMLCommentElement *This = impl_from_IHTMLCommentElement(iface);
125     FIXME("(%p)->(%p)\n", This, p);
126     return E_NOTIMPL;
127 }
128 
129 static const IHTMLCommentElementVtbl HTMLCommentElementVtbl = {
130     HTMLCommentElement_QueryInterface,
131     HTMLCommentElement_AddRef,
132     HTMLCommentElement_Release,
133     HTMLCommentElement_GetTypeInfoCount,
134     HTMLCommentElement_GetTypeInfo,
135     HTMLCommentElement_GetIDsOfNames,
136     HTMLCommentElement_Invoke,
137     HTMLCommentElement_put_text,
138     HTMLCommentElement_get_text,
139     HTMLCommentElement_put_atomic,
140     HTMLCommentElement_get_atomic
141 };
142 
143 static inline HTMLCommentElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
144 {
145     return CONTAINING_RECORD(iface, HTMLCommentElement, element.node);
146 }
147 
148 static HRESULT HTMLCommentElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
149 {
150     HTMLCommentElement *This = impl_from_HTMLDOMNode(iface);
151 
152     *ppv =  NULL;
153 
154     if(IsEqualGUID(&IID_IHTMLCommentElement, riid)) {
155         TRACE("(%p)->(IID_IHTMLCommentElement %p)\n", This, ppv);
156         *ppv = &This->IHTMLCommentElement_iface;
157     }else {
158         return HTMLElement_QI(&This->element.node, riid, ppv);
159     }
160 
161     IUnknown_AddRef((IUnknown*)*ppv);
162     return S_OK;
163 }
164 
165 static void HTMLCommentElement_destructor(HTMLDOMNode *iface)
166 {
167     HTMLCommentElement *This = impl_from_HTMLDOMNode(iface);
168 
169     HTMLElement_destructor(&This->element.node);
170 }
171 
172 static const NodeImplVtbl HTMLCommentElementImplVtbl = {
173     HTMLCommentElement_QI,
174     HTMLCommentElement_destructor,
175     HTMLElement_clone
176 };
177 
178 static const tid_t HTMLCommentElement_iface_tids[] = {
179     HTMLELEMENT_TIDS,
180     IHTMLCommentElement_tid,
181     0
182 };
183 static dispex_static_data_t HTMLCommentElement_dispex = {
184     NULL,
185     DispHTMLCommentElement_tid,
186     NULL,
187     HTMLCommentElement_iface_tids
188 };
189 
190 HRESULT HTMLCommentElement_Create(HTMLDocumentNode *doc, nsIDOMNode *nsnode, HTMLElement **elem)
191 {
192     HTMLCommentElement *ret;
193 
194     ret = heap_alloc_zero(sizeof(*ret));
195     if(!ret)
196         return E_OUTOFMEMORY;
197 
198     ret->element.node.vtbl = &HTMLCommentElementImplVtbl;
199     ret->IHTMLCommentElement_iface.lpVtbl = &HTMLCommentElementVtbl;
200 
201     HTMLElement_Init(&ret->element, doc, NULL, &HTMLCommentElement_dispex);
202 
203     nsIDOMNode_AddRef(nsnode);
204     ret->element.node.nsnode = nsnode;
205 
206     *elem = &ret->element;
207     return S_OK;
208 }
209 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.