#ifndef __TERMINAL_H #define __TERMINAL_H #include #include #include #include "AST/AST" struct termios; struct Terminfo; namespace IO { class Terminal : public AST::Node { private: FILE* f; struct termios oldtios; struct Terminfo* terminfo; protected: void printOrIgnore(const char* s); public: Terminal(); void clear(); void gotoxy(int x, int y); void flush(); virtual std::string toString(void) const; int getReadFD() const; void reset(); void handleRead(); void printOrIgnore(const unsigned char* s); }; void resetTextDevs(void); }; #endif /* ndef __TERMINAL_H */