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 */
11 #define DWCHAR 0x40000000u /* 2nd half of a fullwidth char */
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 */
26 void term_send(int c
);
27 void term_exec(char **args
, int swsig
);
29 void term_screenshot(void);
30 void term_scrl(int pos
);
31 void term_redraw(int all
);
34 #define FN_I 0x01000000 /* italic font */
35 #define FN_B 0x02000000 /* bold font */
36 #define FN_C 0x00ffffff /* font color mask */
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
);
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);
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
);
59 void scr_snap(int idx
);
60 int scr_load(int idx
);
61 void scr_free(int idx
);