aboutsummaryrefslogtreecommitdiff
path: root/lib/gdi/fb.h
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2003-10-17 15:36:42 +0000
committerFelix Domke <tmbinc@elitedvb.net>2003-10-17 15:36:42 +0000
commitd63d2c3c6cbbd574dda4f8b00ebe6c661735edd5 (patch)
tree84d0cacfd0b6c1241c236c7860f7cbd7f26901bb /lib/gdi/fb.h
downloadenigma2-d63d2c3c6cbbd574dda4f8b00ebe6c661735edd5.tar.gz
enigma2-d63d2c3c6cbbd574dda4f8b00ebe6c661735edd5.zip
import of enigma2
Diffstat (limited to 'lib/gdi/fb.h')
-rw-r--r--lib/gdi/fb.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/lib/gdi/fb.h b/lib/gdi/fb.h
new file mode 100644
index 00000000..d0ad6fed
--- /dev/null
+++ b/lib/gdi/fb.h
@@ -0,0 +1,43 @@
+#ifndef __FB_H
+#define __FB_H
+
+#include <linux/fb.h>
+#include <lib/base/eerror.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;
+public:
+ unsigned char *lfb;
+ int showConsole(int state);
+ int SetMode(unsigned int xRes, unsigned int yRes, unsigned int bpp);
+ int Available() { return available; }
+ unsigned int Stride() { return stride; }
+ fb_cmap *CMAP() { return &cmap; }
+
+ fbClass(const char *fb="/dev/fb/0");
+ ~fbClass();
+
+ static fbClass *getInstance();
+
+ // low level gfx stuff
+ int PutCMAP();
+
+ // gfx stuff (colors are 8bit!)
+ void Box(int x, int y, int width, int height, int color, int backcolor=0);
+ void NBox(int x, int y, int width, int height, int color);
+ void VLine(int x, int y, int sy, int color);
+
+ int lock();
+ void unlock();
+};
+
+#endif