graphlcd-base/glcddrivers/driver.h
author root@rika
Thu, 23 Apr 2009 19:10:12 +0200
changeset 30 7fd00015f62f
parent 4 df6a40031aa5
permissions -rw-r--r--
several changes..
     1 /*
     2  * GraphLCD driver library
     3  *
     4  * driver.h  -  driver base class
     5  *
     6  * parts were taken from graphlcd plugin for the Video Disc Recorder
     7  * (c) 2001-2004 Carsten Siebholz <c.siebholz AT t-online.de>
     8  *
     9  * This file is released under the GNU General Public License. Refer
    10  * to the COPYING file distributed with this package.
    11  *
    12  * (c) 2004 Andreas Regel <andreas.regel AT powarman.de>
    13  */
    14 
    15 #ifndef _GLCDDRIVERS_DRIVER_H_
    16 #define _GLCDDRIVERS_DRIVER_H_
    17 
    18 #include <stdint.h>
    19 
    20 namespace GLCD
    21 {
    22 
    23 class cDriver
    24 {
    25 protected:
    26     int width;
    27     int height;
    28 public:
    29     cDriver();
    30     virtual ~cDriver() {}
    31 
    32     int Width() const { return width; }
    33     int Height() const { return height; }
    34 
    35     virtual int Init() { return 0; }
    36     virtual int DeInit() { return 0; }
    37 
    38     virtual void Clear() {}
    39     virtual void Set8Pixels(int x, int y, unsigned char data) {}
    40     virtual void SetScreen(const unsigned char * data, int width, int height, int lineSize);
    41     virtual void Refresh(bool refreshAll = false) {}
    42     virtual void SetBrightness(unsigned int percent) {}
    43     virtual bool HasKeys(); 
    44     virtual int  GetKey(); 
    45 
    46 };
    47 
    48 } // end of namespace
    49 
    50 #endif