change default iSmCaptionWidth to 12
[wine/kumbayo.git] / dlls / mshtml / htmlanchor.c
blob41b71e77a6071ad9dfa853797ef6e89342267094
1 /*
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
19 #include "config.h"
21 #include <stdarg.h>
22 #include <stdio.h>
24 #define COBJMACROS
26 #include "windef.h"
27 #include "winbase.h"
28 #include "winuser.h"
29 #include "winnls.h"
30 #include "ole2.h"
32 #include "wine/debug.h"
34 #include "mshtml_private.h"
36 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
38 typedef struct {
39 HTMLElement element;
41 const IHTMLAnchorElementVtbl *lpHTMLAnchorElementVtbl;
42 } HTMLAnchorElement;
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);
74 return E_NOTIMPL;
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);
82 return E_NOTIMPL;
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,
91 lcid, rgDispId);
92 return E_NOTIMPL;
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);
102 return E_NOTIMPL;
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));
109 return E_NOTIMPL;
112 static HRESULT WINAPI HTMLAnchorElement_get_href(IHTMLAnchorElement *iface, BSTR *p)
114 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
115 FIXME("(%p)->(%p)\n", This, p);
116 return E_NOTIMPL;
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));
123 return E_NOTIMPL;
126 static HRESULT WINAPI HTMLAnchorElement_get_target(IHTMLAnchorElement *iface, BSTR *p)
128 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
129 FIXME("(%p)->(%p)\n", This, p);
130 return E_NOTIMPL;
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));
137 return E_NOTIMPL;
140 static HRESULT WINAPI HTMLAnchorElement_get_rel(IHTMLAnchorElement *iface, BSTR *p)
142 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
143 FIXME("(%p)->(%p)\n", This, p);
144 return E_NOTIMPL;
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));
151 return E_NOTIMPL;
154 static HRESULT WINAPI HTMLAnchorElement_get_rev(IHTMLAnchorElement *iface, BSTR *p)
156 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
157 FIXME("(%p)->(%p)\n", This, p);
158 return E_NOTIMPL;
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));
165 return E_NOTIMPL;
168 static HRESULT WINAPI HTMLAnchorElement_get_urn(IHTMLAnchorElement *iface, BSTR *p)
170 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
171 FIXME("(%p)->(%p)\n", This, p);
172 return E_NOTIMPL;
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));
179 return E_NOTIMPL;
182 static HRESULT WINAPI HTMLAnchorElement_get_Methods(IHTMLAnchorElement *iface, BSTR *p)
184 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
185 FIXME("(%p)->(%p)\n", This, p);
186 return E_NOTIMPL;
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));
193 return E_NOTIMPL;
196 static HRESULT WINAPI HTMLAnchorElement_get_name(IHTMLAnchorElement *iface, BSTR *p)
198 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
199 FIXME("(%p)->(%p)\n", This, p);
200 return E_NOTIMPL;
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));
207 return E_NOTIMPL;
210 static HRESULT WINAPI HTMLAnchorElement_get_host(IHTMLAnchorElement *iface, BSTR *p)
212 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
213 FIXME("(%p)->(%p)\n", This, p);
214 return E_NOTIMPL;
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));
221 return E_NOTIMPL;
224 static HRESULT WINAPI HTMLAnchorElement_get_hostname(IHTMLAnchorElement *iface, BSTR *p)
226 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
227 FIXME("(%p)->(%p)\n", This, p);
228 return E_NOTIMPL;
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));
235 return E_NOTIMPL;
238 static HRESULT WINAPI HTMLAnchorElement_get_pathname(IHTMLAnchorElement *iface, BSTR *p)
240 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
241 FIXME("(%p)->(%p)\n", This, p);
242 return E_NOTIMPL;
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));
249 return E_NOTIMPL;
252 static HRESULT WINAPI HTMLAnchorElement_get_port(IHTMLAnchorElement *iface, BSTR *p)
254 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
255 FIXME("(%p)->(%p)\n", This, p);
256 return E_NOTIMPL;
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));
263 return E_NOTIMPL;
266 static HRESULT WINAPI HTMLAnchorElement_get_protocol(IHTMLAnchorElement *iface, BSTR *p)
268 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
269 FIXME("(%p)->(%p)\n", This, p);
270 return E_NOTIMPL;
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));
277 return E_NOTIMPL;
280 static HRESULT WINAPI HTMLAnchorElement_get_search(IHTMLAnchorElement *iface, BSTR *p)
282 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
283 FIXME("(%p)->(%p)\n", This, p);
284 return E_NOTIMPL;
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));
291 return E_NOTIMPL;
294 static HRESULT WINAPI HTMLAnchorElement_get_hash(IHTMLAnchorElement *iface, BSTR *p)
296 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
297 FIXME("(%p)->(%p)\n", This, p);
298 return E_NOTIMPL;
301 static HRESULT WINAPI HTMLAnchorElement_put_onblur(IHTMLAnchorElement *iface, VARIANT v)
303 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
304 FIXME("(%p)->()\n", This);
305 return E_NOTIMPL;
308 static HRESULT WINAPI HTMLAnchorElement_get_onblur(IHTMLAnchorElement *iface, VARIANT *p)
310 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
311 FIXME("(%p)->(%p)\n", This, p);
312 return E_NOTIMPL;
315 static HRESULT WINAPI HTMLAnchorElement_put_onfocus(IHTMLAnchorElement *iface, VARIANT v)
317 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
318 FIXME("(%p)->()\n", This);
319 return E_NOTIMPL;
322 static HRESULT WINAPI HTMLAnchorElement_get_onfocus(IHTMLAnchorElement *iface, VARIANT *p)
324 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
325 FIXME("(%p)->(%p)\n", This, p);
326 return E_NOTIMPL;
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));
333 return E_NOTIMPL;
336 static HRESULT WINAPI HTMLAnchorElement_get_accessKey(IHTMLAnchorElement *iface, BSTR *p)
338 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
339 FIXME("(%p)->(%p)\n", This, p);
340 return E_NOTIMPL;
343 static HRESULT WINAPI HTMLAnchorElement_get_protocolLong(IHTMLAnchorElement *iface, BSTR *p)
345 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
346 FIXME("(%p)->(%p)\n", This, p);
347 return E_NOTIMPL;
350 static HRESULT WINAPI HTMLAnchorElement_get_mimeType(IHTMLAnchorElement *iface, BSTR *p)
352 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
353 FIXME("(%p)->(%p)\n", This, p);
354 return E_NOTIMPL;
357 static HRESULT WINAPI HTMLAnchorElement_get_nameProp(IHTMLAnchorElement *iface, BSTR *p)
359 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
360 FIXME("(%p)->(%p)\n", This, p);
361 return E_NOTIMPL;
364 static HRESULT WINAPI HTMLAnchorElement_put_tabIndex(IHTMLAnchorElement *iface, short v)
366 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
367 FIXME("(%p)->()\n", This);
368 return E_NOTIMPL;
371 static HRESULT WINAPI HTMLAnchorElement_get_tabIndex(IHTMLAnchorElement *iface, short *p)
373 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
374 FIXME("(%p)->(%p)\n", This, p);
375 return E_NOTIMPL;
378 static HRESULT WINAPI HTMLAnchorElement_focus(IHTMLAnchorElement *iface)
380 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
381 FIXME("(%p)\n", This);
382 return E_NOTIMPL;
385 static HRESULT WINAPI HTMLAnchorElement_blur(IHTMLAnchorElement *iface)
387 HTMLAnchorElement *This = HTMLANCHOR_THIS(iface);
388 FIXME("(%p)\n", This);
389 return E_NOTIMPL;
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);
451 *ppv = NULL;
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);
464 if(*ppv) {
465 IUnknown_AddRef((IUnknown*)*ppv);
466 return S_OK;
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;