2 * Copyright 2005-2006 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
34 #include "wine/debug.h"
36 #include "mshtml_private.h"
38 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
40 #define TIMER_ID 0x1000
42 static const WCHAR wszInternetExplorer_Server[] =
43 {'I','n','t','e','r','n','e','t',' ','E','x','p','l','o','r','e','r','_','S','e','r','v','e','r',0};
45 static const WCHAR wszTooltipData[] = {'t','o','o','l','t','i','p','_','d','a','t','a',0};
47 static ATOM serverwnd_class = 0;
54 static void paint_document(HTMLDocument *This)
60 GetClientRect(This->hwnd, &rect);
62 hdc = BeginPaint(This->hwnd, &ps);
64 if(!(This->hostinfo.dwFlags & (DOCHOSTUIFLAG_NO3DOUTERBORDER|DOCHOSTUIFLAG_NO3DBORDER)))
65 DrawEdge(hdc, &rect, EDGE_SUNKEN, BF_RECT|BF_ADJUST);
67 if(!This->nscontainer) {
68 WCHAR wszHTMLDisabled[100];
71 LoadStringW(hInst, IDS_HTMLDISABLED, wszHTMLDisabled, sizeof(wszHTMLDisabled)/sizeof(WCHAR));
73 font = CreateFontA(25,0,0,0,400,0,0,0,ANSI_CHARSET,0,0,DEFAULT_QUALITY,DEFAULT_PITCH,NULL);
75 SelectObject(hdc, font);
76 SelectObject(hdc, GetSysColorBrush(COLOR_WINDOW));
78 Rectangle(hdc, rect.left, rect.top, rect.right, rect.bottom);
79 DrawTextW(hdc, wszHTMLDisabled,-1, &rect, DT_CENTER | DT_SINGLELINE | DT_VCENTER);
84 EndPaint(This->hwnd, &ps);
87 static void activate_gecko(NSContainer *This)
89 TRACE("(%p) %p\n", This, This->window);
91 SetParent(This->hwnd, This->doc->hwnd);
92 ShowWindow(This->hwnd, SW_SHOW);
94 nsIBaseWindow_SetVisibility(This->window, TRUE);
95 nsIBaseWindow_SetEnabled(This->window, TRUE);
98 void update_doc(HTMLDocument *This, DWORD flags)
100 if(!This->update && This->hwnd)
101 SetTimer(This->hwnd, TIMER_ID, 100, NULL);
103 This->update |= flags;
106 void update_title(HTMLDocument *This)
108 IOleCommandTarget *olecmd;
111 if(!(This->update & UPDATE_TITLE))
114 This->update &= ~UPDATE_TITLE;
119 hres = IOleClientSite_QueryInterface(This->client, &IID_IOleCommandTarget, (void**)&olecmd);
120 if(SUCCEEDED(hres)) {
124 V_VT(&title) = VT_BSTR;
125 V_BSTR(&title) = SysAllocString(empty);
126 IOleCommandTarget_Exec(olecmd, NULL, OLECMDID_SETTITLE, OLECMDEXECOPT_DONTPROMPTUSER,
128 SysFreeString(V_BSTR(&title));
130 IOleCommandTarget_Release(olecmd);
134 static LRESULT on_timer(HTMLDocument *This)
136 TRACE("(%p) %x\n", This, This->update);
138 KillTimer(This->hwnd, TIMER_ID);
143 if(This->update & UPDATE_UI) {
145 IDocHostUIHandler_UpdateUI(This->hostui);
148 IOleCommandTarget *cmdtrg;
151 hres = IOleClientSite_QueryInterface(This->client, &IID_IOleCommandTarget,
153 if(SUCCEEDED(hres)) {
154 IOleCommandTarget_Exec(cmdtrg, NULL, OLECMDID_UPDATECOMMANDS,
155 OLECMDEXECOPT_DONTPROMPTUSER, NULL, NULL);
156 IOleCommandTarget_Release(cmdtrg);
166 void notif_focus(HTMLDocument *This)
168 IOleControlSite *site;
171 hres = IOleClientSite_QueryInterface(This->client, &IID_IOleControlSite, (void**)&site);
175 IOleControlSite_OnFocus(site, This->focus);
176 IOleControlSite_Release(site);
179 static LRESULT WINAPI serverwnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
183 static const WCHAR wszTHIS[] = {'T','H','I','S',0};
185 if(msg == WM_CREATE) {
186 This = *(HTMLDocument**)lParam;
187 SetPropW(hwnd, wszTHIS, This);
189 This = (HTMLDocument*)GetPropW(hwnd, wszTHIS);
197 paint_document(This);
200 TRACE("(%p)->(WM_SIZE)\n", This);
201 if(This->nscontainer) {
204 if(!(This->hostinfo.dwFlags & (DOCHOSTUIFLAG_NO3DOUTERBORDER|DOCHOSTUIFLAG_NO3DBORDER))) {
205 ew = GetSystemMetrics(SM_CXEDGE);
206 eh = GetSystemMetrics(SM_CYEDGE);
209 SetWindowPos(This->nscontainer->hwnd, NULL, ew, eh,
210 LOWORD(lParam) - 2*ew, HIWORD(lParam) - 2*eh,
211 SWP_NOZORDER | SWP_NOACTIVATE);
215 return on_timer(This);
216 case WM_MOUSEACTIVATE:
220 return DefWindowProcW(hwnd, msg, wParam, lParam);
223 static void register_serverwnd_class(void)
225 static WNDCLASSEXW wndclass = {
229 0, 0, NULL, NULL, NULL, NULL, NULL,
230 wszInternetExplorer_Server,
233 wndclass.hInstance = hInst;
234 serverwnd_class = RegisterClassExW(&wndclass);
237 static HRESULT activate_window(HTMLDocument *This)
239 IOleInPlaceFrame *pIPFrame;
240 IOleCommandTarget *cmdtrg;
241 IOleInPlaceSiteEx *ipsiteex;
242 RECT posrect, cliprect;
243 OLEINPLACEFRAMEINFO frameinfo;
248 register_serverwnd_class();
250 hres = IOleInPlaceSite_CanInPlaceActivate(This->ipsite);
252 WARN("CanInPlaceActivate returned: %08x\n", hres);
253 return FAILED(hres) ? hres : E_FAIL;
256 hres = IOleInPlaceSite_GetWindowContext(This->ipsite, &pIPFrame, &This->ip_window,
257 &posrect, &cliprect, &frameinfo);
259 WARN("GetWindowContext failed: %08x\n", hres);
263 TRACE("got window context: %p %p {%d %d %d %d} {%d %d %d %d} {%d %x %p %p %d}\n",
264 pIPFrame, This->ip_window, posrect.left, posrect.top, posrect.right, posrect.bottom,
265 cliprect.left, cliprect.top, cliprect.right, cliprect.bottom,
266 frameinfo.cb, frameinfo.fMDIApp, frameinfo.hwndFrame, frameinfo.haccel, frameinfo.cAccelEntries);
268 hres = IOleInPlaceSite_GetWindow(This->ipsite, &parent_hwnd);
270 WARN("GetWindow failed: %08x\n", hres);
274 TRACE("got parent window %p\n", parent_hwnd);
277 if(GetParent(This->hwnd) != parent_hwnd)
278 SetParent(This->hwnd, parent_hwnd);
279 SetWindowPos(This->hwnd, HWND_TOP,
280 posrect.left, posrect.top, posrect.right-posrect.left, posrect.bottom-posrect.top,
281 SWP_NOACTIVATE | SWP_SHOWWINDOW);
283 CreateWindowExW(0, wszInternetExplorer_Server, NULL,
284 WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
285 posrect.left, posrect.top, posrect.right-posrect.left, posrect.bottom-posrect.top,
286 parent_hwnd, NULL, hInst, This);
288 TRACE("Created window %p\n", This->hwnd);
290 SetWindowPos(This->hwnd, NULL, 0, 0, 0, 0,
291 SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | SWP_NOREDRAW | SWP_NOACTIVATE | SWP_SHOWWINDOW);
292 RedrawWindow(This->hwnd, NULL, NULL, RDW_INVALIDATE | RDW_NOERASE | RDW_ALLCHILDREN);
295 * Windows implementation calls:
296 * RegisterWindowMessage("MSWHEEL_ROLLMSG");
298 SetTimer(This->hwnd, TIMER_ID, 100, NULL);
301 if(This->nscontainer)
302 activate_gecko(This->nscontainer);
304 This->in_place_active = TRUE;
305 hres = IOleInPlaceSite_QueryInterface(This->ipsite, &IID_IOleInPlaceSiteEx, (void**)&ipsiteex);
306 if(SUCCEEDED(hres)) {
309 hres = IOleInPlaceSiteEx_OnInPlaceActivateEx(ipsiteex, &redraw, 0);
310 IOleInPlaceSiteEx_Release(ipsiteex);
312 FIXME("unsupported redraw\n");
314 hres = IOleInPlaceSite_OnInPlaceActivate(This->ipsite);
317 WARN("OnInPlaceActivate failed: %08x\n", hres);
318 This->in_place_active = FALSE;
322 hres = IOleClientSite_QueryInterface(This->client, &IID_IOleCommandTarget, (void**)&cmdtrg);
323 if(SUCCEEDED(hres)) {
326 IOleInPlaceFrame_SetStatusText(pIPFrame, NULL);
330 IOleCommandTarget_Exec(cmdtrg, NULL, OLECMDID_SETPROGRESSMAX,
331 OLECMDEXECOPT_DONTPROMPTUSER, &var, NULL);
332 IOleCommandTarget_Exec(cmdtrg, NULL, OLECMDID_SETPROGRESSPOS,
333 OLECMDEXECOPT_DONTPROMPTUSER, &var, NULL);
335 IOleCommandTarget_Release(cmdtrg);
339 IOleInPlaceFrame_Release(This->frame);
340 This->frame = pIPFrame;
342 This->window_active = TRUE;
347 static LRESULT WINAPI tooltips_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
349 tooltip_data *data = GetPropW(hwnd, wszTooltipData);
351 TRACE("%d %p\n", msg, data);
353 if(msg == TTM_WINDOWFROMPOINT) {
355 POINT *pt = (POINT*)lParam;
357 TRACE("TTM_WINDOWFROMPOINT (%d,%d)\n", pt->x, pt->y);
359 GetWindowRect(data->doc->hwnd, &rect);
361 if(rect.left <= pt->x && pt->x <= rect.right
362 && rect.top <= pt->y && pt->y <= rect.bottom)
363 return (LPARAM)data->doc->hwnd;
366 return CallWindowProcW(data->proc, hwnd, msg, wParam, lParam);
369 static void create_tooltips_window(HTMLDocument *This)
371 tooltip_data *data = mshtml_alloc(sizeof(*data));
373 This->tooltips_hwnd = CreateWindowExW(0, TOOLTIPS_CLASSW, NULL, TTS_NOPREFIX | WS_POPUP,
374 CW_USEDEFAULT, CW_USEDEFAULT, 10, 10, This->hwnd, NULL, hInst, NULL);
377 data->proc = (WNDPROC)GetWindowLongPtrW(This->tooltips_hwnd, GWLP_WNDPROC);
379 SetPropW(This->tooltips_hwnd, wszTooltipData, data);
381 SetWindowLongPtrW(This->tooltips_hwnd, GWLP_WNDPROC, (LONG_PTR)tooltips_proc);
383 SetWindowPos(This->tooltips_hwnd, HWND_TOPMOST,0, 0, 0, 0,
384 SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
388 void show_tooltip(HTMLDocument *This, DWORD x, DWORD y, LPCWSTR text)
390 TTTOOLINFOW toolinfo = {
391 sizeof(TTTOOLINFOW), 0, This->hwnd, 0xdeadbeef,
392 {x>2 ? x-2 : 0, y>0 ? y-2 : 0, x+2, y+2}, /* FIXME */
393 NULL, (LPWSTR)text, 0};
394 MSG msg = {This->hwnd, WM_MOUSEMOVE, 0, MAKELPARAM(x,y), 0, {x,y}};
396 TRACE("(%p)->(%d %d %s)\n", This, x, y, debugstr_w(text));
398 if(!This->tooltips_hwnd)
399 create_tooltips_window(This);
401 SendMessageW(This->tooltips_hwnd, TTM_ADDTOOLW, 0, (LPARAM)&toolinfo);
402 SendMessageW(This->tooltips_hwnd, TTM_ACTIVATE, TRUE, 0);
403 SendMessageW(This->tooltips_hwnd, TTM_RELAYEVENT, 0, (LPARAM)&msg);
406 void hide_tooltip(HTMLDocument *This)
408 TTTOOLINFOW toolinfo = {
409 sizeof(TTTOOLINFOW), 0, This->hwnd, 0xdeadbeef,
410 {0,0,0,0}, NULL, NULL, 0};
412 TRACE("(%p)\n", This);
414 SendMessageW(This->tooltips_hwnd, TTM_DELTOOLW, 0, (LPARAM)&toolinfo);
415 SendMessageW(This->tooltips_hwnd, TTM_ACTIVATE, FALSE, 0);
418 /**********************************************************
419 * IOleDocumentView implementation
422 #define DOCVIEW_THIS(iface) DEFINE_THIS(HTMLDocument, OleDocumentView, iface)
424 static HRESULT WINAPI OleDocumentView_QueryInterface(IOleDocumentView *iface, REFIID riid, void **ppvObject)
426 HTMLDocument *This = DOCVIEW_THIS(iface);
427 return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppvObject);
430 static ULONG WINAPI OleDocumentView_AddRef(IOleDocumentView *iface)
432 HTMLDocument *This = DOCVIEW_THIS(iface);
433 return IHTMLDocument2_AddRef(HTMLDOC(This));
436 static ULONG WINAPI OleDocumentView_Release(IOleDocumentView *iface)
438 HTMLDocument *This = DOCVIEW_THIS(iface);
439 return IHTMLDocument2_Release(HTMLDOC(This));
442 static HRESULT WINAPI OleDocumentView_SetInPlaceSite(IOleDocumentView *iface, IOleInPlaceSite *pIPSite)
444 HTMLDocument *This = DOCVIEW_THIS(iface);
445 TRACE("(%p)->(%p)\n", This, pIPSite);
448 IOleInPlaceSite_AddRef(pIPSite);
451 IOleInPlaceSite_Release(This->ipsite);
453 This->ipsite = pIPSite;
457 static HRESULT WINAPI OleDocumentView_GetInPlaceSite(IOleDocumentView *iface, IOleInPlaceSite **ppIPSite)
459 HTMLDocument *This = DOCVIEW_THIS(iface);
460 TRACE("(%p)->(%p)\n", This, ppIPSite);
466 IOleInPlaceSite_AddRef(This->ipsite);
468 *ppIPSite = This->ipsite;
472 static HRESULT WINAPI OleDocumentView_GetDocument(IOleDocumentView *iface, IUnknown **ppunk)
474 HTMLDocument *This = DOCVIEW_THIS(iface);
475 TRACE("(%p)->(%p)\n", This, ppunk);
480 IHTMLDocument2_AddRef(HTMLDOC(This));
481 *ppunk = (IUnknown*)HTMLDOC(This);
485 static HRESULT WINAPI OleDocumentView_SetRect(IOleDocumentView *iface, LPRECT prcView)
487 HTMLDocument *This = DOCVIEW_THIS(iface);
490 TRACE("(%p)->(%p)\n", This, prcView);
496 GetClientRect(This->hwnd, &rect);
497 if(memcmp(prcView, &rect, sizeof(RECT))) {
498 InvalidateRect(This->hwnd,NULL,TRUE);
499 SetWindowPos(This->hwnd, NULL, prcView->left, prcView->top, prcView->right,
500 prcView->bottom, SWP_NOZORDER | SWP_NOACTIVATE);
507 static HRESULT WINAPI OleDocumentView_GetRect(IOleDocumentView *iface, LPRECT prcView)
509 HTMLDocument *This = DOCVIEW_THIS(iface);
511 TRACE("(%p)->(%p)\n", This, prcView);
516 GetClientRect(This->hwnd, prcView);
520 static HRESULT WINAPI OleDocumentView_SetRectComplex(IOleDocumentView *iface, LPRECT prcView,
521 LPRECT prcHScroll, LPRECT prcVScroll, LPRECT prcSizeBox)
523 HTMLDocument *This = DOCVIEW_THIS(iface);
524 FIXME("(%p)->(%p %p %p %p)\n", This, prcView, prcHScroll, prcVScroll, prcSizeBox);
528 static HRESULT WINAPI OleDocumentView_Show(IOleDocumentView *iface, BOOL fShow)
530 HTMLDocument *This = DOCVIEW_THIS(iface);
533 TRACE("(%p)->(%x)\n", This, fShow);
536 if(!This->ui_active) {
537 hres = activate_window(This);
541 update_doc(This, UPDATE_UI);
542 ShowWindow(This->hwnd, SW_SHOW);
544 ShowWindow(This->hwnd, SW_HIDE);
545 if(This->ip_window) {
546 IOleInPlaceUIWindow_Release(This->ip_window);
547 This->ip_window = NULL;
554 static HRESULT WINAPI OleDocumentView_UIActivate(IOleDocumentView *iface, BOOL fUIActivate)
556 HTMLDocument *This = DOCVIEW_THIS(iface);
559 TRACE("(%p)->(%x)\n", This, fUIActivate);
562 FIXME("This->ipsite = NULL\n");
567 OLECHAR wszHTMLDocument[30];
573 if(!This->window_active) {
574 hres = activate_window(This);
580 nsIWebBrowserFocus_Activate(This->nscontainer->focus);
583 update_doc(This, UPDATE_UI);
585 LoadStringW(hInst, IDS_HTMLDOCUMENT, wszHTMLDocument,
586 sizeof(wszHTMLDocument)/sizeof(WCHAR));
588 hres = IOleInPlaceSite_OnUIActivate(This->ipsite);
589 if(SUCCEEDED(hres)) {
590 IOleInPlaceFrame_SetActiveObject(This->frame, ACTOBJ(This), wszHTMLDocument);
592 FIXME("OnUIActivate failed: %08x\n", hres);
593 IOleInPlaceFrame_Release(This->frame);
595 This->ui_active = FALSE;
599 hres = IDocHostUIHandler_ShowUI(This->hostui,
600 This->usermode == EDITMODE ? DOCHOSTUITYPE_AUTHOR : DOCHOSTUITYPE_BROWSE,
601 ACTOBJ(This), CMDTARGET(This), This->frame, This->ip_window);
603 IDocHostUIHandler_HideUI(This->hostui);
606 IOleInPlaceUIWindow_SetActiveObject(This->ip_window, ACTOBJ(This), wszHTMLDocument);
608 memset(&rcBorderWidths, 0, sizeof(rcBorderWidths));
609 IOleInPlaceFrame_SetBorderSpace(This->frame, &rcBorderWidths);
611 This->ui_active = TRUE;
613 if(This->ui_active) {
614 This->ui_active = FALSE;
616 IOleInPlaceUIWindow_SetActiveObject(This->ip_window, NULL, NULL);
618 IOleInPlaceFrame_SetActiveObject(This->frame, NULL, NULL);
620 IDocHostUIHandler_HideUI(This->hostui);
622 IOleInPlaceSite_OnUIDeactivate(This->ipsite, FALSE);
628 static HRESULT WINAPI OleDocumentView_Open(IOleDocumentView *iface)
630 HTMLDocument *This = DOCVIEW_THIS(iface);
631 FIXME("(%p)\n", This);
635 static HRESULT WINAPI OleDocumentView_CloseView(IOleDocumentView *iface, DWORD dwReserved)
637 HTMLDocument *This = DOCVIEW_THIS(iface);
638 TRACE("(%p)->(%x)\n", This, dwReserved);
641 WARN("dwReserved = %d\n", dwReserved);
644 * Windows implementation calls QueryInterface(IID_IOleCommandTarget),
645 * QueryInterface(IID_IOleControlSite) and KillTimer
648 IOleDocumentView_Show(iface, FALSE);
653 static HRESULT WINAPI OleDocumentView_SaveViewState(IOleDocumentView *iface, LPSTREAM pstm)
655 HTMLDocument *This = DOCVIEW_THIS(iface);
656 FIXME("(%p)->(%p)\n", This, pstm);
660 static HRESULT WINAPI OleDocumentView_ApplyViewState(IOleDocumentView *iface, LPSTREAM pstm)
662 HTMLDocument *This = DOCVIEW_THIS(iface);
663 FIXME("(%p)->(%p)\n", This, pstm);
667 static HRESULT WINAPI OleDocumentView_Clone(IOleDocumentView *iface, IOleInPlaceSite *pIPSiteNew,
668 IOleDocumentView **ppViewNew)
670 HTMLDocument *This = DOCVIEW_THIS(iface);
671 FIXME("(%p)->(%p %p)\n", This, pIPSiteNew, ppViewNew);
677 static const IOleDocumentViewVtbl OleDocumentViewVtbl = {
678 OleDocumentView_QueryInterface,
679 OleDocumentView_AddRef,
680 OleDocumentView_Release,
681 OleDocumentView_SetInPlaceSite,
682 OleDocumentView_GetInPlaceSite,
683 OleDocumentView_GetDocument,
684 OleDocumentView_SetRect,
685 OleDocumentView_GetRect,
686 OleDocumentView_SetRectComplex,
687 OleDocumentView_Show,
688 OleDocumentView_UIActivate,
689 OleDocumentView_Open,
690 OleDocumentView_CloseView,
691 OleDocumentView_SaveViewState,
692 OleDocumentView_ApplyViewState,
693 OleDocumentView_Clone
696 /**********************************************************
697 * IViewObject implementation
700 #define VIEWOBJ_THIS(iface) DEFINE_THIS(HTMLDocument, ViewObject2, iface)
702 static HRESULT WINAPI ViewObject_QueryInterface(IViewObject2 *iface, REFIID riid, void **ppvObject)
704 HTMLDocument *This = VIEWOBJ_THIS(iface);
705 return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppvObject);
708 static ULONG WINAPI ViewObject_AddRef(IViewObject2 *iface)
710 HTMLDocument *This = VIEWOBJ_THIS(iface);
711 return IHTMLDocument2_AddRef(HTMLDOC(This));
714 static ULONG WINAPI ViewObject_Release(IViewObject2 *iface)
716 HTMLDocument *This = VIEWOBJ_THIS(iface);
717 return IHTMLDocument2_Release(HTMLDOC(This));
720 static HRESULT WINAPI ViewObject_Draw(IViewObject2 *iface, DWORD dwDrawAspect, LONG lindex, void *pvAspect,
721 DVTARGETDEVICE *ptd, HDC hdcTargetDev, HDC hdcDraw, LPCRECTL lprcBounds,
722 LPCRECTL lprcWBounds, BOOL (CALLBACK *pfnContinue)(ULONG_PTR dwContinue), ULONG_PTR dwContinue)
724 HTMLDocument *This = VIEWOBJ_THIS(iface);
725 FIXME("(%p)->(%d %d %p %p %p %p %p %p %p %ld)\n", This, dwDrawAspect, lindex, pvAspect,
726 ptd, hdcTargetDev, hdcDraw, lprcBounds, lprcWBounds, pfnContinue, dwContinue);
730 static HRESULT WINAPI ViewObject_GetColorSet(IViewObject2 *iface, DWORD dwDrawAspect, LONG lindex, void *pvAspect,
731 DVTARGETDEVICE *ptd, HDC hicTargetDev, LOGPALETTE **ppColorSet)
733 HTMLDocument *This = VIEWOBJ_THIS(iface);
734 FIXME("(%p)->(%d %d %p %p %p %p)\n", This, dwDrawAspect, lindex, pvAspect, ptd, hicTargetDev, ppColorSet);
738 static HRESULT WINAPI ViewObject_Freeze(IViewObject2 *iface, DWORD dwDrawAspect, LONG lindex,
739 void *pvAspect, DWORD *pdwFreeze)
741 HTMLDocument *This = VIEWOBJ_THIS(iface);
742 FIXME("(%p)->(%d %d %p %p)\n", This, dwDrawAspect, lindex, pvAspect, pdwFreeze);
746 static HRESULT WINAPI ViewObject_Unfreeze(IViewObject2 *iface, DWORD dwFreeze)
748 HTMLDocument *This = VIEWOBJ_THIS(iface);
749 FIXME("(%p)->(%d)\n", This, dwFreeze);
753 static HRESULT WINAPI ViewObject_SetAdvise(IViewObject2 *iface, DWORD aspects, DWORD advf, IAdviseSink *pAdvSink)
755 HTMLDocument *This = VIEWOBJ_THIS(iface);
756 FIXME("(%p)->(%d %d %p)\n", This, aspects, advf, pAdvSink);
760 static HRESULT WINAPI ViewObject_GetAdvise(IViewObject2 *iface, DWORD *pAspects, DWORD *pAdvf, IAdviseSink **ppAdvSink)
762 HTMLDocument *This = VIEWOBJ_THIS(iface);
763 FIXME("(%p)->(%p %p %p)\n", This, pAspects, pAdvf, ppAdvSink);
767 static HRESULT WINAPI ViewObject_GetExtent(IViewObject2 *iface, DWORD dwDrawAspect, LONG lindex,
768 DVTARGETDEVICE* ptd, LPSIZEL lpsizel)
770 HTMLDocument *This = VIEWOBJ_THIS(iface);
771 FIXME("(%p)->(%d %d %p %p)\n", This, dwDrawAspect, lindex, ptd, lpsizel);
777 static const IViewObject2Vtbl ViewObjectVtbl = {
778 ViewObject_QueryInterface,
782 ViewObject_GetColorSet,
785 ViewObject_SetAdvise,
786 ViewObject_GetAdvise,
790 void HTMLDocument_View_Init(HTMLDocument *This)
792 This->lpOleDocumentViewVtbl = &OleDocumentViewVtbl;
793 This->lpViewObject2Vtbl = &ViewObjectVtbl;
797 This->ip_window = NULL;
799 This->tooltips_hwnd = NULL;
801 This->in_place_active = FALSE;
802 This->ui_active = FALSE;
803 This->window_active = FALSE;