add iMutableServiceList
[enigma2.git] / lib / gdi / lcd.h
1 #ifndef __lcd_h
2 #define __lcd_h
3
4 #include <asm/types.h>
5 #include <lib/gdi/esize.h>
6 #include <lib/gdi/erect.h>
7
8 #define LCD_CONTRAST_MIN 0
9 #define LCD_CONTRAST_MAX 63
10 #define LCD_BRIGHTNESS_MIN 0
11 #define LCD_BRIGHTNESS_MAX 255
12
13 class eLCD
14 {
15 protected:
16         eSize res;
17         unsigned char *_buffer;
18         int lcdfd;
19         int _stride;
20         int locked;
21 public:
22         int lock();
23         void unlock();
24         int islocked() { return locked; }
25
26         eLCD(eSize size);
27         virtual ~eLCD();
28
29         __u8 *buffer() { return (__u8*)_buffer; }
30         int stride() { return _stride; }
31         eSize size() { return res; }
32         
33         virtual void update()=0;
34 };
35
36 class eDBoxLCD: public eLCD
37 {
38         static eDBoxLCD *instance;
39         unsigned char inverted;
40 public:
41         static eDBoxLCD *getInstance();
42         int eDBoxLCD::setLCDContrast(int contrast);
43         int eDBoxLCD::setLCDBrightness(int brightness);
44         void setInverted( unsigned char );
45         eDBoxLCD();
46         ~eDBoxLCD();
47         void update();
48 };
49
50 #endif