Qt 4.8
qt-4.8.6
src
plugins
gfxdrivers
powervr
pvreglscreen
pvreglscreen.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 plugins 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 PVREGLSCREEN_H
43
#define PVREGLSCREEN_H
44
45
#include <QScreen>
46
#include <QGLScreen>
47
#include "
pvrqwsdrawable.h
"
48
49
class
PvrEglScreen
;
50
51
class
PvrEglScreenSurfaceFunctions
:
public
QGLScreenSurfaceFunctions
52
{
53
public
:
54
PvrEglScreenSurfaceFunctions
(
PvrEglScreen
*s,
int
screenNum)
55
:
screen
(s),
displayId
(screenNum) {}
56
57
bool
createNativeWindow
(
QWidget
*
widget
,
EGLNativeWindowType
*native);
58
59
private
:
60
PvrEglScreen
*
screen
;
61
int
displayId
;
62
};
63
64
class
PvrEglScreen
:
public
QGLScreen
65
{
66
public
:
67
PvrEglScreen
(
int
displayId
);
68
~
PvrEglScreen
();
69
70
bool
initDevice();
71
bool
connect(
const
QString
&displaySpec);
72
void
disconnect();
73
void
shutdownDevice();
74
void
setMode
(
int
,
int
,
int
) {}
75
76
void
blit(
const
QImage
&img,
const
QPoint
&topLeft,
const
QRegion
®ion);
77
void
solidFill(
const
QColor
&color,
const
QRegion
®ion);
78
79
bool
chooseContext(
QGLContext
*context,
const
QGLContext
*shareContext);
80
bool
hasOpenGL();
81
82
QWSWindowSurface
*
createSurface
(
QWidget
*
widget
)
const
;
83
QWSWindowSurface
*
createSurface
(
const
QString
&
key
)
const
;
84
85
int
transformation()
const
;
86
87
private
:
88
void
sync();
89
void
openTty();
90
void
closeTty();
91
92
int
fd
;
93
int
ttyfd
, oldKdMode;
94
QString
ttyDevice
;
95
bool
doGraphicsMode
;
96
mutable
const
QScreen
*
parent
;
97
};
98
99
#endif
QColor
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition:
qcolor.h:67
QWSWindowSurface
The QWSWindowSurface class provides the drawing area for top-level windows in Qt for Embedded Linux...
Definition:
qwindowsurface_qws_p.h:68
widget
QPointer< QWidget > widget
Definition:
qapplication_mac.mm:879
PvrEglScreen::doGraphicsMode
bool doGraphicsMode
Definition:
pvreglscreen.h:95
PvrEglScreen::setMode
void setMode(int, int, int)
Implement this function to reset the framebuffer's resolution (width and height) and bit depth...
Definition:
pvreglscreen.h:74
QWidget
The QWidget class is the base class of all user interface objects.
Definition:
qwidget.h:150
PvrEglScreen::ttyfd
int ttyfd
Definition:
pvreglscreen.h:93
PvrEglScreen::parent
const QScreen * parent
Definition:
pvreglscreen.h:96
QString
The QString class provides a Unicode character string.
Definition:
qstring.h:83
PvrEglScreenSurfaceFunctions
Definition:
pvreglscreen.h:51
EGLNativeWindowType
NativeWindowType EGLNativeWindowType
Definition:
qegl_p.h:116
pvrqwsdrawable.h
PvrEglScreenSurfaceFunctions::PvrEglScreenSurfaceFunctions
PvrEglScreenSurfaceFunctions(PvrEglScreen *s, int screenNum)
Definition:
pvreglscreen.h:54
PvrEglScreen::ttyDevice
QString ttyDevice
Definition:
pvreglscreen.h:94
QGLContext
The QGLContext class encapsulates an OpenGL rendering context.
Definition:
qgl.h:310
QImage
The QImage class provides a hardware-independent image representation that allows direct access to th...
Definition:
qimage.h:87
QRegion
The QRegion class specifies a clip region for a painter.
Definition:
qregion.h:68
PvrEglScreenSurfaceFunctions::createNativeWindow
bool createNativeWindow(QWidget *widget, EGLNativeWindowType *native)
[2]
Definition:
pvreglscreen.cpp:329
QEgl::createSurface
Q_GUI_EXPORT EGLSurface createSurface(QPaintDevice *device, EGLConfig cfg, const QEglProperties *surfaceAttribs=0)
Definition:
qegl_x11.cpp:333
PvrEglScreen::fd
int fd
Definition:
pvreglscreen.h:92
PvrEglScreenSurfaceFunctions::displayId
int displayId
Definition:
pvreglscreen.h:61
key
int key
Definition:
qkeysequence.cpp:395
QPoint
The QPoint class defines a point in the plane using integer precision.
Definition:
qpoint.h:53
PvrEglScreenSurfaceFunctions::screen
PvrEglScreen * screen
Definition:
pvreglscreen.h:60
QGLScreenSurfaceFunctions
The QGLScreenSurfaceFunctions class encapsulates the functions for creating native windows and pixmap...
Definition:
qglscreen_qws.h:81
QScreen
The QScreen class is a base class for screen drivers in Qt for Embedded Linux.
Definition:
qscreen_qws.h:191
QGLScreen
This class encapsulates an OpenGL screen driver.
Definition:
qglscreen_qws.h:89
PvrEglScreen
Definition:
pvreglscreen.h:64
Qt 4.8 Source Code Browser