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