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
29 #include "wine/debug.h"
31 #include "mshtml_private.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
38 const IHTMLAnchorElementVtbl *lpHTMLAnchorElementVtbl;
41 #define HTMLANCHOR(x) ((IHTMLAnchorElement*) &(x)->lpHTMLAnchorElementVtbl)
43 #define HTMLANCHOR_THIS(iface) DEFINE_THIS(HTMLAnchorElement, HTMLAnchorElement, iface)
45 static HRESULT WINAPI HTMLAnchorElement_QueryInterface(IHTMLAnchorElement *iface,
46 REFIID riid, void **ppv)
48 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
50 return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
53 static ULONG WINAPI HTMLAnchorElement_AddRef(IHTMLAnchorElement *iface)
55 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
57 return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
60 static ULONG WINAPI HTMLAnchorElement_Release(IHTMLAnchorElement *iface)
62 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
64 return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
67 static HRESULT WINAPI HTMLAnchorElement_GetTypeInfoCount(IHTMLAnchorElement *iface, UINT *pctinfo)
69 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
70 FIXME("(%p)->(%p)\n", This, pctinfo);
74 static HRESULT WINAPI HTMLAnchorElement_GetTypeInfo(IHTMLAnchorElement *iface, UINT iTInfo,
75 LCID lcid, ITypeInfo **ppTInfo)
77 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
78 FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
82 static HRESULT WINAPI HTMLAnchorElement_GetIDsOfNames(IHTMLAnchorElement *iface, REFIID riid,
83 LPOLESTR *rgszNames, UINT cNames,
84 LCID lcid, DISPID *rgDispId)
86 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
87 FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
92 static HRESULT WINAPI HTMLAnchorElement_Invoke(IHTMLAnchorElement *iface, DISPID dispIdMember,
93 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
94 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
96 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
97 FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
98 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
102 static HRESULT WINAPI HTMLAnchorElement_put_href(IHTMLAnchorElement *iface, BSTR v)
104 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
105 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
109 static HRESULT WINAPI HTMLAnchorElement_get_href(IHTMLAnchorElement *iface, BSTR *p)
111 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
112 FIXME("(%p)->(%p)\n", This, p);
116 static HRESULT WINAPI HTMLAnchorElement_put_target(IHTMLAnchorElement *iface, BSTR v)
118 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
119 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
123 static HRESULT WINAPI HTMLAnchorElement_get_target(IHTMLAnchorElement *iface, BSTR *p)
125 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
126 FIXME("(%p)->(%p)\n", This, p);
130 static HRESULT WINAPI HTMLAnchorElement_put_rel(IHTMLAnchorElement *iface, BSTR v)
132 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
133 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
137 static HRESULT WINAPI HTMLAnchorElement_get_rel(IHTMLAnchorElement *iface, BSTR *p)
139 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
140 FIXME("(%p)->(%p)\n", This, p);
144 static HRESULT WINAPI HTMLAnchorElement_put_rev(IHTMLAnchorElement *iface, BSTR v)
146 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
147 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
151 static HRESULT WINAPI HTMLAnchorElement_get_rev(IHTMLAnchorElement *iface, BSTR *p)
153 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
154 FIXME("(%p)->(%p)\n", This, p);
158 static HRESULT WINAPI HTMLAnchorElement_put_urn(IHTMLAnchorElement *iface, BSTR v)
160 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
161 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
165 static HRESULT WINAPI HTMLAnchorElement_get_urn(IHTMLAnchorElement *iface, BSTR *p)
167 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
168 FIXME("(%p)->(%p)\n", This, p);
172 static HRESULT WINAPI HTMLAnchorElement_put_Methods(IHTMLAnchorElement *iface, BSTR v)
174 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
175 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
179 static HRESULT WINAPI HTMLAnchorElement_get_Methods(IHTMLAnchorElement *iface, BSTR *p)
181 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
182 FIXME("(%p)->(%p)\n", This, p);
186 static HRESULT WINAPI HTMLAnchorElement_put_name(IHTMLAnchorElement *iface, BSTR v)
188 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
189 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
193 static HRESULT WINAPI HTMLAnchorElement_get_name(IHTMLAnchorElement *iface, BSTR *p)
195 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
196 FIXME("(%p)->(%p)\n", This, p);
200 static HRESULT WINAPI HTMLAnchorElement_put_host(IHTMLAnchorElement *iface, BSTR v)
202 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
203 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
207 static HRESULT WINAPI HTMLAnchorElement_get_host(IHTMLAnchorElement *iface, BSTR *p)
209 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
210 FIXME("(%p)->(%p)\n", This, p);
214 static HRESULT WINAPI HTMLAnchorElement_put_hostname(IHTMLAnchorElement *iface, BSTR v)
216 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
217 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
221 static HRESULT WINAPI HTMLAnchorElement_get_hostname(IHTMLAnchorElement *iface, BSTR *p)
223 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
224 FIXME("(%p)->(%p)\n", This, p);
228 static HRESULT WINAPI HTMLAnchorElement_put_pathname(IHTMLAnchorElement *iface, BSTR v)
230 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
231 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
235 static HRESULT WINAPI HTMLAnchorElement_get_pathname(IHTMLAnchorElement *iface, BSTR *p)
237 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
238 FIXME("(%p)->(%p)\n", This, p);
242 static HRESULT WINAPI HTMLAnchorElement_put_port(IHTMLAnchorElement *iface, BSTR v)
244 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
245 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
249 static HRESULT WINAPI HTMLAnchorElement_get_port(IHTMLAnchorElement *iface, BSTR *p)
251 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
252 FIXME("(%p)->(%p)\n", This, p);
256 static HRESULT WINAPI HTMLAnchorElement_put_protocol(IHTMLAnchorElement *iface, BSTR v)
258 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
259 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
263 static HRESULT WINAPI HTMLAnchorElement_get_protocol(IHTMLAnchorElement *iface, BSTR *p)
265 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
266 FIXME("(%p)->(%p)\n", This, p);
270 static HRESULT WINAPI HTMLAnchorElement_put_search(IHTMLAnchorElement *iface, BSTR v)
272 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
273 FIXME("(%p)->(%p)\n", This, debugstr_w(v));
277 static HRESULT WINAPI HTMLAnchorElement_get_search(IHTMLAnchorElement *iface, BSTR *p)
279 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
280 FIXME("(%p)->(%p)\n", This, p);
284 static HRESULT WINAPI HTMLAnchorElement_put_hash(IHTMLAnchorElement *iface, BSTR v)
286 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
287 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
291 static HRESULT WINAPI HTMLAnchorElement_get_hash(IHTMLAnchorElement *iface, BSTR *p)
293 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
294 FIXME("(%p)->(%p)\n", This, p);
298 static HRESULT WINAPI HTMLAnchorElement_put_onblur(IHTMLAnchorElement *iface, VARIANT v)
300 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
301 FIXME("(%p)->()\n", This);
305 static HRESULT WINAPI HTMLAnchorElement_get_onblur(IHTMLAnchorElement *iface, VARIANT *p)
307 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
308 FIXME("(%p)->(%p)\n", This, p);
312 static HRESULT WINAPI HTMLAnchorElement_put_onfocus(IHTMLAnchorElement *iface, VARIANT v)
314 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
315 FIXME("(%p)->()\n", This);
319 static HRESULT WINAPI HTMLAnchorElement_get_onfocus(IHTMLAnchorElement *iface, VARIANT *p)
321 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
322 FIXME("(%p)->(%p)\n", This, p);
326 static HRESULT WINAPI HTMLAnchorElement_put_accessKey(IHTMLAnchorElement *iface, BSTR v)
328 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
329 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
333 static HRESULT WINAPI HTMLAnchorElement_get_accessKey(IHTMLAnchorElement *iface, BSTR *p)
335 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
336 FIXME("(%p)->(%p)\n", This, p);
340 static HRESULT WINAPI HTMLAnchorElement_get_protocolLong(IHTMLAnchorElement *iface, BSTR *p)
342 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
343 FIXME("(%p)->(%p)\n", This, p);
347 static HRESULT WINAPI HTMLAnchorElement_get_mimeType(IHTMLAnchorElement *iface, BSTR *p)
349 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
350 FIXME("(%p)->(%p)\n", This, p);
354 static HRESULT WINAPI HTMLAnchorElement_get_nameProp(IHTMLAnchorElement *iface, BSTR *p)
356 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
357 FIXME("(%p)->(%p)\n", This, p);
361 static HRESULT WINAPI HTMLAnchorElement_put_tabIndex(IHTMLAnchorElement *iface, short v)
363 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
364 FIXME("(%p)->()\n", This);
368 static HRESULT WINAPI HTMLAnchorElement_get_tabIndex(IHTMLAnchorElement *iface, short *p)
370 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
371 FIXME("(%p)->(%p)\n", This, p);
375 static HRESULT WINAPI HTMLAnchorElement_focus(IHTMLAnchorElement *iface)
377 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
378 FIXME("(%p)\n", This);
382 static HRESULT WINAPI HTMLAnchorElement_blur(IHTMLAnchorElement *iface)
384 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
385 FIXME("(%p)\n", This);
389 #undef HTMLANCHOR_THIS
391 static const IHTMLAnchorElementVtbl HTMLAnchorElementVtbl = {
392 HTMLAnchorElement_QueryInterface,
393 HTMLAnchorElement_AddRef,
394 HTMLAnchorElement_Release,
395 HTMLAnchorElement_GetTypeInfoCount,
396 HTMLAnchorElement_GetTypeInfo,
397 HTMLAnchorElement_GetIDsOfNames,
398 HTMLAnchorElement_Invoke,
399 HTMLAnchorElement_put_href,
400 HTMLAnchorElement_get_href,
401 HTMLAnchorElement_put_target,
402 HTMLAnchorElement_get_target,
403 HTMLAnchorElement_put_rel,
404 HTMLAnchorElement_get_rel,
405 HTMLAnchorElement_put_rev,
406 HTMLAnchorElement_get_rev,
407 HTMLAnchorElement_put_urn,
408 HTMLAnchorElement_get_urn,
409 HTMLAnchorElement_put_Methods,
410 HTMLAnchorElement_get_Methods,
411 HTMLAnchorElement_put_name,
412 HTMLAnchorElement_get_name,
413 HTMLAnchorElement_put_host,
414 HTMLAnchorElement_get_host,
415 HTMLAnchorElement_put_hostname,
416 HTMLAnchorElement_get_hostname,
417 HTMLAnchorElement_put_pathname,
418 HTMLAnchorElement_get_pathname,
419 HTMLAnchorElement_put_port,
420 HTMLAnchorElement_get_port,
421 HTMLAnchorElement_put_protocol,
422 HTMLAnchorElement_get_protocol,
423 HTMLAnchorElement_put_search,
424 HTMLAnchorElement_get_search,
425 HTMLAnchorElement_put_hash,
426 HTMLAnchorElement_get_hash,
427 HTMLAnchorElement_put_onblur,
428 HTMLAnchorElement_get_onblur,
429 HTMLAnchorElement_put_onfocus,
430 HTMLAnchorElement_get_onfocus,
431 HTMLAnchorElement_put_accessKey,
432 HTMLAnchorElement_get_accessKey,
433 HTMLAnchorElement_get_protocolLong,
434 HTMLAnchorElement_get_mimeType,
435 HTMLAnchorElement_get_nameProp,
436 HTMLAnchorElement_put_tabIndex,
437 HTMLAnchorElement_get_tabIndex,
438 HTMLAnchorElement_focus,
439 HTMLAnchorElement_blur
442 #define HTMLANCHOR_NODE_THIS(iface) DEFINE_THIS2(HTMLAnchorElement, element.node, iface)
444 static HRESULT HTMLAnchorElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
446 HTMLAnchorElement *This = HTMLANCHOR_NODE_THIS(iface);
450 if(IsEqualGUID(&IID_IUnknown, riid)) {
451 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
452 *ppv = HTMLANCHOR(This);
453 }else if(IsEqualGUID(&IID_IDispatch, riid)) {
454 TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
455 *ppv = HTMLANCHOR(This);
456 }else if(IsEqualGUID(&IID_IHTMLAnchorElement, riid)) {
457 TRACE("(%p)->(IID_IHTMLAnchorElement %p)\n", This, ppv);
458 *ppv = HTMLANCHOR(This);
462 IUnknown_AddRef((IUnknown*)*ppv);
466 return HTMLElement_QI(&This->element.node, riid, ppv);
469 static void HTMLAnchorElement_destructor(HTMLDOMNode *iface)
471 HTMLAnchorElement *This = HTMLANCHOR_NODE_THIS(iface);
472 HTMLElement_destructor(&This->element.node);
475 #undef HTMLANCHOR_NODE_THIS
477 static const NodeImplVtbl HTMLAnchorElementImplVtbl = {
478 HTMLAnchorElement_QI,
479 HTMLAnchorElement_destructor
482 HTMLElement *HTMLAnchorElement_Create(nsIDOMHTMLElement *nselem)
484 HTMLAnchorElement *ret = heap_alloc_zero(sizeof(HTMLAnchorElement));
486 HTMLElement_Init(&ret->element);
488 ret->lpHTMLAnchorElementVtbl = &HTMLAnchorElementVtbl;
489 ret->element.node.vtbl = &HTMLAnchorElementImplVtbl;
491 return &ret->element;