00001 /********************************************************************** 00002 00003 Copyright (c) 2005, TomTom B.V. 00004 00005 All rights reserved 00006 00007 00008 ***********************************************************************/ 00009 00010 00011 00012 #ifndef __MFRAMEBUFFER_H__ 00013 #define __MFRAMEBUFFER_H__ 00014 00022 class MFrameBuffer 00023 { 00024 public: 00025 00040 virtual char* GetScreenBuffer() = 0; 00041 00044 virtual unsigned int GetWidth() = 0; 00045 00048 virtual unsigned int GetHeight() = 0; 00049 00054 virtual unsigned int GetBitsPerPixel() = 0; 00055 00061 virtual unsigned int GetPixelAddressOffset( unsigned int aX, unsigned int aY ) = 0; 00062 00063 virtual ~MFrameBuffer() {}; 00064 00067 unsigned int GetScreenBufferSize() 00068 { 00069 return GetWidth() * 00070 GetHeight() * 00071 GetBitsPerPixel() >> 3; 00072 } 00073 00074 00075 public: 00078 static MFrameBuffer& GetFrameBuffer(); 00079 }; 00080 00081 #endif //__MFRAMEBUFFER_H__