Add Korean translation.
[wine] / dlls / mshtml / hlink.c
1 /*
2  * Copyright 2005 Jacek Caban
3  *
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.
8  *
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.
13  *
14  * License along with this library; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16  */
17
18 #include "config.h"
19
20 #include <stdarg.h>
21 #include <stdio.h>
22
23 #define COBJMACROS
24
25 #include "windef.h"
26 #include "winbase.h"
27 #include "winuser.h"
28 #include "ole2.h"
29
30 #include "wine/debug.h"
31
32 #include "mshtml_private.h"
33
34 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
35
36 /**********************************************************
37  * IHlinkTarget implementation
38  */
39
40 #define HLINKTRG_THIS(iface) DEFINE_THIS(HTMLDocument, HlinkTarget, iface)
41
42 static HRESULT WINAPI HlinkTarget_QueryInterface(IHlinkTarget *iface, REFIID riid, void **ppv)
43 {
44     HTMLDocument *This = HLINKTRG_THIS(iface);
45     return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppv);
46 }
47
48 static ULONG WINAPI HlinkTarget_AddRef(IHlinkTarget *iface)
49 {
50     HTMLDocument *This = HLINKTRG_THIS(iface);
51     return IHTMLDocument2_AddRef(HTMLDOC(This));
52 }
53
54 static ULONG WINAPI HlinkTarget_Release(IHlinkTarget *iface)
55 {
56     HTMLDocument *This = HLINKTRG_THIS(iface);
57     return IHTMLDocument2_Release(HTMLDOC(This));
58 }
59
60 static HRESULT WINAPI HlinkTarget_SetBrowseContext(IHlinkTarget *iface, IHlinkBrowseContext *pihlbc)
61 {
62     HTMLDocument *This = HLINKTRG_THIS(iface);
63     FIXME("(%p)->(%p)\n", This, pihlbc);
64     return E_NOTIMPL;
65 }
66
67 static HRESULT WINAPI HlinkTarget_GetBrowseContext(IHlinkTarget *iface, IHlinkBrowseContext **ppihlbc)
68 {
69     HTMLDocument *This = HLINKTRG_THIS(iface);
70     FIXME("(%p)->(%p)\n", This, ppihlbc);
71     return E_NOTIMPL;
72 }
73
74 static HRESULT WINAPI HlinkTarget_Navigate(IHlinkTarget *iface, DWORD grfHLNF, LPCWSTR pwzJumpLocation)
75 {
76     HTMLDocument *This = HLINKTRG_THIS(iface);
77
78     TRACE("(%p)->(%08lx %s)\n", This, grfHLNF, debugstr_w(pwzJumpLocation));
79
80     if(grfHLNF)
81         FIXME("Unsupported grfHLNF=%08lx\n", grfHLNF);
82     if(pwzJumpLocation)
83         FIXME("JumpLocation not supported\n");
84
85     return IOleObject_DoVerb(OLEOBJ(This), OLEIVERB_SHOW, NULL, NULL, -1, NULL, NULL);
86 }
87
88 static HRESULT WINAPI HlinkTarget_GetMoniker(IHlinkTarget *iface, LPCWSTR pwzLocation, DWORD dwAssign,
89         IMoniker **ppimkLocation)
90 {
91     HTMLDocument *This = HLINKTRG_THIS(iface);
92     FIXME("(%p)->(%s %08lx %p)\n", This, debugstr_w(pwzLocation), dwAssign, ppimkLocation);
93     return E_NOTIMPL;
94 }
95
96 static HRESULT WINAPI HlinkTarget_GetFriendlyName(IHlinkTarget *iface, LPCWSTR pwzLocation,
97         LPWSTR *ppwzFriendlyName)
98 {
99     HTMLDocument *This = HLINKTRG_THIS(iface);
100     FIXME("(%p)->(%s %p)\n", This, debugstr_w(pwzLocation), ppwzFriendlyName);
101     return E_NOTIMPL;
102 }
103
104 static const IHlinkTargetVtbl HlinkTargetVtbl = {
105     HlinkTarget_QueryInterface,
106     HlinkTarget_AddRef,
107     HlinkTarget_Release,
108     HlinkTarget_SetBrowseContext,
109     HlinkTarget_GetBrowseContext,
110     HlinkTarget_Navigate,
111     HlinkTarget_GetMoniker,
112     HlinkTarget_GetFriendlyName
113 };
114
115 void HTMLDocument_Hlink_Init(HTMLDocument *This)
116 {
117     This->lpHlinkTargetVtbl = &HlinkTargetVtbl;
118 }