Release 1.3.7.
[wine/gsoc-2012-control.git] / dlls / shdocvw / frame.c
blob2f089c125956fd24c23068f3a5ef93fe89f1831e
1 /*
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include "wine/debug.h"
20 #include "shdocvw.h"
22 WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
24 #define INPLACEFRAME_THIS(iface) DEFINE_THIS(DocHost, OleInPlaceFrame, iface)
26 static HRESULT WINAPI InPlaceFrame_QueryInterface(IOleInPlaceFrame *iface,
27 REFIID riid, void **ppv)
29 DocHost *This = INPLACEFRAME_THIS(iface);
31 *ppv = NULL;
33 if(IsEqualGUID(&IID_IUnknown, riid)) {
34 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
35 *ppv = INPLACEFRAME(This);
36 }else if(IsEqualGUID(&IID_IOleWindow, riid)) {
37 TRACE("(%p)->(IID_IOleWindow %p)\n", This, ppv);
38 *ppv = INPLACEFRAME(This);
39 }else if(IsEqualGUID(&IID_IOleInPlaceUIWindow, riid)) {
40 TRACE("(%p)->(IID_IOleInPlaceUIWindow %p)\n", This, ppv);
41 *ppv = INPLACEFRAME(This);
42 }else if(IsEqualGUID(&IID_IOleInPlaceFrame, riid)) {
43 TRACE("(%p)->(IID_IOleInPlaceFrame %p)\n", This, ppv);
44 *ppv = INPLACEFRAME(This);
47 if(*ppv) {
48 IOleInPlaceFrame_AddRef(INPLACEFRAME(This));
49 return S_OK;
52 WARN("Unsopported interface %s\n", debugstr_guid(riid));
53 return E_NOINTERFACE;
56 static ULONG WINAPI InPlaceFrame_AddRef(IOleInPlaceFrame *iface)
58 DocHost *This = INPLACEFRAME_THIS(iface);
59 return IOleClientSite_AddRef(CLIENTSITE(This));
62 static ULONG WINAPI InPlaceFrame_Release(IOleInPlaceFrame *iface)
64 DocHost *This = INPLACEFRAME_THIS(iface);
65 return IOleClientSite_Release(CLIENTSITE(This));
68 static HRESULT WINAPI InPlaceFrame_GetWindow(IOleInPlaceFrame *iface, HWND *phwnd)
70 DocHost *This = INPLACEFRAME_THIS(iface);
71 FIXME("(%p)->(%p)\n", This, phwnd);
72 return E_NOTIMPL;
75 static HRESULT WINAPI InPlaceFrame_ContextSensitiveHelp(IOleInPlaceFrame *iface,
76 BOOL fEnterMode)
78 DocHost *This = INPLACEFRAME_THIS(iface);
79 FIXME("(%p)->(%x)\n", This, fEnterMode);
80 return E_NOTIMPL;
83 static HRESULT WINAPI InPlaceFrame_GetBorder(IOleInPlaceFrame *iface, LPRECT lprectBorder)
85 DocHost *This = INPLACEFRAME_THIS(iface);
86 FIXME("(%p)->(%p)\n", This, lprectBorder);
87 return E_NOTIMPL;
90 static HRESULT WINAPI InPlaceFrame_RequestBorderSpace(IOleInPlaceFrame *iface,
91 LPCBORDERWIDTHS pborderwidths)
93 DocHost *This = INPLACEFRAME_THIS(iface);
94 FIXME("(%p)->(%p)\n", This, pborderwidths);
95 return E_NOTIMPL;
98 static HRESULT WINAPI InPlaceFrame_SetBorderSpace(IOleInPlaceFrame *iface,
99 LPCBORDERWIDTHS pborderwidths)
101 DocHost *This = INPLACEFRAME_THIS(iface);
102 FIXME("(%p)->(%p)\n", This, pborderwidths);
103 return E_NOTIMPL;
106 static HRESULT WINAPI InPlaceFrame_SetActiveObject(IOleInPlaceFrame *iface,
107 IOleInPlaceActiveObject *pActiveObject, LPCOLESTR pszObjName)
109 DocHost *This = INPLACEFRAME_THIS(iface);
110 FIXME("(%p)->(%p %s)\n", This, pActiveObject, debugstr_w(pszObjName));
111 return E_NOTIMPL;
114 static HRESULT WINAPI InPlaceFrame_InsertMenus(IOleInPlaceFrame *iface, HMENU hmenuShared,
115 LPOLEMENUGROUPWIDTHS lpMenuWidths)
117 DocHost *This = INPLACEFRAME_THIS(iface);
118 FIXME("(%p)->(%p %p)\n", This, hmenuShared, lpMenuWidths);
119 return E_NOTIMPL;
122 static HRESULT WINAPI InPlaceFrame_SetMenu(IOleInPlaceFrame *iface, HMENU hmenuShared,
123 HOLEMENU holemenu, HWND hwndActiveObject)
125 DocHost *This = INPLACEFRAME_THIS(iface);
126 FIXME("(%p)->(%p %p %p)\n", This, hmenuShared, holemenu, hwndActiveObject);
127 return E_NOTIMPL;
130 static HRESULT WINAPI InPlaceFrame_RemoveMenus(IOleInPlaceFrame *iface, HMENU hmenuShared)
132 DocHost *This = INPLACEFRAME_THIS(iface);
133 FIXME("(%p)->(%p)\n", This, hmenuShared);
134 return E_NOTIMPL;
137 static HRESULT WINAPI InPlaceFrame_SetStatusText(IOleInPlaceFrame *iface,
138 LPCOLESTR pszStatusText)
140 DocHost *This = INPLACEFRAME_THIS(iface);
141 TRACE("(%p)->(%s)\n", This, debugstr_w(pszStatusText));
142 return This->container_vtbl->SetStatusText(This, pszStatusText);
145 static HRESULT WINAPI InPlaceFrame_EnableModeless(IOleInPlaceFrame *iface, BOOL fEnable)
147 DocHost *This = INPLACEFRAME_THIS(iface);
148 FIXME("(%p)->(%x)\n", This, fEnable);
149 return E_NOTIMPL;
152 static HRESULT WINAPI InPlaceFrame_TranslateAccelerator(IOleInPlaceFrame *iface, LPMSG lpmsg,
153 WORD wID)
155 DocHost *This = INPLACEFRAME_THIS(iface);
156 FIXME("(%p)->(%p %d)\n", This, lpmsg, wID);
157 return E_NOTIMPL;
160 #undef INPLACEFRAME_THIS
162 static const IOleInPlaceFrameVtbl OleInPlaceFrameVtbl = {
163 InPlaceFrame_QueryInterface,
164 InPlaceFrame_AddRef,
165 InPlaceFrame_Release,
166 InPlaceFrame_GetWindow,
167 InPlaceFrame_ContextSensitiveHelp,
168 InPlaceFrame_GetBorder,
169 InPlaceFrame_RequestBorderSpace,
170 InPlaceFrame_SetBorderSpace,
171 InPlaceFrame_SetActiveObject,
172 InPlaceFrame_InsertMenus,
173 InPlaceFrame_SetMenu,
174 InPlaceFrame_RemoveMenus,
175 InPlaceFrame_SetStatusText,
176 InPlaceFrame_EnableModeless,
177 InPlaceFrame_TranslateAccelerator
180 void DocHost_Frame_Init(DocHost *This)
182 This->lpOleInPlaceFrameVtbl = &OleInPlaceFrameVtbl;