forked from aligrudi/fbpdf
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdraw.h
More file actions
30 lines (25 loc) · 680 Bytes
/
draw.h
File metadata and controls
30 lines (25 loc) · 680 Bytes
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
/* main functions */
int fb_init(void);
int fb_open(char *title, int w, int h, int flags);
void fb_free(void);
unsigned fb_mode(void);
void *fb_mem(int r);
int fb_rows(void);
int fb_cols(void);
void fb_cmap(void);
void fb_update(void);
typedef unsigned int fbval_t; /* framebuffer depth */
/* fb_open flags*/
#define NOFRAME 0
#define BORDER 1
#define APPFRAME 2
/* fb_mode() interpretation */
#define FBM_BPP(m) (((m) >> 16) & 0x0f)
#define FBM_COLORS(m) ((m) & 0x0fff)
/* helper functions */
void fb_set(int r, int c, void *mem, int len);
unsigned fb_val(int r, int g, int b);
/* event functions*/
void term_setup(void);
void term_cleanup(void);
int readkey(int waitms);