Qt 4.8
qscreenproxy_qws.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 QPROXYSCREEN_QWS_H
43 #define QPROXYSCREEN_QWS_H
44 
45 #include <QtGui/qscreen_qws.h>
46 
47 #ifndef QT_NO_QWS_PROXYSCREEN
48 
50 
52 
53 QT_MODULE(Gui)
54 
55 class QProxyScreenPrivate;
56 
57 #ifndef QT_NO_QWS_CURSOR
58 
59 class QProxyScreenCursorPrivate;
60 
62 {
63 public:
66 
67  void setScreenCursor(QScreenCursor *cursor);
68  QScreenCursor* screenCursor() const;
69 
70  void set(const QImage &image, int hotx, int hoty);
71  void move(int x, int y);
72  void show();
73  void hide();
74 
75 private:
76  void configure();
77 
79  QProxyScreenCursorPrivate *d_ptr;
80 };
81 
82 #endif // QT_NO_QWS_CURSOR
83 
85 {
86 public:
87  QProxyScreen(int display_id, ClassId = ProxyClass);
88  ~QProxyScreen();
89 
90  void setScreen(QScreen *screen);
91  QScreen *screen() const;
92 
93  QSize mapToDevice(const QSize &s) const;
94  QSize mapFromDevice(const QSize &s) const;
95 
96  QPoint mapToDevice(const QPoint &, const QSize &) const;
97  QPoint mapFromDevice(const QPoint &, const QSize &) const;
98 
99  QRect mapToDevice(const QRect &, const QSize &) const;
100  QRect mapFromDevice(const QRect &, const QSize &) const;
101 
102  QRegion mapToDevice(const QRegion &, const QSize &) const;
103  QRegion mapFromDevice(const QRegion &, const QSize &) const;
104 
105  bool connect(const QString &displaySpec);
106  bool initDevice();
107  void shutdownDevice();
108  void disconnect();
109 
110  void setMode(int width, int height, int depth);
111  bool supportsDepth(int) const;
112 
113  void save();
114  void restore();
115  void blank(bool on);
116 
117  bool onCard(const unsigned char *) const;
118  bool onCard(const unsigned char *, ulong& out_offset) const;
119 
120  bool isInterlaced() const;
121  bool isTransformed() const;
122  int transformOrientation() const;
123 
124  int memoryNeeded(const QString&);
125  int sharedRamSize(void *);
126 
127  void haltUpdates();
128  void resumeUpdates();
129 
130  void exposeRegion(QRegion r, int changing);
131  void blit(const QImage &img, const QPoint &topLeft, const QRegion &region);
132  void solidFill(const QColor &color, const QRegion &region);
133  void setDirty(const QRect&);
134 
136  QWSWindowSurface* createSurface(const QString &key) const;
137 
138  QList<QScreen*> subScreens() const;
139  QRegion region() const;
140 
141 private:
142  void configure();
143 
145  QProxyScreenPrivate *d_ptr;
146 };
147 
149 
151 
152 #endif // QT_NO_QWS_PROXYSCREEN
153 #endif // QPROXYSCREEN_QWS_H
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition: qcolor.h:67
The QScreenCursor class is a base class for screen cursors in Qt for Embedded Linux.
Definition: qscreen_qws.h:135
The QWSWindowSurface class provides the drawing area for top-level windows in Qt for Embedded Linux...
virtual void move(int x, int y)
Moves the mouse cursor to the given position, i.e., (x, y).
The QProxyScreenCursor class provides a generic interface to QScreenCursor implementations.
The QProxyScreen class provides a generic interface to QScreen implementations.
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
QPointer< QWidget > widget
virtual int sharedRamSize(void *)
Definition: qscreen_qws.h:215
#define QT_MODULE(x)
Definition: qglobal.h:2783
friend class QProxyScreen
Definition: qscreen_qws.h:361
#define QT_BEGIN_HEADER
Definition: qglobal.h:136
#define Q_GUI_EXPORT
Definition: qglobal.h:1450
virtual bool connect(const QString &displaySpec)=0
This function is called by every Qt for Embedded Linux application on startup, and must be implemente...
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
virtual void restore()
Restores the previously saved state of the graphics card.
virtual void setMode(int, int, int)=0
Implement this function to reset the framebuffer&#39;s resolution (width and height) and bit depth...
virtual QSize mapFromDevice(const QSize &) const
Maps the given size from the framebuffer coordinate system to the coordinate space used by the applic...
The QString class provides a Unicode character string.
Definition: qstring.h:83
QProxyScreenCursorPrivate * d_ptr
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 QSize mapToDevice(const QSize &) const
Maps the given size from the coordinate space used by the application to the framebuffer coordinate s...
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...
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.
virtual QRegion region() const
Returns the region covered by this screen driver.
Definition: qscreen_qws.h:284
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
virtual void resumeUpdates()
QScreenCursor * realCursor
virtual bool initDevice()=0
This function is called by the Qt for Embedded Linux server to initialize the framebuffer.
The QImage class provides a hardware-independent image representation that allows direct access to th...
Definition: qimage.h:87
QScreen * realScreen
The QRegion class specifies a clip region for a painter.
Definition: qregion.h:68
unsigned long ulong
Definition: qglobal.h:997
virtual void hide()
Hides the cursor from the screen.
virtual QWSWindowSurface * createSurface(QWidget *widget) const
Creates and returns a new window surface for the given widget.
virtual void blank(bool on)
Prevents the screen driver form displaying any content on the screen.
virtual void save()
Saves the current state of the graphics card.
virtual int memoryNeeded(const QString &)
virtual void haltUpdates()
ClassId
This enum defines the class identifiers for the known screen subclasses.
Definition: qscreen_qws.h:194
virtual bool isInterlaced() const
Returns true if the display is interlaced (i.
virtual QList< QScreen * > subScreens() const
Definition: qscreen_qws.h:283
virtual bool isTransformed() const
Returns true if the screen is transformed (for instance, rotated 90 degrees); otherwise returns false...
int key
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
The QScreen class is a base class for screen drivers in Qt for Embedded Linux.
Definition: qscreen_qws.h:191
virtual void shutdownDevice()
This function is called by the Qt for Embedded Linux server before it calls the disconnect() function...
virtual int transformOrientation() const
Returns the current rotation as an integer value.
virtual bool onCard(const unsigned char *) const
Returns true if the specified buffer is within the graphics card&#39;s memory; otherwise returns false (i...
friend class QProxyScreenCursor
Definition: qscreen_qws.h:169
The QSize class defines the size of a two-dimensional object using integer point precision.
Definition: qsize.h:53
virtual bool supportsDepth(int) const
Returns true if the screen supports the specified color depth; otherwise returns false.
virtual void exposeRegion(QRegion r, int changing)
This function is called by the Qt for Embedded Linux server whenever a screen update is required...
QProxyScreenPrivate * d_ptr
virtual void show()
Shows the mouse cursor.
#define QT_END_HEADER
Definition: qglobal.h:137
virtual void solidFill(const QColor &color, const QRegion &region)
Fills the given region of the screen with the specified color.
The QList class is a template class that provides lists.
Definition: qdatastream.h:62