displaychange.h revision b72771e8c6ba3b3d9ebdd7977730325131ae0f98
/** @file
*
* Guest client: display auto-resize.
*/
/*
* 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.
*/
# define __Additions_client_display_change_h
#include "thread.h" /* for VBoxGuestThread */
#if defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) || defined(RT_OS_NETBSD)
/**
* Display change request monitor thread function
*/
{
// Copying or assigning a thread object is not sensible
// Private member variables
/** Have we been initialised yet? */
bool mInit;
/** The thread object running us. */
{
mInit = false;
}
{
LogFlowThisFunc(("\n"));
if (mInit)
{
{
uninit();
}
catch(...) {}
}
LogFlowThisFunc(("returning\n"));
}
/**
* Initialise the class and check that the guest supports dynamic resizing.
* @returns iprt status value
*/
int init(void);
/**
* Uninitialise the class
*/
void uninit(void);
/**
* The actual thread function.
*
* @returns iprt status code as thread return value
* @param pParent the VBoxGuestThread running this thread function
*/
/**
* Send a signal to the thread function that it should exit
*/
};
#else
/* Just in case anyone else ever uses this */
#endif
/**
* Monitor for and dispatch display change events
*/
{
// No copying or assignment
// Private member variables
/** Our monitor thread function */
/** And the thread for the thread function */
/** Are we initialised? */
bool mInit;
/**
* Initialise the class.
* @returns iprt status value
*/
int init(void);
/**
* Uninitialise the class.
* @param cMillies how long to wait for the thread to stop
*/
RTTHREADFLAGS_WAITABLE, "Display change")
{ mInit = false; }
{
LogFlowThisFunc(("\n"));
{
uninit(2000);
}
catch(...) {}
LogFlowThisFunc(("returning\n"));
}
};
#endif /* __Additions_display_change_h not defined */