IEventQueue.cpp

00001 /*
00002  * synergy -- mouse and keyboard sharing utility
00003  * Copyright (C) 2004 Chris Schoeneman
00004  * 
00005  * This package is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * found in the file COPYING that should have accompanied this file.
00008  * 
00009  * This package is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  */
00014 
00015 #include "IEventQueue.h"
00016 
00017 //
00018 // IEventQueue
00019 //
00020 
00021 static int              g_systemTarget = 0;
00022 IEventQueue*            IEventQueue::s_instance = NULL;
00023 
00024 void*
00025 IEventQueue::getSystemTarget()
00026 {
00027     // any unique arbitrary pointer will do
00028     return &g_systemTarget;
00029 }
00030 
00031 IEventQueue*
00032 IEventQueue::getInstance()
00033 {
00034     assert(s_instance != NULL);
00035     return s_instance;
00036 }
00037 
00038 void
00039 IEventQueue::setInstance(IEventQueue* instance)
00040 {
00041     assert(s_instance == NULL || instance == NULL);
00042     s_instance = instance;
00043 }

Generated on Fri Nov 6 00:18:46 2009 for synergy-plus by  doxygen 1.4.7