remove new found flags when do a automatic scan and "clear before scan" was
[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 #ifdef SWIG
16         eLCD(eSize size);
17         ~eLCD();
18 #else
19 protected:
20         eSize res;
21         unsigned char *_buffer;
22         int lcdfd;
23         int _stride;
24         int locked;
25 #endif
26 public:
27         int lock();
28         void unlock();
29         int islocked() { return locked; }
30 #ifndef SWIG
31         eLCD(eSize size);
32         virtual ~eLCD();
33         __u8 *buffer() { return (__u8*)_buffer; }
34         int stride() { return _stride; }
35         eSize size() { return res; }
36         
37         virtual void update()=0;
38 #endif
39 };
40
41 class eDBoxLCD: public eLCD
42 {
43         static eDBoxLCD *instance;
44         unsigned char inverted;
45         int is_oled;
46 #ifdef SWIG
47         eDBoxLCD();
48         ~eDBoxLCD();
49 #endif
50 public:
51 #ifndef SWIG
52         eDBoxLCD();
53         ~eDBoxLCD();
54 #endif
55         static eDBoxLCD *getInstance();
56         int setLCDContrast(int contrast);
57         int setLCDBrightness(int brightness);
58         void setInverted( unsigned char );
59         void update();
60 };
61
62 #endif