seamless.h revision b72771e8c6ba3b3d9ebdd7977730325131ae0f98
/** @file
*
* Guest client: seamless mode.
*/
/*
* Copyright (C) 2006-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.
*/
#ifndef __Additions_xclient_seamless_h
# define __Additions_xclient_seamless_h
#include "seamless-host.h"
#include "seamless-guest.h"
#include "seamless-glue.h"
/** Thread function class for VBoxGuestSeamlessGuest. */
{
/** The guest class "owning" us. */
/** The guest observer monitoring the guest. */
/** Should we exit the thread? */
bool mExit;
// Copying or assigning a thread object is not sensible
virtual ~VBoxGuestSeamlessGuestThread(void) {}
/**
* The actual thread function.
*
* @returns iprt status code as thread return value
* @param pParent the VBoxGuestThread running this thread function
*/
{
int rc = VINF_SUCCESS;
LogFlowThisFunc(("\n"));
if (RT_SUCCESS(rc))
{
while (!pThread->isStopping())
{
}
}
return rc;
}
/**
* Send a signal to the thread function that it should exit
*/
};
/** Observer for the host class - start and stop seamless reporting in the guest when the
host requests. */
{
{
}
{
{
case VBoxGuestSeamlessHost::ENABLE:
mGuestThread->start();
break;
case VBoxGuestSeamlessHost::DISABLE:
break;
default:
break;
}
}
};
/** Observer for the guest class - send the host updated seamless rectangle information when
it becomes available. */
{
{
}
{
}
};
{
bool isInitialised;
int init(void)
{
int rc = VINF_SUCCESS;
LogFlowThisFunc(("\n"));
if (isInitialised) /* Assertion */
{
LogRelFunc(("error: called a second time! (VBoxClient)\n"));
}
if (RT_SUCCESS(rc))
{
}
if (RT_SUCCESS(rc))
{
}
if (RT_SUCCESS(rc))
{
}
if (RT_SUCCESS(rc))
{
isInitialised = true;
}
if (RT_FAILURE(rc))
{
}
return rc;
}
{
LogFlowThisFunc(("\n"));
if (isInitialised)
{
isInitialised = false;
}
LogFlowThisFunc(("returning\n"));
}
RTTHREADFLAGS_WAITABLE, "Guest events"),
{
isInitialised = false;
}
~VBoxGuestSeamless() { uninit(); }
};
#endif /* __Additions_xclient_seamless_h not defined */