forked from zohead/fbvnc
/
draw.h
34 lines (28 loc) · 873 Bytes
/
draw.h
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
32
33
34
#include <rfb/rfbclient.h>
/* framebuffer device */
#define FBDEV_PATH "/dev/graphics/fb0"
/* fb_mode() interpretation */
#define FBM_BPP(m) (((m) >> 16) & 0x0f)
#define FBM_COLORS(m) ((m) & 0x0fff)
/* main functions */
int fb_init(void);
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);
/* helper functions */
struct rgb_conv {
int rshl, gshl;
int rskp, gskp, bskp;
int rmax, gmax, bmax;
};
void fill_rgb_conv(int mode, struct rgb_conv *s);
void fb_set(int r, int c, void *mem, int len);
unsigned fb_val(int r, int g, int b);
/*static*/ void GotFrameBufferUpdate(rfbClient* cl, int x, int y, int w, int h);
/*static*/ rfbBool MallocFrameBuffer(rfbClient* client);
void mxc_epdc_fb_full_refresh(rfbClient* client);
void FinishedFrameBufferUpdate(rfbClient* cl);
void setRotate(int rotate);