-
Notifications
You must be signed in to change notification settings - Fork 0
/
trident.h
37 lines (31 loc) · 818 Bytes
/
trident.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
35
36
37
#ifndef TRIDENT_H
#define TRIDENT_H
#include <linux/fb.h>
#include <stdint.h>
#include <sys/ioctl.h>
enum imgdata_type { RAW, RLE, RLE1, RAW_BL, RLE_BL, RLE1_BL };
typedef struct drawfren_s {
int fb_fd;
struct fb_fix_screeninfo finfo;
struct fb_var_screeninfo vinfo;
long screensize;
uint8_t *fbp;
} drawfren_t;
typedef struct pixmap_s {
int32_t width;
int32_t height;
size_t n_pixels;
char datatype;
uint32_t *data;
} pixmap_t;
#define GET_VINFO(fren) { \
ioctl(fren->fb_fd, FBIOGET_VSCREENINFO, &fren->vinfo); \
}
#define GET_FINFO(fren) { \
ioctl(fren->fb_fd, FBIOGET_FSCREENINFO, &fren->finfo); \
}
#define GET_INFOS(fren) { \
GET_VINFO(fren); \
GET_FINFO(fren); \
}
#endif /* TRIDENT_H */