mirror of
https://github.com/debauchee/barrier.git
synced 2024-12-22 10:31:45 +03:00
900b075e3a
on unix, but client screens don't simulate events other than mouse move. also not supporting clipboard at all yet and the main app is just a temporary framework to test with. must clean up protocol and communication.
37 lines
683 B
C++
37 lines
683 B
C++
#ifndef CEVENTQUEUE_H
|
|
#define CEVENTQUEUE_H
|
|
|
|
#include "IEventQueue.h"
|
|
#include "CEvent.h"
|
|
#include <list>
|
|
|
|
class CEventQueue : public IEventQueue {
|
|
public:
|
|
CEventQueue();
|
|
virtual ~CEventQueue();
|
|
|
|
// IEventQueue overrides
|
|
virtual void wait(double timeout) = 0;
|
|
virtual void pop(CEvent*);
|
|
virtual void push(const CEvent*);
|
|
virtual bool isEmpty();
|
|
|
|
protected:
|
|
// signal the queue not-empty condition. this should cause wait()
|
|
// to stop waiting.
|
|
virtual void signalNotEmpty() = 0;
|
|
|
|
// lock the queue mutex
|
|
virtual void lock() = 0;
|
|
|
|
// unlock the queue mutex
|
|
virtual void unlock() = 0;
|
|
|
|
private:
|
|
typedef std::list<CEvent> List;
|
|
|
|
List m_queue;
|
|
};
|
|
|
|
#endif
|