X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=lib%2Fgdi%2Flcd.h;h=e7b4c2c47149be77d2d29de680c1ffc7379ba832;hb=59f9f67261d0e6018293871d00cbd12572fbb4c7;hp=567d06494273dd46b0700e1a385ed290b0ed3119;hpb=d63d2c3c6cbbd574dda4f8b00ebe6c661735edd5;p=vuplus_dvbapp diff --git a/lib/gdi/lcd.h b/lib/gdi/lcd.h index 567d064..e7b4c2c 100644 --- a/lib/gdi/lcd.h +++ b/lib/gdi/lcd.h @@ -1,5 +1,3 @@ -#ifndef DISABLE_LCD - #ifndef __lcd_h #define __lcd_h @@ -14,40 +12,53 @@ class eLCD { +#ifdef SWIG + eLCD(); + ~eLCD(); +#else protected: + void setSize(int xres, int yres, int bpp); eSize res; unsigned char *_buffer; int lcdfd; int _stride; int locked; +#endif public: int lock(); void unlock(); - - eLCD(eSize size); + int islocked() { return locked; } + bool detected() { return lcdfd >= 0; } +#ifndef SWIG + eLCD(); virtual ~eLCD(); - __u8 *buffer() { return (__u8*)_buffer; } int stride() { return _stride; } eSize size() { return res; } - virtual void update()=0; +#endif }; class eDBoxLCD: public eLCD { static eDBoxLCD *instance; unsigned char inverted; + int is_oled; +#ifdef SWIG + eDBoxLCD(); + ~eDBoxLCD(); +#endif public: - static eDBoxLCD *getInstance(); - int switchLCD(int state); - int setLCDParameter(int brightness, int contrast); - void setInverted( unsigned char ); +#ifndef SWIG eDBoxLCD(); ~eDBoxLCD(); +#endif + static eDBoxLCD *getInstance(); + int setLCDContrast(int contrast); + int setLCDBrightness(int brightness); + void setInverted( unsigned char ); + bool isOled() const { return !!is_oled; } void update(); }; #endif - -#endif //DISABLE_LCD