mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-07 12:25:07 +08:00
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.
24 lines
401 B
C++
24 lines
401 B
C++
#ifndef TMETHODJOB_H
|
|
#define TMETHODJOB_H
|
|
|
|
#include "IJob.h"
|
|
|
|
template <class T>
|
|
class TMethodJob : public IJob {
|
|
public:
|
|
typedef void (T::*Method)();
|
|
|
|
TMethodJob(T* object, Method method) :
|
|
m_object(object), m_method(method) { }
|
|
virtual ~TMethodJob() { }
|
|
|
|
// IJob overrides
|
|
virtual void run() { (m_object->*m_method)(); }
|
|
|
|
private:
|
|
T* m_object;
|
|
Method m_method;
|
|
};
|
|
|
|
#endif
|