88 gf_layer_detach(
layer);
163 #ifndef QT_NO_QWS_CURSOR 180 if (ret != GF_ERR_OK) {
181 qWarning(
"QQnxScreen: gf_dev_attach(%s) failed with error code %d", name, ret);
197 if (ret != GF_ERR_OK) {
198 qWarning(
"QQnxScreen: gf_display_attach(%d) failed with error code %d", displayIndex, ret);
214 int ret = gf_layer_attach(&d->
layer, d->
display, layerIndex, flags);
215 if (ret != GF_ERR_OK) {
216 qWarning(
"QQnxScreen: gf_layer_attach(%d) failed with error code %d", layerIndex, ret);
231 if (ret != GF_ERR_OK) {
232 qWarning(
"QQnxScreen: gf_surface_create_layer(%dx%d) failed with error code %d", w, h, ret);
238 gf_layer_enable(d->
layer);
240 ret = gf_layer_update(d->
layer, 0);
241 if (ret != GF_ERR_OK) {
242 qWarning(
"QQnxScreen: gf_layer_update() failed with error code %d\n", ret);
246 ret = gf_context_create(&d->
context);
247 if (ret != GF_ERR_OK) {
248 qWarning(
"QQnxScreen: gf_context_create() failed with error code %d", ret);
253 if (ret != GF_ERR_OK) {
254 qWarning(
"QQnxScreen: gf_context_set_surface() failed with error code %d", ret);
268 #ifndef QT_NO_QWS_MULTIPROCESS 270 unsigned sidlist[64];
271 int n = gf_surface_sidlist(d->
device, sidlist);
272 for (
int i = 0; i < n; ++i) {
274 if (ret == GF_ERR_OK) {
278 unsigned flags = GF_SURFACE_CPU_LINEAR_READABLE | GF_SURFACE_CPU_LINEAR_WRITEABLE;
287 qWarning(
"QQnxScreen: cannot attach to an usable surface; create a new one.");
291 GF_SURFACE_CREATE_CPU_FAST_ACCESS | GF_SURFACE_CREATE_CPU_LINEAR_ACCESSIBLE
292 | GF_SURFACE_CREATE_PHYS_CONTIG | GF_SURFACE_CREATE_SHAREABLE);
293 if (ret != GF_ERR_OK) {
294 qWarning(
"QQnxScreen: gf_surface_create(%dx%d) failed with error code %d",
302 qWarning(
"QQnxScreen: gf_surface_get_info() failed.");
328 if (params.
indexOf(deviceRegExp) != -1)
329 deviceIndex = deviceRegExp.
cap(1).
toInt();
335 qDebug(
"QQnxScreen: Attached to Device, number of displays: %d",
d->
deviceInfo.ndisplays);
341 if (params.
indexOf(displayRegexp) != -1)
342 displayIndex = displayRegexp.
cap(1).
toInt();
348 qDebug(
"QQnxScreen: Attached to Display %d, resolution %dx%d, refresh %d Hz",
355 if (params.
indexOf(layerRegexp) != -1)
356 layerIndex = layerRegexp.
cap(1).
toInt();
364 #if defined(QT_QWS_DEPTH_32) || defined(QT_QWS_DEPTH_GENERIC) 365 case GF_FORMAT_ARGB8888:
368 case GF_FORMAT_BGRA8888:
372 #if defined(QT_QWS_DEPTH_24) 373 case GF_FORMAT_BGR888:
378 #if defined(QT_QWS_DEPTH_16) || defined(QT_QWS_DEPTH_GENERIC) 379 case GF_FORMAT_PACK_RGB565:
380 case GF_FORMAT_PKLE_RGB565:
381 case GF_FORMAT_PKBE_RGB565:
382 #if Q_BYTE_ORDER == Q_BIG_ENDIAN 398 const int defaultDpi = 72;
404 if (params.
indexOf(mmWidthRegexp) != -1)
408 if (params.
indexOf(mmHeightRegexp) != -1)
461 qWarning(
"QQnxScreen: Unable to change mode, use io-display instead.");
469 gf_modeinfo_t displayMode;
470 for (
int i = 0; gf_display_query_mode(
d->
display, i, &displayMode) == GF_ERR_OK; ++i) {
471 switch (displayMode.primary_format) {
472 #if defined(QT_QWS_DEPTH_32) || defined(QT_QWS_DEPTH_GENERIC) 473 case GF_FORMAT_ARGB8888:
474 case GF_FORMAT_BGRA8888:
479 #if defined(QT_QWS_DEPTH_24) 480 case GF_FORMAT_BGR888:
485 #if defined(QT_QWS_DEPTH_16) || defined(QT_QWS_DEPTH_GENERIC) 486 case GF_FORMAT_PACK_RGB565:
487 case GF_FORMAT_PKLE_RGB565:
488 case GF_FORMAT_PKBE_RGB565:
506 int ret = gf_display_set_dpms(
d->
display, on ? GF_DPMS_OFF : GF_DPMS_ON);
507 if (ret != GF_ERR_OK)
508 qWarning(
"QQnxScreen: gf_display_set_dpms() failed with error code %d", ret);
523 #ifndef QT_NO_QWS_TRANSFORMED 535 int ret = gf_draw_begin(
d->
context);
536 if (ret != GF_ERR_OK) {
537 qWarning(
"QQnxScreen: gf_draw_begin() failed with error code %d", ret);
546 if (ret != GF_ERR_OK)
547 qWarning(
"QQnxScreen: gf_draw_blit2() failed with error code %d", ret);
552 if (ret != GF_ERR_OK)
553 qWarning(
"QQnxScreen: gf_draw_flush() failed with error code %d", ret);
559 #ifndef QT_NO_QWS_TRANSFORMED 569 int ret = gf_draw_begin(
d->
context);
571 if (ret != GF_ERR_OK) {
572 qWarning(
"QQnxScreen: gf_draw_begin() failed with error code %d in setDirty", ret);
579 if (ret != GF_ERR_OK)
580 qWarning(
"QQnxScreen: gf_draw_blit2() failed with error code %d in setDirty", ret);
583 if (ret != GF_ERR_OK)
584 qWarning(
"QQnxScreen: gf_draw_flush() failed with error code %d in setDirty", ret);
Q_GUI_EXPORT QScreen * qt_screen
QString cap(int nth=0) const
Returns the text captured by the nth subexpression.
#define QT_END_NAMESPACE
This macro expands to.
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 ...
bool supportsDepth(int) const
Reimplemented Function
void setDirty(const QRect &)
Marks the given rectangle as dirty.
int width() const
Returns the width of the rectangle.
void shutdownDevice()
Reimplemented Function
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
int physHeight
the physical height of the screen in millimeters.
int height() const
Returns the height of the rectangle.
int bottom() const
Returns the y-coordinate of the rectangle's bottom edge.
The QString class provides a Unicode character string.
int size
the number of bytes in the visible region of the frame buffer
static bool attachDevice(QQnxScreenContext *const d, const char *name)
Attaches to the named device name.
static void initSoftwareCursor()
Initializes the screen cursor.
PixelType pixeltype
set to BGRPixel
int physWidth
the physical width of the screen in millimeters.
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
~QQnxScreen()
Destroys this QQnxScreen object.
bool connect(const QString &displaySpec)
Connects to QNX's io-display based device based on the displaySpec parameters from the QWS_DISPLAY en...
void setPixelFormat(QImage::Format format)
Sets the screen's pixel format to format.
Q_CORE_EXPORT void qDebug(const char *,...)
void blank(bool on)
Reimplemented Function
uchar * data
points to the first visible pixel in the frame buffer.
void disconnect()
Reimplemented Function
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...
#define QT_BEGIN_NAMESPACE
This macro expands to.
static bool createHwSurface(QQnxScreenContext *const d, int w, int h)
The QStringList class provides a list of strings.
int w
the logical width of the screen.
Q_CORE_EXPORT void qWarning(const char *,...)
The QRegion class specifies a clip region for a painter.
bool isEmpty() const
Returns true if the rectangle is empty, otherwise returns false.
void exposeRegion(QRegion r, int changing)
Reimplemented Function
int right() const
Returns the x-coordinate of the rectangle's right edge.
int y() const
Returns the y-coordinate of the rectangle's top edge.
QQnxScreen(int display_id)
Constructs a QQnxScreen object.
void setFrameBufferLittleEndian(bool littleEndian)
int x() const
Returns the x-coordinate of the rectangle's left edge.
virtual bool isTransformed() const
Returns true if the screen is transformed (for instance, rotated 90 degrees); otherwise returns false...
QVector< QRect > rects() const
Returns an array of non-overlapping rectangles that make up the region.
The QRect class defines a rectangle in the plane using integer precision.
static bool attachLayer(QQnxScreenContext *const d, int layerIndex)
Attaches to the layer layerIndex.
The QScreen class is a base class for screen drivers in Qt for Embedded Linux.
gf_surface_info_t memSurfaceInfo
static bool attachDisplay(QQnxScreenContext *const d, int displayIndex)
Attaches to the display at index displayIndex.
void setMode(int, int, int)
QQnxScreen doesn't support setting the mode, use io-display instead.
int lstep
the number of bytes representing a line in the frame buffer.
#define Q_FOREACH(variable, container)
Same as foreach(variable, container).
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...
gf_display_info_t displayInfo
int h
the logical height of the screen.
virtual void exposeRegion(QRegion r, int changing)
This function is called by the Qt for Embedded Linux server whenever a screen update is required...
int mapsize
the total number of bytes in the frame buffer
QQnxScreenContext *const d
static Type type()
Returns the type of application (Tty , GuiClient, or GuiServer).
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
static bool createMemSurface(QQnxScreenContext *const d, int w, int h)
Q_DECL_CONSTEXPR int qRound(qreal d)
int depth() const
Returns the depth of the framebuffer, in bits per pixel.
bool initDevice()
Reimplemented Function