00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef _RSCREENUTILS_H_
00011 #define _RSCREENUTILS_H_
00012
00017 #include <e32std.h>
00018
00026 class RScreenUtils {
00028 class TPicture {
00029 public:
00030 const TUint16 *iData;
00031 TUint32 iXSize;
00032 TUint32 iYSize;
00033 TUint32 iXPos;
00034 TUint32 iYPos;
00035 };
00036
00038 class TBlank {
00039 public:
00040 TUint32 iColor;
00041 TUint32 iXSize;
00042 TUint32 iYSize;
00043 TUint32 iXPos;
00044 TUint32 iYPos;
00045 };
00046
00047 public:
00048 RScreenUtils();
00049 TInt Open();
00050 void Close();
00051
00052 void Blank(TUint16 aColor);
00053 void Number(TUint aX,TUint aY,TUint32 aNumber,
00054 TUint16 aForeColor,TUint16 aBackColor);
00055 void HexNumber(TUint aX,TUint aY,TUint32 aNumber,
00056 TUint16 aForeColor,TUint16 aBackColor);
00057 TUint16 *ScreenBase();
00058
00059 void DrawPicture(TPicture &aPicture);
00060 void BlankArea(TBlank &aBlank);
00061
00062 private:
00063 TUint32 BCDNumber(TUint32 aNumber);
00064
00065 static void NumberAsm(TUint16 *aPos,TUint32 aNumber,
00066 TUint16 aForeColor,TUint16 aBackColor);
00067 void BlankAsm(TUint16 aColor);
00068
00069 void BlankAreaAsm(TBlank *aBlank);
00070 void DrawPictureAsm(TPicture *aPicture);
00071 private:
00072 TUint16 *iScreenBase;
00076 };
00077
00078
00079 #endif