add preroll to iTSMpegDecoder
[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 #ifdef SWIG
20         fbClass(const char *fb="/dev/fb/0");
21         ~fbClass();
22 public:
23 #else
24 public:
25         unsigned char *lfb;
26         int showConsole(int state);
27         int SetMode(unsigned int xRes, unsigned int yRes, unsigned int bpp);
28         int Available() { return available; }
29         
30         int getNumPages() { return m_number_of_pages; }
31         
32         int setOffset(int off);
33         int waitVSync();
34         unsigned int Stride() { return stride; }
35         fb_cmap *CMAP() { return &cmap; }
36
37         fbClass(const char *fb="/dev/fb/0");
38         ~fbClass();
39         
40                         // low level gfx stuff
41         int PutCMAP();
42 #endif
43         static fbClass *getInstance();
44
45         int lock();
46         void unlock();
47         int islocked() { return locked; }
48 };
49
50 #endif