Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenhtmlanchor.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 <stdarg.h> 00020 #include <stdio.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 "wine/debug.h" 00030 00031 #include "mshtml_private.h" 00032 00033 WINE_DEFAULT_DEBUG_CHANNEL(mshtml); 00034 00035 typedef struct { 00036 HTMLElement element; 00037 00038 const IHTMLAnchorElementVtbl *lpHTMLAnchorElementVtbl; 00039 00040 nsIDOMHTMLAnchorElement *nsanchor; 00041 } HTMLAnchorElement; 00042 00043 #define HTMLANCHOR(x) (&(x)->lpHTMLAnchorElementVtbl) 00044 00045 #define HTMLANCHOR_THIS(iface) DEFINE_THIS(HTMLAnchorElement, HTMLAnchorElement, iface) 00046 00047 static HRESULT WINAPI HTMLAnchorElement_QueryInterface(IHTMLAnchorElement *iface, 00048 REFIID riid, void **ppv) 00049 { 00050 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00051 00052 return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv); 00053 } 00054 00055 static ULONG WINAPI HTMLAnchorElement_AddRef(IHTMLAnchorElement *iface) 00056 { 00057 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00058 00059 return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node)); 00060 } 00061 00062 static ULONG WINAPI HTMLAnchorElement_Release(IHTMLAnchorElement *iface) 00063 { 00064 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00065 00066 return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node)); 00067 } 00068 00069 static HRESULT WINAPI HTMLAnchorElement_GetTypeInfoCount(IHTMLAnchorElement *iface, UINT *pctinfo) 00070 { 00071 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00072 return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->element.node.dispex), pctinfo); 00073 } 00074 00075 static HRESULT WINAPI HTMLAnchorElement_GetTypeInfo(IHTMLAnchorElement *iface, UINT iTInfo, 00076 LCID lcid, ITypeInfo **ppTInfo) 00077 { 00078 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00079 return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->element.node.dispex), iTInfo, lcid, ppTInfo); 00080 } 00081 00082 static HRESULT WINAPI HTMLAnchorElement_GetIDsOfNames(IHTMLAnchorElement *iface, REFIID riid, 00083 LPOLESTR *rgszNames, UINT cNames, 00084 LCID lcid, DISPID *rgDispId) 00085 { 00086 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00087 return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->element.node.dispex), riid, rgszNames, cNames, lcid, rgDispId); 00088 } 00089 00090 static HRESULT WINAPI HTMLAnchorElement_Invoke(IHTMLAnchorElement *iface, DISPID dispIdMember, 00091 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, 00092 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) 00093 { 00094 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00095 return IDispatchEx_Invoke(DISPATCHEX(&This->element.node.dispex), dispIdMember, riid, lcid, 00096 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); 00097 } 00098 00099 static HRESULT WINAPI HTMLAnchorElement_put_href(IHTMLAnchorElement *iface, BSTR v) 00100 { 00101 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00102 FIXME("(%p)->(%s)\n", This, debugstr_w(v)); 00103 return E_NOTIMPL; 00104 } 00105 00106 static HRESULT WINAPI HTMLAnchorElement_get_href(IHTMLAnchorElement *iface, BSTR *p) 00107 { 00108 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00109 nsAString href_str; 00110 nsresult nsres; 00111 HRESULT hres; 00112 00113 TRACE("(%p)->(%p)\n", This, p); 00114 00115 nsAString_Init(&href_str, NULL); 00116 nsres = nsIDOMHTMLAnchorElement_GetHref(This->nsanchor, &href_str); 00117 if(NS_SUCCEEDED(nsres)) { 00118 const PRUnichar *href; 00119 00120 nsAString_GetData(&href_str, &href); 00121 hres = nsuri_to_url(href, TRUE, p); 00122 }else { 00123 ERR("GetHref failed: %08x\n", nsres); 00124 hres = E_FAIL; 00125 } 00126 00127 nsAString_Finish(&href_str); 00128 return hres; 00129 } 00130 00131 static HRESULT WINAPI HTMLAnchorElement_put_target(IHTMLAnchorElement *iface, BSTR v) 00132 { 00133 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00134 FIXME("(%p)->(%s)\n", This, debugstr_w(v)); 00135 return E_NOTIMPL; 00136 } 00137 00138 static HRESULT WINAPI HTMLAnchorElement_get_target(IHTMLAnchorElement *iface, BSTR *p) 00139 { 00140 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00141 FIXME("(%p)->(%p)\n", This, p); 00142 return E_NOTIMPL; 00143 } 00144 00145 static HRESULT WINAPI HTMLAnchorElement_put_rel(IHTMLAnchorElement *iface, BSTR v) 00146 { 00147 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00148 FIXME("(%p)->(%s)\n", This, debugstr_w(v)); 00149 return E_NOTIMPL; 00150 } 00151 00152 static HRESULT WINAPI HTMLAnchorElement_get_rel(IHTMLAnchorElement *iface, BSTR *p) 00153 { 00154 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00155 FIXME("(%p)->(%p)\n", This, p); 00156 return E_NOTIMPL; 00157 } 00158 00159 static HRESULT WINAPI HTMLAnchorElement_put_rev(IHTMLAnchorElement *iface, BSTR v) 00160 { 00161 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00162 FIXME("(%p)->(%s)\n", This, debugstr_w(v)); 00163 return E_NOTIMPL; 00164 } 00165 00166 static HRESULT WINAPI HTMLAnchorElement_get_rev(IHTMLAnchorElement *iface, BSTR *p) 00167 { 00168 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00169 FIXME("(%p)->(%p)\n", This, p); 00170 return E_NOTIMPL; 00171 } 00172 00173 static HRESULT WINAPI HTMLAnchorElement_put_urn(IHTMLAnchorElement *iface, BSTR v) 00174 { 00175 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00176 FIXME("(%p)->(%s)\n", This, debugstr_w(v)); 00177 return E_NOTIMPL; 00178 } 00179 00180 static HRESULT WINAPI HTMLAnchorElement_get_urn(IHTMLAnchorElement *iface, BSTR *p) 00181 { 00182 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00183 FIXME("(%p)->(%p)\n", This, p); 00184 return E_NOTIMPL; 00185 } 00186 00187 static HRESULT WINAPI HTMLAnchorElement_put_Methods(IHTMLAnchorElement *iface, BSTR v) 00188 { 00189 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00190 FIXME("(%p)->(%s)\n", This, debugstr_w(v)); 00191 return E_NOTIMPL; 00192 } 00193 00194 static HRESULT WINAPI HTMLAnchorElement_get_Methods(IHTMLAnchorElement *iface, BSTR *p) 00195 { 00196 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00197 FIXME("(%p)->(%p)\n", This, p); 00198 return E_NOTIMPL; 00199 } 00200 00201 static HRESULT WINAPI HTMLAnchorElement_put_name(IHTMLAnchorElement *iface, BSTR v) 00202 { 00203 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00204 FIXME("(%p)->(%s)\n", This, debugstr_w(v)); 00205 return E_NOTIMPL; 00206 } 00207 00208 static HRESULT WINAPI HTMLAnchorElement_get_name(IHTMLAnchorElement *iface, BSTR *p) 00209 { 00210 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00211 FIXME("(%p)->(%p)\n", This, p); 00212 return E_NOTIMPL; 00213 } 00214 00215 static HRESULT WINAPI HTMLAnchorElement_put_host(IHTMLAnchorElement *iface, BSTR v) 00216 { 00217 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00218 FIXME("(%p)->(%s)\n", This, debugstr_w(v)); 00219 return E_NOTIMPL; 00220 } 00221 00222 static HRESULT WINAPI HTMLAnchorElement_get_host(IHTMLAnchorElement *iface, BSTR *p) 00223 { 00224 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00225 FIXME("(%p)->(%p)\n", This, p); 00226 return E_NOTIMPL; 00227 } 00228 00229 static HRESULT WINAPI HTMLAnchorElement_put_hostname(IHTMLAnchorElement *iface, BSTR v) 00230 { 00231 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00232 FIXME("(%p)->(%s)\n", This, debugstr_w(v)); 00233 return E_NOTIMPL; 00234 } 00235 00236 static HRESULT WINAPI HTMLAnchorElement_get_hostname(IHTMLAnchorElement *iface, BSTR *p) 00237 { 00238 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00239 FIXME("(%p)->(%p)\n", This, p); 00240 return E_NOTIMPL; 00241 } 00242 00243 static HRESULT WINAPI HTMLAnchorElement_put_pathname(IHTMLAnchorElement *iface, BSTR v) 00244 { 00245 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00246 FIXME("(%p)->(%s)\n", This, debugstr_w(v)); 00247 return E_NOTIMPL; 00248 } 00249 00250 static HRESULT WINAPI HTMLAnchorElement_get_pathname(IHTMLAnchorElement *iface, BSTR *p) 00251 { 00252 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00253 FIXME("(%p)->(%p)\n", This, p); 00254 return E_NOTIMPL; 00255 } 00256 00257 static HRESULT WINAPI HTMLAnchorElement_put_port(IHTMLAnchorElement *iface, BSTR v) 00258 { 00259 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00260 FIXME("(%p)->(%s)\n", This, debugstr_w(v)); 00261 return E_NOTIMPL; 00262 } 00263 00264 static HRESULT WINAPI HTMLAnchorElement_get_port(IHTMLAnchorElement *iface, BSTR *p) 00265 { 00266 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00267 FIXME("(%p)->(%p)\n", This, p); 00268 return E_NOTIMPL; 00269 } 00270 00271 static HRESULT WINAPI HTMLAnchorElement_put_protocol(IHTMLAnchorElement *iface, BSTR v) 00272 { 00273 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00274 FIXME("(%p)->(%s)\n", This, debugstr_w(v)); 00275 return E_NOTIMPL; 00276 } 00277 00278 static HRESULT WINAPI HTMLAnchorElement_get_protocol(IHTMLAnchorElement *iface, BSTR *p) 00279 { 00280 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00281 FIXME("(%p)->(%p)\n", This, p); 00282 return E_NOTIMPL; 00283 } 00284 00285 static HRESULT WINAPI HTMLAnchorElement_put_search(IHTMLAnchorElement *iface, BSTR v) 00286 { 00287 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00288 FIXME("(%p)->(%p)\n", This, debugstr_w(v)); 00289 return E_NOTIMPL; 00290 } 00291 00292 static HRESULT WINAPI HTMLAnchorElement_get_search(IHTMLAnchorElement *iface, BSTR *p) 00293 { 00294 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00295 FIXME("(%p)->(%p)\n", This, p); 00296 return E_NOTIMPL; 00297 } 00298 00299 static HRESULT WINAPI HTMLAnchorElement_put_hash(IHTMLAnchorElement *iface, BSTR v) 00300 { 00301 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00302 FIXME("(%p)->(%s)\n", This, debugstr_w(v)); 00303 return E_NOTIMPL; 00304 } 00305 00306 static HRESULT WINAPI HTMLAnchorElement_get_hash(IHTMLAnchorElement *iface, BSTR *p) 00307 { 00308 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00309 FIXME("(%p)->(%p)\n", This, p); 00310 return E_NOTIMPL; 00311 } 00312 00313 static HRESULT WINAPI HTMLAnchorElement_put_onblur(IHTMLAnchorElement *iface, VARIANT v) 00314 { 00315 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00316 00317 TRACE("(%p)->()\n", This); 00318 00319 return IHTMLElement2_put_onblur(HTMLELEM2(&This->element), v); 00320 } 00321 00322 static HRESULT WINAPI HTMLAnchorElement_get_onblur(IHTMLAnchorElement *iface, VARIANT *p) 00323 { 00324 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00325 00326 TRACE("(%p)->(%p)\n", This, p); 00327 00328 return IHTMLElement2_get_onblur(HTMLELEM2(&This->element), p); 00329 } 00330 00331 static HRESULT WINAPI HTMLAnchorElement_put_onfocus(IHTMLAnchorElement *iface, VARIANT v) 00332 { 00333 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00334 00335 TRACE("(%p)->()\n", This); 00336 00337 return IHTMLElement2_put_onfocus(HTMLELEM2(&This->element), v); 00338 } 00339 00340 static HRESULT WINAPI HTMLAnchorElement_get_onfocus(IHTMLAnchorElement *iface, VARIANT *p) 00341 { 00342 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00343 00344 TRACE("(%p)->(%p)\n", This, p); 00345 00346 return IHTMLElement2_get_onfocus(HTMLELEM2(&This->element), p); 00347 } 00348 00349 static HRESULT WINAPI HTMLAnchorElement_put_accessKey(IHTMLAnchorElement *iface, BSTR v) 00350 { 00351 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00352 00353 TRACE("(%p)->(%s)\n", This, debugstr_w(v)); 00354 00355 return IHTMLElement2_put_accessKey(HTMLELEM2(&This->element), v); 00356 } 00357 00358 static HRESULT WINAPI HTMLAnchorElement_get_accessKey(IHTMLAnchorElement *iface, BSTR *p) 00359 { 00360 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00361 00362 TRACE("(%p)->(%p)\n", This, p); 00363 00364 return IHTMLElement2_get_accessKey(HTMLELEM2(&This->element), p); 00365 } 00366 00367 static HRESULT WINAPI HTMLAnchorElement_get_protocolLong(IHTMLAnchorElement *iface, BSTR *p) 00368 { 00369 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00370 FIXME("(%p)->(%p)\n", This, p); 00371 return E_NOTIMPL; 00372 } 00373 00374 static HRESULT WINAPI HTMLAnchorElement_get_mimeType(IHTMLAnchorElement *iface, BSTR *p) 00375 { 00376 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00377 FIXME("(%p)->(%p)\n", This, p); 00378 return E_NOTIMPL; 00379 } 00380 00381 static HRESULT WINAPI HTMLAnchorElement_get_nameProp(IHTMLAnchorElement *iface, BSTR *p) 00382 { 00383 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00384 FIXME("(%p)->(%p)\n", This, p); 00385 return E_NOTIMPL; 00386 } 00387 00388 static HRESULT WINAPI HTMLAnchorElement_put_tabIndex(IHTMLAnchorElement *iface, short v) 00389 { 00390 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00391 00392 TRACE("(%p)->()\n", This); 00393 00394 return IHTMLElement2_put_tabIndex(HTMLELEM2(&This->element), v); 00395 } 00396 00397 static HRESULT WINAPI HTMLAnchorElement_get_tabIndex(IHTMLAnchorElement *iface, short *p) 00398 { 00399 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00400 00401 TRACE("(%p)->(%p)\n", This, p); 00402 00403 return IHTMLElement2_get_tabIndex(HTMLELEM2(&This->element), p); 00404 } 00405 00406 static HRESULT WINAPI HTMLAnchorElement_focus(IHTMLAnchorElement *iface) 00407 { 00408 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00409 00410 TRACE("(%p)\n", This); 00411 00412 return IHTMLElement2_focus(HTMLELEM2(&This->element)); 00413 } 00414 00415 static HRESULT WINAPI HTMLAnchorElement_blur(IHTMLAnchorElement *iface) 00416 { 00417 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface); 00418 00419 TRACE("(%p)\n", This); 00420 00421 return IHTMLElement2_blur(HTMLELEM2(&This->element)); 00422 } 00423 00424 #undef HTMLANCHOR_THIS 00425 00426 static const IHTMLAnchorElementVtbl HTMLAnchorElementVtbl = { 00427 HTMLAnchorElement_QueryInterface, 00428 HTMLAnchorElement_AddRef, 00429 HTMLAnchorElement_Release, 00430 HTMLAnchorElement_GetTypeInfoCount, 00431 HTMLAnchorElement_GetTypeInfo, 00432 HTMLAnchorElement_GetIDsOfNames, 00433 HTMLAnchorElement_Invoke, 00434 HTMLAnchorElement_put_href, 00435 HTMLAnchorElement_get_href, 00436 HTMLAnchorElement_put_target, 00437 HTMLAnchorElement_get_target, 00438 HTMLAnchorElement_put_rel, 00439 HTMLAnchorElement_get_rel, 00440 HTMLAnchorElement_put_rev, 00441 HTMLAnchorElement_get_rev, 00442 HTMLAnchorElement_put_urn, 00443 HTMLAnchorElement_get_urn, 00444 HTMLAnchorElement_put_Methods, 00445 HTMLAnchorElement_get_Methods, 00446 HTMLAnchorElement_put_name, 00447 HTMLAnchorElement_get_name, 00448 HTMLAnchorElement_put_host, 00449 HTMLAnchorElement_get_host, 00450 HTMLAnchorElement_put_hostname, 00451 HTMLAnchorElement_get_hostname, 00452 HTMLAnchorElement_put_pathname, 00453 HTMLAnchorElement_get_pathname, 00454 HTMLAnchorElement_put_port, 00455 HTMLAnchorElement_get_port, 00456 HTMLAnchorElement_put_protocol, 00457 HTMLAnchorElement_get_protocol, 00458 HTMLAnchorElement_put_search, 00459 HTMLAnchorElement_get_search, 00460 HTMLAnchorElement_put_hash, 00461 HTMLAnchorElement_get_hash, 00462 HTMLAnchorElement_put_onblur, 00463 HTMLAnchorElement_get_onblur, 00464 HTMLAnchorElement_put_onfocus, 00465 HTMLAnchorElement_get_onfocus, 00466 HTMLAnchorElement_put_accessKey, 00467 HTMLAnchorElement_get_accessKey, 00468 HTMLAnchorElement_get_protocolLong, 00469 HTMLAnchorElement_get_mimeType, 00470 HTMLAnchorElement_get_nameProp, 00471 HTMLAnchorElement_put_tabIndex, 00472 HTMLAnchorElement_get_tabIndex, 00473 HTMLAnchorElement_focus, 00474 HTMLAnchorElement_blur 00475 }; 00476 00477 #define HTMLANCHOR_NODE_THIS(iface) DEFINE_THIS2(HTMLAnchorElement, element.node, iface) 00478 00479 static HRESULT HTMLAnchorElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv) 00480 { 00481 HTMLAnchorElement *This = HTMLANCHOR_NODE_THIS(iface); 00482 00483 *ppv = NULL; 00484 00485 if(IsEqualGUID(&IID_IUnknown, riid)) { 00486 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); 00487 *ppv = HTMLANCHOR(This); 00488 }else if(IsEqualGUID(&IID_IDispatch, riid)) { 00489 TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv); 00490 *ppv = HTMLANCHOR(This); 00491 }else if(IsEqualGUID(&IID_IHTMLAnchorElement, riid)) { 00492 TRACE("(%p)->(IID_IHTMLAnchorElement %p)\n", This, ppv); 00493 *ppv = HTMLANCHOR(This); 00494 } 00495 00496 if(*ppv) { 00497 IUnknown_AddRef((IUnknown*)*ppv); 00498 return S_OK; 00499 } 00500 00501 return HTMLElement_QI(&This->element.node, riid, ppv); 00502 } 00503 00504 static void HTMLAnchorElement_destructor(HTMLDOMNode *iface) 00505 { 00506 HTMLAnchorElement *This = HTMLANCHOR_NODE_THIS(iface); 00507 00508 if(This->nsanchor) 00509 nsIDOMHTMLAnchorElement_Release(This->nsanchor); 00510 00511 HTMLElement_destructor(&This->element.node); 00512 } 00513 00514 #undef HTMLANCHOR_NODE_THIS 00515 00516 static const NodeImplVtbl HTMLAnchorElementImplVtbl = { 00517 HTMLAnchorElement_QI, 00518 HTMLAnchorElement_destructor 00519 }; 00520 00521 static const tid_t HTMLAnchorElement_iface_tids[] = { 00522 IHTMLAnchorElement_tid, 00523 HTMLELEMENT_TIDS, 00524 IHTMLTextContainer_tid, 00525 IHTMLUniqueName_tid, 00526 0 00527 }; 00528 00529 static dispex_static_data_t HTMLAnchorElement_dispex = { 00530 NULL, 00531 DispHTMLAnchorElement_tid, 00532 NULL, 00533 HTMLAnchorElement_iface_tids 00534 }; 00535 00536 HTMLElement *HTMLAnchorElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem) 00537 { 00538 HTMLAnchorElement *ret = heap_alloc_zero(sizeof(HTMLAnchorElement)); 00539 nsresult nsres; 00540 00541 ret->lpHTMLAnchorElementVtbl = &HTMLAnchorElementVtbl; 00542 ret->element.node.vtbl = &HTMLAnchorElementImplVtbl; 00543 00544 HTMLElement_Init(&ret->element, doc, nselem, &HTMLAnchorElement_dispex); 00545 00546 nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLAnchorElement, (void**)&ret->nsanchor); 00547 if(NS_FAILED(nsres)) 00548 ERR("Could not get nsIDOMHTMLAnchorElement iface: %08x\n", nsres); 00549 00550 return &ret->element; 00551 } Generated on Sat May 26 2012 04:23:26 for ReactOS by
1.7.6.1
|