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);
96 nsIWebBrowserFocus_Activate(This->focus);
99 void update_doc(HTMLDocument *This, DWORD flags)
101 if(!This->update && This->hwnd)
102 SetTimer(This->hwnd, TIMER_ID, 100, NULL);
104 This->update |= flags;
107 void update_title(HTMLDocument *This)
109 IOleCommandTarget *olecmd;
112 if(!(This->update & UPDATE_TITLE))
115 This->update &= ~UPDATE_TITLE;
120 hres = IOleClientSite_QueryInterface(This->client, &IID_IOleCommandTarget, (void**)&olecmd);
121 if(SUCCEEDED(hres)) {
125 V_VT(&title) = VT_BSTR;
126 V_BSTR(&title) = SysAllocString(empty);
127 IOleCommandTarget_Exec(olecmd, NULL, OLECMDID_SETTITLE, OLECMDEXECOPT_DONTPROMPTUSER,
129 SysFreeString(V_BSTR(&title));
131 IOleCommandTarget_Release(olecmd);
135 static LRESULT on_timer(HTMLDocument *This)
137 TRACE("(%p) %x\n", This, This->update);
139 KillTimer(This->hwnd, TIMER_ID);
144 if(This->update & UPDATE_UI) {
146 IDocHostUIHandler_UpdateUI(This->hostui);
149 IOleCommandTarget *cmdtrg;
152 hres = IOleClientSite_QueryInterface(This->client, &IID_IOleCommandTarget,
154 if(SUCCEEDED(hres)) {
155 IOleCommandTarget_Exec(cmdtrg, NULL, OLECMDID_UPDATECOMMANDS,
156 OLECMDEXECOPT_DONTPROMPTUSER, NULL, NULL);
157 IOleCommandTarget_Release(cmdtrg);
167 void notif_focus(HTMLDocument *This)
169 IOleControlSite *site;
172 hres = IOleClientSite_QueryInterface(This->client, &IID_IOleControlSite, (void**)&site);
176 IOleControlSite_OnFocus(site, This->focus);
177 IOleControlSite_Release(site);
180 static LRESULT WINAPI serverwnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
184 static const WCHAR wszTHIS[] = {'T','H','I','S',0};
186 if(msg == WM_CREATE) {
187 This = *(HTMLDocument**)lParam;
188 SetPropW(hwnd, wszTHIS, This);
190 This = (HTMLDocument*)GetPropW(hwnd, wszTHIS);
198 paint_document(This);
201 TRACE("(%p)->(WM_SIZE)\n", This);
202 if(This->nscontainer) {
205 if(!(This->hostinfo.dwFlags & (DOCHOSTUIFLAG_NO3DOUTERBORDER|DOCHOSTUIFLAG_NO3DBORDER))) {
206 ew = GetSystemMetrics(SM_CXEDGE);
207 eh = GetSystemMetrics(SM_CYEDGE);
210 SetWindowPos(This->nscontainer->hwnd, NULL, ew, eh,
211 LOWORD(lParam) - 2*ew, HIWORD(lParam) - 2*eh,
212 SWP_NOZORDER | SWP_NOACTIVATE);
216 return on_timer(This);
219 return DefWindowProcW(hwnd, msg, wParam, lParam);
222 static void register_serverwnd_class(void)
224 static WNDCLASSEXW wndclass = {
228 0, 0, NULL, NULL, NULL, NULL, NULL,
229 wszInternetExplorer_Server,
232 wndclass.hInstance = hInst;
233 serverwnd_class = RegisterClassExW(&wndclass);
236 static HRESULT activate_window(HTMLDocument *This)
238 IOleInPlaceUIWindow *pIPWnd;
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, &pIPWnd,
257 &posrect, &cliprect, &frameinfo);
259 WARN("GetWindowContext failed: %08x\n", hres);
264 IOleInPlaceUIWindow_Release(pIPWnd);
265 TRACE("got window context: %p %p {%d %d %d %d} {%d %d %d %d} {%d %x %p %p %d}\n",
266 pIPFrame, pIPWnd, posrect.left, posrect.top, posrect.right, posrect.bottom,
267 cliprect.left, cliprect.top, cliprect.right, cliprect.bottom,
268 frameinfo.cb, frameinfo.fMDIApp, frameinfo.hwndFrame, frameinfo.haccel, frameinfo.cAccelEntries);
270 hres = IOleInPlaceSite_GetWindow(This->ipsite, &parent_hwnd);
272 WARN("GetWindow failed: %08x\n", hres);
276 TRACE("got parent window %p\n", parent_hwnd);
279 if(GetParent(This->hwnd) != parent_hwnd)
280 SetParent(This->hwnd, parent_hwnd);
281 SetWindowPos(This->hwnd, HWND_TOP,
282 posrect.left, posrect.top, posrect.right-posrect.left, posrect.bottom-posrect.top,
283 SWP_NOACTIVATE | SWP_SHOWWINDOW);
285 CreateWindowExW(0, wszInternetExplorer_Server, NULL,
286 WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
287 posrect.left, posrect.top, posrect.right-posrect.left, posrect.bottom-posrect.top,
288 parent_hwnd, NULL, hInst, This);
290 TRACE("Created window %p\n", This->hwnd);
292 SetWindowPos(This->hwnd, NULL, 0, 0, 0, 0,
293 SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | SWP_NOREDRAW | SWP_NOACTIVATE | SWP_SHOWWINDOW);
294 RedrawWindow(This->hwnd, NULL, NULL, RDW_INVALIDATE | RDW_NOERASE | RDW_ALLCHILDREN);
295 SetFocus(This->hwnd);
298 * Windows implementation calls:
299 * RegisterWindowMessage("MSWHEEL_ROLLMSG");
301 SetTimer(This->hwnd, TIMER_ID, 100, NULL);
304 if(This->nscontainer)
305 activate_gecko(This->nscontainer);
307 This->in_place_active = TRUE;
308 hres = IOleInPlaceSite_QueryInterface(This->ipsite, &IID_IOleInPlaceSiteEx, (void**)&ipsiteex);
309 if(SUCCEEDED(hres)) {
312 hres = IOleInPlaceSiteEx_OnInPlaceActivateEx(ipsiteex, &redraw, 0);
313 IOleInPlaceSiteEx_Release(ipsiteex);
315 FIXME("unsupported redraw\n");
317 hres = IOleInPlaceSite_OnInPlaceActivate(This->ipsite);
320 WARN("OnInPlaceActivate failed: %08x\n", hres);
321 This->in_place_active = FALSE;
325 hres = IOleClientSite_QueryInterface(This->client, &IID_IOleCommandTarget, (void**)&cmdtrg);
326 if(SUCCEEDED(hres)) {
329 IOleInPlaceFrame_SetStatusText(pIPFrame, NULL);
333 IOleCommandTarget_Exec(cmdtrg, NULL, OLECMDID_SETPROGRESSMAX,
334 OLECMDEXECOPT_DONTPROMPTUSER, &var, NULL);
335 IOleCommandTarget_Exec(cmdtrg, NULL, OLECMDID_SETPROGRESSPOS,
336 OLECMDEXECOPT_DONTPROMPTUSER, &var, NULL);
338 IOleCommandTarget_Release(cmdtrg);
342 IOleInPlaceFrame_Release(This->frame);
343 This->frame = pIPFrame;
345 This->window_active = TRUE;
350 static LRESULT WINAPI tooltips_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
352 tooltip_data *data = GetPropW(hwnd, wszTooltipData);
354 TRACE("%d %p\n", msg, data);
356 if(msg == TTM_WINDOWFROMPOINT) {
358 POINT *pt = (POINT*)lParam;
360 TRACE("TTM_WINDOWFROMPOINT (%d,%d)\n", pt->x, pt->y);
362 GetWindowRect(data->doc->hwnd, &rect);
364 if(rect.left <= pt->x && pt->x <= rect.right
365 && rect.top <= pt->y && pt->y <= rect.bottom)
366 return (LPARAM)data->doc->hwnd;
369 return CallWindowProcW(data->proc, hwnd, msg, wParam, lParam);
372 static void create_tooltips_window(HTMLDocument *This)
374 tooltip_data *data = mshtml_alloc(sizeof(*data));
376 This->tooltips_hwnd = CreateWindowExW(0, TOOLTIPS_CLASSW, NULL, TTS_NOPREFIX | WS_POPUP,
377 CW_USEDEFAULT, CW_USEDEFAULT, 10, 10, This->hwnd, NULL, hInst, NULL);
380 data->proc = (WNDPROC)GetWindowLongPtrW(This->tooltips_hwnd, GWLP_WNDPROC);
382 SetPropW(This->tooltips_hwnd, wszTooltipData, data);
384 SetWindowLongPtrW(This->tooltips_hwnd, GWLP_WNDPROC, (LONG_PTR)tooltips_proc);
386 SetWindowPos(This->tooltips_hwnd, HWND_TOPMOST,0, 0, 0, 0,
387 SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
391 void show_tooltip(HTMLDocument *This, DWORD x, DWORD y, LPCWSTR text)
393 TTTOOLINFOW toolinfo = {
394 sizeof(TTTOOLINFOW), 0, This->hwnd, 0xdeadbeef,
395 {x>2 ? x-2 : 0, y>0 ? y-2 : 0, x+2, y+2}, /* FIXME */
396 NULL, (LPWSTR)text, 0};
397 MSG msg = {This->hwnd, WM_MOUSEMOVE, 0, MAKELPARAM(x,y), 0, {x,y}};
399 TRACE("(%p)->(%d %d %s)\n", This, x, y, debugstr_w(text));
401 if(!This->tooltips_hwnd)
402 create_tooltips_window(This);
404 SendMessageW(This->tooltips_hwnd, TTM_ADDTOOLW, 0, (LPARAM)&toolinfo);
405 SendMessageW(This->tooltips_hwnd, TTM_ACTIVATE, TRUE, 0);
406 SendMessageW(This->tooltips_hwnd, TTM_RELAYEVENT, 0, (LPARAM)&msg);
409 void hide_tooltip(HTMLDocument *This)
411 TTTOOLINFOW toolinfo = {
412 sizeof(TTTOOLINFOW), 0, This->hwnd, 0xdeadbeef,
413 {0,0,0,0}, NULL, NULL, 0};
415 TRACE("(%p)\n", This);
417 SendMessageW(This->tooltips_hwnd, TTM_DELTOOLW, 0, (LPARAM)&toolinfo);
418 SendMessageW(This->tooltips_hwnd, TTM_ACTIVATE, FALSE, 0);
421 /**********************************************************
422 * IOleDocumentView implementation
425 #define DOCVIEW_THIS(iface) DEFINE_THIS(HTMLDocument, OleDocumentView, iface)
427 static HRESULT WINAPI OleDocumentView_QueryInterface(IOleDocumentView *iface, REFIID riid, void **ppvObject)
429 HTMLDocument *This = DOCVIEW_THIS(iface);
430 return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppvObject);
433 static ULONG WINAPI OleDocumentView_AddRef(IOleDocumentView *iface)
435 HTMLDocument *This = DOCVIEW_THIS(iface);
436 return IHTMLDocument2_AddRef(HTMLDOC(This));
439 static ULONG WINAPI OleDocumentView_Release(IOleDocumentView *iface)
441 HTMLDocument *This = DOCVIEW_THIS(iface);
442 return IHTMLDocument2_Release(HTMLDOC(This));
445 static HRESULT WINAPI OleDocumentView_SetInPlaceSite(IOleDocumentView *iface, IOleInPlaceSite *pIPSite)
447 HTMLDocument *This = DOCVIEW_THIS(iface);
448 TRACE("(%p)->(%p)\n", This, pIPSite);
451 IOleInPlaceSite_AddRef(pIPSite);
454 IOleInPlaceSite_Release(This->ipsite);
456 This->ipsite = pIPSite;
460 static HRESULT WINAPI OleDocumentView_GetInPlaceSite(IOleDocumentView *iface, IOleInPlaceSite **ppIPSite)
462 HTMLDocument *This = DOCVIEW_THIS(iface);
463 TRACE("(%p)->(%p)\n", This, ppIPSite);
469 IOleInPlaceSite_AddRef(This->ipsite);
471 *ppIPSite = This->ipsite;
475 static HRESULT WINAPI OleDocumentView_GetDocument(IOleDocumentView *iface, IUnknown **ppunk)
477 HTMLDocument *This = DOCVIEW_THIS(iface);
478 TRACE("(%p)->(%p)\n", This, ppunk);
483 IHTMLDocument2_AddRef(HTMLDOC(This));
484 *ppunk = (IUnknown*)HTMLDOC(This);
488 static HRESULT WINAPI OleDocumentView_SetRect(IOleDocumentView *iface, LPRECT prcView)
490 HTMLDocument *This = DOCVIEW_THIS(iface);
493 TRACE("(%p)->(%p)\n", This, prcView);
499 GetClientRect(This->hwnd, &rect);
500 if(memcmp(prcView, &rect, sizeof(RECT))) {
501 InvalidateRect(This->hwnd,NULL,TRUE);
502 SetWindowPos(This->hwnd, NULL, prcView->left, prcView->top, prcView->right,
503 prcView->bottom, SWP_NOZORDER | SWP_NOACTIVATE);
510 static HRESULT WINAPI OleDocumentView_GetRect(IOleDocumentView *iface, LPRECT prcView)
512 HTMLDocument *This = DOCVIEW_THIS(iface);
514 TRACE("(%p)->(%p)\n", This, prcView);
519 GetClientRect(This->hwnd, prcView);
523 static HRESULT WINAPI OleDocumentView_SetRectComplex(IOleDocumentView *iface, LPRECT prcView,
524 LPRECT prcHScroll, LPRECT prcVScroll, LPRECT prcSizeBox)
526 HTMLDocument *This = DOCVIEW_THIS(iface);
527 FIXME("(%p)->(%p %p %p %p)\n", This, prcView, prcHScroll, prcVScroll, prcSizeBox);
531 static HRESULT WINAPI OleDocumentView_Show(IOleDocumentView *iface, BOOL fShow)
533 HTMLDocument *This = DOCVIEW_THIS(iface);
536 TRACE("(%p)->(%x)\n", This, fShow);
539 if(!This->ui_active) {
540 hres = activate_window(This);
544 update_doc(This, UPDATE_UI);
545 ShowWindow(This->hwnd, SW_SHOW);
547 ShowWindow(This->hwnd, SW_HIDE);
553 static HRESULT WINAPI OleDocumentView_UIActivate(IOleDocumentView *iface, BOOL fUIActivate)
555 HTMLDocument *This = DOCVIEW_THIS(iface);
558 TRACE("(%p)->(%x)\n", This, fUIActivate);
561 FIXME("This->ipsite = NULL\n");
569 if(!This->window_active) {
570 hres = activate_window(This);
575 update_doc(This, UPDATE_UI);
577 hres = IOleInPlaceSite_OnUIActivate(This->ipsite);
578 if(SUCCEEDED(hres)) {
579 OLECHAR wszHTMLDocument[30];
580 LoadStringW(hInst, IDS_HTMLDOCUMENT, wszHTMLDocument,
581 sizeof(wszHTMLDocument)/sizeof(WCHAR));
582 IOleInPlaceFrame_SetActiveObject(This->frame, ACTOBJ(This), wszHTMLDocument);
584 FIXME("OnUIActivate failed: %08x\n", hres);
585 IOleInPlaceFrame_Release(This->frame);
587 This->ui_active = FALSE;
591 hres = IDocHostUIHandler_ShowUI(This->hostui, 0, ACTOBJ(This), CMDTARGET(This),
594 IDocHostUIHandler_HideUI(This->hostui);
596 This->ui_active = TRUE;
598 This->window_active = FALSE;
599 if(This->ui_active) {
600 This->ui_active = FALSE;
602 IOleInPlaceFrame_SetActiveObject(This->frame, NULL, NULL);
604 IDocHostUIHandler_HideUI(This->hostui);
606 IOleInPlaceSite_OnUIDeactivate(This->ipsite, FALSE);
612 static HRESULT WINAPI OleDocumentView_Open(IOleDocumentView *iface)
614 HTMLDocument *This = DOCVIEW_THIS(iface);
615 FIXME("(%p)\n", This);
619 static HRESULT WINAPI OleDocumentView_CloseView(IOleDocumentView *iface, DWORD dwReserved)
621 HTMLDocument *This = DOCVIEW_THIS(iface);
622 TRACE("(%p)->(%x)\n", This, dwReserved);
625 WARN("dwReserved = %d\n", dwReserved);
628 * Windows implementation calls QueryInterface(IID_IOleCommandTarget),
629 * QueryInterface(IID_IOleControlSite) and KillTimer
632 IOleDocumentView_Show(iface, FALSE);
637 static HRESULT WINAPI OleDocumentView_SaveViewState(IOleDocumentView *iface, LPSTREAM pstm)
639 HTMLDocument *This = DOCVIEW_THIS(iface);
640 FIXME("(%p)->(%p)\n", This, pstm);
644 static HRESULT WINAPI OleDocumentView_ApplyViewState(IOleDocumentView *iface, LPSTREAM pstm)
646 HTMLDocument *This = DOCVIEW_THIS(iface);
647 FIXME("(%p)->(%p)\n", This, pstm);
651 static HRESULT WINAPI OleDocumentView_Clone(IOleDocumentView *iface, IOleInPlaceSite *pIPSiteNew,
652 IOleDocumentView **ppViewNew)
654 HTMLDocument *This = DOCVIEW_THIS(iface);
655 FIXME("(%p)->(%p %p)\n", This, pIPSiteNew, ppViewNew);
661 static const IOleDocumentViewVtbl OleDocumentViewVtbl = {
662 OleDocumentView_QueryInterface,
663 OleDocumentView_AddRef,
664 OleDocumentView_Release,
665 OleDocumentView_SetInPlaceSite,
666 OleDocumentView_GetInPlaceSite,
667 OleDocumentView_GetDocument,
668 OleDocumentView_SetRect,
669 OleDocumentView_GetRect,
670 OleDocumentView_SetRectComplex,
671 OleDocumentView_Show,
672 OleDocumentView_UIActivate,
673 OleDocumentView_Open,
674 OleDocumentView_CloseView,
675 OleDocumentView_SaveViewState,
676 OleDocumentView_ApplyViewState,
677 OleDocumentView_Clone
680 /**********************************************************
681 * IViewObject implementation
684 #define VIEWOBJ_THIS(iface) DEFINE_THIS(HTMLDocument, ViewObject2, iface)
686 static HRESULT WINAPI ViewObject_QueryInterface(IViewObject2 *iface, REFIID riid, void **ppvObject)
688 HTMLDocument *This = VIEWOBJ_THIS(iface);
689 return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppvObject);
692 static ULONG WINAPI ViewObject_AddRef(IViewObject2 *iface)
694 HTMLDocument *This = VIEWOBJ_THIS(iface);
695 return IHTMLDocument2_AddRef(HTMLDOC(This));
698 static ULONG WINAPI ViewObject_Release(IViewObject2 *iface)
700 HTMLDocument *This = VIEWOBJ_THIS(iface);
701 return IHTMLDocument2_Release(HTMLDOC(This));
704 static HRESULT WINAPI ViewObject_Draw(IViewObject2 *iface, DWORD dwDrawAspect, LONG lindex, void *pvAspect,
705 DVTARGETDEVICE *ptd, HDC hdcTargetDev, HDC hdcDraw, LPCRECTL lprcBounds,
706 LPCRECTL lprcWBounds, BOOL (CALLBACK *pfnContinue)(ULONG_PTR dwContinue), ULONG_PTR dwContinue)
708 HTMLDocument *This = VIEWOBJ_THIS(iface);
709 FIXME("(%p)->(%d %d %p %p %p %p %p %p %p %ld)\n", This, dwDrawAspect, lindex, pvAspect,
710 ptd, hdcTargetDev, hdcDraw, lprcBounds, lprcWBounds, pfnContinue, dwContinue);
714 static HRESULT WINAPI ViewObject_GetColorSet(IViewObject2 *iface, DWORD dwDrawAspect, LONG lindex, void *pvAspect,
715 DVTARGETDEVICE *ptd, HDC hicTargetDev, LOGPALETTE **ppColorSet)
717 HTMLDocument *This = VIEWOBJ_THIS(iface);
718 FIXME("(%p)->(%d %d %p %p %p %p)\n", This, dwDrawAspect, lindex, pvAspect, ptd, hicTargetDev, ppColorSet);
722 static HRESULT WINAPI ViewObject_Freeze(IViewObject2 *iface, DWORD dwDrawAspect, LONG lindex,
723 void *pvAspect, DWORD *pdwFreeze)
725 HTMLDocument *This = VIEWOBJ_THIS(iface);
726 FIXME("(%p)->(%d %d %p %p)\n", This, dwDrawAspect, lindex, pvAspect, pdwFreeze);
730 static HRESULT WINAPI ViewObject_Unfreeze(IViewObject2 *iface, DWORD dwFreeze)
732 HTMLDocument *This = VIEWOBJ_THIS(iface);
733 FIXME("(%p)->(%d)\n", This, dwFreeze);
737 static HRESULT WINAPI ViewObject_SetAdvise(IViewObject2 *iface, DWORD aspects, DWORD advf, IAdviseSink *pAdvSink)
739 HTMLDocument *This = VIEWOBJ_THIS(iface);
740 FIXME("(%p)->(%d %d %p)\n", This, aspects, advf, pAdvSink);
744 static HRESULT WINAPI ViewObject_GetAdvise(IViewObject2 *iface, DWORD *pAspects, DWORD *pAdvf, IAdviseSink **ppAdvSink)
746 HTMLDocument *This = VIEWOBJ_THIS(iface);
747 FIXME("(%p)->(%p %p %p)\n", This, pAspects, pAdvf, ppAdvSink);
751 static HRESULT WINAPI ViewObject_GetExtent(IViewObject2 *iface, DWORD dwDrawAspect, LONG lindex,
752 DVTARGETDEVICE* ptd, LPSIZEL lpsizel)
754 HTMLDocument *This = VIEWOBJ_THIS(iface);
755 FIXME("(%p)->(%d %d %p %p)\n", This, dwDrawAspect, lindex, ptd, lpsizel);
761 static const IViewObject2Vtbl ViewObjectVtbl = {
762 ViewObject_QueryInterface,
766 ViewObject_GetColorSet,
769 ViewObject_SetAdvise,
770 ViewObject_GetAdvise,
774 void HTMLDocument_View_Init(HTMLDocument *This)
776 This->lpOleDocumentViewVtbl = &OleDocumentViewVtbl;
777 This->lpViewObject2Vtbl = &ViewObjectVtbl;
782 This->tooltips_hwnd = NULL;
784 This->in_place_active = FALSE;
785 This->ui_active = FALSE;
786 This->window_active = FALSE;