seamless.h revision a2760a4d593af57a19ec32cdfd1723b68495df8c
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt * Guest client: seamless mode.
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt * Copyright (C) 2006-2007 innotek GmbH
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt * This file is part of VirtualBox Open Source Edition (OSE), as
83a28ca274521e15086fc39febde507bcc4e145eMark Andrews * available from http://www.virtualbox.org. This file is free software;
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt * you can redistribute it and/or modify it under the terms of the GNU
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt * General Public License (GPL) as published by the Free Software
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt * Foundation, in version 2 as it comes in the "COPYING" file of the
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt/** Thread function class for VBoxGuestSeamlessX11. */
351b62535d4c4f89883bfdba025999dd32490266Evan Huntclass VBoxGuestSeamlessGuestThread: public VBoxGuestThreadFunction
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt /** The guest class "owning" us. */
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt /** Should we exit the thread? */
19c7b1a0293498a3e36692c59646ed6e15ffc8d0Tinderbox User // Copying or assigning a thread object is not sensible
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews VBoxGuestSeamlessGuestThread(const VBoxGuestSeamlessGuestThread&);
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt VBoxGuestSeamlessGuestThread& operator=(const VBoxGuestSeamlessGuestThread&);
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt VBoxGuestSeamlessGuestThread(VBoxGuestSeamlessGuestImpl *pGuest)
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt * The actual thread function.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt * @returns iprt status code as thread return value
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt * @param pParent the VBoxGuestThread running this thread function
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt virtual int threadFunction(VBoxGuestThread *pThread)
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt * Send a signal to the thread function that it should exit
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt virtual void stop(void) { mGuest->interruptEvent(); }
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt/** Observer for the host class - start and stop seamless reporting in the guest when the
30eec077db2bdcb6f2a0dc388a3cdde2ede75ec1Mark Andrews host requests. */
46bc64f4b1a0e84ab0397943453fe83a17baf2c4Evan Huntclass VBoxGuestSeamlessHostObserver : public VBoxGuestSeamlessObserver
46bc64f4b1a0e84ab0397943453fe83a17baf2c4Evan Hunt VBoxGuestSeamlessHostObserver(VBoxGuestSeamlessHost *pHost,
46bc64f4b1a0e84ab0397943453fe83a17baf2c4Evan Hunt/** Observer for the guest class - send the host updated seamless rectangle information when
30eec077db2bdcb6f2a0dc388a3cdde2ede75ec1Mark Andrews it becomes available. */
46bc64f4b1a0e84ab0397943453fe83a17baf2c4Evan Huntclass VBoxGuestSeamlessGuestObserver : public VBoxGuestSeamlessObserver
30eec077db2bdcb6f2a0dc388a3cdde2ede75ec1Mark Andrews VBoxGuestSeamlessGuestObserver(VBoxGuestSeamlessHost *pHost,
6493425eaa8d09485bcbf78e4f854b1a35ef71edTatuya JINMEI 神明達哉 LogRelFunc(("error: called a second time!\n"));
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt VBoxGuestSeamless() : mHostObs(&mHost, &mGuest), mHostObs(&mHost, &mGuest),
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt mGuestFunction(&mGuest), mGuestThread(&mGuestFunction)
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt#endif /* __Additions_xclient_seamless_h not defined */