#ifndef CURSETREE_NCRSWRAP_H #define CURSETREE_NCRSWRAP_H #include "dims.h" #ifndef __NCURSES_H typedef struct _win_st WINDOW; #endif /* __NCURSES_H */ enum crs_termmode { /* tty cbreak mode */ TMODE_CBREAK, /* tty raw mode */ TMODE_RAW, /* tty cooked mode (ISIG & IXON not modified)*/ TMODE_NOCBREAK, /* tty cooked mode (ISIG & IXON set) */ TMODE_NORAW, }; int termmode(const enum crs_termmode mode); void termsize(int *const width, int *const height); struct ct_dims *termdims(void); void init_ncurses(void); void end_ncurses(void); WINDOW *new_window(const int x, const int y, const int width, const int height); WINDOW *new_window_fs(void); void destroy_window(WINDOW *); #define winpos(win, x, y) (x = winposx(win), y = winposy(win)) #define winsize(win, width, height) \ (width = winwidth(win), height = winheight(win)) int winposx(WINDOW *const); int winposy(WINDOW *const); int winwidth(WINDOW *const); int winheight(WINDOW *const); struct ct_dims *windims(WINDOW *win); int resizemv_window(WINDOW *const win, const int x, const int y, const int width, const int height); #endif /* CURSETREE_NCRSWRAP_H */