tstSeamlessX11.cpp revision b72771e8c6ba3b3d9ebdd7977730325131ae0f98
/** @file
* Linux seamless guest additions simulator in host.
*/
/*
* 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.
*/
#include <iostream>
#include <stdlib.h> /* exit() */
#include <iprt/semaphore.h>
#include <iprt/initterm.h>
#include <VBox/VBoxGuest.h>
#include "../seamless.h"
static RTSEMEVENT eventSem;
{
for (unsigned i = 0; i < cRects; ++i)
{
}
return true;
}
int VbglR3SeamlessSetCap(bool bState)
{
return true;
}
{
return true;
}
{
static bool active = false;
int rc = VINF_SUCCESS;
if (!active)
{
active = true;
}
else
{
if (RT_SUCCESS(rc))
{
}
}
return true;
}
int VbglR3InterruptEventWaits(void)
{
return RTSemEventSignal(eventSem);
}
/**
* Xlib error handler for certain errors that we can't avoid.
*/
{
char errorText[1024];
{
/* This can be triggered if a guest application destroys a window before we notice. */
return 0;
}
exit(1);
}
{
int rc = VINF_SUCCESS;
RTR3Init();
if (0 == XInitThreads())
{
exit(1);
}
/* Set an X11 error handler, so that we don't die when we get unavoidable errors. */
/** Our instance of the seamless class. */
try
{
LogRel(("Starting seamless Guest Additions...\n"));
if (rc != VINF_SUCCESS)
{
}
}
{
}
catch (...)
{
}
try
{
}
{
}
catch (...)
{
}
return rc;
}