#include <visp/vpConfig.h>
#include <visp/vpDisplayOpenCV.h>
#include <visp/vpDisplayX.h>
#include <visp/vpDisplayGTK.h>
#include <visp/vpDisplayGDI.h>
#include <visp/vpDisplayD3D.h>
int main()
{
#if defined(VISP_HAVE_X11)
#elif defined(VISP_HAVE_GTK)
#elif defined(VISP_HAVE_GDI)
#elif defined(VISP_HAVE_D3D9)
#elif defined(VISP_HAVE_OPENCV)
#else
std::cout << "Sorry, no video device is available" << std::endl;
return -1;
#endif
#ifdef VISP_HAVE_DISPLAY
d->init(I);
#endif
std::cout << "Waiting a keyboard event..." << std::endl;
std::cout << "A keyboard event was detected" << std::endl;
int cpt_event = 0;
char key[10];
std::cout << "Enter a non blocking keyboard event detection loop..." << std::endl;
do {
if (event) {
std::cout << "Key detected: " << key << std::endl;
cpt_event ++;
}
} while(cpt_event < 5);
#ifdef VISP_HAVE_DISPLAY
delete d;
#endif
}