QtGui/qscreenproxy_qws.h Source File

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 
61 class Q_GUI_EXPORT QProxyScreenCursor : public QScreenCursor
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 
78  QScreenCursor *realCursor;
79  QProxyScreenCursorPrivate *d_ptr;
80 };
81 
82 #endif // QT_NO_QWS_CURSOR
83 
84 class Q_GUI_EXPORT QProxyScreen : public QScreen
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 
135  QWSWindowSurface* createSurface(QWidget *widget) const;
136  QWSWindowSurface* createSurface(const QString &key) const;
137 
138  QList<QScreen*> subScreens() const;
139  QRegion region() const;
140 
141 private:
142  void configure();
143 
144  QScreen *realScreen;
145  QProxyScreenPrivate *d_ptr;
146 };
147 
149 
151 
152 #endif // QT_NO_QWS_PROXYSCREEN
153 #endif // QPROXYSCREEN_QWS_H
GLdouble GLdouble GLdouble r
Definition: GLee.h:1189
GLenum GLint GLint y
Definition: GLee.h:876
virtual void solidFill(const QColor &color, const QRegion &region)
#define QT_END_NAMESPACE
Definition: qglobal.h:128
virtual QRegion region() const
Definition: qscreen_qws.h:284
virtual void shutdownDevice()
#define QT_BEGIN_HEADER
Definition: qglobal.h:141
virtual void haltUpdates()
int screen
Definition: GLee.h:10533
virtual bool supportsDepth(int) const
GLenum GLsizei width
Definition: GLee.h:873
virtual int sharedRamSize(void *)
Definition: qscreen_qws.h:215
virtual void show()
virtual bool isTransformed() const
Definition: qcolor.h:67
GLenum GLsizei GLenum GLenum const GLvoid * image
Definition: GLee.h:882
virtual bool initDevice()=0
virtual QSize mapFromDevice(const QSize &) const
Definition: qpoint.h:53
virtual void set(const QImage &image, int hotx, int hoty)
#define QT_BEGIN_NAMESPACE
Definition: qglobal.h:127
virtual void setMode(int, int, int)=0
GLint GLvoid * img
Definition: GLee.h:1216
virtual void setDirty(const QRect &)
GLenum GLsizei GLsizei height
Definition: GLee.h:883
virtual int memoryNeeded(const QString &)
Definition: qimage.h:87
GLenum GLint x
Definition: GLee.h:876
virtual void exposeRegion(QRegion r, int changing)
virtual void hide()
virtual int transformOrientation() const
virtual void disconnect()=0
virtual void blank(bool on)
GLint GLint GLsizei GLsizei GLsizei depth
Definition: GLee.h:905
Definition: qrect.h:58
virtual void move(int x, int y)
Definition: qsize.h:53
virtual QWSWindowSurface * createSurface(QWidget *widget) const
virtual void restore()
virtual bool connect(const QString &displaySpec)=0
virtual bool onCard(const unsigned char *) const
virtual QSize mapToDevice(const QSize &) const
virtual QList< QScreen * > subScreens() const
Definition: qscreen_qws.h:283
virtual void resumeUpdates()
virtual void save()
GLdouble s
Definition: GLee.h:1173
#define QT_END_HEADER
Definition: qglobal.h:142
virtual void blit(const QImage &img, const QPoint &topLeft, const QRegion &region)
friend class QProxyScreenCursor
Definition: qscreen_qws.h:169
virtual bool isInterlaced() const
GLuint color
Definition: GLee.h:8456