add struct ct_term terminfo/termios/ioctl wrapper

This commit is contained in:
Emile Clark-Boman 2025-09-24 15:46:56 +10:00
parent 2033721c22
commit bcfcbaf529
3 changed files with 89 additions and 0 deletions

19
src/term.h Normal file
View file

@ -0,0 +1,19 @@
#ifndef _CURSETREE_TERM_H
#define _CURSETREE_TERM_H
#include "termios.h"
struct ct_term {
int fd;
unsigned short cols;
unsigned short rows;
struct termios termios0;
struct termios termios;
};
int getterm(struct ct_term *const term);
void endterm(struct ct_term *const term);
int termsize(struct ct_term *const term);
#endif /* _CURSETREE_TERM_H */