2 * Copyright 2005 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #include "wine/debug.h"
22 WINE_DEFAULT_DEBUG_CHANNEL(shdocvw
);
24 #define DOCHOSTUI_THIS(iface) DEFINE_THIS(WebBrowser, DocHostUIHandler, iface)
26 static HRESULT WINAPI
DocHostUIHandler_QueryInterface(IDocHostUIHandler2
*iface
,
27 REFIID riid
, void **ppv
)
29 WebBrowser
*This
= DOCHOSTUI_THIS(iface
);
30 return IOleClientSite_QueryInterface(CLIENTSITE(This
), riid
, ppv
);
33 static ULONG WINAPI
DocHostUIHandler_AddRef(IDocHostUIHandler2
*iface
)
35 WebBrowser
*This
= DOCHOSTUI_THIS(iface
);
36 return IOleClientSite_AddRef(CLIENTSITE(This
));
39 static ULONG WINAPI
DocHostUIHandler_Release(IDocHostUIHandler2
*iface
)
41 WebBrowser
*This
= DOCHOSTUI_THIS(iface
);
42 return IOleClientSite_Release(CLIENTSITE(This
));
45 static HRESULT WINAPI
DocHostUIHandler_ShowContextMenu(IDocHostUIHandler2
*iface
,
46 DWORD dwID
, POINT
*ppt
, IUnknown
*pcmdtReserved
, IDispatch
*pdispReserved
)
48 WebBrowser
*This
= DOCHOSTUI_THIS(iface
);
49 FIXME("(%p)->(%ld %p %p %p)\n", This
, dwID
, ppt
, pcmdtReserved
, pdispReserved
);
53 static HRESULT WINAPI
DocHostUIHandler_GetHostInfo(IDocHostUIHandler2
*iface
,
56 WebBrowser
*This
= DOCHOSTUI_THIS(iface
);
57 FIXME("(%p)->(%p)\n", This
, pInfo
);
61 static HRESULT WINAPI
DocHostUIHandler_ShowUI(IDocHostUIHandler2
*iface
, DWORD dwID
,
62 IOleInPlaceActiveObject
*pActiveObject
, IOleCommandTarget
*pCommandTarget
,
63 IOleInPlaceFrame
*pFrame
, IOleInPlaceUIWindow
*pDoc
)
65 WebBrowser
*This
= DOCHOSTUI_THIS(iface
);
66 FIXME("(%p)->(%ld %p %p %p %p)\n", This
, dwID
, pActiveObject
, pCommandTarget
,
71 static HRESULT WINAPI
DocHostUIHandler_HideUI(IDocHostUIHandler2
*iface
)
73 WebBrowser
*This
= DOCHOSTUI_THIS(iface
);
74 FIXME("(%p)\n", This
);
78 static HRESULT WINAPI
DocHostUIHandler_UpdateUI(IDocHostUIHandler2
*iface
)
80 WebBrowser
*This
= DOCHOSTUI_THIS(iface
);
81 FIXME("(%p)\n", This
);
85 static HRESULT WINAPI
DocHostUIHandler_EnableModeless(IDocHostUIHandler2
*iface
,
88 WebBrowser
*This
= DOCHOSTUI_THIS(iface
);
89 FIXME("(%p)->(%x)\n", This
, fEnable
);
93 static HRESULT WINAPI
DocHostUIHandler_OnDocWindowActivate(IDocHostUIHandler2
*iface
,
96 WebBrowser
*This
= DOCHOSTUI_THIS(iface
);
97 FIXME("(%p)->(%x)\n", This
, fActivate
);
101 static HRESULT WINAPI
DocHostUIHandler_OnFrameWindowActivate(IDocHostUIHandler2
*iface
,
104 WebBrowser
*This
= DOCHOSTUI_THIS(iface
);
105 FIXME("(%p)->(%x)\n", This
, fActivate
);
109 static HRESULT WINAPI
DocHostUIHandler_ResizeBorder(IDocHostUIHandler2
*iface
,
110 LPCRECT prcBorder
, IOleInPlaceUIWindow
*pUIWindow
, BOOL fRameWindow
)
112 WebBrowser
*This
= DOCHOSTUI_THIS(iface
);
113 FIXME("(%p)->(%p %p %X)\n", This
, prcBorder
, pUIWindow
, fRameWindow
);
117 static HRESULT WINAPI
DocHostUIHandler_TranslateAccelerator(IDocHostUIHandler2
*iface
,
118 LPMSG lpMsg
, const GUID
*pguidCmdGroup
, DWORD nCmdID
)
120 WebBrowser
*This
= DOCHOSTUI_THIS(iface
);
121 FIXME("(%p)->(%p %p %ld)\n", This
, lpMsg
, pguidCmdGroup
, nCmdID
);
125 static HRESULT WINAPI
DocHostUIHandler_GetOptionKeyPath(IDocHostUIHandler2
*iface
,
126 LPOLESTR
*pchKey
, DWORD dw
)
128 WebBrowser
*This
= DOCHOSTUI_THIS(iface
);
129 FIXME("(%p)->(%p %ld)\n", This
, pchKey
, dw
);
133 static HRESULT WINAPI
DocHostUIHandler_GetDropTarget(IDocHostUIHandler2
*iface
,
134 IDropTarget
*pDropTarget
, IDropTarget
**ppDropTarget
)
136 WebBrowser
*This
= DOCHOSTUI_THIS(iface
);
137 FIXME("(%p)\n", This
);
141 static HRESULT WINAPI
DocHostUIHandler_GetExternal(IDocHostUIHandler2
*iface
,
142 IDispatch
**ppDispatch
)
144 WebBrowser
*This
= DOCHOSTUI_THIS(iface
);
145 FIXME("(%p)->(%p)\n", This
, ppDispatch
);
149 static HRESULT WINAPI
DocHostUIHandler_TranslateUrl(IDocHostUIHandler2
*iface
,
150 DWORD dwTranslate
, OLECHAR
*pchURLIn
, OLECHAR
**ppchURLOut
)
152 WebBrowser
*This
= DOCHOSTUI_THIS(iface
);
153 FIXME("(%p)->(%ld %s %p)\n", This
, dwTranslate
, debugstr_w(pchURLIn
), ppchURLOut
);
157 static HRESULT WINAPI
DocHostUIHandler_FilterDataObject(IDocHostUIHandler2
*iface
,
158 IDataObject
*pDO
, IDataObject
**ppDORet
)
160 WebBrowser
*This
= DOCHOSTUI_THIS(iface
);
161 FIXME("(%p)->(%p %p)\n", This
, pDO
, ppDORet
);
165 static HRESULT WINAPI
DocHostUIHandler_GetOverrideKeyPath(IDocHostUIHandler2
*iface
,
166 LPOLESTR
*pchKey
, DWORD dw
)
168 WebBrowser
*This
= DOCHOSTUI_THIS(iface
);
169 FIXME("(%p)->(%p %ld)\n", This
, pchKey
, dw
);
173 #undef DOCHOSTUI_THIS
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
197 void WebBrowser_DocHost_Init(WebBrowser
*This
)
199 This
->lpDocHostUIHandlerVtbl
= &DocHostUIHandler2Vtbl
;