#ifndef PIKBDLISTENER_H #define PIKBDLISTENER_H #include "pithread.h" #ifndef __WIN32__ #include #endif typedef void (*KBFunc)(void * , char); class PIKbdListener: public PIThread { public: // slot is any function format "void (void * , char)" PIKbdListener(KBFunc slot = 0, void * data = 0); ~PIKbdListener(); private: void run(); KBFunc ret_func; char rc; void * data; #ifdef __WIN32__ DWORD ret; void * hIn; DWORD smode; #else int ret; struct termios sterm; #endif }; #endif // PIKBDLISTENER_H