seamless-guest.h revision b72771e8c6ba3b3d9ebdd7977730325131ae0f98
1N/A/** @file
1N/A *
1N/A * Guest client: seamless mode
1N/A * Abstract class for interacting with the guest system
1N/A */
1N/A
1N/A/*
1N/A * Copyright (C) 2006-2007 Sun Microsystems, Inc.
1N/A *
1N/A * This file is part of VirtualBox Open Source Edition (OSE), as
1N/A * available from http://www.virtualbox.org. This file is free software;
1N/A * you can redistribute it and/or modify it under the terms of the GNU
1N/A * General Public License (GPL) as published by the Free Software
1N/A * Foundation, in version 2 as it comes in the "COPYING" file of the
1N/A * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
1N/A * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
1N/A *
1N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
1N/A * Clara, CA 95054 USA or visit http://www.sun.com if you need
1N/A * additional information or have any questions.
1N/A */
1N/A
1N/A#ifndef __Additions_client_seamless_guest_h
1N/A# define __Additions_client_seamless_guest_h
1N/A
1N/A#include <memory> /* for auto_ptr */
1N/A#include <vector> /* for vector */
1N/A
1N/A#include <iprt/types.h> /* for RTRECT */
1N/A
1N/A#include "seamless-glue.h"
1N/A
1N/A/**
1N/A * Observable to monitor the state of the guest windows. This abstract class definition
1N/A * serves as a template (in the linguistic sense, not the C++ sense) for creating
1N/A * platform-specific child classes.
1N/A */
1N/Aclass VBoxGuestSeamlessGuest
1N/A{
1N/Apublic:
1N/A /** Events which can be reported by this class */
1N/A enum meEvent
1N/A {
1N/A /** Empty event */
1N/A NONE,
1N/A /** Seamless mode is now supported */
1N/A CAPABLE,
1N/A /** Seamless mode is no longer supported */
1N/A INCAPABLE
1N/A };
1N/A
1N/A /**
1N/A * Initialise the guest and ensure that it is capable of handling seamless mode
1N/A *
1N/A * @param pObserver An observer object to which to report changes in state and events
1N/A * by calling its notify() method. A state change to CAPABLE also
1N/A * signals new seamless data.
1N/A * @returns iprt status code
1N/A */
1N/A int init(VBoxGuestSeamlessObserver *pObserver);
1N/A
1N/A /**
1N/A * Shutdown seamless event monitoring.
1N/A */
1N/A void uninit(void);
1N/A
1N/A /**
1N/A * Initialise seamless event reporting in the guest.
1N/A *
1N/A * @returns IPRT status code
1N/A */
1N/A int start(void);
1N/A /** Stop reporting seamless events. */
1N/A void stop(void);
1N/A /** Get the current state of the guest (capable or incapable of seamless mode). */
1N/A // meEvent getState(void);
1N/A /** Get the current list of visible rectangles. */
1N/A std::auto_ptr<std::vector<RTRECT> > getRects(void);
1N/A /** Process next event in the guest event queue - called by the event thread. */
1N/A void nextEvent(void);
1N/A /** Wake up the event thread if it is waiting for an event so that it can exit. */
1N/A bool interruptEvent(void);
1N/A};
1N/A
1N/A#if defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD)
1N/A# include "seamless-x11.h" /* for VBoxGuestSeamlessGuestImpl */
1N/A#else
1N/A# error Port me
1N/A#endif
1N/A
1N/A#endif /* __Additions_client_seamless_guest_h not defined */
1N/A