47 #ifndef QT_NO_QWS_TRANSFORMED 51 #include <sys/ioctl.h> 61 setSupportsBlitInClients(
true);
72 if (!eglInitialize(dpy, 0, 0))
73 qWarning(
"Could not initialize EGL display - are the drivers loaded?");
127 int dimIdxW = displayArgs.
indexOf(mmWidthRx);
129 int dimIdxH = displayArgs.
indexOf(mmHeightRx);
142 if (dimIdxW < 0 && dimIdxH < 0) {
150 if (displayArgs.
indexOf(ttyRegExp) != -1)
198 if (qobject_cast<QGLWidget*>(widget))
213 #ifndef QT_NO_QWS_TRANSFORMED 225 if (child == lookingFor)
234 foreach (
QScreen *screen, screens) {
235 if (screen == lookingFor)
281 const char *
const devs[] = {
"/dev/tty0",
"/dev/tty",
"/dev/console", 0};
284 for (
const char *
const *dev = devs; *dev; ++dev) {
301 int ret = ioctl(
ttyfd, KDSETMODE, KD_GRAPHICS);
308 const char termctl[] =
"\033[9;0]\033[?33l\033[?25l\033[?1c";
309 ::write(
ttyfd, termctl,
sizeof(termctl));
321 const char termctl[] =
"\033[9;15]\033[?33h\033[?25h\033[?0c";
322 ::write(
ttyfd, termctl,
sizeof(termctl));
Q_GUI_EXPORT QScreen * qt_screen
The QColor class provides colors based on RGB, HSV or CMYK values.
The QWSWindowSurface class provides the drawing area for top-level windows in Qt for Embedded Linux...
The QProxyScreen class provides a generic interface to QScreen implementations.
void solidFill(const QColor &color, const QRegion ®ion)
Fills the given region of the screen with the specified color.
QString cap(int nth=0) const
Returns the text captured by the nth subexpression.
QPointer< QWidget > widget
The QRegExp class provides pattern matching using regular expressions.
int toInt(bool *ok=0, int base=10) const
Returns the string converted to an int using base base, which is 10 by default and must be between 2 ...
void blit(const QImage &img, const QPoint &topLeft, const QRegion ®ion)
Copies the given region in the given image to the point specified by topLeft using device coordinates...
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
PvrQwsDisplay pvrQwsDisplay
bool connect(const QString &displaySpec)
This function is called by every Qt for Embedded Linux application on startup, and must be implemente...
void moveTo(int x, int t)
Moves the rectangle, leaving the top-left corner at the given position (x, y).
int physHeight
the physical height of the screen in millimeters.
The QString class provides a Unicode character string.
int size
the number of bytes in the visible region of the frame buffer
long nativeDrawable() const
bool initDevice()
This function is called by the Qt for Embedded Linux server to initialize the framebuffer.
int pvrQwsDisplayOpen(void)
NativeWindowType EGLNativeWindowType
PvrEglScreen(int displayId)
[0]
int physWidth
the physical width of the screen in millimeters.
void setPixelFormat(QImage::Format format)
Sets the screen's pixel format to format.
void setOptions(QGLScreen::Options value)
Sets the options associated with this QGLScreen to value.
virtual void blit(const QImage &img, const QPoint &topLeft, const QRegion ®ion)
Copies the given region in the given image to the point specified by topLeft using device coordinates...
QWSWindowSurface * createSurface(QWidget *widget) const
[1]
virtual QRegion region() const
Returns the region covered by this screen driver.
uchar * data
points to the first visible pixel in the frame buffer.
int transformation() const
int indexOf(const QRegExp &rx, int from=0) const
Returns the index position of the first exact match of rx in the list, searching forward from index p...
The QGLContext class encapsulates an OpenGL rendering context.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
const T & at(int i) const
Returns the item at index position i in the list.
The QStringList class provides a list of strings.
int w
the logical width of the screen.
void disconnect()
This function is called by every Qt for Embedded Linux application before exiting, and must be implemented to unmap the framebuffer.
Q_CORE_EXPORT void qWarning(const char *,...)
The QImage class provides a hardware-independent image representation that allows direct access to th...
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal...
QBool contains(const QString &str, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the list contains the string str; otherwise returns false.
The QRegion class specifies a clip region for a painter.
bool createNativeWindow(QWidget *widget, EGLNativeWindowType *native)
[2]
static const QScreen * parentScreen(const QScreen *current, const QScreen *lookingFor)
[1]
virtual QWSWindowSurface * createSurface(QWidget *widget) const
Creates and returns a new window surface for the given widget.
const char * constData() const
Returns a pointer to the data stored in the byte array.
virtual QString key() const =0
Implement this function to return a string that uniquely identifies the class of this surface...
void shutdownDevice()
This function is called by the Qt for Embedded Linux server before it calls the disconnect() function...
virtual QList< QScreen * > subScreens() const
The QPoint class defines a point in the plane using integer precision.
QByteArray toAscii() const Q_REQUIRED_RESULT
Returns an 8-bit representation of the string as a QByteArray.
The QRect class defines a rectangle in the plane using integer precision.
The QScreen class is a base class for screen drivers in Qt for Embedded Linux.
virtual int transformOrientation() const
Returns the current rotation as an integer value.
bool exactMatch(const QString &str) const
Returns true if str is matched exactly by this regular expression; otherwise returns false...
int lstep
the number of bytes representing a line in the frame buffer.
NativeDisplayType EGLNativeDisplayType
ClassId classId() const
Returns the class identifier for the screen object.
PvrQwsDrawable * pvrQwsScreenWindow(int screen)
QStringList split(const QString &sep, SplitBehavior behavior=KeepEmptyParts, Qt::CaseSensitivity cs=Qt::CaseSensitive) const Q_REQUIRED_RESULT
Splits the string into substrings wherever sep occurs, and returns the list of those strings...
void setSurfaceFunctions(QGLScreenSurfaceFunctions *functions)
Sets the surface functions object for this QGLScreen to functions.
PvrQwsScreenInfo screens[PVRQWS_MAX_SCREENS]
int h
the logical height of the screen.
int mapsize
the total number of bytes in the frame buffer
This class encapsulates an OpenGL screen driver.
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
virtual void solidFill(const QColor &color, const QRegion ®ion)
Fills the given region of the screen with the specified color.
Q_DECL_CONSTEXPR int qRound(qreal d)
bool chooseContext(QGLContext *context, const QGLContext *shareContext)
Initializes the context and sets up the QGLWindowSurface of the QWidget of context based on the param...
virtual void setGeometry(const QRect &rect)
Sets the currently allocated area to be the given rect.
int open(const char *, int,...)
void pvrQwsDisplayClose(void)
The QList class is a template class that provides lists.