- disable console, remove ancient calls, add vsync and setoffset calls
[enigma2.git] / lib / gdi / fb.h
1 #ifndef __FB_H
2 #define __FB_H
3
4 #include <linux/fb.h>
5 #include <lib/base/eerror.h>
6
7 class fbClass
8 {
9         int fd;
10         unsigned int xRes, yRes, stride, bpp;
11         int available;
12         struct fb_var_screeninfo screeninfo, oldscreen;
13         fb_cmap cmap;
14         __u16 red[256], green[256], blue[256], trans[256];
15         static fbClass *instance;
16         int locked;
17         
18 public:
19         unsigned char *lfb;
20         int showConsole(int state);
21         int SetMode(unsigned int xRes, unsigned int yRes, unsigned int bpp);
22         int Available() { return available; }
23         int setOffset(int off);
24         int waitVSync();
25         unsigned int Stride() { return stride; }
26         fb_cmap *CMAP() { return &cmap; }
27
28         fbClass(const char *fb="/dev/fb/0");
29         ~fbClass();
30         
31         static fbClass *getInstance();
32
33                                 // low level gfx stuff
34         int PutCMAP();
35
36         int lock();
37         void unlock();
38         int islocked() { return locked; }
39 };
40
41 #endif