VBoxGuestR3LibSeamless.cpp revision 55d9f6ae0938acb37e715dd8e24c5e6ccdbd3453
/* $Id$ */
/** @file
* VBoxGuestR3Lib - Ring-3 Support Library for VirtualBox guest additions, Seamless mode.
*/
/*
* Copyright (C) 2007 Sun Microsystems, Inc.
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
* Clara, CA 95054 USA or visit http://www.sun.com if you need
* additional information or have any questions.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
#include "VBGLR3Internal.h"
/**
* Tell the host that we support (or no longer support) seamless mode.
*
* @returns IPRT status value
* @param fState whether or not we support seamless mode
*/
{
if (fState)
return VbglR3SetGuestCaps(VMMDEV_GUEST_SUPPORTS_SEAMLESS, 0);
return VbglR3SetGuestCaps(0, VMMDEV_GUEST_SUPPORTS_SEAMLESS);
}
/**
* Wait for a seamless mode change event.
*
* @returns IPRT status value
* @retval pMode on success, the seamless mode to switch into (i.e. disabled, visible region
* or host window)
*/
{
int rc;
if (RT_SUCCESS(rc))
{
/* did we get the right event? */
{
/* get the seamless change request */
if (RT_SUCCESS(rc))
{
return VINF_SUCCESS;
}
}
else
rc = VERR_TRY_AGAIN;
}
return rc;
}
/**
* Inform the host about the visible region
*
* @returns IPRT status code
* @param cRects number of rectangles in the list of visible rectangles
* @param pRects list of visible rectangles on the guest display
*
* @todo A scatter-gather version of vbglR3GRPerform would be nice, so that we don't have
* to copy our rectangle and header data into a single structure and perform an
* additional allocation.
*/
{
int rc;
return VINF_SUCCESS;
if (RT_SUCCESS(rc))
{
if (RT_SUCCESS(rc))
}
return rc;
}