1 | /*
|
---|
2 | * synergy -- mouse and keyboard sharing utility
|
---|
3 | * Copyright (C) 2004 Chris Schoeneman
|
---|
4 | * Copyright (C) 2006 Knut St. Osmundsen
|
---|
5 | *
|
---|
6 | * This package is free software; you can redistribute it and/or
|
---|
7 | * modify it under the terms of the GNU General Public License
|
---|
8 | * found in the file COPYING that should have accompanied this file.
|
---|
9 | *
|
---|
10 | * This package is distributed in the hope that it will be useful,
|
---|
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
13 | * GNU General Public License for more details.
|
---|
14 | */
|
---|
15 |
|
---|
16 | #ifndef CPMEVENTQUEUEBUFFER_H
|
---|
17 | #define CPMEVENTQUEUEBUFFER_H
|
---|
18 |
|
---|
19 | #include "IEventQueueBuffer.h"
|
---|
20 | #define INCL_ERRORS
|
---|
21 | #define INCL_BASE
|
---|
22 | #define INCL_PM
|
---|
23 | #include <os2.h>
|
---|
24 |
|
---|
25 | //! Event queue buffer for PM
|
---|
26 | class CPMEventQueueBuffer : public IEventQueueBuffer {
|
---|
27 | public:
|
---|
28 | CPMEventQueueBuffer();
|
---|
29 | virtual ~CPMEventQueueBuffer();
|
---|
30 |
|
---|
31 | // IEventQueueBuffer overrides
|
---|
32 | virtual void waitForEvent(double timeout);
|
---|
33 | virtual Type getEvent(CEvent& event, UInt32& dataID);
|
---|
34 | virtual bool addEvent(UInt32 dataID);
|
---|
35 | virtual bool isEmpty() const;
|
---|
36 | virtual CEventQueueTimer*
|
---|
37 | newTimer(double duration, bool oneShot) const;
|
---|
38 | virtual void deleteTimer(CEventQueueTimer*) const;
|
---|
39 |
|
---|
40 | private:
|
---|
41 | bool m_shallTerminate;
|
---|
42 | HAB m_hab;
|
---|
43 | bool m_shallDestroyMsgQueue;
|
---|
44 | HMQ m_hmq;
|
---|
45 | HEV m_hev;
|
---|
46 | ULONG m_userEvent;
|
---|
47 | QMSG m_event;
|
---|
48 | ULONG m_daemonQuit;
|
---|
49 | };
|
---|
50 |
|
---|
51 | #endif
|
---|