2 * Copyright 2005 Jacek Caban
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
34 #include "wine/debug.h"
36 #include "mshtml_private.h"
38 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
40 /**********************************************************
41 * IOleInPlaceActiveObject implementation
44 #define ACTOBJ_THIS DEFINE_THIS(HTMLDocument, OleInPlaceActiveObject)
46 static HRESULT WINAPI OleInPlaceActiveObject_QueryInterface(IOleInPlaceActiveObject *iface, REFIID riid, void **ppvObject)
49 return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppvObject);
52 static ULONG WINAPI OleInPlaceActiveObject_AddRef(IOleInPlaceActiveObject *iface)
55 return IHTMLDocument2_AddRef(HTMLDOC(This));
58 static ULONG WINAPI OleInPlaceActiveObject_Release(IOleInPlaceActiveObject *iface)
61 return IHTMLDocument2_Release(HTMLDOC(This));
64 static HRESULT WINAPI OleInPlaceActiveObject_GetWindow(IOleInPlaceActiveObject *iface, HWND *phwnd)
67 TRACE("(%p)->(%p)\n", This, phwnd);
76 static HRESULT WINAPI OleInPlaceActiveObject_ContextSensitiveHelp(IOleInPlaceActiveObject *iface, BOOL fEnterMode)
79 FIXME("(%p)->(%x)\n", This, fEnterMode);
83 static HRESULT WINAPI OleInPlaceActiveObject_TranslateAccelerator(IOleInPlaceActiveObject *iface, LPMSG lpmsg)
86 FIXME("(%p)->(%p)\n", This, lpmsg);
90 static HRESULT WINAPI OleInPlaceActiveObject_OnFrameWindowActivate(IOleInPlaceActiveObject *iface, BOOL fActivate)
93 FIXME("(%p)->(%x)\n", This, fActivate);
97 static HRESULT WINAPI OleInPlaceActiveObject_OnDocWindowActivate(IOleInPlaceActiveObject *iface, BOOL fActivate)
100 FIXME("(%p)->(%x)\n", This, fActivate);
104 static HRESULT WINAPI OleInPlaceActiveObject_ResizeBorder(IOleInPlaceActiveObject *iface, LPCRECT prcBorder,
105 IOleInPlaceUIWindow *pUIWindow, BOOL fFrameWindow)
108 FIXME("(%p)->(%p %p %x)\n", This, prcBorder, pUIWindow, fFrameWindow);
112 static HRESULT WINAPI OleInPlaceActiveObject_EnableModeless(IOleInPlaceActiveObject *iface, BOOL fEnable)
115 FIXME("(%p)->(%x)\n", This, fEnable);
119 static const IOleInPlaceActiveObjectVtbl OleInPlaceActiveObjectVtbl = {
120 OleInPlaceActiveObject_QueryInterface,
121 OleInPlaceActiveObject_AddRef,
122 OleInPlaceActiveObject_Release,
123 OleInPlaceActiveObject_GetWindow,
124 OleInPlaceActiveObject_ContextSensitiveHelp,
125 OleInPlaceActiveObject_TranslateAccelerator,
126 OleInPlaceActiveObject_OnFrameWindowActivate,
127 OleInPlaceActiveObject_OnDocWindowActivate,
128 OleInPlaceActiveObject_ResizeBorder,
129 OleInPlaceActiveObject_EnableModeless
134 /**********************************************************
135 * IOleInPlaceObjectWindowless implementation
138 #define OLEINPLACEWND_THIS DEFINE_THIS(HTMLDocument, OleInPlaceObjectWindowless)
140 static HRESULT WINAPI OleInPlaceObjectWindowless_QueryInterface(IOleInPlaceObjectWindowless *iface,
141 REFIID riid, void **ppvObject)
144 return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppvObject);
147 static ULONG WINAPI OleInPlaceObjectWindowless_AddRef(IOleInPlaceObjectWindowless *iface)
150 return IHTMLDocument2_AddRef(HTMLDOC(This));
153 static ULONG WINAPI OleInPlaceObjectWindowless_Release(IOleInPlaceObjectWindowless *iface)
156 return IHTMLDocument2_Release(HTMLDOC(This));
159 static HRESULT WINAPI OleInPlaceObjectWindowless_GetWindow(IOleInPlaceObjectWindowless *iface,
163 return IOleWindow_GetWindow(OLEWIN(This), phwnd);
166 static HRESULT WINAPI OleInPlaceObjectWindowless_ContextSensitiveHelp(IOleInPlaceObjectWindowless *iface,
170 return IOleWindow_ContextSensitiveHelp(OLEWIN(This), fEnterMode);
173 static HRESULT WINAPI OleInPlaceObjectWindowless_InPlaceDeactivate(IOleInPlaceObjectWindowless *iface)
176 FIXME("(%p)\n", This);
180 static HRESULT WINAPI OleInPlaceObjectWindowless_UIDeactivate(IOleInPlaceObjectWindowless *iface)
183 FIXME("(%p)\n", This);
187 static HRESULT WINAPI OleInPlaceObjectWindowless_SetObjectRects(IOleInPlaceObjectWindowless *iface,
188 LPCRECT lprcPosRect, LPCRECT lprcClipRect)
191 FIXME("(%p)->(%p %p)\n", This, lprcPosRect, lprcClipRect);
195 static HRESULT WINAPI OleInPlaceObjectWindowless_ReactivateAndUndo(IOleInPlaceObjectWindowless *iface)
198 FIXME("(%p)\n", This);
202 static HRESULT WINAPI OleInPlaceObjectWindowless_OnWindowMessage(IOleInPlaceObjectWindowless *iface,
203 UINT msg, WPARAM wParam, LPARAM lParam, LRESULT *lpResult)
206 FIXME("(%p)->(%u %u %lu %p)\n", This, msg, wParam, lParam, lpResult);
210 static HRESULT WINAPI OleInPlaceObjectWindowless_GetDropTarget(IOleInPlaceObjectWindowless *iface,
211 IDropTarget **ppDropTarget)
214 FIXME("(%p)->(%p)\n", This, ppDropTarget);
218 static IOleInPlaceObjectWindowlessVtbl OleInPlaceObjectWindowlessVtbl = {
219 OleInPlaceObjectWindowless_QueryInterface,
220 OleInPlaceObjectWindowless_AddRef,
221 OleInPlaceObjectWindowless_Release,
222 OleInPlaceObjectWindowless_GetWindow,
223 OleInPlaceObjectWindowless_ContextSensitiveHelp,
224 OleInPlaceObjectWindowless_InPlaceDeactivate,
225 OleInPlaceObjectWindowless_UIDeactivate,
226 OleInPlaceObjectWindowless_SetObjectRects,
227 OleInPlaceObjectWindowless_ReactivateAndUndo,
228 OleInPlaceObjectWindowless_OnWindowMessage,
229 OleInPlaceObjectWindowless_GetDropTarget
232 #undef INPLACEWIN_THIS
234 void HTMLDocument_Window_Init(HTMLDocument *This)
236 This->lpOleInPlaceActiveObjectVtbl = &OleInPlaceActiveObjectVtbl;
237 This->lpOleInPlaceObjectWindowlessVtbl = &OleInPlaceObjectWindowlessVtbl;