3 This program is free software; you can redistribute it and/or
4 modify it under the terms of the GNU Lesser General Public
5 License (LGPL) as published by the Free Software Foundation.
7 Please refer to the COPYING file for more information.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 Copyright © 2004 Bruno T. C. de Oliveira
19 Copyright © 2006 Pierre Habouzit
22 #ifndef MADTTY_MADTTY_H
23 #define MADTTY_MADTTY_H
29 #include <sys/types.h>
33 #define MAX_CSI_ES_PARAMS 32
35 typedef struct mtty_row_t mtty_row_t;
42 unsigned seen_input : 1;
45 unsigned graphmode : 1;
52 mtty_row_t *scroll_top;
53 mtty_row_t *scroll_bot;
59 int curs_srow, curs_scol;
61 /* buffers and parsing state */
68 void madtty_initialize(void);
70 madtty_t *madtty_create(int rows, int cols);
71 void madtty_destroy(madtty_t *rt);
72 pid_t madtty_forkpty(madtty_t *rt, const char *path, const char *argv[]);
74 int madtty_process(madtty_t *rt);
75 void madtty_keypress(madtty_t *rt, int keycode);
76 void madtty_draw(madtty_t *rt, WINDOW *win, int startrow, int startcol);
79 #endif /* MADTTY_MADTTY_H */