QScreen(3qt)

πŸ“¦ version 3.3.8b, in fedora 43, fedora 44

πŸ’– 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 is 64, 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 to 64, again overridable by individual accelerated drivers. πŸŽ€
  • void QScreen::restore () [virtual] β€” puts the state of the graphics card back the way it was, from a previous save(). 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. hardware QScreen descendants 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 a QGfx (normally a QGfxRaster) all set up and initialized to point at the screen, with an origin at 0,0 and 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. at base()). 🫢
  • 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; the QScreen version 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] β€” returns true if the screen supports a particular color depth d. possible values are 1, 4, 8, 16 and 32. 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. the QScreeen implementation returns 0. (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 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