remove __init__.py files and create them on the fly
[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         int m_number_of_pages;
19 public:
20         unsigned char *lfb;
21         int showConsole(int state);
22         int SetMode(unsigned int xRes, unsigned int yRes, unsigned int bpp);
23         int Available() { return available; }
24         
25         int getNumPages() { return m_number_of_pages; }
26         
27         int setOffset(int off);
28         int waitVSync();
29         unsigned int Stride() { return stride; }
30         fb_cmap *CMAP() { return &cmap; }
31
32         fbClass(const char *fb="/dev/fb/0");
33         ~fbClass();
34         
35         static fbClass *getInstance();
36
37                                 // low level gfx stuff
38         int PutCMAP();
39
40         int lock();
41         void unlock();
42         int islocked() { return locked; }
43 };
44
45 #endif