30.11.2010 - initial commit

This commit is contained in:
peri4
2010-11-30 08:11:27 +03:00
commit 2925e4d786
24 changed files with 2403 additions and 0 deletions

34
pikbdlistener.h Normal file
View File

@@ -0,0 +1,34 @@
#ifndef PIKBDLISTENER_H
#define PIKBDLISTENER_H
#include "pithread.h"
#ifndef __WIN32__
#include <termios.h>
#endif
typedef void (*KBFunc)(void * , char);
class PIKbdListener: public PIThread {
public:
// slot is any function format "void <func>(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