41 #if !defined(_WIN32) && (defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__)))
42 #include <sys/select.h>
46 #include <visp3/core/vpException.h>
47 #include <visp3/io/vpKeyboard.h>
55 #if !defined(_WIN32) && (defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__)))
56 : initial_settings(), new_settings()
69 #if !defined(_WIN32) && (defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__)))
79 #if !defined(_WIN32) && (defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__)))
83 #elif defined(_WIN32) && !defined(WINRT)
85 #elif defined(_WIN32) && defined(WINRT)
95 #if !defined(_WIN32) && (defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__)))
96 struct timeval tv = { 0, 0 };
100 FD_SET(STDIN_FILENO, &readfds);
102 return select(STDIN_FILENO + 1, &readfds,
nullptr,
nullptr, &tv) == 1;
103 #elif defined(_WIN32) && !defined(WINRT)
105 #elif defined(_WIN32) && defined(WINRT)
110 #if !defined(_WIN32) && (defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__)))
115 void vpKeyboard::init()
124 void vpKeyboard::end()
136 void vpKeyboard::setRawMode(
bool active)
140 tcgetattr(STDIN_FILENO, &initial_settings);
144 new_settings = initial_settings;
145 new_settings.c_lflag &= (
unsigned int)~ICANON;
146 new_settings.c_lflag &= (
unsigned int)~ECHO;
147 new_settings.c_lflag &= (
unsigned int)~ISIG;
150 new_settings.c_oflag &= (
unsigned int)~TAB0;
152 new_settings.c_cc[VMIN] = 1;
153 new_settings.c_cc[VTIME] = 0;
154 tcsetattr(STDIN_FILENO, TCSANOW, &new_settings);
158 tcsetattr(STDIN_FILENO, TCSANOW, &initial_settings);
error that can be emitted by ViSP classes.
void init(unsigned int h, unsigned int w, Type value)