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);
41 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 return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
86 static ULONG WINAPI HTMLAnchorElement_Release(IHTMLAnchorElement *iface)
88 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
90 return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
93 static HRESULT WINAPI HTMLAnchorElement_GetTypeInfoCount(IHTMLAnchorElement *iface, UINT *pctinfo)
95 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
96 FIXME("(%p)->(%p)\n", This, pctinfo);
100 static HRESULT WINAPI HTMLAnchorElement_GetTypeInfo(IHTMLAnchorElement *iface, UINT iTInfo,
101 LCID lcid, ITypeInfo **ppTInfo)
103 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
104 FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
108 static HRESULT WINAPI HTMLAnchorElement_GetIDsOfNames(IHTMLAnchorElement *iface, REFIID riid,
109 LPOLESTR *rgszNames, UINT cNames,
110 LCID lcid, DISPID *rgDispId)
112 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
113 FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
118 static HRESULT WINAPI HTMLAnchorElement_Invoke(IHTMLAnchorElement *iface, DISPID dispIdMember,
119 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
120 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
122 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
123 FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
124 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
128 static HRESULT WINAPI HTMLAnchorElement_put_href(IHTMLAnchorElement *iface, BSTR v)
130 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
131 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
135 static HRESULT WINAPI HTMLAnchorElement_get_href(IHTMLAnchorElement *iface, BSTR *p)
137 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
138 FIXME("(%p)->(%p)\n", This, p);
142 static HRESULT WINAPI HTMLAnchorElement_put_target(IHTMLAnchorElement *iface, BSTR v)
144 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
145 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
149 static HRESULT WINAPI HTMLAnchorElement_get_target(IHTMLAnchorElement *iface, BSTR *p)
151 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
152 FIXME("(%p)->(%p)\n", This, p);
156 static HRESULT WINAPI HTMLAnchorElement_put_rel(IHTMLAnchorElement *iface, BSTR v)
158 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
159 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
163 static HRESULT WINAPI HTMLAnchorElement_get_rel(IHTMLAnchorElement *iface, BSTR *p)
165 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
166 FIXME("(%p)->(%p)\n", This, p);
170 static HRESULT WINAPI HTMLAnchorElement_put_rev(IHTMLAnchorElement *iface, BSTR v)
172 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
173 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
177 static HRESULT WINAPI HTMLAnchorElement_get_rev(IHTMLAnchorElement *iface, BSTR *p)
179 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
180 FIXME("(%p)->(%p)\n", This, p);
184 static HRESULT WINAPI HTMLAnchorElement_put_urn(IHTMLAnchorElement *iface, BSTR v)
186 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
187 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
191 static HRESULT WINAPI HTMLAnchorElement_get_urn(IHTMLAnchorElement *iface, BSTR *p)
193 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
194 FIXME("(%p)->(%p)\n", This, p);
198 static HRESULT WINAPI HTMLAnchorElement_put_Methods(IHTMLAnchorElement *iface, BSTR v)
200 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
201 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
205 static HRESULT WINAPI HTMLAnchorElement_get_Methods(IHTMLAnchorElement *iface, BSTR *p)
207 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
208 FIXME("(%p)->(%p)\n", This, p);
212 static HRESULT WINAPI HTMLAnchorElement_put_name(IHTMLAnchorElement *iface, BSTR v)
214 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
215 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
219 static HRESULT WINAPI HTMLAnchorElement_get_name(IHTMLAnchorElement *iface, BSTR *p)
221 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
222 FIXME("(%p)->(%p)\n", This, p);
226 static HRESULT WINAPI HTMLAnchorElement_put_host(IHTMLAnchorElement *iface, BSTR v)
228 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
229 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
233 static HRESULT WINAPI HTMLAnchorElement_get_host(IHTMLAnchorElement *iface, BSTR *p)
235 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
236 FIXME("(%p)->(%p)\n", This, p);
240 static HRESULT WINAPI HTMLAnchorElement_put_hostname(IHTMLAnchorElement *iface, BSTR v)
242 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
243 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
247 static HRESULT WINAPI HTMLAnchorElement_get_hostname(IHTMLAnchorElement *iface, BSTR *p)
249 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
250 FIXME("(%p)->(%p)\n", This, p);
254 static HRESULT WINAPI HTMLAnchorElement_put_pathname(IHTMLAnchorElement *iface, BSTR v)
256 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
257 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
261 static HRESULT WINAPI HTMLAnchorElement_get_pathname(IHTMLAnchorElement *iface, BSTR *p)
263 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
264 FIXME("(%p)->(%p)\n", This, p);
268 static HRESULT WINAPI HTMLAnchorElement_put_port(IHTMLAnchorElement *iface, BSTR v)
270 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
271 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
275 static HRESULT WINAPI HTMLAnchorElement_get_port(IHTMLAnchorElement *iface, BSTR *p)
277 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
278 FIXME("(%p)->(%p)\n", This, p);
282 static HRESULT WINAPI HTMLAnchorElement_put_protocol(IHTMLAnchorElement *iface, BSTR v)
284 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
285 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
289 static HRESULT WINAPI HTMLAnchorElement_get_protocol(IHTMLAnchorElement *iface, BSTR *p)
291 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
292 FIXME("(%p)->(%p)\n", This, p);
296 static HRESULT WINAPI HTMLAnchorElement_put_search(IHTMLAnchorElement *iface, BSTR v)
298 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
299 FIXME("(%p)->(%p)\n", This, debugstr_w(v));
303 static HRESULT WINAPI HTMLAnchorElement_get_search(IHTMLAnchorElement *iface, BSTR *p)
305 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
306 FIXME("(%p)->(%p)\n", This, p);
310 static HRESULT WINAPI HTMLAnchorElement_put_hash(IHTMLAnchorElement *iface, BSTR v)
312 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
313 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
317 static HRESULT WINAPI HTMLAnchorElement_get_hash(IHTMLAnchorElement *iface, BSTR *p)
319 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
320 FIXME("(%p)->(%p)\n", This, p);
324 static HRESULT WINAPI HTMLAnchorElement_put_onblur(IHTMLAnchorElement *iface, VARIANT v)
326 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
327 FIXME("(%p)->()\n", This);
331 static HRESULT WINAPI HTMLAnchorElement_get_onblur(IHTMLAnchorElement *iface, VARIANT *p)
333 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
334 FIXME("(%p)->(%p)\n", This, p);
338 static HRESULT WINAPI HTMLAnchorElement_put_onfocus(IHTMLAnchorElement *iface, VARIANT v)
340 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
341 FIXME("(%p)->()\n", This);
345 static HRESULT WINAPI HTMLAnchorElement_get_onfocus(IHTMLAnchorElement *iface, VARIANT *p)
347 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
348 FIXME("(%p)->(%p)\n", This, p);
352 static HRESULT WINAPI HTMLAnchorElement_put_accessKey(IHTMLAnchorElement *iface, BSTR v)
354 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
355 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
359 static HRESULT WINAPI HTMLAnchorElement_get_accessKey(IHTMLAnchorElement *iface, BSTR *p)
361 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
362 FIXME("(%p)->(%p)\n", This, p);
366 static HRESULT WINAPI HTMLAnchorElement_get_protocolLong(IHTMLAnchorElement *iface, BSTR *p)
368 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
369 FIXME("(%p)->(%p)\n", This, p);
373 static HRESULT WINAPI HTMLAnchorElement_get_mimeType(IHTMLAnchorElement *iface, BSTR *p)
375 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
376 FIXME("(%p)->(%p)\n", This, p);
380 static HRESULT WINAPI HTMLAnchorElement_get_nameProp(IHTMLAnchorElement *iface, BSTR *p)
382 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
383 FIXME("(%p)->(%p)\n", This, p);
387 static HRESULT WINAPI HTMLAnchorElement_put_tabIndex(IHTMLAnchorElement *iface, short v)
389 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
390 FIXME("(%p)->()\n", This);
394 static HRESULT WINAPI HTMLAnchorElement_get_tabIndex(IHTMLAnchorElement *iface, short *p)
396 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
397 FIXME("(%p)->(%p)\n", This, p);
401 static HRESULT WINAPI HTMLAnchorElement_focus(IHTMLAnchorElement *iface)
403 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
404 FIXME("(%p)\n", This);
408 static HRESULT WINAPI HTMLAnchorElement_blur(IHTMLAnchorElement *iface)
410 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
411 FIXME("(%p)\n", This);
415 static void HTMLAnchorElement_destructor(IUnknown *iface)
417 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
421 static const IHTMLAnchorElementVtbl HTMLAnchorElementVtbl = {
422 HTMLAnchorElement_QueryInterface,
423 HTMLAnchorElement_AddRef,
424 HTMLAnchorElement_Release,
425 HTMLAnchorElement_GetTypeInfoCount,
426 HTMLAnchorElement_GetTypeInfo,
427 HTMLAnchorElement_GetIDsOfNames,
428 HTMLAnchorElement_Invoke,
429 HTMLAnchorElement_put_href,
430 HTMLAnchorElement_get_href,
431 HTMLAnchorElement_put_target,
432 HTMLAnchorElement_get_target,
433 HTMLAnchorElement_put_rel,
434 HTMLAnchorElement_get_rel,
435 HTMLAnchorElement_put_rev,
436 HTMLAnchorElement_get_rev,
437 HTMLAnchorElement_put_urn,
438 HTMLAnchorElement_get_urn,
439 HTMLAnchorElement_put_Methods,
440 HTMLAnchorElement_get_Methods,
441 HTMLAnchorElement_put_name,
442 HTMLAnchorElement_get_name,
443 HTMLAnchorElement_put_host,
444 HTMLAnchorElement_get_host,
445 HTMLAnchorElement_put_hostname,
446 HTMLAnchorElement_get_hostname,
447 HTMLAnchorElement_put_pathname,
448 HTMLAnchorElement_get_pathname,
449 HTMLAnchorElement_put_port,
450 HTMLAnchorElement_get_port,
451 HTMLAnchorElement_put_protocol,
452 HTMLAnchorElement_get_protocol,
453 HTMLAnchorElement_put_search,
454 HTMLAnchorElement_get_search,
455 HTMLAnchorElement_put_hash,
456 HTMLAnchorElement_get_hash,
457 HTMLAnchorElement_put_onblur,
458 HTMLAnchorElement_get_onblur,
459 HTMLAnchorElement_put_onfocus,
460 HTMLAnchorElement_get_onfocus,
461 HTMLAnchorElement_put_accessKey,
462 HTMLAnchorElement_get_accessKey,
463 HTMLAnchorElement_get_protocolLong,
464 HTMLAnchorElement_get_mimeType,
465 HTMLAnchorElement_get_nameProp,
466 HTMLAnchorElement_put_tabIndex,
467 HTMLAnchorElement_get_tabIndex,
468 HTMLAnchorElement_focus,
469 HTMLAnchorElement_blur
472 HTMLElement *HTMLAnchorElement_Create(nsIDOMHTMLElement *nselem)
474 HTMLAnchorElement *ret = mshtml_alloc(sizeof(HTMLAnchorElement));
476 ret->lpHTMLAnchorElementVtbl = &HTMLAnchorElementVtbl;
478 ret->element.impl = (IUnknown*)HTMLANCHOR(ret);
479 ret->element.destructor = HTMLAnchorElement_destructor;
481 return &ret->element;