Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1023 B

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. // TextConsoleUnix.h: Unix interface for the TextConsole class.
  9. //
  10. //////////////////////////////////////////////////////////////////////
  11. #if !defined TEXTCONSOLE_UNIX_H
  12. #define TEXTCONSOLE_UNIX_H
  13. #ifndef _WIN32
  14. #include <termios.h>
  15. #include <stdio.h>
  16. #include "textconsole.h"
  17. typedef enum
  18. {
  19. ESCAPE_CLEAR = 0,
  20. ESCAPE_RECEIVED,
  21. ESCAPE_BRACKET_RECEIVED
  22. } escape_sequence_t;
  23. class CTextConsoleUnix : public CTextConsole
  24. {
  25. public:
  26. virtual ~CTextConsoleUnix()
  27. {
  28. };
  29. bool Init();
  30. void ShutDown( void );
  31. void PrintRaw( char * pszMsg, int nChars = 0 );
  32. void Echo( char * pszMsg, int nChars = 0 );
  33. char * GetLine( void );
  34. int GetWidth( void );
  35. private:
  36. int kbhit( void );
  37. bool m_bConDebug;
  38. struct termios termStored;
  39. FILE *tty;
  40. };
  41. #endif // _ndef WIN32
  42. #endif // !defined