Qt 4.8
Public Types | Public Functions | Static Public Functions | Protected Functions | Protected Variables | Static Protected Variables | Private Functions | Static Private Functions | Properties | Friends | Related Functions | List of all members
QScreen Class Referenceabstract

The QScreen class is a base class for screen drivers in Qt for Embedded Linux. More...

#include <qscreen_qws.h>

Inheritance diagram for QScreen:
QAhiScreen QDirectFBScreen QGLScreen QIntfbScreen QLinuxFbScreen QMultiScreen QProxyScreen QQnxScreen QVFbScreen

Public Types

enum  ClassId {
  LinuxFBClass, TransformedClass, VNCClass, MultiClass,
  VFbClass, DirectFBClass, SvgalibClass, ProxyClass,
  GLClass, IntfbClass, CustomClass = 1024
}
 This enum defines the class identifiers for the known screen subclasses. More...
 
enum  PixelType { NormalPixel, BGRPixel }
 This enum describes the pixel storage format of the screen, i. More...
 

Public Functions

virtual int alloc (unsigned int, unsigned int, unsigned int)
 Returns the index in the screen's palette which is the closest match to the given RGB value (red, green, blue). More...
 
ucharbase () const
 Returns a pointer to the beginning of the framebuffer. More...
 
virtual void blank (bool on)
 Prevents the screen driver form displaying any content on the screen. More...
 
virtual void blit (const QImage &img, const QPoint &topLeft, const QRegion &region)
 Copies the given region in the given image to the point specified by topLeft using device coordinates. More...
 
void blit (QWSWindow *bs, const QRegion &clip)
 
virtual ucharcache (int)
 
ClassId classId () const
 Returns the class identifier for the screen object. More...
 
QRgbclut ()
 Returns a pointer to the screen's color lookup table (i. More...
 
int colorCount ()
 Returns the number of entries in the screen's color lookup table (i. More...
 
virtual bool connect (const QString &displaySpec)=0
 This function is called by every Qt for Embedded Linux application on startup, and must be implemented to map in the framebuffer and the accelerated drivers that the graphics card control registers. More...
 
virtual QWSWindowSurfacecreateSurface (QWidget *widget) const
 Creates and returns a new window surface for the given widget. More...
 
virtual QWSWindowSurfacecreateSurface (const QString &key) const
 Creates and returns a new window surface matching the given key. More...
 
int depth () const
 Returns the depth of the framebuffer, in bits per pixel. More...
 
int deviceHeight () const
 Returns the full height of the framebuffer device in pixels. More...
 
int deviceWidth () const
 Returns the physical width of the framebuffer device in pixels. More...
 
virtual void disconnect ()=0
 This function is called by every Qt for Embedded Linux application before exiting, and must be implemented to unmap the framebuffer. More...
 
virtual void exposeRegion (QRegion r, int changing)
 This function is called by the Qt for Embedded Linux server whenever a screen update is required. More...
 
QGraphicsSystemgraphicsSystem () const
 
virtual void haltUpdates ()
 
int height () const
 Returns the logical height of the framebuffer in pixels. More...
 
virtual bool initDevice ()=0
 This function is called by the Qt for Embedded Linux server to initialize the framebuffer. More...
 
virtual bool isInterlaced () const
 Returns true if the display is interlaced (i. More...
 
virtual bool isTransformed () const
 Returns true if the screen is transformed (for instance, rotated 90 degrees); otherwise returns false. More...
 
int linestep () const
 Returns the length of each scanline of the framebuffer in bytes. More...
 
virtual QSize mapFromDevice (const QSize &) const
 Maps the given size from the framebuffer coordinate system to the coordinate space used by the application. More...
 
virtual QPoint mapFromDevice (const QPoint &, const QSize &) const
 Maps the given point from the framebuffer coordinate system to the coordinate space used by the application, passing the device's screenSize as argument. More...
 
virtual QRect mapFromDevice (const QRect &, const QSize &) const
 Maps the given rectangle from the framebuffer coordinate system to the coordinate space used by the application, passing the device's screenSize as argument. More...
 
virtual QImage mapFromDevice (const QImage &) const
 Maps the given image from the framebuffer coordinate system to the coordinate space used by the application. More...
 
virtual QRegion mapFromDevice (const QRegion &, const QSize &) const
 Maps the given region from the framebuffer coordinate system to the coordinate space used by the application, passing the device's screenSize as argument. More...
 
virtual QSize mapToDevice (const QSize &) const
 Maps the given size from the coordinate space used by the application to the framebuffer coordinate system. More...
 
virtual QPoint mapToDevice (const QPoint &, const QSize &) const
 Maps the given point from the coordinate space used by the application to the framebuffer coordinate system, passing the device's screenSize as argument. More...
 
virtual QRect mapToDevice (const QRect &, const QSize &) const
 Maps the given rectangle from the coordinate space used by the application to the framebuffer coordinate system, passing the device's screenSize as argument. More...
 
virtual QImage mapToDevice (const QImage &) const
 Maps the given image from the coordinate space used by the application to the framebuffer coordinate system. More...
 
virtual QRegion mapToDevice (const QRegion &, const QSize &) const
 Maps the given region from the coordinate space used by the application to the framebuffer coordinate system, passing the device's screenSize as argument. More...
 
virtual int memoryNeeded (const QString &)
 
QT_DEPRECATED int numCols ()
 
QPoint offset () const
 Returns the logical offset of the screen, i. More...
 
virtual bool onCard (const unsigned char *) const
 Returns true if the specified buffer is within the graphics card's memory; otherwise returns false (i.e. More...
 
virtual bool onCard (const unsigned char *, ulong &out_offset) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.If the specified buffer is within the graphics card's memory, this function stores the offset from the start of graphics card memory (in bytes), in the location specified by the offset parameter. More...
 
int physicalHeight () const
 Returns the physical height of the screen in millimeters. More...
 
int physicalWidth () const
 Returns the physical width of the screen in millimeters. More...
 
QImage::Format pixelFormat () const
 Returns the pixel format of the screen, or QImage::Format_Invalid if the pixel format is not a supported image format. More...
 
PixelType pixelType () const
 Returns the pixel storage format of the screen. More...
 
QPixmapDataFactorypixmapDataFactory () const
 
virtual int pixmapDepth () const
 Returns the preferred depth for pixmaps, in bits per pixel. More...
 
virtual int pixmapLinestepAlignment ()
 Returns the value (in bits) to which individual scanlines of pixmaps held in the graphics card's memory, should be aligned. More...
 
virtual int pixmapOffsetAlignment ()
 Returns the value (in bits) to which the start address of pixmaps held in the graphics card's memory, should be aligned. More...
 
 QScreen (int display_id, ClassId classId)
 Constructs a new screen driver. More...
 
 QScreen (int display_id)
 Constructs a new screen driver. More...
 
virtual QRegion region () const
 Returns the region covered by this screen driver. More...
 
virtual void restore ()
 Restores the previously saved state of the graphics card. More...
 
virtual void resumeUpdates ()
 
virtual void save ()
 Saves the current state of the graphics card. More...
 
int screenSize () const
 Returns the size of the screen in bytes. More...
 
virtual void set (unsigned int, unsigned int, unsigned int, unsigned int)
 
virtual void setDirty (const QRect &)
 Marks the given rectangle as dirty. More...
 
virtual void setMode (int, int, int)=0
 Implement this function to reset the framebuffer's resolution (width and height) and bit depth. More...
 
void setOffset (const QPoint &p)
 
virtual int sharedRamSize (void *)
 
virtual void shutdownDevice ()
 This function is called by the Qt for Embedded Linux server before it calls the disconnect() function when exiting. More...
 
virtual void solidFill (const QColor &color, const QRegion &region)
 Fills the given region of the screen with the specified color. More...
 
int subScreenIndexAt (const QPoint &p) const
 Returns the index of the subscreen at the given position; returns -1 if no screen is found. More...
 
virtual QList< QScreen * > subScreens () const
 
virtual bool supportsDepth (int) const
 Returns true if the screen supports the specified color depth; otherwise returns false. More...
 
int totalSize () const
 Returns the size of the available graphics card memory (including the screen) in bytes. More...
 
virtual int transformOrientation () const
 Returns the current rotation as an integer value. More...
 
virtual void uncache (uchar *)
 
int width () const
 Returns the logical width of the framebuffer in pixels. More...
 
virtual ~QScreen ()
 Destroys this screen driver. More...
 

Static Public Functions

static QScreeninstance ()
 Returns a pointer to the application's QScreen instance. More...
 

Protected Functions

void setGraphicsSystem (QGraphicsSystem *system)
 
void setPixelFormat (QImage::Format format)
 Sets the screen's pixel format to format. More...
 
void setPixmapDataFactory (QPixmapDataFactory *factory)
 

Protected Variables

int d
 the pixel depth More...
 
uchardata
 points to the first visible pixel in the frame buffer. More...
 
int dh
 the device height More...
 
int displayId
 
int dw
 the device width More...
 
QPoolEntryentries
 
int * entryp
 
bool grayscale
 the gray scale screen mode flag More...
 
int h
 the logical height of the screen. More...
 
unsigned int * lowest
 
int lstep
 the number of bytes representing a line in the frame buffer. More...
 
int mapsize
 the total number of bytes in the frame buffer More...
 
int physHeight
 the physical height of the screen in millimeters. More...
 
int physWidth
 the physical width of the screen in millimeters. More...
 
PixelType pixeltype
 set to BGRPixel More...
 
QRgb screenclut [256]
 the color table More...
 
int screencols
 the number of entries in the color table More...
 
int size
 the number of bytes in the visible region of the frame buffer More...
 
int w
 the logical width of the screen. More...
 

Static Protected Variables

static ClearCacheFunc clearCacheFunc = 0
 

Private Functions

void compose (int level, const QRegion &exposed, QRegion &blend, QImage **blendbuffer, int changing_level)
 
bool frameBufferLittleEndian () const
 
void paintBackground (const QRegion &)
 
void setFrameBufferLittleEndian (bool littleEndian)
 

Static Private Functions

static bool isWidgetPaintOnScreen (const QWidget *w)
 

Properties

QScreenPrivated_ptr
 

Friends

class QIntfbScreen
 
class QLinuxFbScreen
 
class QProxyScreen
 
class QQnxScreen
 
void qt_blit_setup (QScreen *screen, const QImage &image, const QPoint &topLeft, const QRegion &region)
 
void qt_solidFill_setup (QScreen *, const QColor &, const QRegion &)
 
class QVFbScreen
 
class QVNCScreen
 
class QWSOnScreenSurface
 
class QWSServer
 
class QWSServerPrivate
 

Related Functions

(Note that these are not member functions.)

void setTransformation (int transformation, int screenNo)
 Here it is. More...
 

Detailed Description

The QScreen class is a base class for screen drivers in Qt for Embedded Linux.

Note that this class is only available in Qt for Embedded Linux.

Qt for Embedded Linux provides ready-made drivers for several screen protocols, see the Qt for Embedded Linux Display Management{display management} documentation for details. Custom screen drivers can be implemented by subclassing the QScreen class and creating a screen driver plugin (derived from QScreenDriverPlugin). The default implementation of the QScreenDriverFactory class will automatically detect the plugin, and load the driver into the server application at run-time using Qt's How to Create Qt Plugins.

When rendering, the default behavior is for each client to render its widgets as well as its decorations into memory, while the server copies the memory content to the device's framebuffer using the screen driver. See the Qt for Embedded Linux Architecture overview for details (note that it is possible for the clients to manipulate and control the underlying hardware directly as well).

Starting with Qt 4.2, it is also possible to add an accelerated graphics driver to take advantage of available hardware resources. See the Adding an Accelerated Graphics Driver to Qt for Embedded Linux documentation for details.

Framebuffer Management

When a Qt for Embedded Linux application starts running, it calls the screen driver's connect() function to map the framebuffer and the accelerated drivers that the graphics card control registers. The connect() function should then read out the parameters of the framebuffer and use them as required to set this class's protected variables.

The initDevice() function can be reimplemented to initialize the graphics card. Note, however, that connect() is called before the initDevice() function, so, for some hardware configurations, some of the initialization that would normally be done in the initDevice() function might have to be done in the connect() function.

Likewise, just before a Qt for Embedded Linux application exits, it calls the screen driver's disconnect() function. The server application will in addition call the shutdownDevice() function before it calls disconnect(). Note that the default implementation of the shutdownDevice() function only hides the mouse cursor.

QScreen also provides the save() and restore() functions, making it possible to save and restore the state of the graphics card. Note that the default implementations do nothing. Hardware screen drivers should reimplement these functions to save (and restore) its registers, enabling switching between virtual consoles.

In addition, you can use the base() function to retrieve a pointer to the beginning of the framebuffer, and the region() function to retrieve the framebuffer's region. Use the onCard() function to determine whether the framebuffer is within the graphics card's memory, and the totalSize() function to determine the size of the available graphics card memory (including the screen). Finally, you can use the offset() function to retrieve the offset between the framebuffer's coordinates and the application's coordinate system.

Palette Management

QScreen provides several functions to retrieve information about the color palette: The clut() function returns a pointer to the color lookup table (i.e. its color palette). Use the colorCount() function to determine the number of entries in this table, and the alloc() function to retrieve the palette index of the color that is the closest match to a given RGB value.

To determine if the screen driver supports a given color depth, use the supportsDepth() function that returns true of the specified depth is supported.

Drawing on Screen

When a screen update is required, the Qt for Embedded Linux server runs through all the top-level windows that intersect with the region that is about to be updated, and ensures that the associated clients have updated their memory buffer. Then the server calls the exposeRegion() function that composes the window surfaces and copies the content of memory to screen by calling the blit() and solidFill() functions.

The blit() function copies a given region in a given image to a specified point using device coordinates, while the solidFill() function fills the given region of the screen with the specified color. Note that normally there is no need to call either of these functions explicitly.

In addition, QScreen provides the blank() function that can be reimplemented to prevent any contents from being displayed on the screen, and the setDirty() function that can be reimplemented to indicate that a given rectangle of the screen has been altered. Note that the default implementations of these functions do nothing.

Reimplement the mapFromDevice() and mapToDevice() functions to map objects from the framebuffer coordinate system to the coordinate space used by the application, and vice versa. Be aware that the default implementations simply return the given objects as they are.

Properties

Property Functions
Size

The size of the screen can be retrieved using the screenSize() function. The size is returned in bytes.

The framebuffer's logical width and height can be retrieved using width() and height(), respectively. These functions return values are given in pixels. Alternatively, the physicalWidth() and physicalHeight() function returns the same metrics in millimeters. QScreen also provides the deviceWidth() and deviceHeight() functions returning the physical width and height of the device in pixels. Note that the latter metrics can differ from the ones used if the display is centered within the framebuffer.

Resolution

Reimplement the setMode() function to be able to set the framebuffer to a new resolution (width and height) and bit depth.

The current depth of the framebuffer can be always be retrieved using the depth() function. Use the pixmapDepth() function to obtain the preferred depth for pixmaps.

Pixmap Alignment

Use the pixmapOffsetAlignment() function to retrieve the value to which the start address of pixmaps held in the graphics card's memory, should be aligned.

Use the pixmapLinestepAlignment() to retrieve the value to which the {individual scanlines} of pixmaps should be aligned.

Image Display

The isInterlaced() function tells whether the screen is displaying images progressively, and the isTransformed() function whether it is rotated. The transformOrientation() function can be reimplemented to return the current rotation.

Scanlines

Use the linestep() function to retrieve the length of each scanline of the framebuffer.

Pixel Type

The pixelType() function returns the screen's pixel storage format as described by the PixelType enum.

Subclassing and Initial Values

You need to set the following members when implementing a subclass of QScreen:

Member Initial Value
QScreen::data A pointer to the framebuffer if possible; 0 otherwise.
QScreen::lstep The number of bytes between each scanline in the framebuffer.
QScreen::w The logical screen width in pixels.
QScreen::h The logical screen height in pixels.
QScreen::dw The real screen width in pixels.
QScreen::dh The real screen height in pixels.
QScreen::d The number of bits per pixel.
QScreen::physWidth The screen width in millimeters.
QScreen::physHeight The screen height in millimeters.

The logical screen values are the same as the real screen values unless the screen is transformed in some way; e.g., rotated.

See also the Accelerated Graphics Driver Example for an example that shows how to initialize these values.

See also
QScreenDriverPlugin, QScreenDriverFactory, {Qt for Embedded Linux Display Management}

Definition at line 191 of file qscreen_qws.h.

Enumerations

◆ ClassId

This enum defines the class identifiers for the known screen subclasses.

See also
classId()
Enumerator
LinuxFBClass 
TransformedClass 
VNCClass 
MultiClass 
VFbClass 
DirectFBClass 
SvgalibClass 
ProxyClass 
GLClass 
IntfbClass 
CustomClass 

Definition at line 194 of file qscreen_qws.h.

◆ PixelType

This enum describes the pixel storage format of the screen, i.

e. the order of the red (R), green (G) and blue (B) components of a pixel.

  • NormalPixel Red-green-blue (RGB)
  • BGRPixel Blue-green-red (BGR)
See also
pixelType()
Enumerator
NormalPixel 
BGRPixel 

Definition at line 220 of file qscreen_qws.h.

Constructors and Destructors

◆ QScreen() [1/2]

QScreen::QScreen ( int  display_id,
ClassId  classId 
)

Constructs a new screen driver.

Since
4.4

The display_id identifies the Qt for Embedded Linux server to connect to. The classId specifies the class identifier.

Definition at line 2163 of file qscreen_qws.cpp.

2164  : screencols(0), data(0), entries(0), entryp(0), lowest(0),
2165  w(0), lstep(0), h(0), d(1), pixeltype(NormalPixel), grayscale(false),
2166  dw(0), dh(0), size(0), mapsize(0), displayId(display_id),
2167  physWidth(0), physHeight(0), d_ptr(new QScreenPrivate(this, classId))
2168 {
2169  clearCacheFunc = 0;
2170 }
int screencols
the number of entries in the color table
Definition: qscreen_qws.h:309
int * entryp
Definition: qscreen_qws.h:321
int d
the pixel depth
Definition: qscreen_qws.h:327
unsigned int * lowest
Definition: qscreen_qws.h:322
QScreenPrivate * d_ptr
Definition: qscreen_qws.h:374
static ClearCacheFunc clearCacheFunc
Definition: qscreen_qws.h:344
int physHeight
the physical height of the screen in millimeters.
Definition: qscreen_qws.h:340
int size
the number of bytes in the visible region of the frame buffer
Definition: qscreen_qws.h:334
PixelType pixeltype
set to BGRPixel
Definition: qscreen_qws.h:328
int physWidth
the physical width of the screen in millimeters.
Definition: qscreen_qws.h:339
uchar * data
points to the first visible pixel in the frame buffer.
Definition: qscreen_qws.h:311
int w
the logical width of the screen.
Definition: qscreen_qws.h:324
int displayId
Definition: qscreen_qws.h:337
int dw
the device width
Definition: qscreen_qws.h:331
QPoolEntry * entries
Definition: qscreen_qws.h:320
int dh
the device height
Definition: qscreen_qws.h:332
bool grayscale
the gray scale screen mode flag
Definition: qscreen_qws.h:329
int lstep
the number of bytes representing a line in the frame buffer.
Definition: qscreen_qws.h:325
ClassId classId() const
Returns the class identifier for the screen object.
int h
the logical height of the screen.
Definition: qscreen_qws.h:326
int mapsize
the total number of bytes in the frame buffer
Definition: qscreen_qws.h:335

◆ QScreen() [2/2]

QScreen::QScreen ( int  displayId)
explicit

Constructs a new screen driver.

The displayId identifies the Qt for Embedded Linux server to connect to.

Definition at line 2172 of file qscreen_qws.cpp.

2173  : screencols(0), data(0), entries(0), entryp(0), lowest(0),
2174  w(0), lstep(0), h(0), d(1), pixeltype(NormalPixel), grayscale(false),
2175  dw(0), dh(0), size(0), mapsize(0), displayId(display_id),
2176  physWidth(0), physHeight(0), d_ptr(new QScreenPrivate(this))
2177 {
2178  clearCacheFunc = 0;
2179 }
int screencols
the number of entries in the color table
Definition: qscreen_qws.h:309
int * entryp
Definition: qscreen_qws.h:321
int d
the pixel depth
Definition: qscreen_qws.h:327
unsigned int * lowest
Definition: qscreen_qws.h:322
QScreenPrivate * d_ptr
Definition: qscreen_qws.h:374
static ClearCacheFunc clearCacheFunc
Definition: qscreen_qws.h:344
int physHeight
the physical height of the screen in millimeters.
Definition: qscreen_qws.h:340
int size
the number of bytes in the visible region of the frame buffer
Definition: qscreen_qws.h:334
PixelType pixeltype
set to BGRPixel
Definition: qscreen_qws.h:328
int physWidth
the physical width of the screen in millimeters.
Definition: qscreen_qws.h:339
uchar * data
points to the first visible pixel in the frame buffer.
Definition: qscreen_qws.h:311
int w
the logical width of the screen.
Definition: qscreen_qws.h:324
int displayId
Definition: qscreen_qws.h:337
int dw
the device width
Definition: qscreen_qws.h:331
QPoolEntry * entries
Definition: qscreen_qws.h:320
int dh
the device height
Definition: qscreen_qws.h:332
bool grayscale
the gray scale screen mode flag
Definition: qscreen_qws.h:329
int lstep
the number of bytes representing a line in the frame buffer.
Definition: qscreen_qws.h:325
int h
the logical height of the screen.
Definition: qscreen_qws.h:326
int mapsize
the total number of bytes in the frame buffer
Definition: qscreen_qws.h:335

◆ ~QScreen()

QScreen::~QScreen ( )
virtual

Destroys this screen driver.

Definition at line 2185 of file qscreen_qws.cpp.

2186 {
2187  delete d_ptr;
2188 }
QScreenPrivate * d_ptr
Definition: qscreen_qws.h:374

Functions

◆ alloc()

int QScreen::alloc ( unsigned int  red,
unsigned int  green,
unsigned int  blue 
)
virtual

Returns the index in the screen's palette which is the closest match to the given RGB value (red, green, blue).

Note that this function only apply in paletted modes like 8-bit, i.e. in modes where only the palette indexes (and not the actual color values) are stored in memory.

See also
clut(), colorCount()

Definition at line 2255 of file qscreen_qws.cpp.

2256 {
2257  int ret = 0;
2258  if (d == 8) {
2259  if (grayscale)
2260  return qGray(r, g, b);
2261 
2262  // First we look to see if we match a default color
2263  const int pos = (r + 25) / 51 * 36 + (g + 25) / 51 * 6 + (b + 25) / 51;
2264  if (pos < screencols && screenclut[pos] == qRgb(r, g, b)) {
2265  return pos;
2266  }
2267 
2268  // search for nearest color
2269  unsigned int mindiff = 0xffffffff;
2270  unsigned int diff;
2271  int dr,dg,db;
2272 
2273  for (int loopc = 0; loopc < screencols; ++loopc) {
2274  dr = qRed(screenclut[loopc]) - r;
2275  dg = qGreen(screenclut[loopc]) - g;
2276  db = qBlue(screenclut[loopc]) - b;
2277  diff = dr*dr + dg*dg + db*db;
2278 
2279  if (diff < mindiff) {
2280  ret = loopc;
2281  if (!diff)
2282  break;
2283  mindiff = diff;
2284  }
2285  }
2286  } else if (d == 4) {
2287  ret = qGray(r, g, b) >> 4;
2288  } else if (d == 1) {
2289  ret = qGray(r, g, b) >= 128;
2290  } else {
2291  qFatal("cannot alloc %dbpp color", d);
2292  }
2293 
2294  return ret;
2295 }
int screencols
the number of entries in the color table
Definition: qscreen_qws.h:309
int d
the pixel depth
Definition: qscreen_qws.h:327
QRgb screenclut[256]
the color table
Definition: qscreen_qws.h:308
Q_GUI_EXPORT_INLINE int qRed(QRgb rgb)
Definition: qrgb.h:57
static Bigint * diff(Bigint *a, Bigint *b)
Q_GUI_EXPORT_INLINE int qBlue(QRgb rgb)
Definition: qrgb.h:63
Q_GUI_EXPORT_INLINE int qGray(int r, int g, int b)
Definition: qrgb.h:75
Q_CORE_EXPORT void qFatal(const char *,...)
Q_GUI_EXPORT_INLINE QRgb qRgb(int r, int g, int b)
Definition: qrgb.h:69
bool grayscale
the gray scale screen mode flag
Definition: qscreen_qws.h:329
Q_GUI_EXPORT_INLINE int qGreen(QRgb rgb)
Definition: qrgb.h:60

◆ base()

uchar * QScreen::base ( ) const
inline

◆ blank()

void QScreen::blank ( bool  on)
virtual

Prevents the screen driver form displaying any content on the screen.

Note that the default implementation does nothing.

Reimplement this function to prevent the screen driver from displaying any contents on the screen if on is true; otherwise the contents is expected to be shown.

See also
blit()

Reimplemented in QDirectFBScreen, QProxyScreen, QLinuxFbScreen, QMultiScreen, QVFbScreen, QIntfbScreen, QQnxScreen, and EGLNullWSScreen.

Definition at line 2329 of file qscreen_qws.cpp.

Referenced by QWSServerPrivate::_q_screenSaverSleep(), QWSServerPrivate::_q_screenSaverWake(), QMultiScreen::blank(), QProxyScreen::blank(), and QWSServer::setScreenSaverIntervals().

2330 {
2331 }

◆ blit() [1/2]

void QScreen::blit ( const QImage image,
const QPoint topLeft,
const QRegion region 
)
virtual

Copies the given region in the given image to the point specified by topLeft using device coordinates.

This function is called from the exposeRegion() function; it is not intended to be called explicitly.

Reimplement this function to make use of Adding an Accelerated Graphics Driver to Qt for Embedded Linux{accelerated hardware}. Note that this function must be reimplemented if the framebuffer format is not supported by Qt for Embedded Linux (See the Qt for Embedded Linux Display Management{Display Management} documentation for more details).

See also
exposeRegion(), solidFill(), blank()

Reimplemented in QProxyScreen, QMultiScreen, QTransformedScreen, PvrEglScreen, and QAhiScreen.

Definition at line 2640 of file qscreen_qws.cpp.

Referenced by PvrEglScreen::blit(), QMultiScreen::blit(), QProxyScreen::blit(), blit(), compose(), exposeRegion(), QWSWindowSurface::flush(), and paintBackground().

2641 {
2642  const QRect bound = (region() & QRect(topLeft, img.size())).boundingRect();
2643  QWSDisplay::grab();
2644  d_ptr->blit(this, img, topLeft - offset(),
2645  (reg & bound).translated(-topLeft));
2647 }
QScreenPrivate * d_ptr
Definition: qscreen_qws.h:374
virtual QRegion region() const
Returns the region covered by this screen driver.
Definition: qscreen_qws.h:284
static void grab()
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
static void ungrab()
QPoint offset() const
Returns the logical offset of the screen, i.

◆ blit() [2/2]

void QScreen::blit ( QWSWindow win,
const QRegion clip 
)
Warning
This function is not part of the public interface.

Definition at line 2681 of file qscreen_qws.cpp.

2682 {
2683  QWSWindowSurface *surface = win->windowSurface();
2684  if (!surface)
2685  return;
2686 
2687  const QImage &img = surface->image();
2688  if (img.isNull())
2689  return;
2690 
2691  const QRegion rgn = clip & win->paintedRegion();
2692  if (rgn.isEmpty())
2693  return;
2694 
2695  surface->lock();
2696  blit(img, win->requestedRegion().boundingRect().topLeft(), rgn);
2697  surface->unlock();
2698 }
The QWSWindowSurface class provides the drawing area for top-level windows in Qt for Embedded Linux...
bool isNull() const
Returns true if it is a null image, otherwise returns false.
Definition: qimage.cpp:1542
QRect boundingRect() const
Returns the bounding rectangle of this region.
Definition: qregion.cpp:4363
virtual bool lock(int timeout=-1)
virtual void blit(const QImage &img, const QPoint &topLeft, const QRegion &region)
Copies the given region in the given image to the point specified by topLeft using device coordinates...
bool isEmpty() const
Returns true if the region is empty; otherwise returns false.
Definition: qregion.cpp:4098
The QImage class provides a hardware-independent image representation that allows direct access to th...
Definition: qimage.h:87
The QRegion class specifies a clip region for a painter.
Definition: qregion.h:68
const QRegion & requestedRegion() const
Returns the region that the window has requested to draw onto, including any window decorations...
QWSWindowSurface * windowSurface() const
virtual QImage image() const =0
Implement this function to return an image of the top-level window.
QRegion paintedRegion() const
Returns the region that the window is known to have drawn into.
QPoint topLeft() const
Returns the position of the rectangle&#39;s top-left corner.
Definition: qrect.h:288

◆ cache()

uchar * QScreen::cache ( int  )
inlinevirtual
Warning
This function is not part of the public interface.

This function is used to store pixmaps in graphics memory for the use of the accelerated drivers. See QLinuxFbScreen (where the caching is implemented) for more information.

Reimplemented in QLinuxFbScreen.

Definition at line 237 of file qscreen_qws.h.

237 { return 0; }

◆ classId()

QScreen::ClassId QScreen::classId ( ) const

Returns the class identifier for the screen object.

Since
4.4

Definition at line 3551 of file qscreen_qws.cpp.

Referenced by glScreenForDevice(), parentScreen(), screenForDevice(), QApplicationPrivate::setScreenTransformation(), and PvrEglScreen::transformation().

3552 {
3553  return static_cast<ClassId>(d_ptr->classId);
3554 }
QScreenPrivate * d_ptr
Definition: qscreen_qws.h:374
ClassId
This enum defines the class identifiers for the known screen subclasses.
Definition: qscreen_qws.h:194

◆ clut()

QScreen::clut ( )
inline

Returns a pointer to the screen's color lookup table (i.

e. its color palette).

Note that this function only apply in paletted modes like 8-bit, i.e. in modes where only the palette indexes (and not the actual color values) are stored in memory.

See also
alloc(), depth(), colorCount()

Definition at line 245 of file qscreen_qws.h.

Referenced by QVNCServer::convertPixels(), and qt_conv16ToRgb().

245 { return screenclut; }
QRgb screenclut[256]
the color table
Definition: qscreen_qws.h:308

◆ colorCount()

int QScreen::colorCount ( )
inline

Returns the number of entries in the screen's color lookup table (i.

Since
4.6

e. its color palette). A pointer to the color table can be retrieved using the clut() function.

See also
clut(), alloc()

Definition at line 249 of file qscreen_qws.h.

Referenced by effectiveState().

249 { return screencols; }
int screencols
the number of entries in the color table
Definition: qscreen_qws.h:309

◆ compose()

void QScreen::compose ( int  level,
const QRegion exposed,
QRegion blend,
QImage **  blendbuffer,
int  changing_level 
)
private

Definition at line 2828 of file qscreen_qws.cpp.

Referenced by exposeRegion().

2830 {
2831  QRect exposed_bounds = exposed.boundingRect();
2832  QWSWindow *win = 0;
2833  do {
2834  win = qwsServer->clientWindows().value(level); // null is background
2835  ++level;
2836  } while (win && !win->paintedRegion().boundingRect().intersects(exposed_bounds));
2837 
2838  QWSWindowSurface *surface = (win ? win->windowSurface() : 0);
2839  bool above_changing = level <= changing_level; // 0 is topmost
2840 
2841  QRegion exposedBelow = exposed;
2842  bool opaque = true;
2843 
2844  if (win) {
2845  opaque = win->isOpaque() || !surface->isBuffered();
2846  if (opaque) {
2847  exposedBelow -= win->paintedRegion();
2848  if (above_changing || !surface->isBuffered())
2849  blend -= exposed & win->paintedRegion();
2850  } else {
2851  blend += exposed & win->paintedRegion();
2852  }
2853  }
2854  if (win && !exposedBelow.isEmpty()) {
2855  compose(level, exposedBelow, blend, blendbuffer, changing_level);
2856  } else {
2857  QSize blendSize = blend.boundingRect().size();
2858  if (!blendSize.isNull()) {
2859  *blendbuffer = new QImage(blendSize, d_ptr->preferredImageFormat());
2860  }
2861  }
2862 
2863  const QRegion blitRegion = exposed - blend;
2864  if (!win)
2865  paintBackground(blitRegion);
2866  else if (!above_changing && surface->isBuffered())
2867  blit(win, blitRegion);
2868 
2869  QRegion blendRegion = exposed & blend;
2870 
2871  if (win)
2872  blendRegion &= win->paintedRegion();
2873  if (!blendRegion.isEmpty()) {
2874 
2875  QPoint off = blend.boundingRect().topLeft();
2876 
2877  QRasterBuffer rb;
2878  rb.prepare(*blendbuffer);
2879  QSpanData spanData;
2880  spanData.init(&rb, 0);
2881  if (!win) {
2882  const QImage::Format format = (*blendbuffer)->format();
2883  switch (format) {
2885  case QImage::Format_ARGB32:
2891  break;
2892  default:
2893  break;
2894  }
2896  spanData.dx = off.x();
2897  spanData.dy = off.y();
2898  } else if (!surface->isBuffered()) {
2899  return;
2900  } else {
2901  const QImage &img = surface->image();
2902  QPoint winoff = off - win->requestedRegion().boundingRect().topLeft();
2903  // convert win->opacity() from scale [0..255] to [0..256]
2904  int const_alpha = win->opacity();
2905  const_alpha += (const_alpha >> 7);
2906  spanData.type = QSpanData::Texture;
2907  spanData.initTexture(&img, const_alpha);
2908  spanData.dx = winoff.x();
2909  spanData.dy = winoff.y();
2910  }
2911  if (!spanData.blend)
2912  return;
2913 
2914  if (surface)
2915  surface->lock();
2916  const QVector<QRect> rects = blendRegion.rects();
2917  const int nspans = 256;
2918  QT_FT_Span spans[nspans];
2919  for (int i = 0; i < rects.size(); ++i) {
2920  int y = rects.at(i).y() - off.y();
2921  int ye = y + rects.at(i).height();
2922  int x = rects.at(i).x() - off.x();
2923  int len = rects.at(i).width();
2924  while (y < ye) {
2925  int n = qMin(nspans, ye - y);
2926  int i = 0;
2927  while (i < n) {
2928  spans[i].x = x;
2929  spans[i].len = len;
2930  spans[i].y = y + i;
2931  spans[i].coverage = 255;
2932  ++i;
2933  }
2934  spanData.blend(n, spans, &spanData);
2935  y += n;
2936  }
2937  }
2938  if (surface)
2939  surface->unlock();
2940  }
2941 }
void compose(int level, const QRegion &exposed, QRegion &blend, QImage **blendbuffer, int changing_level)
The QWSWindowSurface class provides the drawing area for top-level windows in Qt for Embedded Linux...
Format
The following image formats are available in Qt.
Definition: qimage.h:91
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
Definition: qglobal.h:1215
unsigned char coverage
unsigned short len
void paintBackground(const QRegion &)
int width() const
Returns the width of the rectangle.
Definition: qrect.h:303
QRect boundingRect() const
Returns the bounding rectangle of this region.
Definition: qregion.cpp:4363
QScreenPrivate * d_ptr
Definition: qscreen_qws.h:374
bool isBuffered() const
Returns true if the QWSWindowSurface::Buffered is set; otherwise returns false.
int height() const
Returns the height of the rectangle.
Definition: qrect.h:306
virtual bool lock(int timeout=-1)
QPainter::CompositionMode compositionMode
virtual void blit(const QImage &img, const QPoint &topLeft, const QRegion &region)
Copies the given region in the given image to the point specified by topLeft using device coordinates...
ProcessSpans blend
The QWSWindow class encapsulates a top-level window in Qt for Embedded Linux.
bool isEmpty() const
Returns true if the region is empty; otherwise returns false.
Definition: qregion.cpp:4098
QSize size() const
Returns the size of the rectangle.
Definition: qrect.h:309
The QImage class provides a hardware-independent image representation that allows direct access to th...
Definition: qimage.h:87
The QRegion class specifies a clip region for a painter.
Definition: qregion.h:68
T value(int i) const
Returns the value at index position i in the list.
Definition: qlist.h:661
void initTexture(const QImage *image, int alpha, QTextureData::Type=QTextureData::Plain, const QRect &sourceRect=QRect())
QImage::Format prepare(QImage *image)
const T & at(int i) const
Returns the item at index position i in the vector.
Definition: qvector.h:350
uint opacity() const
Returns the window&#39;s alpha channel value.
void setup(const QBrush &brush, int alpha, QPainter::CompositionMode compositionMode)
void init(QRasterBuffer *rb, const QRasterPaintEngine *pe)
const QBrush & backgroundBrush() const
Returns the brush used as background in the absence of obscuring windows.
const QRegion & requestedRegion() const
Returns the region that the window has requested to draw onto, including any window decorations...
int y() const
Returns the y-coordinate of the rectangle&#39;s top edge.
Definition: qrect.h:255
QRasterBuffer * rasterBuffer
QImage::Format preferredImageFormat() const
int x() const
Returns the x-coordinate of the rectangle&#39;s left edge.
Definition: qrect.h:252
The QPoint class defines a point in the plane using integer precision.
Definition: qpoint.h:53
QVector< QRect > rects() const
Returns an array of non-overlapping rectangles that make up the region.
Definition: qregion.cpp:4412
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
QWSWindowSurface * windowSurface() const
int y() const
Returns the y coordinate of this point.
Definition: qpoint.h:131
bool isNull() const
Returns true if both the width and height is 0; otherwise returns false.
Definition: qsize.h:117
The QSize class defines the size of a two-dimensional object using integer point precision.
Definition: qsize.h:53
bool intersects(const QRect &r) const
Returns true if this rectangle intersects with the given rectangle (i.
Definition: qrect.cpp:1429
int x() const
Returns the x coordinate of this point.
Definition: qpoint.h:128
bool isOpaque() const
Returns true if the window is opaque, i.
virtual QImage image() const =0
Implement this function to return an image of the top-level window.
QRegion paintedRegion() const
Returns the region that the window is known to have drawn into.
enum QSpanData::Type type
int size() const
Returns the number of items in the vector.
Definition: qvector.h:137
QWSServer Q_GUI_EXPORT * qwsServer
const QList< QWSWindow * > & clientWindows()
Returns the list of current top-level windows.
QPoint topLeft() const
Returns the position of the rectangle&#39;s top-left corner.
Definition: qrect.h:288

◆ connect()

bool QScreen::connect ( const QString displaySpec)
pure virtual

This function is called by every Qt for Embedded Linux application on startup, and must be implemented to map in the framebuffer and the accelerated drivers that the graphics card control registers.

Note that connect must be called before the initDevice() function.

Ensure that true is returned if a connection to the screen device is made. Otherwise, return false. Upon making the connection, the function should read out the parameters of the framebuffer and use them as required to set this class's protected variables.

The displaySpec argument is passed by the QWS_DISPLAY environment variable or the -display command line parameter, and has the following syntax:

[screen driver][:driver specific options][:display number]

For example, to use the mach64 driver on fb1 as display 2:

Mach64:/dev/fb1:2

See Qt for Embedded Linux Display Management for more details.

See also
disconnect(), initDevice(), {Running Qt for Embedded Linux Applications}

Implemented in QDirectFBScreen, QProxyScreen, QLinuxFbScreen, QTransformedScreen, PvrEglScreen, QMultiScreen, QQnxScreen, QVFbScreen, QVNCScreen, QIntfbScreen, QAhiScreen, and EGLNullWSScreen.

Referenced by QWSServer::endDisplayReconfigure(), and qt_get_screen().

◆ createSurface() [1/2]

QWSWindowSurface * QScreen::createSurface ( QWidget widget) const
virtual

Creates and returns a new window surface for the given widget.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Reimplemented in QDirectFBScreen, QProxyScreen, QMultiScreen, PvrEglScreen, and EGLNullWSScreen.

Definition at line 2811 of file qscreen_qws.cpp.

Referenced by EGLNullWSScreen::createSurface(), PvrEglScreen::createSurface(), QMultiScreen::createSurface(), QProxyScreen::createSurface(), QWSWindow::createSurface(), QDirectFBScreen::createSurface(), QWSGraphicsSystem::createWindowSurface(), effectiveState(), and qt_egl_create_surface().

2812 {
2813 #ifndef QT_NO_PAINTONSCREEN
2814  if (isWidgetPaintOnScreen(widget) && base())
2815  return new QWSOnScreenSurface(widget);
2816  else
2817 #endif
2819  return new QWSLocalMemSurface(widget);
2820 #ifndef QT_NO_QWS_MULTIPROCESS
2821  else
2822  return new QWSSharedMemSurface(widget);
2823 #endif
2824 
2825  return 0;
2826 }
friend class QWSOnScreenSurface
Definition: qscreen_qws.h:351
uchar * base() const
Returns a pointer to the beginning of the framebuffer.
Definition: qscreen_qws.h:235
static bool isWidgetPaintOnScreen(const QWidget *w)
static Type type()
Returns the type of application (Tty , GuiClient, or GuiServer).

◆ createSurface() [2/2]

QWSWindowSurface * QScreen::createSurface ( const QString key) const
virtual

Creates and returns a new window surface matching the given key.

Since
4.2

The server application will call this function whenever it needs to create a server side representation of a window, e.g. when copying the content of memory to the screen using the screen driver.

Note that this function must be reimplemented when adding an accelerated graphics driver. See the Adding an Accelerated Graphics Driver to Qt for Embedded Linux {Adding an Accelerated Graphics Driver} documentation for details.

See also
{Qt for Embedded Linux Architecture}

Reimplemented in QDirectFBScreen, QProxyScreen, QMultiScreen, PvrEglScreen, and EGLNullWSScreen.

Definition at line 2756 of file qscreen_qws.cpp.

2757 {
2758 #ifndef QT_NO_PAINTONSCREEN
2759  if (key == QLatin1String("OnScreen"))
2760  return new QWSOnScreenSurface;
2761  else
2762 #endif
2763  if (key == QLatin1String("mem"))
2764  return new QWSLocalMemSurface;
2765 #ifndef QT_NO_QWS_MULTIPROCESS
2766  else if (key == QLatin1String("shm"))
2767  return new QWSSharedMemSurface;
2768 #endif
2769 #ifndef QT_NO_PAINT_DEBUG
2770  else if (key == QLatin1String("Yellow"))
2771  return new QWSYellowSurface;
2772 #endif
2773 #ifndef QT_NO_DIRECTPAINTER
2774  else if (key == QLatin1String("DirectPainter"))
2775  return new QWSDirectPainterSurface;
2776 #endif
2777 
2778  return 0;
2779 }
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
friend class QWSOnScreenSurface
Definition: qscreen_qws.h:351

◆ depth()

QScreen::depth ( ) const
inline

◆ deviceHeight()

QScreen::deviceHeight ( ) const
inline

◆ deviceWidth()

QScreen::deviceWidth ( ) const
inline

◆ disconnect()

QScreen::disconnect ( )
pure virtual

This function is called by every Qt for Embedded Linux application before exiting, and must be implemented to unmap the framebuffer.

Note that a server application will call the shutdownDevice() function prior to this function.

See also
connect(), shutdownDevice(), {Running Qt for Embedded Linux Applications}

Implemented in QDirectFBScreen, QProxyScreen, QLinuxFbScreen, PvrEglScreen, QMultiScreen, QQnxScreen, QVFbScreen, QVNCScreen, QIntfbScreen, QAhiScreen, and EGLNullWSScreen.

Referenced by QWSServer::beginDisplayReconfigure(), QMultiScreen::disconnect(), QProxyScreen::disconnect(), and QWSDisplay::Data::~Data().

◆ exposeRegion()

void QScreen::exposeRegion ( QRegion  region,
int  windowIndex 
)
virtual

This function is called by the Qt for Embedded Linux server whenever a screen update is required.

region is the area on the screen that must be updated, and windowIndex is the index into QWSServer::clientWindows() of the window that required the update. QWSWindow::state() gives more information about the cause.

The default implementation composes the affected windows and paints the given region on screen by calling the blit() and solidFill() functions

This function can be reimplemented to perform composition in hardware, or to perform transition effects. For simpler hardware acceleration, or to interface with this is typically done by reimplementing the blit() and solidFill() functions instead.

Note that there is no need to call this function explicitly.

See also
blit(), solidFill(), blank()

Reimplemented in QDirectFBScreen, QProxyScreen, QMultiScreen, QTransformedScreen, QQnxScreen, and EGLNullWSScreen.

Definition at line 2555 of file qscreen_qws.cpp.

Referenced by QQnxScreen::exposeRegion(), QTransformedScreen::exposeRegion(), QMultiScreen::exposeRegion(), QProxyScreen::exposeRegion(), QWSServerPrivate::exposeRegion(), QScreenCursor::hide(), QScreenCursor::move(), QScreenCursor::set(), QWSServer::setBackground(), QLinuxFbScreen::setMode(), and QScreenCursor::show().

2556 {
2557  r &= region();
2558  if (r.isEmpty())
2559  return;
2560 
2561  int changing = windowIndex;
2562  // when we have just lowered a window, we have to expose all the windows below where the
2563  // window used to be.
2564  if (changing && qwsServer->clientWindows().at(changing)->state() == QWSWindow::Lowering)
2565  changing = 0;
2566 #ifdef QTOPIA_PERFTEST
2567  static enum { PerfTestUnknown, PerfTestOn, PerfTestOff } perfTestState = PerfTestUnknown;
2568  if(PerfTestUnknown == perfTestState) {
2569  if(::getenv("QTOPIA_PERFTEST"))
2570  perfTestState = PerfTestOn;
2571  else
2572  perfTestState = PerfTestOff;
2573  }
2574  if(PerfTestOn == perfTestState) {
2575  QWSWindow *changed = qwsServer->clientWindows().at(changing);
2576  if(!changed->client()->identity().isEmpty())
2577  qDebug() << "Performance : expose_region :"
2578  << changed->client()->identity()
2579  << r.boundingRect() << ": "
2580  << qPrintable( QTime::currentTime().toString( "h:mm:ss.zzz" ) );
2581  }
2582 #endif
2583 
2584  const QRect bounds = r.boundingRect();
2585  QRegion blendRegion;
2586  QImage *blendBuffer = 0;
2587 
2588 #ifndef QT_NO_QWS_CURSOR
2590  blendRegion = r & qt_screencursor->boundingRect();
2591  }
2592 #endif
2593  compose(0, r, blendRegion, &blendBuffer, changing);
2594 
2595  if (blendBuffer && !blendBuffer->isNull()) {
2596  const QPoint offset = blendRegion.boundingRect().topLeft();
2597 #ifndef QT_NO_QWS_CURSOR
2599  const QRect cursorRect = qt_screencursor->boundingRect();
2600  if (blendRegion.intersects(cursorRect)) {
2601  blendCursor(blendBuffer, qt_screencursor->image(),
2602  cursorRect.topLeft() - offset);
2603  }
2604  }
2605 #endif // QT_NO_QWS_CURSOR
2606  blit(*blendBuffer, offset, blendRegion);
2607  delete blendBuffer;
2608  }
2609 
2610  if (r.rectCount() == 1) {
2611  setDirty(r.boundingRect());
2612  } else {
2613  const QVector<QRect> rects = r.rects();
2614  for (int i = 0; i < rects.size(); ++i)
2615  setDirty(rects.at(i));
2616  }
2617 }
void compose(int level, const QRegion &exposed, QRegion &blend, QImage **blendbuffer, int changing_level)
static void blendCursor(QImage *dest, const QImage &cursor, const QPoint &offset)
bool isNull() const
Returns true if it is a null image, otherwise returns false.
Definition: qimage.cpp:1542
QWSClient * client() const
Returns a reference to the QWSClient object that owns this window.
QRect boundingRect() const
Returns the bounding rectangle of this region.
Definition: qregion.cpp:4363
virtual void setDirty(const QRect &)
Marks the given rectangle as dirty.
QImage image() const
Returns the cursor&#39;s image.
Definition: qscreen_qws.h:151
virtual void blit(const QImage &img, const QPoint &topLeft, const QRegion &region)
Copies the given region in the given image to the point specified by topLeft using device coordinates...
Q_CORE_EXPORT void qDebug(const char *,...)
The QWSWindow class encapsulates a top-level window in Qt for Embedded Linux.
virtual QRegion region() const
Returns the region covered by this screen driver.
Definition: qscreen_qws.h:284
bool isAccelerated() const
Returns true if the cursor is accelerated; otherwise false.
Definition: qscreen_qws.h:153
static QString toString(Register *reg, int type, bool *ok=0)
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
Definition: qstring.h:704
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
The QImage class provides a hardware-independent image representation that allows direct access to th...
Definition: qimage.h:87
The QRegion class specifies a clip region for a painter.
Definition: qregion.h:68
const T & at(int i) const
Returns the item at index position i in the vector.
Definition: qvector.h:350
QString identity() const
Returns the name of this client&#39;s running application.
State state() const
Returns the current state of the window.
static QTime currentTime()
Returns the current time as reported by the system clock.
Definition: qdatetime.cpp:3125
QRect boundingRect() const
Returns the cursor&#39;s bounding rectangle.
Definition: qscreen_qws.h:150
The QPoint class defines a point in the plane using integer precision.
Definition: qpoint.h:53
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
bool intersects(const QRegion &r) const
Returns true if this region intersects with region, otherwise returns false.
Definition: qregion.cpp:766
Q_GUI_EXPORT QScreenCursor * qt_screencursor
Definition: qscreen_qws.cpp:67
#define qPrintable(string)
Definition: qglobal.h:1750
int size() const
Returns the number of items in the vector.
Definition: qvector.h:137
QPoint offset() const
Returns the logical offset of the screen, i.
QWSServer Q_GUI_EXPORT * qwsServer
const QList< QWSWindow * > & clientWindows()
Returns the list of current top-level windows.
QPoint topLeft() const
Returns the position of the rectangle&#39;s top-left corner.
Definition: qrect.h:288

◆ frameBufferLittleEndian()

bool QScreen::frameBufferLittleEndian ( ) const
private

Definition at line 3322 of file qscreen_qws.cpp.

Referenced by QProxyScreen::configure().

3323 {
3324  return d_ptr->fb_is_littleEndian;
3325 }
QScreenPrivate * d_ptr
Definition: qscreen_qws.h:374

◆ graphicsSystem()

QGraphicsSystem * QScreen::graphicsSystem ( ) const
Warning
This function is not part of the public interface.
Since
4.5

Definition at line 3538 of file qscreen_qws.cpp.

Referenced by QApplicationPrivate::graphicsSystem().

3539 {
3540  return d_ptr->graphicsSystem;
3541 }
QGraphicsSystem * graphicsSystem
QScreenPrivate * d_ptr
Definition: qscreen_qws.h:374

◆ haltUpdates()

void QScreen::haltUpdates ( )
virtual
Warning
This function is not part of the public interface.

Reimplemented in QProxyScreen, and QMultiScreen.

Definition at line 3271 of file qscreen_qws.cpp.

Referenced by QMultiScreen::haltUpdates(), and QProxyScreen::haltUpdates().

3272 {
3273 }

◆ height()

int QScreen::height ( ) const
inline

◆ initDevice()

bool QScreen::initDevice ( )
pure virtual

This function is called by the Qt for Embedded Linux server to initialize the framebuffer.

Note that a server application will call the connect() function prior to this function.

Implement this function to make accelerated drivers set up the graphics card. Return true to indicate success and false to indicate failure.

See also
shutdownDevice(), connect()

Implemented in QDirectFBScreen, QProxyScreen, QLinuxFbScreen, PvrEglScreen, QMultiScreen, QAhiScreen, QQnxScreen, QVFbScreen, QVNCScreen, QIntfbScreen, and EGLNullWSScreen.

Referenced by QWSDisplay::Data::init(), QMultiScreen::initDevice(), and QProxyScreen::initDevice().

◆ instance()

static QScreen * QScreen::instance ( )
inlinestatic

Returns a pointer to the application's QScreen instance.

If this screen consists of several subscreens, operations to the returned instance will affect all its subscreens. Use the subscreens() function to retrieve access to a particular subscreen.

See also
subScreens(), subScreenIndexAt()

Definition at line 201 of file qscreen_qws.h.

Referenced by QRasterPixmapData::createPixmapForImage(), QPixmap::defaultDepth(), getPrimaryScreen(), QApplicationPrivate::graphicsSystem(), QPixmapDataFactory::instance(), QDirectFBMouseHandlerPrivate::QDirectFBMouseHandlerPrivate(), QWSDirectPainterSurface::QWSDirectPainterSurface(), QDirectFBMouseHandlerPrivate::readMouseData(), QWSServer::refresh(), QRasterPixmapData::resize(), and setScreenTransformation().

201 { return qt_screen; }
Q_GUI_EXPORT QScreen * qt_screen
Definition: qscreen_qws.cpp:69

◆ isInterlaced()

bool QScreen::isInterlaced ( ) const
virtual

Returns true if the display is interlaced (i.

e. is displaying images progressively like a television screen); otherwise returns false.

If the display is interlaced, the drawing is altered to look better.

See also
isTransformed(), linestep()

Reimplemented in QProxyScreen, and QMultiScreen.

Definition at line 3047 of file qscreen_qws.cpp.

Referenced by QMultiScreen::isInterlaced(), and QProxyScreen::isInterlaced().

3048 {
3049  return false;//qws_screen_is_interlaced;;
3050 }

◆ isTransformed()

bool QScreen::isTransformed ( ) const
virtual

◆ isWidgetPaintOnScreen()

bool QScreen::isWidgetPaintOnScreen ( const QWidget w)
staticprivate

Definition at line 2782 of file qscreen_qws.cpp.

Referenced by createSurface(), and QWSOnScreenSurface::isValid().

2783 {
2784  static int doOnScreen = -1;
2785  if (doOnScreen == -1) {
2786  const QByteArray env = qgetenv("QT_ONSCREEN_PAINT");
2787  if (env == "force")
2788  doOnScreen = 2;
2789  else
2790  doOnScreen = (env.toInt() > 0 ? 1 : 0);
2791  }
2792 
2793  if (doOnScreen == 2) // force
2794  return true;
2795 
2796  if (doOnScreen == 0 && !w->testAttribute(Qt::WA_PaintOnScreen))
2797  return false;
2798 
2799  return w->d_func()->isOpaque;
2800 }
Q_CORE_EXPORT QByteArray qgetenv(const char *varName)
The QByteArray class provides an array of bytes.
Definition: qbytearray.h:135
bool testAttribute(Qt::WidgetAttribute) const
Returns true if attribute attribute is set on this widget; otherwise returns false.
Definition: qwidget.h:1041
int toInt(bool *ok=0, int base=10) const
Returns the byte array converted to an int using base base, which is 10 by default and must be betwee...

◆ linestep()

QScreen::linestep ( ) const
inline

Returns the length of each scanline of the framebuffer in bytes.

See also
isInterlaced()

Definition at line 232 of file qscreen_qws.h.

Referenced by QWSOnScreenSurface::attachToScreen(), blit180(), blit270(), blit90(), blit_template(), QProxyScreen::configure(), QDirectPainter::linestep(), QVFbScreen::physicalSize(), QVNCDirtyMapOptimized< T >::setDirty(), and solidFill_template().

232 { return lstep; }
int lstep
the number of bytes representing a line in the frame buffer.
Definition: qscreen_qws.h:325

◆ mapFromDevice() [1/5]

QSize QScreen::mapFromDevice ( const QSize size) const
virtual

Maps the given size from the framebuffer coordinate system to the coordinate space used by the application.

Note that the default implementation simply returns the given size as it is.

Reimplement this function to use the given device's coordinate system when mapping.

See also
mapToDevice()

Reimplemented in QProxyScreen, and QTransformedScreen.

Definition at line 3089 of file qscreen_qws.cpp.

Referenced by QDirectPainter::endPainting(), QDirectPainter::flush(), QProxyScreen::mapFromDevice(), QWSServer::sendMouseEvent(), QDirectPainter::setRegion(), and QDirectPainter::startPainting().

3090 {
3091  return s;
3092 }

◆ mapFromDevice() [2/5]

QPoint QScreen::mapFromDevice ( const QPoint point,
const QSize screenSize 
) const
virtual

Maps the given point from the framebuffer coordinate system to the coordinate space used by the application, passing the device's screenSize as argument.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Note that the default implementation simply returns the given point as it is.

Reimplemented in QProxyScreen, and QTransformedScreen.

Definition at line 3125 of file qscreen_qws.cpp.

3126 {
3127  return p;
3128 }

◆ mapFromDevice() [3/5]

QRect QScreen::mapFromDevice ( const QRect rectangle,
const QSize screenSize 
) const
virtual

Maps the given rectangle from the framebuffer coordinate system to the coordinate space used by the application, passing the device's screenSize as argument.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Note that the default implementation simply returns the given rectangle as it is.

Reimplemented in QProxyScreen, and QTransformedScreen.

Definition at line 3161 of file qscreen_qws.cpp.

3162 {
3163  return r;
3164 }

◆ mapFromDevice() [4/5]

QImage QScreen::mapFromDevice ( const QImage image) const
virtual

Maps the given image from the framebuffer coordinate system to the coordinate space used by the application.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Note that the default implementation simply returns the given image as it is.

Definition at line 3195 of file qscreen_qws.cpp.

3196 {
3197  return i;
3198 }

◆ mapFromDevice() [5/5]

QRegion QScreen::mapFromDevice ( const QRegion region,
const QSize screenSize 
) const
virtual

Maps the given region from the framebuffer coordinate system to the coordinate space used by the application, passing the device's screenSize as argument.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Note that the default implementation simply returns the given region as it is.

Reimplemented in QProxyScreen, and QTransformedScreen.

Definition at line 3231 of file qscreen_qws.cpp.

3232 {
3233  return r;
3234 }

◆ mapToDevice() [1/5]

QSize QScreen::mapToDevice ( const QSize size) const
virtual

Maps the given size from the coordinate space used by the application to the framebuffer coordinate system.

Note that the default implementation simply returns the given size as it is.

Reimplement this function to use the given device's coordinate system when mapping.

See also
mapFromDevice()

Reimplemented in QProxyScreen, and QTransformedScreen.

Definition at line 3068 of file qscreen_qws.cpp.

Referenced by QDirectPainter::allocatedRegion(), QProxyScreen::mapToDevice(), qt_directpainter_embedevent(), qt_directpainter_region(), and QWSPcMouseHandlerPrivate::sendEvent().

3069 {
3070  return s;
3071 }

◆ mapToDevice() [2/5]

QPoint QScreen::mapToDevice ( const QPoint point,
const QSize screenSize 
) const
virtual

Maps the given point from the coordinate space used by the application to the framebuffer coordinate system, passing the device's screenSize as argument.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Note that the default implementation returns the given point as it is.

Reimplemented in QProxyScreen, and QTransformedScreen.

Definition at line 3107 of file qscreen_qws.cpp.

3108 {
3109  return p;
3110 }

◆ mapToDevice() [3/5]

QRect QScreen::mapToDevice ( const QRect rectangle,
const QSize screenSize 
) const
virtual

Maps the given rectangle from the coordinate space used by the application to the framebuffer coordinate system, passing the device's screenSize as argument.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Note that the default implementation returns the given rectangle as it is.

Reimplemented in QProxyScreen, and QTransformedScreen.

Definition at line 3143 of file qscreen_qws.cpp.

3144 {
3145  return r;
3146 }

◆ mapToDevice() [4/5]

QImage QScreen::mapToDevice ( const QImage image) const
virtual

Maps the given image from the coordinate space used by the application to the framebuffer coordinate system.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Note that the default implementation returns the given image as it is.

Definition at line 3178 of file qscreen_qws.cpp.

3179 {
3180  return i;
3181 }

◆ mapToDevice() [5/5]

QRegion QScreen::mapToDevice ( const QRegion region,
const QSize screenSize 
) const
virtual

Maps the given region from the coordinate space used by the application to the framebuffer coordinate system, passing the device's screenSize as argument.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Note that the default implementation returns the given region as it is.

Reimplemented in QProxyScreen, and QTransformedScreen.

Definition at line 3213 of file qscreen_qws.cpp.

3214 {
3215  return r;
3216 }

◆ memoryNeeded()

int QScreen::memoryNeeded ( const QString )
virtual
Warning
This function is not part of the public interface.

Reimplemented in QProxyScreen, and QMultiScreen.

Definition at line 3263 of file qscreen_qws.cpp.

Referenced by QWSDisplay::Data::init(), QMultiScreen::memoryNeeded(), QProxyScreen::memoryNeeded(), and QWSDisplay::Data::reinit().

3264 {
3265  return 0;
3266 }

◆ numCols()

int QScreen::numCols ( )
inline
See also
colorCount()

Definition at line 247 of file qscreen_qws.h.

Referenced by qt_conv16ToRgb().

247 { return screencols; }
int screencols
the number of entries in the color table
Definition: qscreen_qws.h:309

◆ offset()

QPoint QScreen::offset ( ) const

Returns the logical offset of the screen, i.

Since
4.2

e., the offset between (0,0) in screen coordinates and the application coordinate system.

Definition at line 3311 of file qscreen_qws.cpp.

Referenced by blit(), QProxyScreen::configure(), QMultiScreen::connect(), exposeRegion(), QVNCServer::frameBufferUpdateRequest(), QWSMouseHandler::mouseChanged(), QVNCServer::pointerEvent(), QVFbScreen::setDirty(), solidFill(), QRfbRawEncoder::write(), and QRfbHextileEncoder< SRC >::write().

3312 {
3313  return d_ptr->offset;
3314 }
QScreenPrivate * d_ptr
Definition: qscreen_qws.h:374

◆ onCard() [1/2]

bool QScreen::onCard ( const unsigned char *  buffer) const
virtual

Returns true if the specified buffer is within the graphics card's memory; otherwise returns false (i.e.

if it's in main RAM).

See also
base(), totalSize()

Reimplemented in QProxyScreen, and QMultiScreen.

Definition at line 2402 of file qscreen_qws.cpp.

Referenced by QMultiScreen::onCard(), and QProxyScreen::onCard().

2403 {
2404  long t=(unsigned long)p;
2405  long bmin=(unsigned long)data;
2406  if (t < bmin)
2407  return false;
2408  if(t >= bmin+mapsize)
2409  return false;
2410  return true;
2411 }
uchar * data
points to the first visible pixel in the frame buffer.
Definition: qscreen_qws.h:311
int mapsize
the total number of bytes in the frame buffer
Definition: qscreen_qws.h:335

◆ onCard() [2/2]

bool QScreen::onCard ( const unsigned char *  buffer,
ulong out_offset 
) const
virtual

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.If the specified buffer is within the graphics card's memory, this function stores the offset from the start of graphics card memory (in bytes), in the location specified by the offset parameter.

Reimplemented in QProxyScreen, and QMultiScreen.

Definition at line 2423 of file qscreen_qws.cpp.

2424 {
2425  long t=(unsigned long)p;
2426  long bmin=(unsigned long)data;
2427  if (t < bmin)
2428  return false;
2429  long o = t - bmin;
2430  if (o >= mapsize)
2431  return false;
2432  offset = o;
2433  return true;
2434 }
uchar * data
points to the first visible pixel in the frame buffer.
Definition: qscreen_qws.h:311
int mapsize
the total number of bytes in the frame buffer
Definition: qscreen_qws.h:335
QPoint offset() const
Returns the logical offset of the screen, i.

◆ paintBackground()

void QScreen::paintBackground ( const QRegion r)
private

Definition at line 2943 of file qscreen_qws.cpp.

Referenced by compose().

2944 {
2945  const QBrush &bg = qwsServer->backgroundBrush();
2946  Qt::BrushStyle bs = bg.style();
2947  if (bs == Qt::NoBrush || r.isEmpty())
2948  return;
2949 
2950  if (bs == Qt::SolidPattern) {
2951  solidFill(bg.color(), r);
2952  } else {
2953  const QRect br = r.boundingRect();
2954  QImage img(br.size(), d_ptr->preferredImageFormat());
2955  QPoint off = br.topLeft();
2956  QRasterBuffer rb;
2957  rb.prepare(&img);
2958  QSpanData spanData;
2959  spanData.init(&rb, 0);
2960  spanData.setup(bg, 256, QPainter::CompositionMode_Source);
2961  spanData.dx = off.x();
2962  spanData.dy = off.y();
2963  Q_ASSERT(spanData.blend);
2964 
2965  const QVector<QRect> rects = r.rects();
2966  const int nspans = 256;
2967  QT_FT_Span spans[nspans];
2968  for (int i = 0; i < rects.size(); ++i) {
2969  int y = rects.at(i).y() - off.y();
2970  int ye = y + rects.at(i).height();
2971  int x = rects.at(i).x() - off.x();
2972  int len = rects.at(i).width();
2973  while (y < ye) {
2974  int n = qMin(nspans, ye - y);
2975  int i = 0;
2976  while (i < n) {
2977  spans[i].x = x;
2978  spans[i].len = len;
2979  spans[i].y = y + i;
2980  spans[i].coverage = 255;
2981  ++i;
2982  }
2983  spanData.blend(n, spans, &spanData);
2984  y += n;
2985  }
2986  }
2987  blit(img, br.topLeft(), r);
2988  }
2989 }
BrushStyle
Definition: qnamespace.h:1162
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
Definition: qglobal.h:1215
const QColor & color() const
Returns the brush color.
Definition: qbrush.h:183
unsigned char coverage
unsigned short len
int width() const
Returns the width of the rectangle.
Definition: qrect.h:303
QRect boundingRect() const
Returns the bounding rectangle of this region.
Definition: qregion.cpp:4363
QScreenPrivate * d_ptr
Definition: qscreen_qws.h:374
int height() const
Returns the height of the rectangle.
Definition: qrect.h:306
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
virtual void blit(const QImage &img, const QPoint &topLeft, const QRegion &region)
Copies the given region in the given image to the point specified by topLeft using device coordinates...
ProcessSpans blend
bool isEmpty() const
Returns true if the region is empty; otherwise returns false.
Definition: qregion.cpp:4098
QSize size() const
Returns the size of the rectangle.
Definition: qrect.h:309
The QImage class provides a hardware-independent image representation that allows direct access to th...
Definition: qimage.h:87
Qt::BrushStyle style() const
Returns the brush style.
Definition: qbrush.h:182
QImage::Format prepare(QImage *image)
const T & at(int i) const
Returns the item at index position i in the vector.
Definition: qvector.h:350
The QBrush class defines the fill pattern of shapes drawn by QPainter.
Definition: qbrush.h:76
void setup(const QBrush &brush, int alpha, QPainter::CompositionMode compositionMode)
void init(QRasterBuffer *rb, const QRasterPaintEngine *pe)
const QBrush & backgroundBrush() const
Returns the brush used as background in the absence of obscuring windows.
int y() const
Returns the y-coordinate of the rectangle&#39;s top edge.
Definition: qrect.h:255
QImage::Format preferredImageFormat() const
int x() const
Returns the x-coordinate of the rectangle&#39;s left edge.
Definition: qrect.h:252
The QPoint class defines a point in the plane using integer precision.
Definition: qpoint.h:53
QVector< QRect > rects() const
Returns an array of non-overlapping rectangles that make up the region.
Definition: qregion.cpp:4412
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
int size() const
Returns the number of items in the vector.
Definition: qvector.h:137
virtual void solidFill(const QColor &color, const QRegion &region)
Fills the given region of the screen with the specified color.
QWSServer Q_GUI_EXPORT * qwsServer
QPoint topLeft() const
Returns the position of the rectangle&#39;s top-left corner.
Definition: qrect.h:288

◆ physicalHeight()

int QScreen::physicalHeight ( ) const
inline

Returns the physical height of the screen in millimeters.

Since
4.2
See also
height(), deviceHeight(), physicalWidth()

Definition at line 291 of file qscreen_qws.h.

Referenced by QProxyScreen::configure(), QMultiScreen::connect(), QDirectFBPaintDevice::dotsPerMeterY(), effectiveState(), qt_defaultDpiY(), setImageMetrics(), and QTransformedScreen::setTransformation().

291 { return physHeight; } // physical display size in mm
int physHeight
the physical height of the screen in millimeters.
Definition: qscreen_qws.h:340

◆ physicalWidth()

int QScreen::physicalWidth ( ) const
inline

Returns the physical width of the screen in millimeters.

Since
4.2
See also
width(), deviceWidth(), physicalHeight()

Definition at line 290 of file qscreen_qws.h.

Referenced by QProxyScreen::configure(), QMultiScreen::connect(), QDirectFBPaintDevice::dotsPerMeterX(), effectiveState(), qt_defaultDpiX(), setImageMetrics(), and QTransformedScreen::setTransformation().

290 { return physWidth; } // physical display size in mm
int physWidth
the physical width of the screen in millimeters.
Definition: qscreen_qws.h:339

◆ pixelFormat()

QImage::Format QScreen::pixelFormat ( ) const

◆ pixelType()

PixelType QScreen::pixelType ( ) const
inline

Returns the pixel storage format of the screen.

Definition at line 231 of file qscreen_qws.h.

Referenced by QTransformedScreen::blit(), QProxyScreen::configure(), QVNCServer::convertPixels(), qt_blit_setup(), qt_conv16ToRgb(), and qt_solidFill_setup().

231 { return pixeltype; }
PixelType pixeltype
set to BGRPixel
Definition: qscreen_qws.h:328

◆ pixmapDataFactory()

QPixmapDataFactory * QScreen::pixmapDataFactory ( ) const
Warning
This function is not part of the public interface.
Since
4.4

Definition at line 3520 of file qscreen_qws.cpp.

Referenced by QWSGraphicsSystem::createPixmapData(), and QPixmapDataFactory::instance().

3521 {
3522  return d_ptr->pixmapFactory;
3523 }
QScreenPrivate * d_ptr
Definition: qscreen_qws.h:374
QPixmapDataFactory * pixmapFactory

◆ pixmapDepth()

int QScreen::pixmapDepth ( ) const
virtual

Returns the preferred depth for pixmaps, in bits per pixel.

See also
depth()

Definition at line 3255 of file qscreen_qws.cpp.

Referenced by QWSDisplay::pixmapDepth().

3256 {
3257  return depth();
3258 }
int depth() const
Returns the depth of the framebuffer, in bits per pixel.
Definition: qscreen_qws.h:229

◆ pixmapLinestepAlignment()

int QScreen::pixmapLinestepAlignment ( )
inlinevirtual

Returns the value (in bits) to which individual scanlines of pixmaps held in the graphics card's memory, should be aligned.

Note that the default implementation returns 64; reimplement this function to override the return value, e.g., when implementing an accelerated driver (see the Adding an Accelerated Graphics Driver to Qt for Embedded Linux documentation for details.

See also
pixmapOffsetAlignment()

Definition at line 214 of file qscreen_qws.h.

214 { return 64; }

◆ pixmapOffsetAlignment()

int QScreen::pixmapOffsetAlignment ( )
inlinevirtual

Returns the value (in bits) to which the start address of pixmaps held in the graphics card's memory, should be aligned.

Note that the default implementation returns 64; reimplement this function to override the return value, e.g., when implementing an accelerated driver (see the Adding an Accelerated Graphics Driver to Qt for Embedded Linux documentation for details).

See also
pixmapLinestepAlignment()

Definition at line 213 of file qscreen_qws.h.

Referenced by QLinuxFbScreen::cache().

213 { return 64; }

◆ region()

QRegion QScreen::region ( ) const
inlinevirtual

Returns the region covered by this screen driver.

Since
4.2
See also
base(), screenSize()

Reimplemented in QProxyScreen, QMultiScreen, and QTransformedScreen.

Definition at line 284 of file qscreen_qws.h.

Referenced by QMultiScreen::addSubScreen(), QAhiScreen::blit(), QMultiScreen::blit(), blit(), clearRect(), QMultiScreen::exposeRegion(), QProxyScreen::exposeRegion(), QDirectFBScreen::exposeRegion(), exposeRegion(), QWSServerPrivate::exposeRegion(), QMultiScreenCursor::move(), QProxyScreen::region(), QMultiScreen::removeSubScreen(), QVFbScreen::setDirty(), QMultiScreen::setDirty(), QDirectFBWindowSurface::setGeometry(), setMaxWindowRect(), QWSServer::setMaxWindowRect(), QLinuxFbScreen::setMode(), QApplicationPrivate::setScreenTransformation(), QAhiScreen::solidFill(), QMultiScreen::solidFill(), and subScreenIndexAt().

284 { return QRect(offset(), QSize(w, h)); }
int w
the logical width of the screen.
Definition: qscreen_qws.h:324
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
The QSize class defines the size of a two-dimensional object using integer point precision.
Definition: qsize.h:53
int h
the logical height of the screen.
Definition: qscreen_qws.h:326
QPoint offset() const
Returns the logical offset of the screen, i.

◆ restore()

void QScreen::restore ( )
virtual

Restores the previously saved state of the graphics card.

For example, hardware screen drivers should reimplement the save() and restore() functions to save and restore its registers, enabling swintching between virtual consoles.

Note that the default implementation does nothing.

See also
save()

Reimplemented in QProxyScreen, QLinuxFbScreen, QMultiScreen, QVFbScreen, and QIntfbScreen.

Definition at line 2325 of file qscreen_qws.cpp.

Referenced by QWSTtyKbPrivate::handleConsoleSwitch(), QMultiScreen::restore(), and QProxyScreen::restore().

2326 {
2327 }

◆ resumeUpdates()

void QScreen::resumeUpdates ( )
virtual
Warning
This function is not part of the public interface.

Reimplemented in QProxyScreen, and QMultiScreen.

Definition at line 3278 of file qscreen_qws.cpp.

Referenced by QMultiScreen::resumeUpdates(), and QProxyScreen::resumeUpdates().

3279 {
3280 }

◆ save()

void QScreen::save ( )
virtual

Saves the current state of the graphics card.

For example, hardware screen drivers should reimplement the save() and restore() functions to save and restore its registers, enabling swintching between virtual consoles.

Note that the default implementation does nothing.

See also
restore()

Reimplemented in QProxyScreen, QLinuxFbScreen, QMultiScreen, QVFbScreen, and QIntfbScreen.

Definition at line 2309 of file qscreen_qws.cpp.

Referenced by QWSTtyKbPrivate::handleConsoleSwitch(), QMultiScreen::save(), and QProxyScreen::save().

2310 {
2311 }

◆ screenSize()

QScreen::screenSize ( ) const
inline

Returns the size of the screen in bytes.

The screen size is always located at the beginning of framebuffer memory, i.e. it can also be retrieved using the base() function.

See also
base(), region()

Definition at line 242 of file qscreen_qws.h.

Referenced by QProxyScreen::configure().

242 { return size; }
int size
the number of bytes in the visible region of the frame buffer
Definition: qscreen_qws.h:334

◆ set()

void QScreen::set ( unsigned int  ,
unsigned int  ,
unsigned int  ,
unsigned int   
)
virtual
Warning
This function is not part of the public interface.

Reimplemented in QLinuxFbScreen.

Definition at line 2337 of file qscreen_qws.cpp.

Referenced by QApplication::qwsSetCustomColors().

2338 {
2339 }

◆ setDirty()

void QScreen::setDirty ( const QRect rectangle)
virtual

Marks the given rectangle as dirty.

Note that the default implementation does nothing; reimplement this function to indicate that the given rectangle has been altered.

Reimplemented in QProxyScreen, QLinuxFbScreen, QMultiScreen, QTransformedScreen, QQnxScreen, QVFbScreen, QIntfbScreen, QVNCScreen, and QVFbScreen.

Definition at line 3010 of file qscreen_qws.cpp.

Referenced by exposeRegion(), QWSWindowSurface::flush(), QMultiScreen::setDirty(), and QProxyScreen::setDirty().

3011 {
3012 }

◆ setFrameBufferLittleEndian()

void QScreen::setFrameBufferLittleEndian ( bool  littleEndian)
private

◆ setGraphicsSystem()

void QScreen::setGraphicsSystem ( QGraphicsSystem system)
protected
Warning
This function is not part of the public interface.
Since
4.5

Definition at line 3529 of file qscreen_qws.cpp.

Referenced by QDirectFBScreen::connect().

3530 {
3531  d_ptr->graphicsSystem = system;
3532 }
QGraphicsSystem * graphicsSystem
QScreenPrivate * d_ptr
Definition: qscreen_qws.h:374

◆ setMode()

QScreen::setMode ( int  width,
int  height,
int  depth 
)
pure virtual

Implement this function to reset the framebuffer's resolution (width and height) and bit depth.

After the resolution has been set, existing paint engines will be invalid and the framebuffer should be completely redrawn. In a multiple-process situation, all other applications must be notified to reset their mode and update themselves accordingly.

Implemented in QDirectFBScreen, QProxyScreen, QLinuxFbScreen, PvrEglScreen, QMultiScreen, QVFbScreen, QIntfbScreen, QQnxScreen, QAhiScreen, and EGLNullWSScreen.

Referenced by QProxyScreen::setMode().

◆ setOffset()

void QScreen::setOffset ( const QPoint p)
Warning
This function is not part of the public interface.

Definition at line 3297 of file qscreen_qws.cpp.

Referenced by QProxyScreen::configure(), and QMultiScreen::connect().

3298 {
3299  d_ptr->offset = p;
3300 }
QScreenPrivate * d_ptr
Definition: qscreen_qws.h:374

◆ setPixelFormat()

void QScreen::setPixelFormat ( QImage::Format  format)
protected

◆ setPixmapDataFactory()

void QScreen::setPixmapDataFactory ( QPixmapDataFactory factory)
protected
Warning
This function is not part of the public interface.
Since
4.4

Definition at line 3505 of file qscreen_qws.cpp.

3506 {
3507  static bool shownWarning = false;
3508  if (!shownWarning) {
3509  qWarning("QScreen::setPixmapDataFactory() is deprecated - use setGraphicsSystem() instead");
3510  shownWarning = true;
3511  }
3512 
3513  d_ptr->pixmapFactory = factory;
3514 }
QScreenPrivate * d_ptr
Definition: qscreen_qws.h:374
Q_CORE_EXPORT void qWarning(const char *,...)
QPixmapDataFactory * pixmapFactory

◆ sharedRamSize()

int QScreen::sharedRamSize ( void *  )
inlinevirtual
Warning
This function is not part of the public interface.

Reimplemented in QProxyScreen, QLinuxFbScreen, and QMultiScreen.

Definition at line 215 of file qscreen_qws.h.

Referenced by QWSDisplay::Data::init(), QMultiScreen::sharedRamSize(), and QProxyScreen::sharedRamSize().

215 { return 0; }

◆ shutdownDevice()

void QScreen::shutdownDevice ( )
virtual

This function is called by the Qt for Embedded Linux server before it calls the disconnect() function when exiting.

Note that the default implementation only hides the mouse cursor; reimplement this function to do the necessary graphics card specific cleanup.

See also
initDevice(), disconnect()

Reimplemented in QDirectFBScreen, QProxyScreen, QLinuxFbScreen, PvrEglScreen, QMultiScreen, QQnxScreen, QVFbScreen, QAhiScreen, QVNCScreen, QIntfbScreen, and EGLNullWSScreen.

Definition at line 2201 of file qscreen_qws.cpp.

Referenced by QWSServerPrivate::closeDisplay(), QMultiScreen::shutdownDevice(), and QProxyScreen::shutdownDevice().

2202 {
2203 #ifndef QT_NO_QWS_CURSOR
2204  if (qt_screencursor)
2205  qt_screencursor->hide();
2206 #endif
2207 }
virtual void hide()
Hides the cursor from the screen.
Q_GUI_EXPORT QScreenCursor * qt_screencursor
Definition: qscreen_qws.cpp:67

◆ solidFill()

void QScreen::solidFill ( const QColor color,
const QRegion region 
)
virtual

Fills the given region of the screen with the specified color.

This function is called from the exposeRegion() function; it is not intended to be called explicitly.

Reimplement this function to make use of Adding an Accelerated Graphics Driver to Qt for Embedded Linux{accelerated hardware}. Note that this function must be reimplemented if the framebuffer format is not supported by Qt for Embedded Linux (See the Qt for Embedded Linux Display Management{Display Management} documentation for more details).

See also
exposeRegion(), blit(), blank()

Reimplemented in QDirectFBScreen, QProxyScreen, QMultiScreen, QTransformedScreen, PvrEglScreen, and QAhiScreen.

Definition at line 2727 of file qscreen_qws.cpp.

Referenced by paintBackground(), PvrEglScreen::solidFill(), QMultiScreen::solidFill(), and QProxyScreen::solidFill().

2728 {
2729  QWSDisplay::grab();
2730  d_ptr->solidFill(this, color,
2731  region.translated(-offset()) & QRect(0, 0, dw, dh));
2733 }
QScreenPrivate * d_ptr
Definition: qscreen_qws.h:374
static void grab()
SolidFillFunc solidFill
int dw
the device width
Definition: qscreen_qws.h:331
int dh
the device height
Definition: qscreen_qws.h:332
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
QRegion translated(int dx, int dy) const
Returns a copy of the region that is translated dx along the x axis and dy along the y axis...
Definition: qregion.cpp:743
static void ungrab()
QPoint offset() const
Returns the logical offset of the screen, i.

◆ subScreenIndexAt()

int QScreen::subScreenIndexAt ( const QPoint position) const

Returns the index of the subscreen at the given position; returns -1 if no screen is found.

Since
4.2

The index identifies the subscreen in the list of pointers returned by the subScreens() function.

See also
instance(), subScreens()

Definition at line 3343 of file qscreen_qws.cpp.

Referenced by QMultiScreen::createSurface(), and QMultiScreenCursor::move().

3344 {
3345  const QList<QScreen*> screens = subScreens();
3346  const int n = screens.count();
3347  for (int i = 0; i < n; ++i) {
3348  if (screens.at(i)->region().contains(p))
3349  return i;
3350  }
3351 
3352  return -1;
3353 }
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
virtual QRegion region() const
Returns the region covered by this screen driver.
Definition: qscreen_qws.h:284
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
bool contains(const QPoint &p) const
Returns true if the region contains the point p; otherwise returns false.
Definition: qregion.cpp:4104
virtual QList< QScreen * > subScreens() const
Definition: qscreen_qws.h:283
The QList class is a template class that provides lists.
Definition: qdatastream.h:62

◆ subScreens()

QList< QScreen * > QScreen::subScreens ( ) const
inlinevirtual
Since
4.2

Returns a list of this screen's subscreens. Use the subScreenIndexAt() function to retrieve the index of a screen at a given position.

Note that if this screen consists of several subscreens, operations to this instance will affect all subscreens by default.

See also
instance(), subScreenIndexAt()

Reimplemented in QProxyScreen, and QMultiScreen.

Definition at line 283 of file qscreen_qws.h.

Referenced by QWSServerPrivate::_q_newConnection(), effectiveState(), getPrimaryScreen(), getScreen(), glScreenForDevice(), isServerProcess(), QMultiScreenCursor::move(), QWSServerPrivate::newMouseHandler(), parentScreen(), qt_defaultDpiX(), qt_defaultDpiY(), QWSDirectPainterSurface::QWSDirectPainterSurface(), screenForDevice(), setMaxWindowRect(), QWSServer::setMaxWindowRect(), QWSOnScreenSurface::setPermanentState(), setScreenTransformation(), subScreenIndexAt(), and QProxyScreen::subScreens().

283 { return QList<QScreen*>(); }
The QList class is a template class that provides lists.
Definition: qdatastream.h:62

◆ supportsDepth()

bool QScreen::supportsDepth ( int  depth) const
virtual

Returns true if the screen supports the specified color depth; otherwise returns false.

See also
clut()

Reimplemented in QProxyScreen, QMultiScreen, and QQnxScreen.

Definition at line 2353 of file qscreen_qws.cpp.

Referenced by QWSDisplay::supportsDepth(), and QProxyScreen::supportsDepth().

2354 {
2355  if (false) {
2356  //Just to simplify the ifdeffery
2357 #ifdef QT_QWS_DEPTH_1
2358  } else if(d==1) {
2359  return true;
2360 #endif
2361 #ifdef QT_QWS_DEPTH_4
2362  } else if(d==4) {
2363  return true;
2364 #endif
2365 #ifdef QT_QWS_DEPTH_8
2366  } else if(d==8) {
2367  return true;
2368 #endif
2369 #ifdef QT_QWS_DEPTH_16
2370  } else if(d==16) {
2371  return true;
2372 #endif
2373 #ifdef QT_QWS_DEPTH_15
2374  } else if (d == 15) {
2375  return true;
2376 #endif
2377 #ifdef QT_QWS_DEPTH_18
2378  } else if(d==18 || d==19) {
2379  return true;
2380 #endif
2381 #ifdef QT_QWS_DEPTH_24
2382  } else if(d==24) {
2383  return true;
2384 #endif
2385 #ifdef QT_QWS_DEPTH_32
2386  } else if(d==32) {
2387  return true;
2388 #endif
2389  }
2390  return false;
2391 }
int d
the pixel depth
Definition: qscreen_qws.h:327

◆ totalSize()

QScreen::totalSize ( ) const
inline

Returns the size of the available graphics card memory (including the screen) in bytes.

See also
onCard()

Definition at line 243 of file qscreen_qws.h.

243 { return mapsize; }
int mapsize
the total number of bytes in the frame buffer
Definition: qscreen_qws.h:335

◆ transformOrientation()

int QScreen::transformOrientation ( ) const
virtual

Returns the current rotation as an integer value.

Note that the default implementation returns 0; reimplement this function to override this value.

See also
isTransformed()

Reimplemented in QProxyScreen, and QTransformedScreen.

Definition at line 3250 of file qscreen_qws.cpp.

Referenced by QWSServerPrivate::_q_newConnection(), PvrEglScreen::transformation(), QWSKeyboardHandler::transformDirKey(), and QProxyScreen::transformOrientation().

3251 {
3252  return 0;
3253 }

◆ uncache()

QScreen::uncache ( uchar )
inlinevirtual
Warning
This function is not part of the public interface.

This function is called on pixmap destruction to remove them from graphics card memory.

Reimplemented in QLinuxFbScreen.

Definition at line 238 of file qscreen_qws.h.

238 {}

◆ width()

QScreen::width ( ) const
inline

Friends and Related Functions

◆ QIntfbScreen

friend class QIntfbScreen
friend

Definition at line 362 of file qscreen_qws.h.

◆ QLinuxFbScreen

friend class QLinuxFbScreen
friend

Definition at line 358 of file qscreen_qws.h.

◆ QProxyScreen

friend class QProxyScreen
friend

Definition at line 361 of file qscreen_qws.h.

◆ QQnxScreen

friend class QQnxScreen
friend

Definition at line 360 of file qscreen_qws.h.

◆ qt_blit_setup

void qt_blit_setup ( QScreen screen,
const QImage image,
const QPoint topLeft,
const QRegion region 
)
friend

Definition at line 1217 of file qscreen_qws.cpp.

1219 {
1220  switch (screen->depth()) {
1221 #ifdef QT_QWS_DEPTH_32
1222  case 32:
1223  if (screen->pixelType() == QScreen::NormalPixel)
1224  screen->d_ptr->blit = blit_32;
1225  else
1226  screen->d_ptr->blit = blit_template<qabgr8888, quint32>;
1227  break;
1228 #endif
1229 #ifdef QT_QWS_DEPTH_24
1230  case 24:
1231  if (screen->pixelType() == QScreen::NormalPixel)
1232  screen->d_ptr->blit = blit_qrgb888;
1233  else
1234  screen->d_ptr->blit = blit_24;
1235  break;
1236 #endif
1237 #ifdef QT_QWS_DEPTH_18
1238  case 18:
1239  screen->d_ptr->blit = blit_18;
1240  break;
1241 #endif
1242 #ifdef QT_QWS_DEPTH_16
1243  case 16:
1244 #if Q_BYTE_ORDER == Q_BIG_ENDIAN
1245  if (screen->d_ptr->fb_is_littleEndian)
1246  screen->d_ptr->blit = blit_16_bigToLittleEndian;
1247  else
1248 #endif
1249  if (screen->pixelType() == QScreen::NormalPixel)
1250  screen->d_ptr->blit = blit_16;
1251  else
1252  screen->d_ptr->blit = blit_template<qbgr565, quint16>;
1253  break;
1254 #endif
1255 #ifdef QT_QWS_DEPTH_15
1256  case 15:
1257 #if Q_BYTE_ORDER == Q_BIG_ENDIAN
1258  if (screen->d_ptr->fb_is_littleEndian)
1259  screen->d_ptr->blit = blit_15_bigToLittleEndian;
1260  else
1261 #endif // Q_BIG_ENDIAN
1262  if (screen->pixelType() == QScreen::NormalPixel)
1263  screen->d_ptr->blit = blit_15;
1264  else
1265  screen->d_ptr->blit = blit_template<qbgr555, qrgb555>;
1266  break;
1267 #endif
1268 #ifdef QT_QWS_DEPTH_12
1269  case 12:
1270  screen->d_ptr->blit = blit_12;
1271  break;
1272 #endif
1273 #ifdef QT_QWS_DEPTH_8
1274  case 8:
1275  screen->d_ptr->blit = blit_8;
1276  break;
1277 #endif
1278 #ifdef QT_QWS_DEPTH_4
1279  case 4:
1280  screen->d_ptr->blit = blit_4;
1281  break;
1282 #endif
1283 #ifdef QT_QWS_DEPTH_1
1284  case 1:
1285  screen->d_ptr->blit = blit_1;
1286  break;
1287 #endif
1288  default:
1289  qFatal("blit_setup(): Screen depth %d not supported!",
1290  screen->depth());
1291  screen->d_ptr->blit = 0;
1292  break;
1293  }
1294  screen->d_ptr->blit(screen, image, topLeft, region);
1295 }
QScreenPrivate * d_ptr
Definition: qscreen_qws.h:374
PixelType pixelType() const
Returns the pixel storage format of the screen.
Definition: qscreen_qws.h:231
Q_CORE_EXPORT void qFatal(const char *,...)
if(void) toggleToolbarShown
int depth() const
Returns the depth of the framebuffer, in bits per pixel.
Definition: qscreen_qws.h:229

◆ qt_solidFill_setup

void qt_solidFill_setup ( QScreen screen,
const QColor color,
const QRegion region 
)
friend

Definition at line 544 of file qscreen_qws.cpp.

546 {
547  switch (screen->depth()) {
548 #ifdef QT_QWS_DEPTH_32
549  case 32:
550  if (screen->pixelType() == QScreen::NormalPixel)
551  screen->d_ptr->solidFill = solidFill_template<quint32>;
552  else
553  screen->d_ptr->solidFill = solidFill_template<qabgr8888>;
554  break;
555 #endif
556 #ifdef QT_QWS_DEPTH_24
557  case 24:
558  if (screen->pixelType() == QScreen::NormalPixel)
559  screen->d_ptr->solidFill = solidFill_template<qrgb888>;
560  else
561  screen->d_ptr->solidFill = solidFill_template<quint24>;
562  break;
563 #endif
564 #ifdef QT_QWS_DEPTH_18
565  case 18:
566  screen->d_ptr->solidFill = solidFill_template<quint18>;
567  break;
568 #endif
569 #ifdef QT_QWS_DEPTH_16
570  case 16:
571  if (screen->pixelType() == QScreen::NormalPixel)
572  screen->d_ptr->solidFill = solidFill_template<quint16>;
573  else
574  screen->d_ptr->solidFill = solidFill_template<qbgr565>;
575  break;
576 #endif
577 #ifdef QT_QWS_DEPTH_15
578  case 15:
579  if (screen->pixelType() == QScreen::NormalPixel)
580  screen->d_ptr->solidFill = solidFill_template<qrgb555>;
581  else
582  screen->d_ptr->solidFill = solidFill_template<qbgr555>;
583  break;
584 #endif
585 #ifdef QT_QWS_DEPTH_12
586  case 12:
587  screen->d_ptr->solidFill = solidFill_template<qrgb444>;
588  break;
589 #endif
590 #ifdef QT_QWS_DEPTH_8
591  case 8:
592  screen->d_ptr->solidFill = solidFill_template<quint8>;
593  break;
594 #endif
595 #ifdef QT_QWS_DEPTH_4
596  case 4:
597  screen->d_ptr->solidFill = solidFill_gray4;
598  break;
599 #endif
600 #ifdef QT_QWS_DEPTH_1
601  case 1:
602  screen->d_ptr->solidFill = solidFill_mono;
603  break;
604 #endif
605  default:
606  qFatal("solidFill_setup(): Screen depth %d not supported!",
607  screen->depth());
608  screen->d_ptr->solidFill = 0;
609  break;
610  }
611  screen->d_ptr->solidFill(screen, color, region);
612 }
QScreenPrivate * d_ptr
Definition: qscreen_qws.h:374
PixelType pixelType() const
Returns the pixel storage format of the screen.
Definition: qscreen_qws.h:231
SolidFillFunc solidFill
Q_CORE_EXPORT void qFatal(const char *,...)
if(void) toggleToolbarShown
int depth() const
Returns the depth of the framebuffer, in bits per pixel.
Definition: qscreen_qws.h:229

◆ QVFbScreen

friend class QVFbScreen
friend

Definition at line 359 of file qscreen_qws.h.

◆ QVNCScreen

friend class QVNCScreen
friend

Definition at line 357 of file qscreen_qws.h.

◆ QWSOnScreenSurface

friend class QWSOnScreenSurface
friend

Definition at line 351 of file qscreen_qws.h.

Referenced by createSurface().

◆ QWSServer

friend class QWSServer
friend

Definition at line 342 of file qscreen_qws.h.

◆ QWSServerPrivate

friend class QWSServerPrivate
friend

Definition at line 343 of file qscreen_qws.h.

◆ setTransformation()

void setTransformation ( int  transformation,
int  screenNo 
)
related

Here it is.

transformation and screenNo

Definition at line 1889 of file qapplication_qws.cpp.

1890 {
1892  cmd.setTransformation(screenNo, transformation);
1894 }
void sendCommand(QWSCommand &cmd)
void setTransformation(int screen, int transformation)
static QWSDisplay * instance()

Properties

◆ clearCacheFunc

ClearCacheFunc QScreen::clearCacheFunc = 0
staticprotected

◆ d

QScreen::d
protected

◆ d_ptr

QScreenPrivate* QScreen::d_ptr
private

◆ data

QScreen::data
protected

◆ dh

QScreen::dh
protected

the device height

This is the number of pixels in a column of the physical screen. It must be initialized by a subclass. Normally, it should be set to the logical height QScreen::h, but it might be different, e.g., if you are doing rotations in software.

See also
QScreen::h

Definition at line 332 of file qscreen_qws.h.

Referenced by QAhiScreen::configure(), QProxyScreen::configure(), QVNCScreenPrivate::configure(), EGLNullWSScreen::connect(), QIntfbScreen::connect(), QVNCScreen::connect(), QQnxScreen::connect(), QVFbScreen::connect(), QMultiScreen::connect(), PvrEglScreen::connect(), QLinuxFbScreen::connect(), QDirectFBScreen::connect(), QLinuxFbScreen::setDirty(), QProxyScreen::setMode(), QTransformedScreen::setTransformation(), and solidFill().

◆ displayId

int QScreen::displayId
protected

◆ dw

QScreen::dw
protected

the device width

This is the number of pixels in a row of the physical screen. It must be initialized by a subclass. Normally, it should be set to the logical width QScreen::w, but it might be different, e.g., if you are doing rotations in software.

See also
QScreen::w

Definition at line 331 of file qscreen_qws.h.

Referenced by QAhiScreen::configure(), QProxyScreen::configure(), QVNCScreenPrivate::configure(), EGLNullWSScreen::connect(), QIntfbScreen::connect(), QVNCScreen::connect(), QQnxScreen::connect(), QVFbScreen::connect(), QMultiScreen::connect(), PvrEglScreen::connect(), QLinuxFbScreen::connect(), QDirectFBScreen::connect(), QLinuxFbScreen::setDirty(), QProxyScreen::setMode(), QTransformedScreen::setTransformation(), and solidFill().

◆ entries

QPoolEntry* QScreen::entries
protected

◆ entryp

int* QScreen::entryp
protected

◆ grayscale

QScreen::grayscale
protected

the gray scale screen mode flag

Set this variable to true in a subclass, if you are using a grayscale screen mode. e.g., in an 8-bit mode where you don't want to use the palette, but you want to use the grayscales.

Definition at line 329 of file qscreen_qws.h.

Referenced by alloc(), QVFbScreen::connect(), QLinuxFbScreen::connect(), QLinuxFbScreen::createPalette(), QVFbScreen::initDevice(), and QLinuxFbScreen::initDevice().

◆ h

QScreen::h
protected

◆ lowest

unsigned int* QScreen::lowest
protected

◆ lstep

QScreen::lstep
protected

the number of bytes representing a line in the frame buffer.

i.e., line step. {data[lstep * 2]} is the address of the first visible pixel in the third line of the frame buffer.

See also
data

Definition at line 325 of file qscreen_qws.h.

Referenced by QAhiScreen::configure(), QProxyScreen::configure(), QVNCScreenPrivate::configure(), QIntfbScreen::connect(), QQnxScreen::connect(), QVFbScreen::connect(), QMultiScreen::connect(), PvrEglScreen::connect(), QLinuxFbScreen::connect(), QDirectFBScreen::connect(), and QLinuxFbScreen::QLinuxFbScreen().

◆ mapsize

QScreen::mapsize
protected

the total number of bytes in the frame buffer

This is the total number of bytes in the block pointed to by the QScreen::data pointer. You must initialize this variable if you initialize the QScreen::data pointer.

See also
QScreen::data, QScreen::size

Definition at line 335 of file qscreen_qws.h.

Referenced by QVNCScreenPrivate::configure(), QIntfbScreen::connect(), QVFbScreen::connect(), QQnxScreen::connect(), PvrEglScreen::connect(), QLinuxFbScreen::connect(), QLinuxFbScreen::disconnect(), QLinuxFbScreen::initDevice(), onCard(), and QLinuxFbScreen::useOffscreen().

◆ physHeight

QScreen::physHeight
protected

the physical height of the screen in millimeters.

Currently, this variable is used when calculating the screen DPI, which in turn is used when deciding the actual font size Qt is using.

Definition at line 340 of file qscreen_qws.h.

Referenced by QAhiScreen::configure(), QProxyScreen::configure(), QVNCScreenPrivate::configure(), EGLNullWSScreen::connect(), QIntfbScreen::connect(), QQnxScreen::connect(), QVFbScreen::connect(), QMultiScreen::connect(), PvrEglScreen::connect(), QLinuxFbScreen::connect(), QDirectFBScreen::connect(), and QTransformedScreen::setTransformation().

◆ physWidth

QScreen::physWidth
protected

the physical width of the screen in millimeters.

Currently, this variable is used when calculating the screen DPI, which in turn is used when deciding the actual font size Qt is using.

Definition at line 339 of file qscreen_qws.h.

Referenced by QAhiScreen::configure(), QProxyScreen::configure(), QVNCScreenPrivate::configure(), EGLNullWSScreen::connect(), QIntfbScreen::connect(), QQnxScreen::connect(), QVFbScreen::connect(), QMultiScreen::connect(), PvrEglScreen::connect(), QLinuxFbScreen::connect(), QDirectFBScreen::connect(), and QTransformedScreen::setTransformation().

◆ pixeltype

QScreen::pixeltype
protected

set to BGRPixel

Set this variable to BGRPixel in a subclass, if the screen pixel format is a BGR type and you have used setPixelFormat() to set the pixel format to the corresponding RGB format. e.g., you have set the pixel format to QImage::Format_RGB555, but your screen really uses BGR, not RGB.

Definition at line 328 of file qscreen_qws.h.

Referenced by QProxyScreen::configure(), QVFbScreen::connect(), QQnxScreen::connect(), and QLinuxFbScreen::setPixelFormat().

◆ screenclut

QScreen::screenclut
protected

the color table

Initialize this variable in a subclass using a paletted screen mode, and initialize its partner, QScreen::screencols.

See also
screencols

Definition at line 308 of file qscreen_qws.h.

Referenced by alloc(), QVFbScreen::connect(), QLinuxFbScreen::connect(), QLinuxFbScreen::createPalette(), QVFbScreen::initDevice(), QVNCScreen::initDevice(), QLinuxFbScreen::restore(), and QLinuxFbScreen::set().

◆ screencols

QScreen::screencols
protected

the number of entries in the color table

Initialize this variable in a subclass using a paletted screen mode, and initialize its partner, QScreen::screenclut.

See also
screenclut

Definition at line 309 of file qscreen_qws.h.

Referenced by alloc(), QVFbScreen::connect(), QLinuxFbScreen::connect(), QLinuxFbScreen::createPalette(), QVFbScreen::initDevice(), QVNCScreen::initDevice(), QLinuxFbScreen::initDevice(), and QLinuxFbScreen::restore().

◆ size

QScreen::size
protected

◆ w

QScreen::w
protected

The documentation for this class was generated from the following files: