shdocvw: Added WebBrowser::FullScreen property implementation.

This commit is contained in:
Jacek Caban 2007-09-23 22:37:01 +02:00 committed by Alexandre Julliard
parent 00e562735d
commit 2fe9af5507
3 changed files with 35 additions and 4 deletions

View File

@ -131,6 +131,7 @@ struct WebBrowser {
VARIANT_BOOL address_bar;
VARIANT_BOOL status_bar;
VARIANT_BOOL tool_bar;
VARIANT_BOOL full_screen;
DocHost doc_host;
};

View File

@ -1094,6 +1094,29 @@ static void test_ie_funcs(IUnknown *unk)
hres = IWebBrowser2_put_ToolBar(wb, VARIANT_TRUE);
ok(hres == S_OK, "put_ToolBar failed: %08x\n", hres);
/* FullScreen */
hres = IWebBrowser2_get_FullScreen(wb, &b);
ok(hres == S_OK, "get_FullScreen failed: %08x\n", hres);
ok(b == VARIANT_FALSE, "b=%x\n", b);
hres = IWebBrowser2_put_FullScreen(wb, VARIANT_TRUE);
ok(hres == S_OK, "put_FullScreen failed: %08x\n", hres);
hres = IWebBrowser2_get_FullScreen(wb, &b);
ok(hres == S_OK, "get_FullScreen failed: %08x\n", hres);
ok(b == VARIANT_TRUE, "b=%x\n", b);
hres = IWebBrowser2_put_FullScreen(wb, 100);
ok(hres == S_OK, "put_FullScreen failed: %08x\n", hres);
hres = IWebBrowser2_get_FullScreen(wb, &b);
ok(hres == S_OK, "get_FullScreen failed: %08x\n", hres);
ok(b == VARIANT_TRUE, "b=%x\n", b);
hres = IWebBrowser2_put_FullScreen(wb, VARIANT_FALSE);
ok(hres == S_OK, "put_FullScreen failed: %08x\n", hres);
IWebBrowser2_Release(wb);
}

View File

@ -638,15 +638,21 @@ static HRESULT WINAPI WebBrowser_put_MenuBar(IWebBrowser2 *iface, VARIANT_BOOL V
static HRESULT WINAPI WebBrowser_get_FullScreen(IWebBrowser2 *iface, VARIANT_BOOL *pbFullScreen)
{
WebBrowser *This = WEBBROWSER_THIS(iface);
FIXME("(%p)->(%p)\n", This, pbFullScreen);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, pbFullScreen);
*pbFullScreen = This->full_screen;
return S_OK;
}
static HRESULT WINAPI WebBrowser_put_FullScreen(IWebBrowser2 *iface, VARIANT_BOOL bFullScreen)
{
WebBrowser *This = WEBBROWSER_THIS(iface);
FIXME("(%p)->(%x)\n", This, bFullScreen);
return E_NOTIMPL;
TRACE("(%p)->(%x)\n", This, bFullScreen);
This->full_screen = bFullScreen ? VARIANT_TRUE : VARIANT_FALSE;
return S_OK;
}
static HRESULT WINAPI WebBrowser_Navigate2(IWebBrowser2 *iface, VARIANT *URL, VARIANT *Flags,
@ -927,6 +933,7 @@ static HRESULT WebBrowser_Create(INT version, IUnknown *pOuter, REFIID riid, voi
ret->address_bar = VARIANT_TRUE;
ret->status_bar = VARIANT_TRUE;
ret->tool_bar = VARIANT_TRUE;
ret->full_screen = VARIANT_FALSE;
WebBrowser_OleObject_Init(ret);
WebBrowser_ViewObject_Init(ret);