The QScreen class and its descendants manage the framebuffer and palette.
.PP
QScreens act as factories for the screen cursor and QGfx's. QLinuxFbScreen manages a Linux framebuffer; accelerated drivers subclass QLinuxFbScreen. There can only be one screen in a Qt/Embedded application.
.PP
See also Qt/Embedded.
.SH MEMBER FUNCTION DOCUMENTATION
.SH "QScreen::QScreen ( int display_id )"
Create a screen; the \fIdisplay_id\fR is the number of the Qt/Embedded server to connect to.
.SH "QScreen::~QScreen ()\fC [virtual]\fR"
Destroys a QScreen
.SH "int QScreen::alloc ( unsigned int r, unsigned int g, unsigned int b )\fC [virtual]\fR"
Given an RGB value \fIr\fR \fIg\fR \fIb\fR, return an index which is the closest match to it in the screen's palette. Used in paletted modes only.
.SH "uchar * QScreen::base () const"
Returns a pointer to the start of the framebuffer.
.SH "void QScreen::blank ( bool on )\fC [virtual]\fR"
If \fIon\fR is true, blank the screen. Otherwise unblank it.
.SH "uchar * QScreen::cache ( int, int )\fC [virtual]\fR"
This function is used to store pixmaps in graphics memory for the use of the accelerated drivers. See QLinuxFbScreen (where the cacheing is implemented) for more information.
.SH "QRgb * QScreen::clut ()"
Returns the screen's color lookup table (color palette). This is only valid in paletted modes (8bpp and lower).
This function is called by every Qt/Embedded application on startup. It maps in the framebuffer and in the accelerated drivers the graphics card control registers. \fIdisplaySpec\fR has the following syntax:
.PP
\fC[gfx driver][:driver specific options][:display number]\fR
.PP
for example if you want to use the mach64 driver on fb1 as display 2:
.PP
\fCMach64:/dev/fb1:2\fR
.PP
\fIdisplaySpec\fR is passed in via the QWS_DISPLAY environment variable or the -display command line parameter.
.SH "QGfx * QScreen::createGfx ( unsigned char * bytes, int w, int h, int d, int linestep )\fC [virtual]\fR"
Creates a gfx on an arbitrary buffer \fIbytes\fR, width \fIw\fR and height \fIh\fR in pixels, depth \fId\fR and \fIlinestep\fR (length in bytes of each line in the buffer). Accelerated drivers can check to see if \fIbytes\fR points into graphics memory and create an accelerated Gfx.
.SH "int QScreen::depth () const"
Gives the depth in bits per pixel of the framebuffer. This is the number of bits each pixel takes up rather than the number of significant bits, so 24bpp and 32bpp express the same range of colors (8 bits of red, green and blue)
.SH "int QScreen::deviceHeight () const"
Gives the full height of the framebuffer device, as opposed to the height which Qt/Embedded will actually use. These can differ if the display is centered within the framebuffer.
.SH "int QScreen::deviceWidth () const"
Gives the full width of the framebuffer device, as opposed to the width which Qt/Embedded will actually use. These can differ if the display is centered within the framebuffer.
This is used to initialize the software cursor - \fIend_of_location\fR points to the address after the area where the cursor image can be stored. \fIinit\fR is true for the first application this method is called from (the Qt/Embedded server), false otherwise.
Returns TRUE if the display is interlaced (for instance a television screen); otherwise returns FALSE. If TRUE, drawing is altered to look better on such displays.
Map a framebuffer coordinate to the coordinate space used by the application. Used by the rotated driver; the QScreen implementation simply returns \fIs\fR.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Map a framebuffer coordinate to the coordinate space used by the application. Used by the rotated driver; the QScreen implementation simply returns the point.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Map a framebuffer coordinate to the coordinate space used by the application. Used by the rotated driver; the QScreen implementation simply returns \fIr\fR.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Transforms an image so that it matches the application coordinate space (e.g. rotating it 90 degrees counter-clockwise). The QScreen implementation simply returns \fIi\fR.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Transforms a region so that it matches the application coordinate space (e.g. rotating it 90 degrees counter-clockwise). The QScreen implementation simply returns \fIr\fR.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Transforms an image so that it fits the device coordinate space (e.g. rotating it 90 degrees clockwise). The QScreen implementation simply returns \fIi\fR.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Transforms a region so that it fits the device coordinate space (e.g. rotating it 90 degrees clockwise). The QScreen implementation simply returns \fIr\fR.
.SH "int QScreen::numCols ()"
Returns the number of entries in the color table returned by clut().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
This checks whether the buffer specified by \fIp\fR is on the card (as per the other version of onCard) and returns an offset in bytes from the start of graphics card memory in \fIoffset\fR if it is.
.SH "int * QScreen::opType ()"
Returns the screen's operation type.
.SH "int QScreen::pixelType () const"
Returns an integer (taking the same values as QGfx::PixelType) that specifies the pixel storage format of the screen.
Returns the value in bits to which individual scanlines of pixmaps held in graphics card memory should be aligned. This is only useful for accelerated drivers. By default the value returned is 64 but it can be overridden by individual accelerated drivers.
Returns the value in bits to which the start address of pixmaps held in graphics card memory should be aligned. This is only useful for accelerated drivers. By default the value returned is 64 but it can be overridden by individual accelerated drivers.
.SH "void QScreen::restore ()\fC [virtual]\fR"
Restores the state of the graphics card from a previous save()
.SH "void QScreen::save ()\fC [virtual]\fR"
Saves the state of the graphics card - used so that, for instance, the palette can be restored when switching between linux virtual consoles. Hardware QScreen descendants should save register state here if necessary if switching between virtual consoles (for example to/from X) is to be permitted.
Called by the Qt/Embedded server on shutdown; never called by a Qt/Embedded client. This is intended to support graphics card specific shutdown; the unaccelerated implementation simply hides the mouse cursor.
.SH "bool QScreen::supportsDepth ( int d ) const\fC [virtual]\fR"
Returns true if the screen supports a particular color depth \fId\fR. Possible values are 1,4,8,16 and 32.
.SH "int QScreen::totalSize () const"
Returns the size in bytes of available graphics card memory, including the screen. Offscreen memory is only used by the accelerated drivers.