2002-08-02 19:57:46 +00:00
|
|
|
/*
|
|
|
|
* synergy -- mouse and keyboard sharing utility
|
2004-02-01 21:09:22 +00:00
|
|
|
* Copyright (C) 2004 Chris Schoeneman
|
2002-08-02 19:57:46 +00:00
|
|
|
*
|
|
|
|
* This package is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* found in the file COPYING that should have accompanied this file.
|
|
|
|
*
|
|
|
|
* This package is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*/
|
|
|
|
|
2004-02-01 21:09:22 +00:00
|
|
|
#include "IEventQueue.h"
|
2001-10-06 14:13:28 +00:00
|
|
|
|
|
|
|
//
|
2004-02-01 21:09:22 +00:00
|
|
|
// IEventQueue
|
2001-10-06 14:13:28 +00:00
|
|
|
//
|
|
|
|
|
2004-02-01 21:09:22 +00:00
|
|
|
static int g_systemTarget = 0;
|
|
|
|
IEventQueue* IEventQueue::s_instance = NULL;
|
|
|
|
|
|
|
|
void*
|
|
|
|
IEventQueue::getSystemTarget()
|
2001-10-06 14:13:28 +00:00
|
|
|
{
|
2004-02-01 21:09:22 +00:00
|
|
|
// any unique arbitrary pointer will do
|
|
|
|
return &g_systemTarget;
|
2001-10-06 14:13:28 +00:00
|
|
|
}
|
|
|
|
|
2004-02-01 21:09:22 +00:00
|
|
|
IEventQueue*
|
|
|
|
IEventQueue::getInstance()
|
2001-10-06 14:13:28 +00:00
|
|
|
{
|
2004-02-01 21:09:22 +00:00
|
|
|
assert(s_instance != NULL);
|
|
|
|
return s_instance;
|
2001-10-06 14:13:28 +00:00
|
|
|
}
|
|
|
|
|
2004-02-01 21:09:22 +00:00
|
|
|
void
|
|
|
|
IEventQueue::setInstance(IEventQueue* instance)
|
2001-10-06 14:13:28 +00:00
|
|
|
{
|
2004-02-01 21:09:22 +00:00
|
|
|
assert(s_instance == NULL || instance == NULL);
|
|
|
|
s_instance = instance;
|
2001-10-06 14:13:28 +00:00
|
|
|
}
|