blob: fcb5ff275ef9b4826d32f980d9a0cf623a4075b1 (
plain)
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
#ifndef __FB_H
#define __FB_H
#include <lib/base/eerror.h>
#include <linux/fb.h>
class fbClass
{
int fd;
unsigned int xRes, yRes, stride, bpp;
int available;
struct fb_var_screeninfo screeninfo, oldscreen;
fb_cmap cmap;
__u16 red[256], green[256], blue[256], trans[256];
static fbClass *instance;
int locked;
int m_manual_blit;
int m_number_of_pages;
int m_phys_mem;
#ifdef SWIG
fbClass(const char *fb="/dev/fb0");
~fbClass();
public:
#else
public:
unsigned char *lfb;
void enableManualBlit();
void disableManualBlit();
int showConsole(int state);
int SetMode(unsigned int xRes, unsigned int yRes, unsigned int bpp);
int Available() { return available; }
int getNumPages() { return m_number_of_pages; }
unsigned long getPhysAddr() { return m_phys_mem; }
int setOffset(int off);
int waitVSync();
void blit();
unsigned int Stride() { return stride; }
fb_cmap *CMAP() { return &cmap; }
fbClass(const char *fb="/dev/fb0");
~fbClass();
// low level gfx stuff
int PutCMAP();
#endif
static fbClass *getInstance();
int lock();
void unlock();
int islocked() { return locked; }
};
#endif
|