8 const int KMaxDisplayStringLength = 256;
11 Define an interface to some basic display functionality
16 DisplayBase():iRequest(EMiniDisplayRequestNone),iPowerOn(false)
19 iFirmwareRevision[0]=0;
22 virtual ~DisplayBase(){};
25 virtual void Close()=0;
27 virtual int MinBrightness() const=0;
28 virtual int MaxBrightness() const=0;
29 virtual void SetBrightness(int aBrightness)=0;
30 virtual void Clear()=0;
31 virtual void Fill()=0;
33 virtual void SwapBuffers()=0;
36 virtual void Request(TMiniDisplayRequest /*aRequest*/){ /*No request supported by default*/ };
37 virtual TMiniDisplayRequest AttemptRequestCompletion()=0;
39 virtual TMiniDisplayRequest CurrentRequest(){return iRequest;}
40 virtual void CancelRequest(){iRequest=EMiniDisplayRequestNone;}
41 virtual bool RequestPending(){return iRequest!=EMiniDisplayRequestNone;}
43 virtual bool PowerOn() {return iPowerOn;}
44 virtual char* DeviceId() {return iDeviceId;}
45 virtual char* FirmwareRevision() {return iFirmwareRevision;}
48 void SetRequest(TMiniDisplayRequest aRequest) { iRequest=aRequest; }
51 char iDeviceId[KMaxDisplayStringLength];
52 char iFirmwareRevision[KMaxDisplayStringLength];
57 TMiniDisplayRequest iRequest;
63 class GraphicDisplay : public DisplayBase
66 virtual int WidthInPixels() const=0;
67 virtual int HeightInPixels() const=0;
68 virtual void SetPixel(unsigned char aX, unsigned char aY, bool aOn)=0;
69 virtual void SetAllPixels(unsigned char aOn)=0;
70 virtual int FrameBufferSizeInBytes() const=0;
71 //virtual int BitBlit(unsigned char* aSrc, unsigned char aSrcWidth, unsigned char aSrcHeight, unsigned char aTargetX, unsigned char aTargetY) const=0;