2 * Copyright 2007 Jacek Caban for CodeWeavers
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.
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.
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
32 #include "wine/debug.h"
34 #include "mshtml_private.h"
36 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
39 const IHTMLAnchorElementVtbl *lpHTMLAnchorElementVtbl;
44 #define HTMLANCHOR(x) ((IHTMLAnchorElement*) &(x)->lpHTMLAnchorElementVtbl)
46 #define HTMLANCHOR_THIS(iface) DEFINE_THIS(HTMLAnchorElement, HTMLAnchorElement, iface)
48 static HRESULT WINAPI HTMLAnchorElement_QueryInterface(IHTMLAnchorElement *iface,
49 REFIID riid, void **ppv)
51 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
56 if(IsEqualGUID(&IID_IUnknown, riid)) {
57 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
58 *ppv = HTMLANCHOR(This);
59 }else if(IsEqualGUID(&IID_IDispatch, riid)) {
60 TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
61 *ppv = HTMLANCHOR(This);
62 }else if(IsEqualGUID(&IID_IHTMLAnchorElement, riid)) {
63 TRACE("(%p)->(IID_IHTMLAnchorElement %p)\n", This, ppv);
64 *ppv = HTMLANCHOR(This);
68 IUnknown_AddRef((IUnknown*)*ppv);
72 hres = HTMLElement_QI(This->element, riid, ppv);
74 WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
79 static ULONG WINAPI HTMLAnchorElement_AddRef(IHTMLAnchorElement *iface)
81 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
83 TRACE("(%p)\n", This);
85 return IHTMLDocument2_AddRef(HTMLDOC(This->element->node.doc));
88 static ULONG WINAPI HTMLAnchorElement_Release(IHTMLAnchorElement *iface)
90 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
92 TRACE("(%p)\n", This);
94 return IHTMLDocument2_Release(HTMLDOC(This->element->node.doc));
97 static HRESULT WINAPI HTMLAnchorElement_GetTypeInfoCount(IHTMLAnchorElement *iface, UINT *pctinfo)
99 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
100 FIXME("(%p)->(%p)\n", This, pctinfo);
104 static HRESULT WINAPI HTMLAnchorElement_GetTypeInfo(IHTMLAnchorElement *iface, UINT iTInfo,
105 LCID lcid, ITypeInfo **ppTInfo)
107 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
108 FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
112 static HRESULT WINAPI HTMLAnchorElement_GetIDsOfNames(IHTMLAnchorElement *iface, REFIID riid,
113 LPOLESTR *rgszNames, UINT cNames,
114 LCID lcid, DISPID *rgDispId)
116 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
117 FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
122 static HRESULT WINAPI HTMLAnchorElement_Invoke(IHTMLAnchorElement *iface, DISPID dispIdMember,
123 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
124 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
126 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
127 FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
128 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
132 static HRESULT WINAPI HTMLAnchorElement_put_href(IHTMLAnchorElement *iface, BSTR v)
134 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
135 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
139 static HRESULT WINAPI HTMLAnchorElement_get_href(IHTMLAnchorElement *iface, BSTR *p)
141 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
142 FIXME("(%p)->(%p)\n", This, p);
146 static HRESULT WINAPI HTMLAnchorElement_put_target(IHTMLAnchorElement *iface, BSTR v)
148 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
149 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
153 static HRESULT WINAPI HTMLAnchorElement_get_target(IHTMLAnchorElement *iface, BSTR *p)
155 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
156 FIXME("(%p)->(%p)\n", This, p);
160 static HRESULT WINAPI HTMLAnchorElement_put_rel(IHTMLAnchorElement *iface, BSTR v)
162 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
163 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
167 static HRESULT WINAPI HTMLAnchorElement_get_rel(IHTMLAnchorElement *iface, BSTR *p)
169 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
170 FIXME("(%p)->(%p)\n", This, p);
174 static HRESULT WINAPI HTMLAnchorElement_put_rev(IHTMLAnchorElement *iface, BSTR v)
176 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
177 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
181 static HRESULT WINAPI HTMLAnchorElement_get_rev(IHTMLAnchorElement *iface, BSTR *p)
183 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
184 FIXME("(%p)->(%p)\n", This, p);
188 static HRESULT WINAPI HTMLAnchorElement_put_urn(IHTMLAnchorElement *iface, BSTR v)
190 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
191 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
195 static HRESULT WINAPI HTMLAnchorElement_get_urn(IHTMLAnchorElement *iface, BSTR *p)
197 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
198 FIXME("(%p)->(%p)\n", This, p);
202 static HRESULT WINAPI HTMLAnchorElement_put_Methods(IHTMLAnchorElement *iface, BSTR v)
204 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
205 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
209 static HRESULT WINAPI HTMLAnchorElement_get_Methods(IHTMLAnchorElement *iface, BSTR *p)
211 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
212 FIXME("(%p)->(%p)\n", This, p);
216 static HRESULT WINAPI HTMLAnchorElement_put_name(IHTMLAnchorElement *iface, BSTR v)
218 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
219 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
223 static HRESULT WINAPI HTMLAnchorElement_get_name(IHTMLAnchorElement *iface, BSTR *p)
225 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
226 FIXME("(%p)->(%p)\n", This, p);
230 static HRESULT WINAPI HTMLAnchorElement_put_host(IHTMLAnchorElement *iface, BSTR v)
232 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
233 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
237 static HRESULT WINAPI HTMLAnchorElement_get_host(IHTMLAnchorElement *iface, BSTR *p)
239 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
240 FIXME("(%p)->(%p)\n", This, p);
244 static HRESULT WINAPI HTMLAnchorElement_put_hostname(IHTMLAnchorElement *iface, BSTR v)
246 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
247 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
251 static HRESULT WINAPI HTMLAnchorElement_get_hostname(IHTMLAnchorElement *iface, BSTR *p)
253 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
254 FIXME("(%p)->(%p)\n", This, p);
258 static HRESULT WINAPI HTMLAnchorElement_put_pathname(IHTMLAnchorElement *iface, BSTR v)
260 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
261 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
265 static HRESULT WINAPI HTMLAnchorElement_get_pathname(IHTMLAnchorElement *iface, BSTR *p)
267 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
268 FIXME("(%p)->(%p)\n", This, p);
272 static HRESULT WINAPI HTMLAnchorElement_put_port(IHTMLAnchorElement *iface, BSTR v)
274 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
275 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
279 static HRESULT WINAPI HTMLAnchorElement_get_port(IHTMLAnchorElement *iface, BSTR *p)
281 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
282 FIXME("(%p)->(%p)\n", This, p);
286 static HRESULT WINAPI HTMLAnchorElement_put_protocol(IHTMLAnchorElement *iface, BSTR v)
288 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
289 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
293 static HRESULT WINAPI HTMLAnchorElement_get_protocol(IHTMLAnchorElement *iface, BSTR *p)
295 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
296 FIXME("(%p)->(%p)\n", This, p);
300 static HRESULT WINAPI HTMLAnchorElement_put_search(IHTMLAnchorElement *iface, BSTR v)
302 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
303 FIXME("(%p)->(%p)\n", This, debugstr_w(v));
307 static HRESULT WINAPI HTMLAnchorElement_get_search(IHTMLAnchorElement *iface, BSTR *p)
309 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
310 FIXME("(%p)->(%p)\n", This, p);
314 static HRESULT WINAPI HTMLAnchorElement_put_hash(IHTMLAnchorElement *iface, BSTR v)
316 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
317 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
321 static HRESULT WINAPI HTMLAnchorElement_get_hash(IHTMLAnchorElement *iface, BSTR *p)
323 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
324 FIXME("(%p)->(%p)\n", This, p);
328 static HRESULT WINAPI HTMLAnchorElement_put_onblur(IHTMLAnchorElement *iface, VARIANT v)
330 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
331 FIXME("(%p)->()\n", This);
335 static HRESULT WINAPI HTMLAnchorElement_get_onblur(IHTMLAnchorElement *iface, VARIANT *p)
337 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
338 FIXME("(%p)->(%p)\n", This, p);
342 static HRESULT WINAPI HTMLAnchorElement_put_onfocus(IHTMLAnchorElement *iface, VARIANT v)
344 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
345 FIXME("(%p)->()\n", This);
349 static HRESULT WINAPI HTMLAnchorElement_get_onfocus(IHTMLAnchorElement *iface, VARIANT *p)
351 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
352 FIXME("(%p)->(%p)\n", This, p);
356 static HRESULT WINAPI HTMLAnchorElement_put_accessKey(IHTMLAnchorElement *iface, BSTR v)
358 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
359 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
363 static HRESULT WINAPI HTMLAnchorElement_get_accessKey(IHTMLAnchorElement *iface, BSTR *p)
365 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
366 FIXME("(%p)->(%p)\n", This, p);
370 static HRESULT WINAPI HTMLAnchorElement_get_protocolLong(IHTMLAnchorElement *iface, BSTR *p)
372 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
373 FIXME("(%p)->(%p)\n", This, p);
377 static HRESULT WINAPI HTMLAnchorElement_get_mimeType(IHTMLAnchorElement *iface, BSTR *p)
379 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
380 FIXME("(%p)->(%p)\n", This, p);
384 static HRESULT WINAPI HTMLAnchorElement_get_nameProp(IHTMLAnchorElement *iface, BSTR *p)
386 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
387 FIXME("(%p)->(%p)\n", This, p);
391 static HRESULT WINAPI HTMLAnchorElement_put_tabIndex(IHTMLAnchorElement *iface, short v)
393 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
394 FIXME("(%p)->()\n", This);
398 static HRESULT WINAPI HTMLAnchorElement_get_tabIndex(IHTMLAnchorElement *iface, short *p)
400 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
401 FIXME("(%p)->(%p)\n", This, p);
405 static HRESULT WINAPI HTMLAnchorElement_focus(IHTMLAnchorElement *iface)
407 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
408 FIXME("(%p)\n", This);
412 static HRESULT WINAPI HTMLAnchorElement_blur(IHTMLAnchorElement *iface)
414 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
415 FIXME("(%p)\n", This);
419 static void HTMLAnchorElement_destructor(IUnknown *iface)
421 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
425 static const IHTMLAnchorElementVtbl HTMLAnchorElementVtbl = {
426 HTMLAnchorElement_QueryInterface,
427 HTMLAnchorElement_AddRef,
428 HTMLAnchorElement_Release,
429 HTMLAnchorElement_GetTypeInfoCount,
430 HTMLAnchorElement_GetTypeInfo,
431 HTMLAnchorElement_GetIDsOfNames,
432 HTMLAnchorElement_Invoke,
433 HTMLAnchorElement_put_href,
434 HTMLAnchorElement_get_href,
435 HTMLAnchorElement_put_target,
436 HTMLAnchorElement_get_target,
437 HTMLAnchorElement_put_rel,
438 HTMLAnchorElement_get_rel,
439 HTMLAnchorElement_put_rev,
440 HTMLAnchorElement_get_rev,
441 HTMLAnchorElement_put_urn,
442 HTMLAnchorElement_get_urn,
443 HTMLAnchorElement_put_Methods,
444 HTMLAnchorElement_get_Methods,
445 HTMLAnchorElement_put_name,
446 HTMLAnchorElement_get_name,
447 HTMLAnchorElement_put_host,
448 HTMLAnchorElement_get_host,
449 HTMLAnchorElement_put_hostname,
450 HTMLAnchorElement_get_hostname,
451 HTMLAnchorElement_put_pathname,
452 HTMLAnchorElement_get_pathname,
453 HTMLAnchorElement_put_port,
454 HTMLAnchorElement_get_port,
455 HTMLAnchorElement_put_protocol,
456 HTMLAnchorElement_get_protocol,
457 HTMLAnchorElement_put_search,
458 HTMLAnchorElement_get_search,
459 HTMLAnchorElement_put_hash,
460 HTMLAnchorElement_get_hash,
461 HTMLAnchorElement_put_onblur,
462 HTMLAnchorElement_get_onblur,
463 HTMLAnchorElement_put_onfocus,
464 HTMLAnchorElement_get_onfocus,
465 HTMLAnchorElement_put_accessKey,
466 HTMLAnchorElement_get_accessKey,
467 HTMLAnchorElement_get_protocolLong,
468 HTMLAnchorElement_get_mimeType,
469 HTMLAnchorElement_get_nameProp,
470 HTMLAnchorElement_put_tabIndex,
471 HTMLAnchorElement_get_tabIndex,
472 HTMLAnchorElement_focus,
473 HTMLAnchorElement_blur
476 void HTMLAnchorElement_Create(HTMLElement *element)
478 HTMLAnchorElement *ret = mshtml_alloc(sizeof(HTMLAnchorElement));
480 ret->lpHTMLAnchorElementVtbl = &HTMLAnchorElementVtbl;
481 ret->element = element;
483 element->impl = (IUnknown*)HTMLANCHOR(ret);
484 element->destructor = HTMLAnchorElement_destructor;