9.10.2011 - stable backup commit
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
#define PIKBDLISTENER_H
|
||||
|
||||
#include "pithread.h"
|
||||
#ifndef __WIN32__
|
||||
# include <termios.h>
|
||||
#ifndef WINDOWS
|
||||
#include <termios.h>
|
||||
#endif
|
||||
|
||||
#define WAIT_FOR_EXIT while (!PIKbdListener::exiting) msleep(1);
|
||||
@@ -17,12 +17,12 @@ public:
|
||||
PIKbdListener(KBFunc slot = 0, void * data = 0);
|
||||
~PIKbdListener() {terminate(); end();}
|
||||
|
||||
inline void enableExitCapture(char key = 'Q') {exit_enabled = true; exit_key = key;}
|
||||
inline void disableExitCapture() {exit_enabled = false;}
|
||||
inline bool exitCaptured() const {return exit_enabled;}
|
||||
inline char exitKey() const {return exit_key;}
|
||||
inline bool isActive() {return is_active;}
|
||||
inline void setActive(bool yes = true) {is_active = yes;}
|
||||
void enableExitCapture(char key = 'Q') {exit_enabled = true; exit_key = key;}
|
||||
void disableExitCapture() {exit_enabled = false;}
|
||||
bool exitCaptured() const {return exit_enabled;}
|
||||
char exitKey() const {return exit_key;}
|
||||
bool isActive() {return is_active;}
|
||||
void setActive(bool yes = true);
|
||||
|
||||
static bool exiting;
|
||||
|
||||
@@ -35,13 +35,13 @@ private:
|
||||
char rc, exit_key, is_active;
|
||||
bool exit_enabled;
|
||||
void * data;
|
||||
#ifdef __WIN32__
|
||||
#ifdef WINDOWS
|
||||
DWORD ret;
|
||||
void * hIn;
|
||||
DWORD smode;
|
||||
DWORD smode, tmode;
|
||||
#else
|
||||
int ret;
|
||||
struct termios sterm;
|
||||
struct termios sterm, tterm;
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user