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);
53 return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
56 static ULONG WINAPI HTMLAnchorElement_AddRef(IHTMLAnchorElement *iface)
58 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
60 return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
63 static ULONG WINAPI HTMLAnchorElement_Release(IHTMLAnchorElement *iface)
65 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
67 return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
70 static HRESULT WINAPI HTMLAnchorElement_GetTypeInfoCount(IHTMLAnchorElement *iface, UINT *pctinfo)
72 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
73 FIXME("(%p)->(%p)\n", This, pctinfo);
77 static HRESULT WINAPI HTMLAnchorElement_GetTypeInfo(IHTMLAnchorElement *iface, UINT iTInfo,
78 LCID lcid, ITypeInfo **ppTInfo)
80 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
81 FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
85 static HRESULT WINAPI HTMLAnchorElement_GetIDsOfNames(IHTMLAnchorElement *iface, REFIID riid,
86 LPOLESTR *rgszNames, UINT cNames,
87 LCID lcid, DISPID *rgDispId)
89 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
90 FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
95 static HRESULT WINAPI HTMLAnchorElement_Invoke(IHTMLAnchorElement *iface, DISPID dispIdMember,
96 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
97 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
99 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
100 FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
101 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
105 static HRESULT WINAPI HTMLAnchorElement_put_href(IHTMLAnchorElement *iface, BSTR v)
107 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
108 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
112 static HRESULT WINAPI HTMLAnchorElement_get_href(IHTMLAnchorElement *iface, BSTR *p)
114 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
115 FIXME("(%p)->(%p)\n", This, p);
119 static HRESULT WINAPI HTMLAnchorElement_put_target(IHTMLAnchorElement *iface, BSTR v)
121 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
122 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
126 static HRESULT WINAPI HTMLAnchorElement_get_target(IHTMLAnchorElement *iface, BSTR *p)
128 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
129 FIXME("(%p)->(%p)\n", This, p);
133 static HRESULT WINAPI HTMLAnchorElement_put_rel(IHTMLAnchorElement *iface, BSTR v)
135 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
136 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
140 static HRESULT WINAPI HTMLAnchorElement_get_rel(IHTMLAnchorElement *iface, BSTR *p)
142 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
143 FIXME("(%p)->(%p)\n", This, p);
147 static HRESULT WINAPI HTMLAnchorElement_put_rev(IHTMLAnchorElement *iface, BSTR v)
149 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
150 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
154 static HRESULT WINAPI HTMLAnchorElement_get_rev(IHTMLAnchorElement *iface, BSTR *p)
156 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
157 FIXME("(%p)->(%p)\n", This, p);
161 static HRESULT WINAPI HTMLAnchorElement_put_urn(IHTMLAnchorElement *iface, BSTR v)
163 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
164 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
168 static HRESULT WINAPI HTMLAnchorElement_get_urn(IHTMLAnchorElement *iface, BSTR *p)
170 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
171 FIXME("(%p)->(%p)\n", This, p);
175 static HRESULT WINAPI HTMLAnchorElement_put_Methods(IHTMLAnchorElement *iface, BSTR v)
177 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
178 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
182 static HRESULT WINAPI HTMLAnchorElement_get_Methods(IHTMLAnchorElement *iface, BSTR *p)
184 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
185 FIXME("(%p)->(%p)\n", This, p);
189 static HRESULT WINAPI HTMLAnchorElement_put_name(IHTMLAnchorElement *iface, BSTR v)
191 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
192 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
196 static HRESULT WINAPI HTMLAnchorElement_get_name(IHTMLAnchorElement *iface, BSTR *p)
198 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
199 FIXME("(%p)->(%p)\n", This, p);
203 static HRESULT WINAPI HTMLAnchorElement_put_host(IHTMLAnchorElement *iface, BSTR v)
205 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
206 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
210 static HRESULT WINAPI HTMLAnchorElement_get_host(IHTMLAnchorElement *iface, BSTR *p)
212 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
213 FIXME("(%p)->(%p)\n", This, p);
217 static HRESULT WINAPI HTMLAnchorElement_put_hostname(IHTMLAnchorElement *iface, BSTR v)
219 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
220 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
224 static HRESULT WINAPI HTMLAnchorElement_get_hostname(IHTMLAnchorElement *iface, BSTR *p)
226 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
227 FIXME("(%p)->(%p)\n", This, p);
231 static HRESULT WINAPI HTMLAnchorElement_put_pathname(IHTMLAnchorElement *iface, BSTR v)
233 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
234 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
238 static HRESULT WINAPI HTMLAnchorElement_get_pathname(IHTMLAnchorElement *iface, BSTR *p)
240 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
241 FIXME("(%p)->(%p)\n", This, p);
245 static HRESULT WINAPI HTMLAnchorElement_put_port(IHTMLAnchorElement *iface, BSTR v)
247 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
248 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
252 static HRESULT WINAPI HTMLAnchorElement_get_port(IHTMLAnchorElement *iface, BSTR *p)
254 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
255 FIXME("(%p)->(%p)\n", This, p);
259 static HRESULT WINAPI HTMLAnchorElement_put_protocol(IHTMLAnchorElement *iface, BSTR v)
261 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
262 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
266 static HRESULT WINAPI HTMLAnchorElement_get_protocol(IHTMLAnchorElement *iface, BSTR *p)
268 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
269 FIXME("(%p)->(%p)\n", This, p);
273 static HRESULT WINAPI HTMLAnchorElement_put_search(IHTMLAnchorElement *iface, BSTR v)
275 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
276 FIXME("(%p)->(%p)\n", This, debugstr_w(v));
280 static HRESULT WINAPI HTMLAnchorElement_get_search(IHTMLAnchorElement *iface, BSTR *p)
282 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
283 FIXME("(%p)->(%p)\n", This, p);
287 static HRESULT WINAPI HTMLAnchorElement_put_hash(IHTMLAnchorElement *iface, BSTR v)
289 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
290 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
294 static HRESULT WINAPI HTMLAnchorElement_get_hash(IHTMLAnchorElement *iface, BSTR *p)
296 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
297 FIXME("(%p)->(%p)\n", This, p);
301 static HRESULT WINAPI HTMLAnchorElement_put_onblur(IHTMLAnchorElement *iface, VARIANT v)
303 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
304 FIXME("(%p)->()\n", This);
308 static HRESULT WINAPI HTMLAnchorElement_get_onblur(IHTMLAnchorElement *iface, VARIANT *p)
310 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
311 FIXME("(%p)->(%p)\n", This, p);
315 static HRESULT WINAPI HTMLAnchorElement_put_onfocus(IHTMLAnchorElement *iface, VARIANT v)
317 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
318 FIXME("(%p)->()\n", This);
322 static HRESULT WINAPI HTMLAnchorElement_get_onfocus(IHTMLAnchorElement *iface, VARIANT *p)
324 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
325 FIXME("(%p)->(%p)\n", This, p);
329 static HRESULT WINAPI HTMLAnchorElement_put_accessKey(IHTMLAnchorElement *iface, BSTR v)
331 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
332 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
336 static HRESULT WINAPI HTMLAnchorElement_get_accessKey(IHTMLAnchorElement *iface, BSTR *p)
338 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
339 FIXME("(%p)->(%p)\n", This, p);
343 static HRESULT WINAPI HTMLAnchorElement_get_protocolLong(IHTMLAnchorElement *iface, BSTR *p)
345 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
346 FIXME("(%p)->(%p)\n", This, p);
350 static HRESULT WINAPI HTMLAnchorElement_get_mimeType(IHTMLAnchorElement *iface, BSTR *p)
352 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
353 FIXME("(%p)->(%p)\n", This, p);
357 static HRESULT WINAPI HTMLAnchorElement_get_nameProp(IHTMLAnchorElement *iface, BSTR *p)
359 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
360 FIXME("(%p)->(%p)\n", This, p);
364 static HRESULT WINAPI HTMLAnchorElement_put_tabIndex(IHTMLAnchorElement *iface, short v)
366 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
367 FIXME("(%p)->()\n", This);
371 static HRESULT WINAPI HTMLAnchorElement_get_tabIndex(IHTMLAnchorElement *iface, short *p)
373 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
374 FIXME("(%p)->(%p)\n", This, p);
378 static HRESULT WINAPI HTMLAnchorElement_focus(IHTMLAnchorElement *iface)
380 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
381 FIXME("(%p)\n", This);
385 static HRESULT WINAPI HTMLAnchorElement_blur(IHTMLAnchorElement *iface)
387 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
388 FIXME("(%p)\n", This);
392 #undef HTMLANCHOR_THIS
394 static const IHTMLAnchorElementVtbl HTMLAnchorElementVtbl = {
395 HTMLAnchorElement_QueryInterface,
396 HTMLAnchorElement_AddRef,
397 HTMLAnchorElement_Release,
398 HTMLAnchorElement_GetTypeInfoCount,
399 HTMLAnchorElement_GetTypeInfo,
400 HTMLAnchorElement_GetIDsOfNames,
401 HTMLAnchorElement_Invoke,
402 HTMLAnchorElement_put_href,
403 HTMLAnchorElement_get_href,
404 HTMLAnchorElement_put_target,
405 HTMLAnchorElement_get_target,
406 HTMLAnchorElement_put_rel,
407 HTMLAnchorElement_get_rel,
408 HTMLAnchorElement_put_rev,
409 HTMLAnchorElement_get_rev,
410 HTMLAnchorElement_put_urn,
411 HTMLAnchorElement_get_urn,
412 HTMLAnchorElement_put_Methods,
413 HTMLAnchorElement_get_Methods,
414 HTMLAnchorElement_put_name,
415 HTMLAnchorElement_get_name,
416 HTMLAnchorElement_put_host,
417 HTMLAnchorElement_get_host,
418 HTMLAnchorElement_put_hostname,
419 HTMLAnchorElement_get_hostname,
420 HTMLAnchorElement_put_pathname,
421 HTMLAnchorElement_get_pathname,
422 HTMLAnchorElement_put_port,
423 HTMLAnchorElement_get_port,
424 HTMLAnchorElement_put_protocol,
425 HTMLAnchorElement_get_protocol,
426 HTMLAnchorElement_put_search,
427 HTMLAnchorElement_get_search,
428 HTMLAnchorElement_put_hash,
429 HTMLAnchorElement_get_hash,
430 HTMLAnchorElement_put_onblur,
431 HTMLAnchorElement_get_onblur,
432 HTMLAnchorElement_put_onfocus,
433 HTMLAnchorElement_get_onfocus,
434 HTMLAnchorElement_put_accessKey,
435 HTMLAnchorElement_get_accessKey,
436 HTMLAnchorElement_get_protocolLong,
437 HTMLAnchorElement_get_mimeType,
438 HTMLAnchorElement_get_nameProp,
439 HTMLAnchorElement_put_tabIndex,
440 HTMLAnchorElement_get_tabIndex,
441 HTMLAnchorElement_focus,
442 HTMLAnchorElement_blur
445 #define HTMLANCHOR_NODE_THIS(iface) DEFINE_THIS2(HTMLAnchorElement, element.node, iface)
447 static HRESULT HTMLAnchorElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
449 HTMLAnchorElement *This = HTMLANCHOR_NODE_THIS(iface);
453 if(IsEqualGUID(&IID_IUnknown, riid)) {
454 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
455 *ppv = HTMLANCHOR(This);
456 }else if(IsEqualGUID(&IID_IDispatch, riid)) {
457 TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
458 *ppv = HTMLANCHOR(This);
459 }else if(IsEqualGUID(&IID_IHTMLAnchorElement, riid)) {
460 TRACE("(%p)->(IID_IHTMLAnchorElement %p)\n", This, ppv);
461 *ppv = HTMLANCHOR(This);
465 IUnknown_AddRef((IUnknown*)*ppv);
469 return HTMLElement_QI(&This->element.node, riid, ppv);
472 static void HTMLAnchorElement_destructor(HTMLDOMNode *iface)
474 HTMLAnchorElement *This = HTMLANCHOR_NODE_THIS(iface);
475 HTMLElement_destructor(&This->element.node);
478 #undef HTMLANCHOR_NODE_THIS
480 static const NodeImplVtbl HTMLAnchorElementImplVtbl = {
481 HTMLAnchorElement_QI,
482 HTMLAnchorElement_destructor
485 HTMLElement *HTMLAnchorElement_Create(nsIDOMHTMLElement *nselem)
487 HTMLAnchorElement *ret = heap_alloc(sizeof(HTMLAnchorElement));
489 HTMLElement_Init(&ret->element);
491 ret->lpHTMLAnchorElementVtbl = &HTMLAnchorElementVtbl;
492 ret->element.node.vtbl = &HTMLAnchorElementImplVtbl;
494 return &ret->element;