term: enable switching signals using the second argument of term_exec()
[fbpad.git] / fbpad.h
blob3df9ab289c9979bbab1ff6a4ba2f5582eea20b55
1 /* fbpad header file */
3 #define MIN(a, b) ((a) < (b) ? (a) : (b))
4 #define MAX(a, b) ((a) > (b) ? (a) : (b))
5 #define LEN(a) (sizeof(a) / sizeof((a)[0]))
7 #define ESC 27 /* escape code */
8 #define NHIST 128 /* scrolling history lines */
10 /* isdw.c */
11 #define DWCHAR 0x40000000u /* 2nd half of a fullwidth char */
13 int isdw(int c);
14 int iszw(int c);
16 /* term.c */
17 struct term *term_make(void);
18 void term_free(struct term *term);
19 void term_load(struct term *term, int visible);
20 void term_save(struct term *term);
21 int term_fd(struct term *term);
22 void term_hide(struct term *term);
23 void term_show(struct term *term);
24 /* operations on the loaded terminal */
25 void term_read(void);
26 void term_send(int c);
27 void term_exec(char **args, int swsig);
28 void term_end(void);
29 void term_screenshot(void);
30 void term_scrl(int pos);
31 void term_redraw(int all);
33 /* pad.c */
34 #define FN_I 0x01000000 /* italic font */
35 #define FN_B 0x02000000 /* bold font */
36 #define FN_C 0x00ffffff /* font color mask */
38 int pad_init(void);
39 void pad_free(void);
40 void pad_conf(int row, int col, int rows, int cols);
41 int pad_font(char *fr, char *fi, char *fb);
42 void pad_put(int ch, int r, int c, int fg, int bg);
43 int pad_rows(void);
44 int pad_cols(void);
45 void pad_fill(int sr, int er, int sc, int ec, int c);
46 void pad_border(unsigned c, int wid);
47 char *pad_fbdev(void);
48 int pad_crows(void);
49 int pad_ccols(void);
51 /* font.c */
52 struct font *font_open(char *path);
53 void font_free(struct font *font);
54 int font_rows(struct font *font);
55 int font_cols(struct font *font);
56 int font_bitmap(struct font *font, void *dst, int c);
58 /* scrsnap.c */
59 void scr_snap(int idx);
60 int scr_load(int idx);
61 void scr_free(int idx);
62 void scr_done(void);