Added a few more Unicode digits from Unicode version 4.1.
[wine] / dlls / shdocvw / dochost.c
1 /*
2  * Copyright 2005 Jacek Caban for CodeWeavers
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  * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  */
18
19 #include "wine/debug.h"
20 #include "shdocvw.h"
21
22 WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
23
24 #define DOCHOSTUI_THIS(iface) DEFINE_THIS(WebBrowser, DocHostUIHandler, iface)
25
26 static HRESULT WINAPI DocHostUIHandler_QueryInterface(IDocHostUIHandler2 *iface,
27                                                       REFIID riid, void **ppv)
28 {
29     WebBrowser *This = DOCHOSTUI_THIS(iface);
30     return IOleClientSite_QueryInterface(CLIENTSITE(This), riid, ppv);
31 }
32
33 static ULONG WINAPI DocHostUIHandler_AddRef(IDocHostUIHandler2 *iface)
34 {
35     WebBrowser *This = DOCHOSTUI_THIS(iface);
36     return IOleClientSite_AddRef(CLIENTSITE(This));
37 }
38
39 static ULONG WINAPI DocHostUIHandler_Release(IDocHostUIHandler2 *iface)
40 {
41     WebBrowser *This = DOCHOSTUI_THIS(iface);
42     return IOleClientSite_Release(CLIENTSITE(This));
43 }
44
45 static HRESULT WINAPI DocHostUIHandler_ShowContextMenu(IDocHostUIHandler2 *iface,
46          DWORD dwID, POINT *ppt, IUnknown *pcmdtReserved, IDispatch *pdispReserved)
47 {
48     WebBrowser *This = DOCHOSTUI_THIS(iface);
49     FIXME("(%p)->(%ld %p %p %p)\n", This, dwID, ppt, pcmdtReserved, pdispReserved);
50     return E_NOTIMPL;
51 }
52
53 static HRESULT WINAPI DocHostUIHandler_GetHostInfo(IDocHostUIHandler2 *iface,
54         DOCHOSTUIINFO *pInfo)
55 {
56     WebBrowser *This = DOCHOSTUI_THIS(iface);
57     FIXME("(%p)->(%p)\n", This, pInfo);
58     return E_NOTIMPL;
59 }
60
61 static HRESULT WINAPI DocHostUIHandler_ShowUI(IDocHostUIHandler2 *iface, DWORD dwID,
62         IOleInPlaceActiveObject *pActiveObject, IOleCommandTarget *pCommandTarget,
63         IOleInPlaceFrame *pFrame, IOleInPlaceUIWindow *pDoc)
64 {
65     WebBrowser *This = DOCHOSTUI_THIS(iface);
66     FIXME("(%p)->(%ld %p %p %p %p)\n", This, dwID, pActiveObject, pCommandTarget,
67           pFrame, pDoc);
68     return E_NOTIMPL;
69 }
70
71 static HRESULT WINAPI DocHostUIHandler_HideUI(IDocHostUIHandler2 *iface)
72 {
73     WebBrowser *This = DOCHOSTUI_THIS(iface);
74     FIXME("(%p)\n", This);
75     return E_NOTIMPL;
76 }
77
78 static HRESULT WINAPI DocHostUIHandler_UpdateUI(IDocHostUIHandler2 *iface)
79 {
80     WebBrowser *This = DOCHOSTUI_THIS(iface);
81     FIXME("(%p)\n", This);
82     return E_NOTIMPL;
83 }
84
85 static HRESULT WINAPI DocHostUIHandler_EnableModeless(IDocHostUIHandler2 *iface,
86                                                       BOOL fEnable)
87 {
88     WebBrowser *This = DOCHOSTUI_THIS(iface);
89     FIXME("(%p)->(%x)\n", This, fEnable);
90     return E_NOTIMPL;
91 }
92
93 static HRESULT WINAPI DocHostUIHandler_OnDocWindowActivate(IDocHostUIHandler2 *iface,
94                                                            BOOL fActivate)
95 {
96     WebBrowser *This = DOCHOSTUI_THIS(iface);
97     FIXME("(%p)->(%x)\n", This, fActivate);
98     return E_NOTIMPL;
99 }
100
101 static HRESULT WINAPI DocHostUIHandler_OnFrameWindowActivate(IDocHostUIHandler2 *iface,
102                                                              BOOL fActivate)
103 {
104     WebBrowser *This = DOCHOSTUI_THIS(iface);
105     FIXME("(%p)->(%x)\n", This, fActivate);
106     return E_NOTIMPL;
107 }
108
109 static HRESULT WINAPI DocHostUIHandler_ResizeBorder(IDocHostUIHandler2 *iface,
110         LPCRECT prcBorder, IOleInPlaceUIWindow *pUIWindow, BOOL fRameWindow)
111 {
112     WebBrowser *This = DOCHOSTUI_THIS(iface);
113     FIXME("(%p)->(%p %p %X)\n", This, prcBorder, pUIWindow, fRameWindow);
114     return E_NOTIMPL;
115 }
116
117 static HRESULT WINAPI DocHostUIHandler_TranslateAccelerator(IDocHostUIHandler2 *iface,
118         LPMSG lpMsg, const GUID *pguidCmdGroup, DWORD nCmdID)
119 {
120     WebBrowser *This = DOCHOSTUI_THIS(iface);
121     FIXME("(%p)->(%p %p %ld)\n", This, lpMsg, pguidCmdGroup, nCmdID);
122     return E_NOTIMPL;
123 }
124
125 static HRESULT WINAPI DocHostUIHandler_GetOptionKeyPath(IDocHostUIHandler2 *iface,
126         LPOLESTR *pchKey, DWORD dw)
127 {
128     WebBrowser *This = DOCHOSTUI_THIS(iface);
129     FIXME("(%p)->(%p %ld)\n", This, pchKey, dw);
130     return E_NOTIMPL;
131 }
132
133 static HRESULT WINAPI DocHostUIHandler_GetDropTarget(IDocHostUIHandler2 *iface,
134         IDropTarget *pDropTarget, IDropTarget **ppDropTarget)
135 {
136     WebBrowser *This = DOCHOSTUI_THIS(iface);
137     FIXME("(%p)\n", This);
138     return E_NOTIMPL;
139 }
140
141 static HRESULT WINAPI DocHostUIHandler_GetExternal(IDocHostUIHandler2 *iface,
142         IDispatch **ppDispatch)
143 {
144     WebBrowser *This = DOCHOSTUI_THIS(iface);
145     FIXME("(%p)->(%p)\n", This, ppDispatch);
146     return E_NOTIMPL;
147 }
148
149 static HRESULT WINAPI DocHostUIHandler_TranslateUrl(IDocHostUIHandler2 *iface,
150         DWORD dwTranslate, OLECHAR *pchURLIn, OLECHAR **ppchURLOut)
151 {
152     WebBrowser *This = DOCHOSTUI_THIS(iface);
153     FIXME("(%p)->(%ld %s %p)\n", This, dwTranslate, debugstr_w(pchURLIn), ppchURLOut);
154     return E_NOTIMPL;
155 }
156
157 static HRESULT WINAPI DocHostUIHandler_FilterDataObject(IDocHostUIHandler2 *iface,
158         IDataObject *pDO, IDataObject **ppDORet)
159 {
160     WebBrowser *This = DOCHOSTUI_THIS(iface);
161     FIXME("(%p)->(%p %p)\n", This, pDO, ppDORet);
162     return E_NOTIMPL;
163 }
164
165 static HRESULT WINAPI DocHostUIHandler_GetOverrideKeyPath(IDocHostUIHandler2 *iface,
166         LPOLESTR *pchKey, DWORD dw)
167 {
168     WebBrowser *This = DOCHOSTUI_THIS(iface);
169     FIXME("(%p)->(%p %ld)\n", This, pchKey, dw);
170     return E_NOTIMPL;
171 }
172
173 #undef DOCHOSTUI_THIS
174
175 static const IDocHostUIHandler2Vtbl DocHostUIHandler2Vtbl = {
176     DocHostUIHandler_QueryInterface,
177     DocHostUIHandler_AddRef,
178     DocHostUIHandler_Release,
179     DocHostUIHandler_ShowContextMenu,
180     DocHostUIHandler_GetHostInfo,
181     DocHostUIHandler_ShowUI,
182     DocHostUIHandler_HideUI,
183     DocHostUIHandler_UpdateUI,
184     DocHostUIHandler_EnableModeless,
185     DocHostUIHandler_OnDocWindowActivate,
186     DocHostUIHandler_OnFrameWindowActivate,
187     DocHostUIHandler_ResizeBorder,
188     DocHostUIHandler_TranslateAccelerator,
189     DocHostUIHandler_GetOptionKeyPath,
190     DocHostUIHandler_GetDropTarget,
191     DocHostUIHandler_GetExternal,
192     DocHostUIHandler_TranslateUrl,
193     DocHostUIHandler_FilterDataObject,
194     DocHostUIHandler_GetOverrideKeyPath
195 };
196
197 void WebBrowser_DocHost_Init(WebBrowser *This)
198 {
199     This->lpDocHostUIHandlerVtbl = &DocHostUIHandler2Vtbl;
200 }