VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/xclient/seamless-guest.h@ 15776

Last change on this file since 15776 was 8155, checked in by vboxsync, 17 years ago

The Big Sun Rebranding Header Change

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.9 KB
Line 
1/** @file
2 *
3 * Guest client: seamless mode
4 * Abstract class for interacting with the guest system
5 */
6
7/*
8 * Copyright (C) 2006-2007 Sun Microsystems, Inc.
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.virtualbox.org. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
13 * General Public License (GPL) as published by the Free Software
14 * Foundation, in version 2 as it comes in the "COPYING" file of the
15 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17 *
18 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
19 * Clara, CA 95054 USA or visit http://www.sun.com if you need
20 * additional information or have any questions.
21 */
22
23#ifndef __Additions_client_seamless_guest_h
24# define __Additions_client_seamless_guest_h
25
26#include <memory> /* for auto_ptr */
27#include <vector> /* for vector */
28
29#include <iprt/types.h> /* for RTRECT */
30
31#include "seamless-glue.h"
32
33/**
34 * Observable to monitor the state of the guest windows. This abstract class definition
35 * serves as a template (in the linguistic sense, not the C++ sense) for creating
36 * platform-specific child classes.
37 */
38class VBoxGuestSeamlessGuest
39{
40public:
41 /** Events which can be reported by this class */
42 enum meEvent
43 {
44 /** Empty event */
45 NONE,
46 /** Seamless mode is now supported */
47 CAPABLE,
48 /** Seamless mode is no longer supported */
49 INCAPABLE
50 };
51
52 /**
53 * Initialise the guest and ensure that it is capable of handling seamless mode
54 *
55 * @param pObserver An observer object to which to report changes in state and events
56 * by calling its notify() method. A state change to CAPABLE also
57 * signals new seamless data.
58 * @returns iprt status code
59 */
60 int init(VBoxGuestSeamlessObserver *pObserver);
61
62 /**
63 * Shutdown seamless event monitoring.
64 */
65 void uninit(void);
66
67 /**
68 * Initialise seamless event reporting in the guest.
69 *
70 * @returns IPRT status code
71 */
72 int start(void);
73 /** Stop reporting seamless events. */
74 void stop(void);
75 /** Get the current state of the guest (capable or incapable of seamless mode). */
76 // meEvent getState(void);
77 /** Get the current list of visible rectangles. */
78 std::auto_ptr<std::vector<RTRECT> > getRects(void);
79 /** Process next event in the guest event queue - called by the event thread. */
80 void nextEvent(void);
81 /** Wake up the event thread if it is waiting for an event so that it can exit. */
82 bool interruptEvent(void);
83};
84
85#if defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD)
86# include "seamless-x11.h" /* for VBoxGuestSeamlessGuestImpl */
87#else
88# error Port me
89#endif
90
91#endif /* __Additions_client_seamless_guest_h not defined */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette