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"
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
);
33 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
34 TRACE("(%p)->(IID_IUnknown %p)\n", This
, ppv
);
35 *ppv
= INPLACEFRAME(This
);
36 }else if(IsEqualGUID(&IID_IOleInPlaceUIWindow
, riid
)) {
37 TRACE("(%p)->(IID_IOleInPlaceUIWindow %p)\n", This
, ppv
);
38 *ppv
= INPLACEFRAME(This
);
39 }else if(IsEqualGUID(&IID_IOleInPlaceFrame
, riid
)) {
40 TRACE("(%p)->(IID_IOleInPlaceFrame %p)\n", This
, ppv
);
41 *ppv
= INPLACEFRAME(This
);
45 IOleInPlaceFrame_AddRef(INPLACEFRAME(This
));
49 WARN("Unsopported interface %s\n", debugstr_guid(riid
));
53 static ULONG WINAPI
InPlaceFrame_AddRef(IOleInPlaceFrame
*iface
)
55 DocHost
*This
= INPLACEFRAME_THIS(iface
);
56 return IOleClientSite_AddRef(CLIENTSITE(This
));
59 static ULONG WINAPI
InPlaceFrame_Release(IOleInPlaceFrame
*iface
)
61 DocHost
*This
= INPLACEFRAME_THIS(iface
);
62 return IOleClientSite_Release(CLIENTSITE(This
));
65 static HRESULT WINAPI
InPlaceFrame_GetWindow(IOleInPlaceFrame
*iface
, HWND
*phwnd
)
67 DocHost
*This
= INPLACEFRAME_THIS(iface
);
68 FIXME("(%p)->(%p)\n", This
, phwnd
);
72 static HRESULT WINAPI
InPlaceFrame_ContextSensitiveHelp(IOleInPlaceFrame
*iface
,
75 DocHost
*This
= INPLACEFRAME_THIS(iface
);
76 FIXME("(%p)->(%x)\n", This
, fEnterMode
);
80 static HRESULT WINAPI
InPlaceFrame_GetBorder(IOleInPlaceFrame
*iface
, LPRECT lprectBorder
)
82 DocHost
*This
= INPLACEFRAME_THIS(iface
);
83 FIXME("(%p)->(%p)\n", This
, lprectBorder
);
87 static HRESULT WINAPI
InPlaceFrame_RequestBorderSpace(IOleInPlaceFrame
*iface
,
88 LPCBORDERWIDTHS pborderwidths
)
90 DocHost
*This
= INPLACEFRAME_THIS(iface
);
91 FIXME("(%p)->(%p)\n", This
, pborderwidths
);
95 static HRESULT WINAPI
InPlaceFrame_SetBorderSpace(IOleInPlaceFrame
*iface
,
96 LPCBORDERWIDTHS pborderwidths
)
98 DocHost
*This
= INPLACEFRAME_THIS(iface
);
99 FIXME("(%p)->(%p)\n", This
, pborderwidths
);
103 static HRESULT WINAPI
InPlaceFrame_SetActiveObject(IOleInPlaceFrame
*iface
,
104 IOleInPlaceActiveObject
*pActiveObject
, LPCOLESTR pszObjName
)
106 DocHost
*This
= INPLACEFRAME_THIS(iface
);
107 FIXME("(%p)->(%p %s)\n", This
, pActiveObject
, debugstr_w(pszObjName
));
111 static HRESULT WINAPI
InPlaceFrame_InsertMenus(IOleInPlaceFrame
*iface
, HMENU hmenuShared
,
112 LPOLEMENUGROUPWIDTHS lpMenuWidths
)
114 DocHost
*This
= INPLACEFRAME_THIS(iface
);
115 FIXME("(%p)->(%p %p)\n", This
, hmenuShared
, lpMenuWidths
);
119 static HRESULT WINAPI
InPlaceFrame_SetMenu(IOleInPlaceFrame
*iface
, HMENU hmenuShared
,
120 HOLEMENU holemenu
, HWND hwndActiveObject
)
122 DocHost
*This
= INPLACEFRAME_THIS(iface
);
123 FIXME("(%p)->(%p %p %p)\n", This
, hmenuShared
, holemenu
, hwndActiveObject
);
127 static HRESULT WINAPI
InPlaceFrame_RemoveMenus(IOleInPlaceFrame
*iface
, HMENU hmenuShared
)
129 DocHost
*This
= INPLACEFRAME_THIS(iface
);
130 FIXME("(%p)->(%p)\n", This
, hmenuShared
);
134 static HRESULT WINAPI
InPlaceFrame_SetStatusText(IOleInPlaceFrame
*iface
,
135 LPCOLESTR pszStatusText
)
137 DocHost
*This
= INPLACEFRAME_THIS(iface
);
138 TRACE("(%p)->(%s)\n", This
, debugstr_w(pszStatusText
));
139 return This
->container_vtbl
->SetStatusText(This
, pszStatusText
);
142 static HRESULT WINAPI
InPlaceFrame_EnableModeless(IOleInPlaceFrame
*iface
, BOOL fEnable
)
144 DocHost
*This
= INPLACEFRAME_THIS(iface
);
145 FIXME("(%p)->(%x)\n", This
, fEnable
);
149 static HRESULT WINAPI
InPlaceFrame_TranslateAccelerator(IOleInPlaceFrame
*iface
, LPMSG lpmsg
,
152 DocHost
*This
= INPLACEFRAME_THIS(iface
);
153 FIXME("(%p)->(%p %d)\n", This
, lpmsg
, wID
);
157 #undef INPLACEFRAME_THIS
159 static const IOleInPlaceFrameVtbl OleInPlaceFrameVtbl
= {
160 InPlaceFrame_QueryInterface
,
162 InPlaceFrame_Release
,
163 InPlaceFrame_GetWindow
,
164 InPlaceFrame_ContextSensitiveHelp
,
165 InPlaceFrame_GetBorder
,
166 InPlaceFrame_RequestBorderSpace
,
167 InPlaceFrame_SetBorderSpace
,
168 InPlaceFrame_SetActiveObject
,
169 InPlaceFrame_InsertMenus
,
170 InPlaceFrame_SetMenu
,
171 InPlaceFrame_RemoveMenus
,
172 InPlaceFrame_SetStatusText
,
173 InPlaceFrame_EnableModeless
,
174 InPlaceFrame_TranslateAccelerator
177 void DocHost_Frame_Init(DocHost
*This
)
179 This
->lpOleInPlaceFrameVtbl
= &OleInPlaceFrameVtbl
;