1 /*---------------------------------------------------------------------\
3 | __ __ ____ _____ ____ |
4 | \ \ / /_ _/ ___|_ _|___ \ |
5 | \ V / _` \___ \ | | __) | |
6 | | | (_| |___) || | / __/ |
7 | |_|\__,_|____/ |_| |_____| |
11 \----------------------------------------------------------------------/
15 Author: Stefan Hundhammer <sh@suse.de>
20 #ifndef YFrameBuffer_h
21 #define YFrameBuffer_h
27 typedef unsigned short UINT16;
28 typedef unsigned long UINT32;
29 typedef UINT32 FBPixel;
34 YFrameBuffer( int screenWidth, int screenHeight, int bitDepth );
39 virtual ~YFrameBuffer();
42 * Set the framebuffer pixel at (x, y)
44 void setPixel( int x, int y, FBPixel pixel );
47 * Get the framebuffer pixel value at (x, y)
49 FBPixel pixel( int x, int y );
52 * Returns 'true' if the framebuffer is valid, i.e. can be used.
54 bool valid() const { return _fb != 0; }
56 int width() const { return _width; }
57 int height() const { return _height; }
58 int depth() const { return _depth; }
59 int bytesPerPixel() const { return _bytesPerPixel; }
65 * mmap() the framebuffer device
70 * release the mmaped framebuffer
92 #endif // ifndef YFrameBuffer_h