QScreen(3qt)
π QScreen β the 3qt manual page, bestie edition π
okay so welcome to QScreen(3qt), the manual page about the class that runs the whole show for your framebuffer and palette. grab a snack, this one's a chonker. π
β¨ NAME β¨
QScreen β and its descendants manage the framebuffer and palette π
πΈ SYNOPSIS πΈ
#include <qgfx_qws.h>
π Public Members π
QScreen ( int display_id )
virtual ~QScreen ()
virtual bool initDevice () = 0
virtual bool connect ( const QString & displaySpec ) = 0
virtual void disconnect () = 0
virtual int initCursor ( void * end_of_location, bool init = FALSE )
virtual void shutdownDevice ()
virtual void setMode ( int, int, int ) = 0
virtual bool supportsDepth ( int d ) const
virtual QGfx * createGfx ( unsigned char * bytes, int w, int h, int d,
int linestep )
virtual QGfx * screenGfx ()
virtual void save ()
virtual void restore ()
virtual void blank ( bool on )
virtual int pixmapOffsetAlignment ()
virtual int pixmapLinestepAlignment ()
virtual bool onCard ( unsigned char * p ) const
virtual bool onCard ( unsigned char * p, ulong & offset ) const
virtual void set ( unsigned int, unsigned int, unsigned int, unsigned
int )
virtual int alloc ( unsigned int r, unsigned int g, unsigned int b )
int width () const
int height () const
int depth () const
virtual int pixmapDepth () const
int pixelType () const
int linestep () const
int deviceWidth () const
int deviceHeight () const
uchar * base () const
virtual uchar * cache ( int, int )
virtual void uncache ( uchar * )
int screenSize () const
int totalSize () const
QRgb * clut ()
int numCols ()
virtual QSize mapToDevice ( const QSize & s ) const
virtual QSize mapFromDevice ( const QSize & s ) const
virtual QPoint mapToDevice ( const QPoint &, const QSize & ) const
virtual QPoint mapFromDevice ( const QPoint &, const QSize & ) const
virtual QRect mapToDevice ( const QRect & r, const QSize & ) const
virtual QRect mapFromDevice ( const QRect & r, const QSize & ) const
virtual QImage mapToDevice ( const QImage & i ) const
virtual QImage mapFromDevice ( const QImage & i ) const
virtual QRegion mapToDevice ( const QRegion & r, const QSize & ) const
virtual QRegion mapFromDevice ( const QRegion & r, const QSize & ) const
virtual int transformOrientation () const
virtual bool isTransformed () const
virtual bool isInterlaced () const
virtual void setDirty ( const QRect & )
int * opType ()
int * lastOp ()
π¦ DESCRIPTION π¦
The QScreen class and its descendants manage the framebuffer and palette. that's the whole vibe. π«Ά
QScreens act as factories for the screen cursor and QGfx's. literally, they make them. β¨
QLinuxFbScreen manages a Linux framebuffer, and accelerated drivers subclass QLinuxFbScreen. no cap.
π¨ bestie listen: there can only be one screen in a Qt/Embedded application. one. singular. main character energy only.
See also Qt/Embedded.
π MEMBER FUNCTION DOCUMENTATION π
QScreen::QScreen ( int display_id )
Creates a screen π« and the display_id is the number of the Qt/Embedded server you wanna connect to.
QScreen::~QScreen () [virtual]
Destroys a QScreen. bye bestie ππ¦
QScreen::alloc ( unsigned int r, unsigned int g, unsigned int b ) [virtual]
Give it an RGB value r g b and it hands you back an index β the closest match to it in the screen's palette. Only used in paletted modes tho. π
QScreen::base () const
Returns a pointer to the start of the framebuffer. like, the very beginning. iconic. β¨
QScreen::blank ( bool on ) [virtual]
If on is true, blank the screen π. Otherwise unblank it βοΈ.
QScreen::cache ( int, int ) [virtual]
This one's here to store pixmaps in graphics memory for the accelerated drivers to use. peep QLinuxFbScreen (where the cacheing is implemented) for the deets. π
QScreen::clut ()
Returns the screen's color lookup table (aka the color palette) π.
β οΈ heads up: this is only valid in paletted modes (8bpp and lower).
QScreen::connect ( const QString & displaySpec ) [pure virtual]
This function gets called by every Qt/Embedded application on startup π₯. It maps in the framebuffer, and in the accelerated drivers it maps in the graphics card control registers.
displaySpec has this syntax:
[gfx driver][:driver specific options][:display number]
for example, if you wanna use the mach64 driver on fb1 as display 2:
Mach64:/dev/fb1:2
displaySpec comes in via the QWS_DISPLAY environment variable or the -display command line parameter. iykyk π
QScreen::createGfx ( unsigned char * bytes, int w, int h, int d, int linestep ) [virtual]
Creates a gfx on an arbitrary buffer bytes, with width w and height h in pixels, depth d, and linestep (which is the length in bytes of each line in the buffer).
Accelerated drivers can check whether bytes points into graphics memory and then create an accelerated Gfx β¨.
QScreen::depth () const
Gives the depth in bits per pixel of the framebuffer.
sneaky detail bestie: this is the number of bits each pixel takes up, not the number of significant bits. so 24bpp and 32bpp express the same range of colors (8 bits of red, green and blue). same vibes, different storage π
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. π
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. π
QScreen::disconnect () [pure virtual]
This function gets called by every Qt/Embedded application right before it exits πͺ, and it's normally used to unmap the framebuffer. periodt.
QScreen::height () const
Gives the height in pixels of the framebuffer ππ
QScreen::initCursor ( void * end_of_location, bool init = FALSE ) [virtual]
This is used to initialize the software cursor π±οΈβ¨. end_of_location points to the address after the area where the cursor image can be stored.
init is true for the first application this method is called from (the Qt/Embedded server), and false otherwise.
QScreen::initDevice () [pure virtual]
This function gets called by the Qt/Embedded server when it's initializing the framebuffer π§. Accelerated drivers use it to set up the graphics card. slay.
QScreen::isInterlaced () const [virtual]
Returns TRUE if the display is interlaced (for instance a television screen πΊ); otherwise returns FALSE.
If it's TRUE, drawing is altered to look better on such displays. thoughtful fr fr π
QScreen::isTransformed () const [virtual]
Returns TRUE if the screen is transformed (for instance, rotated 90 degrees π); otherwise returns FALSE.
QScreen's version always returns FALSE. always. no exceptions bestie π
QScreen::lastOp ()
Returns the screen's last operation. π¬
QScreen::linestep () const
Returns the length in bytes of each scanline of the framebuffer π.
QScreen::mapFromDevice ( const QSize & s ) const [virtual]
Map a framebuffer coordinate to the coordinate space used by the application πΊοΈβ¨. Used by the rotated driver; the QScreen implementation simply returns s.
QScreen::mapFromDevice ( const QPoint &, const QSize & ) const [virtual]
This is an overloaded member function, provided for convenience π«Ά. It behaves essentially like the above function.
Map a framebuffer coordinate to the coordinate space used by the application. Used by the rotated driver; the QScreen implementation simply returns the point.
QScreen::mapFromDevice ( const QRect & r, const QSize & ) const [virtual]
This is an overloaded member function, provided for convenience π«Ά. It behaves essentially like the above function.
Map a framebuffer coordinate to the coordinate space used by the application. Used by the rotated driver; the QScreen implementation simply returns r.
QScreen::mapFromDevice ( const QImage & i ) const [virtual]
This is an overloaded member function, provided for convenience π«Ά. It behaves essentially like the above function.
Transforms an image so that it matches the application coordinate space (e.g. rotating it 90 degrees counter-clockwise π). The QScreen implementation simply returns i.
QScreen::mapFromDevice ( const QRegion & r, const QSize & ) const [virtual]
This is an overloaded member function, provided for convenience π«Ά. It behaves essentially like the above function.
Transforms a region so that it matches the application coordinate space (e.g. rotating it 90 degrees counter-clockwise π). The QScreen implementation simply returns r.
QScreen::mapToDevice ( const QSize & s ) const [virtual]
Map a user coordinate to the one to actually draw πΊοΈπ₯. Used by the rotated driver; the QScreen implementation simply returns s.
QScreen::mapToDevice ( const QPoint &, const QSize & ) const [virtual]
This is an overloaded member function, provided for convenience π«Ά. It behaves essentially like the above function.
Map a user coordinate to the one to actually draw. Used by the rotated driver; the QScreen implementation simply returns the point passed in.
QScreen::mapToDevice ( const QRect & r, const QSize & ) const [virtual]
This is an overloaded member function, provided for convenience π«Ά. It behaves essentially like the above function.
Map a user coordinate to the one to actually draw. Used by the rotated driver; the QScreen implementation simply returns r.
QScreen::mapToDevice ( const QImage & i ) const [virtual]
This is an overloaded member function, provided for convenience π«Ά. It behaves essentially like the above function.
Transforms an image so that it fits the device coordinate space (e.g. rotating it 90 degrees clockwise π). The QScreen implementation simply returns i.
QScreen::mapToDevice ( const QRegion & r, const QSize & ) const [virtual]
This is an overloaded member function, provided for convenience π«Ά. It behaves essentially like the above function.
Transforms a region so that it fits the device coordinate space (e.g. rotating it 90 degrees clockwise π). The QScreen implementation simply returns r.
QScreen::numCols ()
Returns the number of entries in the color table returned by clut() π’π
QScreen::onCard ( unsigned char * p ) const [virtual]
Returns true if the buffer pointed to by p is within graphics card memory π³, and false if it's in main RAM π§ .
QScreen::onCard ( unsigned char * p, ulong & offset ) const [virtual]
This is an overloaded member function, provided for convenience π«Ά. It behaves essentially like the above function.
This checks whether the buffer specified by p is on the card (as per the other version of onCard) and, if it is, returns an offset in bytes from the start of graphics card memory in offset. π
QScreen::opType ()
Returns the screen's operation type. ποΈ
QScreen::pixelType () const
Returns an integer (taking the same values as QGfx::PixelType) that specifies the pixel storage format of the screen πΎβ¨
QScreen::pixmapDepth () const [virtual]
Gives the preferred depth for pixmaps π¨. By default this is the same as the screen depth, but for the VGA16 driver it's 8bpp.
int QScreen::pixmapLinestepAlignment ()[virtual] β tells you the value in bits that individual scanlines of pixmaps living in graphics card memory should be aligned to. bestie, this one is only useful for accelerated drivers. the default it hands back is64, but individual accelerated drivers can override it. β¨int QScreen::pixmapOffsetAlignment ()[virtual] β same energy, different address: this returns the value in bits that the start address of pixmaps in graphics card memory should be aligned to. again, only for accelerated drivers, again defaulting to64, again overridable by individual accelerated drivers. πvoid QScreen::restore ()[virtual] β puts the state of the graphics card back the way it was, from a previoussave(). it's giving undo button. β©οΈvoid QScreen::save ()[virtual] β saves the state of the graphics card. why tho? so that, for instance, the palette can be restored when you switch between linux virtual consoles. hardwareQScreendescendants should save register state here if it's necessary and if switching between virtual consoles (like, say, to/from X) is going to be permitted. no cap, this is the moment to stash your register state. πΎQGfx * QScreen::screenGfx ()[virtual] β returns aQGfx(normally aQGfxRaster) all set up and initialized to point at the screen, with an origin at0,0and a clip region covering the whole entire screen. iconic. π₯οΈint QScreen::screenSize () constβ returns the size in bytes of the screen. heads up: this is always located at the beginning of framebuffer memory (i.e. atbase()). π«Άvoid QScreen::set ( unsigned int, unsigned int, unsigned int, unsigned int )[virtual] β sets an entry in the color palette. that's it, that's the whole vibe. π¨void QScreen::setDirty ( const QRect & )[virtual] β indicates which section of the screen has been altered. it's used by the VNC and VFB displays; theQScreenversion does nothing. literally just sits there. πvoid QScreen::setMode ( int, int, int )[pure virtual] β you can use this function to set the framebuffer width, height and depth. it's currently unused tho. πvoid QScreen::shutdownDevice ()[virtual] β called by the Qt/Embedded server on shutdown; never called by a Qt/Embedded client. it's meant to support graphics card specific shutdown, and the unaccelerated implementation simply hides the mouse cursor. bye bye cursor πbool QScreen::supportsDepth ( int d ) const[virtual] β returnstrueif the screen supports a particular color depth d. possible values are1,4,8,16and32. slay πint QScreen::totalSize () constβ returns the size in bytes of available graphics card memory, including the screen. fyi offscreen memory is only used by the accelerated drivers. π§int QScreen::transformOrientation () const[virtual] β used by the rotated server. theQScreeenimplementation returns0. (yes that typo is in the original, we keep it, we respect it) β¨void QScreen::uncache ( uchar * )[virtual] β this function is called on pixmap destruction to remove them from graphics card memory. it's the cleanup era. π§Ήint QScreen::width () constβ gives the width in pixels of the framebuffer. π
π SEE ALSO π
go read, bestie, the docs are right there π
π COPYRIGHT π
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. π
πΈ AUTHOR πΈ
Generated automatically from the source code. (not me, i'm just the messenger π«Ά)
π BUGS π
if you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. good bug reports help us help you. thank you. π₯Ί
the definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. this man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. ngl, keep that in mind.
if you find errors in this manual page, please report them to qt-bugs@trolltech.com. please include the name of the manual page (qscreen.3qt) and the Qt version (3.3.8). pls pls pls include both, it makes everything so much easier π
and that's the whole page, bestie!! this one came from Trolltech AS, dated 2 February 2007, and it lives in the man pages as QScreen(3qt) β go forth and talk to your framebuffer with confidence, you absolute main character π
β¨π¦
π¦ where this page comes from
- fedora 43: qt3-devel-docs 3.3.8b-102.fc43 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- fedora 44: qt3-devel-docs 3.3.8b-103.fc44 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms