MDM166AA: Clock and Clear adjustments.
8 #include "MiniDisplay.h"
10 const int KMaxDisplayStringLength = 256;
13 Define an interface to some basic display functionality
15 class DisplayBase: public HidDevice
18 DisplayBase():iRequest(EMiniDisplayRequestNone),iPowerOn(false)
21 iFirmwareRevision[0]=0;
24 virtual ~DisplayBase(){};
27 virtual void Close()=0;
29 virtual int MinBrightness() const=0;
30 virtual int MaxBrightness() const=0;
31 virtual void SetBrightness(int aBrightness)=0;
33 virtual void Clear()=0;
34 virtual void Fill()=0;
36 virtual void SwapBuffers()=0;
39 virtual void Request(TMiniDisplayRequest /*aRequest*/){ /*No request supported by default*/ };
40 virtual TMiniDisplayRequest AttemptRequestCompletion(){return EMiniDisplayRequestNone;};
42 virtual TMiniDisplayRequest CurrentRequest(){return iRequest;}
43 virtual void CancelRequest(){iRequest=EMiniDisplayRequestNone;}
44 virtual bool RequestPending(){return iRequest!=EMiniDisplayRequestNone;}
46 virtual bool IsPowerOn() {return iPowerOn;}
47 virtual char* DeviceId() {return iDeviceId;}
48 virtual char* FirmwareRevision() {return iFirmwareRevision;}
50 virtual void TurnPowerOn(){}
51 virtual void TurnPowerOff(){}
52 virtual bool SupportPowerOnOff(){return false;}
54 virtual void ShowClock(){}
55 virtual void HideClock(){}
56 virtual bool SupportClock(){return false;}
59 //Icon support queries return the number of segments an icon supports.
60 virtual int IconCount(TMiniDisplayIconType /*aIcon*/){return 0;}
61 virtual int IconStatusCount(TMiniDisplayIconType /*aIcon*/){return 0;}
62 virtual void SetIconStatus(TMiniDisplayIconType /*aIcon*/, int /*aIndex*/, int /*aStatus*/){}
65 void SetRequest(TMiniDisplayRequest aRequest) { iRequest=aRequest; }
68 char iDeviceId[KMaxDisplayStringLength];
69 char iFirmwareRevision[KMaxDisplayStringLength];
74 TMiniDisplayRequest iRequest;
80 class GraphicDisplay : public DisplayBase
83 virtual int WidthInPixels() const=0;
84 virtual int HeightInPixels() const=0;
85 virtual void SetPixel(unsigned char aX, unsigned char aY, unsigned int aPixel)=0;
86 virtual void SetAllPixels(unsigned char aOn)=0;
87 virtual int FrameBufferSizeInBytes() const=0;
88 //virtual int BitBlit(unsigned char* aSrc, unsigned char aSrcWidth, unsigned char aSrcHeight, unsigned char aTargetX, unsigned char aTargetY) const=0;