Backspace sends DEL instead of ^H.
[spft.git] / Terminal.h
blob4efeb2ad3171d7d740245ff68b2e9c09c49d5ea6
1 #ifndef Terminal_h
2 #define Terminal_h
4 #include <signal.h>
6 class History;
9 class Terminal {
10 public:
11 Terminal(History* history_in);
12 ~Terminal();
14 bool is_done();
15 int get_terminal_fd() { return terminal_fd; }
16 void tick();
17 void send(const char* data, int length = -1);
18 void hang_up();
19 void notify_resize(int columns, int rows, int pixel_width, int pixel_height);
21 private:
22 History* history;
23 int terminal_fd;
24 pid_t child_pid;
25 char* buffer;
26 int prebuffered_bytes;
27 static bool child_died;
29 void exec_shell();
30 static void sigchld_received(int signal_number);
34 #endif // !Terminal_h