Changeset 50338 in vbox
- Timestamp:
- Feb 6, 2014 9:07:50 AM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 92068
- Location:
- trunk/src/VBox/Additions/x11/VBoxClient
- Files:
-
- 5 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/VBoxClient/Makefile.kmk
r50337 r50338 59 59 VBoxClient_DEFS += SEAMLESS_GUEST DYNAMIC_RESIZE 60 60 VBoxClient_SOURCES += \ 61 seamless -host.cpp \61 seamless.cpp \ 62 62 seamless-x11.cpp \ 63 63 display.cpp \ … … 109 109 tstSeamlessX11_SOURCES = \ 110 110 testcase/tstSeamlessX11.cpp \ 111 seamless -host.cpp \111 seamless.cpp \ 112 112 seamless-x11.cpp 113 113 tstSeamlessX11_LIBPATH = \ -
trunk/src/VBox/Additions/x11/VBoxClient/seamless-x11.cpp
r50337 r50338 71 71 * @returns true if it can handle seamless, false otherwise 72 72 */ 73 int VBoxGuestSeamlessX11::init(SeamlessHostProxy *pHost)73 int SeamlessX11::init(SeamlessHostProxy *pHost) 74 74 { 75 75 int rc = VINF_SUCCESS; … … 99 99 * @todo This function should switch the guest to fullscreen mode. 100 100 */ 101 int VBoxGuestSeamlessX11::start(void)101 int SeamlessX11::start(void) 102 102 { 103 103 int rc = VINF_SUCCESS; … … 116 116 /** Stop reporting seamless events to the host. Free information about guest windows 117 117 and stop requesting updates. */ 118 void VBoxGuestSeamlessX11::stop(void)118 void SeamlessX11::stop(void) 119 119 { 120 120 LogRelFlowFunc(("\n")); … … 125 125 } 126 126 127 void VBoxGuestSeamlessX11::monitorClientList(void)127 void SeamlessX11::monitorClientList(void) 128 128 { 129 129 LogRelFlowFunc(("called\n")); … … 131 131 } 132 132 133 void VBoxGuestSeamlessX11::unmonitorClientList(void)133 void SeamlessX11::unmonitorClientList(void) 134 134 { 135 135 LogRelFlowFunc(("called\n")); … … 141 141 * X server. 142 142 */ 143 void VBoxGuestSeamlessX11::rebuildWindowTree(void)143 void SeamlessX11::rebuildWindowTree(void) 144 144 { 145 145 LogRelFlowFunc(("called\n")); … … 156 156 * @param hRoot the virtual root window to be examined 157 157 */ 158 void VBoxGuestSeamlessX11::addClients(const Window hRoot)158 void SeamlessX11::addClients(const Window hRoot) 159 159 { 160 160 /** Unused out parameters of XQueryTree */ … … 178 178 179 179 180 void VBoxGuestSeamlessX11::addClientWindow(const Window hWin)180 void SeamlessX11::addClientWindow(const Window hWin) 181 181 { 182 182 LogRelFlowFunc(("\n")); … … 241 241 * @param hWin the window to be examined 242 242 */ 243 bool VBoxGuestSeamlessX11::isVirtualRoot(Window hWin)243 bool SeamlessX11::isVirtualRoot(Window hWin) 244 244 { 245 245 unsigned char *windowTypeRaw = NULL; … … 275 275 * Free all information in the tree of visible windows 276 276 */ 277 void VBoxGuestSeamlessX11::freeWindowTree(void)277 void SeamlessX11::freeWindowTree(void) 278 278 { 279 279 /* We use post-increment in the operation to prevent the iterator from being invalidated. */ … … 289 289 * @note Called from the guest event thread. 290 290 */ 291 void VBoxGuestSeamlessX11::nextEvent(void)291 void SeamlessX11::nextEvent(void) 292 292 { 293 293 XEvent event; … … 345 345 * @param event the X11 event structure 346 346 */ 347 void VBoxGuestSeamlessX11::doConfigureEvent(Window hWin)347 void SeamlessX11::doConfigureEvent(Window hWin) 348 348 { 349 349 VBoxGuestWinInfo *pInfo = mGuestWindows.find(hWin); … … 381 381 * @param event the X11 event structure 382 382 */ 383 void VBoxGuestSeamlessX11::doMapEvent(Window hWin)383 void SeamlessX11::doMapEvent(Window hWin) 384 384 { 385 385 LogRelFlowFunc(("\n")); … … 399 399 * @param event the X11 event structure 400 400 */ 401 void VBoxGuestSeamlessX11::doShapeEvent(Window hWin)401 void SeamlessX11::doShapeEvent(Window hWin) 402 402 { 403 403 LogRelFlowFunc(("\n")); … … 427 427 * @param event the X11 event structure 428 428 */ 429 void VBoxGuestSeamlessX11::doUnmapEvent(Window hWin)429 void SeamlessX11::doUnmapEvent(Window hWin) 430 430 { 431 431 LogRelFlowFunc(("\n")); … … 442 442 * Gets the list of visible rectangles 443 443 */ 444 RTRECT * VBoxGuestSeamlessX11::getRects(void)444 RTRECT *SeamlessX11::getRects(void) 445 445 { 446 446 return mpRects; … … 450 450 * Gets the number of rectangles in the visible rectangle list 451 451 */ 452 size_t VBoxGuestSeamlessX11::getRectCount(void)452 size_t SeamlessX11::getRectCount(void) 453 453 { 454 454 return mcRects; … … 501 501 * Updates the list of seamless rectangles 502 502 */ 503 int VBoxGuestSeamlessX11::updateRects(void)503 int SeamlessX11::updateRects(void) 504 504 { 505 505 LogRelFlowFunc(("\n")); … … 528 528 * @note This function should only be called from the host event thread. 529 529 */ 530 bool VBoxGuestSeamlessX11::interruptEvent(void)530 bool SeamlessX11::interruptEvent(void) 531 531 { 532 532 bool rc = false; -
trunk/src/VBox/Additions/x11/VBoxClient/seamless-x11.h
r50337 r50338 155 155 }; 156 156 157 class VBoxGuestSeamlessX11157 class SeamlessX11 158 158 { 159 159 private: 160 160 // We don't want a copy constructor or assignment operator 161 VBoxGuestSeamlessX11(const VBoxGuestSeamlessX11&);162 VBoxGuestSeamlessX11& operator=(const VBoxGuestSeamlessX11&);161 SeamlessX11(const SeamlessX11&); 162 SeamlessX11& operator=(const SeamlessX11&); 163 163 164 164 // Private member variables … … 248 248 void doShapeEvent(Window hWin); 249 249 250 VBoxGuestSeamlessX11(void)250 SeamlessX11(void) 251 251 : mHost(0), mDisplay(NULL), mpRects(NULL), mcRects(0), 252 252 mSupportsShape(false), mEnabled(false), mChanged(false) {} 253 253 254 ~ VBoxGuestSeamlessX11()254 ~SeamlessX11() 255 255 { 256 256 uninit(); -
trunk/src/VBox/Additions/x11/VBoxClient/seamless.cpp
r50337 r50338 29 29 30 30 #include "VBoxClient.h" 31 #include "seamless-host.h" 32 #include "seamless-x11.h" 31 #include "seamless.h" 33 32 34 33 /** … … 36 35 * @returns iprt status value 37 36 */ 38 int VBoxGuestSeamlessHost::start(void)37 int SeamlessMain::start(void) 39 38 { 40 39 int rc = VERR_NOT_SUPPORTED; … … 78 77 79 78 /** Stops the service. */ 80 void VBoxGuestSeamlessHost::stop()79 void SeamlessMain::stop() 81 80 { 82 81 LogRelFlowFunc(("\n")); … … 97 96 * @returns IRPT return code. 98 97 */ 99 int VBoxGuestSeamlessHost::nextEvent(void)98 int SeamlessMain::nextEvent(void) 100 99 { 101 100 VMMDevSeamlessMode newMode = VMMDev_Seamless_Disabled; … … 148 147 * Update the set of visible rectangles in the host. 149 148 */ 150 void VBoxGuestSeamlessHost::notify(RTRECT *pRects, size_t cRects)149 void SeamlessMain::notify(RTRECT *pRects, size_t cRects) 151 150 { 152 151 LogRelFlowFunc(("\n")); … … 164 163 * The actual event thread function. 165 164 */ 166 int VBoxGuestSeamlessHost::threadFunction(RTTHREAD self, void *pvUser)167 { 168 VBoxGuestSeamlessHost *pHost = (VBoxGuestSeamlessHost*)pvUser;165 int SeamlessMain::threadFunction(RTTHREAD self, void *pvUser) 166 { 167 SeamlessMain *pHost = (SeamlessMain *)pvUser; 169 168 170 169 LogRelFlowFunc(("\n")); … … 190 189 * Send a signal to the thread that it should exit 191 190 */ 192 void VBoxGuestSeamlessHost::stopThread()191 void SeamlessMain::stopThread() 193 192 { 194 193 int rc; … … 219 218 * The actual X11 event thread function. 220 219 */ 221 int VBoxGuestSeamlessHost::x11ThreadFunction(RTTHREAD self, void *pvUser)222 { 223 VBoxGuestSeamlessHost *pHost = (VBoxGuestSeamlessHost*)pvUser;220 int SeamlessMain::x11ThreadFunction(RTTHREAD self, void *pvUser) 221 { 222 SeamlessMain *pHost = (SeamlessMain *)pvUser; 224 223 int rc = VINF_SUCCESS; 225 224 … … 241 240 * Send a signal to the thread function that it should exit 242 241 */ 243 void VBoxGuestSeamlessHost::stopX11Thread(void)242 void SeamlessMain::stopX11Thread(void) 244 243 { 245 244 int rc; … … 261 260 { 262 261 private: 263 VBoxGuestSeamlessHostmSeamless;262 SeamlessMain mSeamless; 264 263 bool mIsInitialised; 265 264 public: -
trunk/src/VBox/Additions/x11/VBoxClient/seamless.h
r50337 r50338 29 29 * Interface to the host 30 30 */ 31 class VBoxGuestSeamlessHost: public SeamlessHostProxy31 class SeamlessMain : public SeamlessHostProxy 32 32 { 33 33 public: … … 45 45 private: 46 46 // We don't want a copy constructor or assignment operator 47 VBoxGuestSeamlessHost(const VBoxGuestSeamlessHost&);48 VBoxGuestSeamlessHost& operator=(const VBoxGuestSeamlessHost&);47 SeamlessMain(const SeamlessMain&); 48 SeamlessMain& operator=(const SeamlessMain&); 49 49 50 50 /** Have we been initialised yet? */ 51 51 bool mIsInitialised; 52 52 /** X11 event monitor object */ 53 VBoxGuestSeamlessX11 mX11Monitor;53 SeamlessX11 mX11Monitor; 54 54 55 55 /** Thread to start and stop when we enter and leave seamless mode which … … 128 128 virtual void notify(RTRECT *pRects, size_t cRects); 129 129 130 VBoxGuestSeamlessHost(void)130 SeamlessMain(void) 131 131 { 132 132 mIsInitialised = false; … … 138 138 } 139 139 140 ~ VBoxGuestSeamlessHost()140 ~SeamlessMain() 141 141 { 142 142 LogRelFlowFunc(("\n")); -
trunk/src/VBox/Additions/x11/VBoxClient/testcase/tstSeamlessX11-auto.cpp
r50337 r50338 598 598 static unsigned smlsDoFixture(SMLSFIXTURE *pFixture, const char *pszDesc) 599 599 { 600 VBoxGuestSeamlessX11 subject;600 SeamlessX11 subject; 601 601 testHost host; 602 602 unsigned cErrs = 0; -
trunk/src/VBox/Additions/x11/VBoxClient/testcase/tstSeamlessX11.cpp
r50337 r50338 119 119 RTSemEventCreate(&eventSem); 120 120 /** Our instance of the seamless class. */ 121 VBoxGuestSeamlessseamless;121 SeamlessMain seamless; 122 122 LogRel(("Starting seamless Guest Additions...\n")); 123 123 rc = seamless.init();
Note:
See TracChangeset
for help on using the changeset viewer.