Qt 4.8
qscreenmulti_qws_p.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtGui module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #ifndef QMULTISCREEN_QWS_P_H
43 #define QMULTISCREEN_QWS_P_H
44 
45 //
46 // W A R N I N G
47 // -------------
48 //
49 // This file is not part of the Qt API. It exists for the convenience
50 // of the QLibrary class. This header file may change from
51 // version to version without notice, or even be removed.
52 //
53 // We mean it.
54 //
55 
56 #include <qscreen_qws.h>
57 
59 
60 #ifndef QT_NO_QWS_MULTISCREEN
61 
63 
64 class QMultiScreen : public QScreen
65 {
66 public:
68  ~QMultiScreen();
69  bool initDevice();
70  bool connect(const QString &displaySpec);
71  void disconnect();
72  void shutdownDevice();
73  void setMode(int,int,int);
74  bool supportsDepth(int) const;
75 
76  void save();
77  void restore();
78  void blank(bool on);
79 
80  bool onCard(const unsigned char *) const;
81  bool onCard(const unsigned char *, ulong& out_offset) const;
82 
83  bool isInterlaced() const;
84 
85  int memoryNeeded(const QString&);
86  int sharedRamSize(void *);
87 
88  void haltUpdates();
89  void resumeUpdates();
90 
91  void exposeRegion(QRegion r, int changing);
92 
93  void blit(const QImage &img, const QPoint &topLeft, const QRegion &region);
94  void solidFill(const QColor &color, const QRegion &region);
95  void blit(QWSWindow *bs, const QRegion &clip);
96  void setDirty(const QRect&);
97 
100 
101  QList<QScreen*> subScreens() const;
102  QRegion region() const;
103 
104 private:
105  void addSubScreen(QScreen *screen);
106  void removeSubScreen(QScreen *screen);
107 
109 };
110 
111 
113 #endif // QT_NO_QWS_MULTISCREEN
114 #endif // QMULTISCREEN_QWS_P_H
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition: qcolor.h:67
bool initDevice()
This function is called by the Qt for Embedded Linux server to initialize the framebuffer.
bool onCard(const unsigned char *) const
Returns true if the specified buffer is within the graphics card&#39;s memory; otherwise returns false (i...
The QWSWindowSurface class provides the drawing area for top-level windows in Qt for Embedded Linux...
void exposeRegion(QRegion r, int changing)
This function is called by the Qt for Embedded Linux server whenever a screen update is required...
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
QPointer< QWidget > widget
bool connect(const QString &displaySpec)
This function is called by every Qt for Embedded Linux application on startup, and must be implemente...
QMultiScreen(int displayId)
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
The QString class provides a Unicode character string.
Definition: qstring.h:83
QRegion region() const
Returns the region covered by this screen driver.
void removeSubScreen(QScreen *screen)
void shutdownDevice()
This function is called by the Qt for Embedded Linux server before it calls the disconnect() function...
bool supportsDepth(int) const
Returns true if the screen supports the specified color depth; otherwise returns false.
The QWSWindow class encapsulates a top-level window in Qt for Embedded Linux.
void addSubScreen(QScreen *screen)
void setMode(int, int, int)
Implement this function to reset the framebuffer&#39;s resolution (width and height) and bit depth...
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
void blank(bool on)
Prevents the screen driver form displaying any content on the screen.
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
int displayId
Definition: qscreen_qws.h:337
unsigned long ulong
Definition: qglobal.h:997
int memoryNeeded(const QString &)
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...
void solidFill(const QColor &color, const QRegion &region)
Fills the given region of the screen with the specified color.
QList< QScreen * > subScreens() const
void save()
Saves the current state of the graphics card.
int sharedRamSize(void *)
void disconnect()
This function is called by every Qt for Embedded Linux application before exiting, and must be implemented to unmap the framebuffer.
int key
The QPoint class defines a point in the plane using integer precision.
Definition: qpoint.h:53
QMultiScreenPrivate * d_ptr
void restore()
Restores the previously saved state of the graphics card.
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
The QScreen class is a base class for screen drivers in Qt for Embedded Linux.
Definition: qscreen_qws.h:191
void setDirty(const QRect &)
Marks the given rectangle as dirty.
QWSWindowSurface * createSurface(QWidget *widget) const
Creates and returns a new window surface for the given widget.
bool isInterlaced() const
Returns true if the display is interlaced (i.
The QList class is a template class that provides lists.
Definition: qdatastream.h:62