00001 /*! \file SurcoucheTouche.h 00002 \brief Surcouche pour touche. 00003 00004 Redéfinie tout un tas de fonctions système pour les rendre portables unix et windows. 00005 00006 \author aerith (www.aerith.fr) 00007 \version 1.0 00008 \date 24/02/2007 00009 */ 00010 00011 #ifndef INCLUDE_RSRC_PORTAGE_TOUCHE 00012 #define INCLUDE_RSRC_PORTAGE_TOUCHE 00013 00014 00015 #include <stdio.h> 00016 #include <stdlib.h> 00017 00018 #ifdef WIN32 00019 #include <conio.h> 00020 #else 00021 #include <sys/time.h> 00022 #include <sys/unistd.h> 00023 #include <termios.h> 00024 #endif 00025 00026 00027 //! Retourne une touche 00028 /*! Retourne la plus vielle touche du buffer \a stdin. 00029 \return code ascii de la touche 00030 \sa KeyWait() et KeyPressed() 00031 */ 00032 int KeyGet(); 00033 00034 //! Permet de savoir si une touche a été presser 00035 /*! Permet de savoir si une touche a été presser. 00036 \bug rechercher l'équivalent unix 00037 \return 0 si non presser sinon > 1 00038 \sa KeyGet() et KeyWait() 00039 */ 00040 int KeyPressed(); 00041 00042 //! Attend la frappe d'une touche et la retourne 00043 /*! Pause la tache en attente de la frappe d'une touche et retourne son code. 00044 \bug rechercher l'équivalent unix 00045 \return 0 code ascii de la touche 00046 \sa KeyGet() et KeyPressed() 00047 */ 00048 int KeyWait(); 00049 00050 00051 #endif