Qt 4.8
Functions
pvreglscreen.cpp File Reference
#include "pvreglscreen.h"
#include "pvreglwindowsurface.h"
#include "pvrqwsdrawable_p.h"
#include <QRegExp>
#include <qwindowsystem_qws.h>
#include <qscreentransformed_qws.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/kd.h>
#include <fcntl.h>
#include <unistd.h>

Go to the source code of this file.

Functions

static const QScreenparentScreen (const QScreen *current, const QScreen *lookingFor)
 [1] More...
 

Function Documentation

◆ parentScreen()

static const QScreen* parentScreen ( const QScreen current,
const QScreen lookingFor 
)
static

[1]

Definition at line 216 of file pvreglscreen.cpp.

Referenced by PvrEglScreen::createSurface(), and PvrEglScreen::transformation().

217 {
218  if (!current)
219  return 0;
220  switch (current->classId()) {
221  case QScreen::ProxyClass:
223  const QScreen *child =
224  static_cast<const QProxyScreen *>(current)->screen();
225  if (child == lookingFor)
226  return current;
227  else
228  return parentScreen(child, lookingFor);
229  }
230  // Not reached.
231 
232  case QScreen::MultiClass: {
233  QList<QScreen *> screens = current->subScreens();
234  foreach (QScreen *screen, screens) {
235  if (screen == lookingFor)
236  return current;
237  const QScreen *parent = parentScreen(screen, lookingFor);
238  if (parent)
239  return parent;
240  }
241  }
242  break;
243 
244  default: break;
245  }
246  return 0;
247 }
The QProxyScreen class provides a generic interface to QScreen implementations.
static const QScreen * parentScreen(const QScreen *current, const QScreen *lookingFor)
[1]
virtual QList< QScreen * > subScreens() const
Definition: qscreen_qws.h:283
The QScreen class is a base class for screen drivers in Qt for Embedded Linux.
Definition: qscreen_qws.h:191
ClassId classId() const
Returns the class identifier for the screen object.
The QList class is a template class that provides lists.
Definition: qdatastream.h:62