filter \n and \t in short description title
[enigma2.git] / lib / gdi / fb.h
1 #ifndef __FB_H
2 #define __FB_H
3
4 #include <lib/base/eerror.h>
5 #include <linux/fb.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_manual_blit;
19         int m_number_of_pages;
20 #ifdef SWIG
21         fbClass(const char *fb="/dev/fb/0");
22         ~fbClass();
23 public:
24 #else
25 public:
26         unsigned char *lfb;
27         void enableManualBlit();
28         void disableManualBlit();
29         int showConsole(int state);
30         int SetMode(unsigned int xRes, unsigned int yRes, unsigned int bpp);
31         int Available() { return available; }
32         
33         int getNumPages() { return m_number_of_pages; }
34         
35         int setOffset(int off);
36         int waitVSync();
37         void blit();
38         unsigned int Stride() { return stride; }
39         fb_cmap *CMAP() { return &cmap; }
40
41         fbClass(const char *fb="/dev/fb/0");
42         ~fbClass();
43         
44                         // low level gfx stuff
45         int PutCMAP();
46 #endif
47         static fbClass *getInstance();
48
49         int lock();
50         void unlock();
51         int islocked() { return locked; }
52 };
53
54 #endif