| Line | |
|---|
| 1 | /*
|
|---|
| 2 | * synergy -- mouse and keyboard sharing utility
|
|---|
| 3 | * Copyright (C) 2004 Chris Schoeneman
|
|---|
| 4 | *
|
|---|
| 5 | * This package is free software; you can redistribute it and/or
|
|---|
| 6 | * modify it under the terms of the GNU General Public License
|
|---|
| 7 | * found in the file COPYING that should have accompanied this file.
|
|---|
| 8 | *
|
|---|
| 9 | * This package is distributed in the hope that it will be useful,
|
|---|
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 12 | * GNU General Public License for more details.
|
|---|
| 13 | */
|
|---|
| 14 |
|
|---|
| 15 | #include "IEventQueue.h"
|
|---|
| 16 |
|
|---|
| 17 | //
|
|---|
| 18 | // IEventQueue
|
|---|
| 19 | //
|
|---|
| 20 |
|
|---|
| 21 | static int g_systemTarget = 0;
|
|---|
| 22 | IEventQueue* IEventQueue::s_instance = NULL;
|
|---|
| 23 |
|
|---|
| 24 | void*
|
|---|
| 25 | IEventQueue::getSystemTarget()
|
|---|
| 26 | {
|
|---|
| 27 | // any unique arbitrary pointer will do
|
|---|
| 28 | return &g_systemTarget;
|
|---|
| 29 | }
|
|---|
| 30 |
|
|---|
| 31 | IEventQueue*
|
|---|
| 32 | IEventQueue::getInstance()
|
|---|
| 33 | {
|
|---|
| 34 | assert(s_instance != NULL);
|
|---|
| 35 | return s_instance;
|
|---|
| 36 | }
|
|---|
| 37 |
|
|---|
| 38 | void
|
|---|
| 39 | IEventQueue::setInstance(IEventQueue* instance)
|
|---|
| 40 | {
|
|---|
| 41 | assert(s_instance == NULL || instance == NULL);
|
|---|
| 42 | s_instance = instance;
|
|---|
| 43 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.