blob: a6506264e109fc543b3a8ae5a47564f159adc18e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#ifndef TCTL_H
#define TCTL_H
typedef struct {
unsigned short int height;
unsigned short int width;
unsigned short int ws_xpixel;
unsigned short int ws_ypixel;
} window_size_t;
typedef struct {
unsigned int c_iflag;
unsigned int c_oflag;
unsigned int c_cflag;
unsigned int c_lflag;
unsigned char c_line;
unsigned char c_cc[19];
} termios_t;
window_size_t tctl_get_window_size();
void tctl_set_window_size(window_size_t size);
window_size_t tctl_get_fd_window_size(int fd);
void tctl_set_fd_window_size(int fd, window_size_t size);
int isatty();
int tcgetattr(int fd, termios_t *termios);
void tcsetattr(int fd, termios_t *termios);
void setcanonical(termios_t *term, int is_canonical);
void setecho(termios_t *term, int is_echo);
void flush(unsigned int fd);
#endif
|