44 #ifndef QT_NO_QWS_LINUXFB 48 #include <private/qwssignalhandler_p.h> 49 #include <private/qcore_unix_p.h> 53 #include <sys/ioctl.h> 54 #include <sys/types.h> 66 #if !defined(Q_OS_DARWIN) && !defined(Q_OS_FREEBSD) 97 #ifdef QT_QWS_DEPTH_GENERIC 108 #ifdef QT_QWS_DEPTH_GENERIC
109 doGenericColors(false),
113 #ifndef QT_NO_QWS_SIGNALHANDLER 125 const char *
const devs[] = {
"/dev/tty0",
"/dev/tty",
"/dev/console", 0};
128 for (
const char *
const *dev = devs; *dev; ++dev) {
143 int ret = ioctl(
ttyfd, KDSETMODE, KD_GRAPHICS);
150 const char termctl[] =
"\033[9;0]\033[?33l\033[?25l\033[?1c";
163 const char termctl[] =
"\033[9;15]\033[?33h\033[?25h\033[?0c";
200 if(!strcmp(finfo.id,
"8TRACKFB") && vinfo.bits_per_pixel == 1) {
201 vinfo.bits_per_pixel = 8;
202 finfo.line_length = vinfo.xres;
269 #ifdef QT_QWS_CLIENTBLIT 270 setSupportsBlitInClients(
true);
280 #ifdef QT_NO_QWS_SIGNALHANDLER 309 #ifdef QT_QWS_DEPTH_GENERIC
311 d_ptr->doGenericColors =
true;
315 if (args.
indexOf(ttyRegExp) != -1)
318 #if Q_BYTE_ORDER == Q_BIG_ENDIAN 319 #ifndef QT_QWS_FRAMEBUFFER_LITTLE_ENDIAN 337 perror(
"QScreenLinuxFb::connect");
345 ::fb_fix_screeninfo finfo;
346 ::fb_var_screeninfo vinfo;
349 memset(&vinfo, 0,
sizeof(vinfo));
350 memset(&finfo, 0,
sizeof(finfo));
354 if (
d_ptr->
fd != -1 && ioctl(
d_ptr->
fd, FBIOGET_FSCREENINFO, &finfo)) {
355 perror(
"QLinuxFbScreen::connect");
356 qWarning(
"Error reading fixed information");
362 if (finfo.type == FB_TYPE_VGA_PLANES) {
363 qWarning(
"VGA16 video mode not supported");
368 if (
d_ptr->
fd != -1 && ioctl(
d_ptr->
fd, FBIOGET_VSCREENINFO, &vinfo)) {
369 perror(
"QLinuxFbScreen::connect");
370 qWarning(
"Error reading variable information");
377 d = vinfo.bits_per_pixel;
379 d = vinfo.red.
length + vinfo.green.length + vinfo.blue.length;
382 }
else if (d == 16) {
383 d = vinfo.red.
length + vinfo.green.length + vinfo.blue.length;
387 lstep = finfo.line_length;
389 int xoff = vinfo.xoffset;
390 int yoff = vinfo.yoffset;
392 if((qwssize=::getenv(
"QWS_SIZE")) && sscanf(qwssize,
"%dx%d",&
w,&
h)==2) {
394 if ((
uint)
w > vinfo.xres)
w = vinfo.xres;
395 if ((
uint)
h > vinfo.yres)
h = vinfo.yres;
400 if (sscanf(qwssize,
"%*dx%*d+%d+%d", &xxoff, &yyoff) == 2) {
401 if (xxoff < 0 || xxoff + w > (
int)vinfo.xres)
402 xxoff = vinfo.xres -
w;
403 if (yyoff < 0 || yyoff + h > (
int)vinfo.yres)
404 yyoff = vinfo.yres -
h;
408 xoff += (vinfo.xres -
w)/2;
409 yoff += (vinfo.yres -
h)/2;
416 if (
w == 0 ||
h == 0) {
417 qWarning(
"QScreenLinuxFb::connect(): Unable to find screen geometry, " 418 "will use 320x240.");
428 int dimIdxW = displayArgs.
indexOf(mmWidthRx);
430 int dimIdxH = displayArgs.
indexOf(mmHeightRx);
443 if (dimIdxW < 0 && dimIdxH < 0) {
444 if (vinfo.width != 0 && vinfo.height != 0
445 && vinfo.width != UINT_MAX && vinfo.height != UINT_MAX) {
463 data = (
unsigned char *)-1;
465 data = (
unsigned char *)mmap(0,
mapsize, PROT_READ | PROT_WRITE,
468 if ((
long)
data == -1) {
470 perror(
"QLinuxFbScreen::connect");
471 qWarning(
"Error: failed to map framebuffer device to memory.");
484 if((vinfo.bits_per_pixel==8) || (vinfo.bits_per_pixel==4)) {
485 screencols= (vinfo.bits_per_pixel==8) ? 256 : 16;
490 startcmap.red=(
unsigned short int *)
491 malloc(
sizeof(
unsigned short int)*
screencols);
492 startcmap.green=(
unsigned short int *)
493 malloc(
sizeof(
unsigned short int)*
screencols);
494 startcmap.blue=(
unsigned short int *)
495 malloc(
sizeof(
unsigned short int)*
screencols);
496 startcmap.transp=(
unsigned short int *)
497 malloc(
sizeof(
unsigned short int)*
screencols);
498 if (
d_ptr->
fd == -1 || ioctl(
d_ptr->
fd, FBIOGETCMAP, &startcmap)) {
499 perror(
"QLinuxFbScreen::connect");
500 qWarning(
"Error reading palette from framebuffer, using default palette");
506 startcmap.green[loopc] >> 8,
507 startcmap.blue[loopc] >> 8);
508 bits_used |= startcmap.red[loopc]
509 | startcmap.green[loopc]
510 | startcmap.blue[loopc];
514 if ((bits_used & 0x00ff) && !(bits_used & 0xff00)) {
517 startcmap.green[loopc],
518 startcmap.blue[loopc]);
520 qWarning(
"8 bits cmap returned due to faulty FB driver, colors corrected");
523 free(startcmap.green);
524 free(startcmap.blue);
525 free(startcmap.transp);
556 if((vinfo.bits_per_pixel==8) || (vinfo.bits_per_pixel==4)) {
557 screencols= (vinfo.bits_per_pixel==8) ? 256 : 16;
560 cmap.red=(
unsigned short int *)
561 malloc(
sizeof(
unsigned short int)*
screencols);
562 cmap.green=(
unsigned short int *)
563 malloc(
sizeof(
unsigned short int)*
screencols);
564 cmap.blue=(
unsigned short int *)
565 malloc(
sizeof(
unsigned short int)*
screencols);
566 cmap.transp=(
unsigned short int *)
567 malloc(
sizeof(
unsigned short int)*
screencols);
570 if (finfo.type == FB_TYPE_PACKED_PIXELS) {
573 for (
int idx = 0; idx < 16; ++idx, val += 17) {
574 cmap.red[idx] = (val<<8)|val;
575 cmap.green[idx] = (val<<8)|val;
576 cmap.blue[idx] = (val<<8)|val;
583 unsigned char reds[16] = { 0x00, 0x7F, 0xBF, 0xFF, 0xFF, 0xA2, 0x00, 0xFF, 0xFF, 0x00, 0x7F, 0x7F, 0x00, 0x00, 0x00, 0x82 };
584 unsigned char greens[16] = { 0x00, 0x7F, 0xBF, 0xFF, 0x00, 0xC5, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x7F, 0x7F, 0x7F };
585 unsigned char blues[16] = { 0x00, 0x7F, 0xBF, 0xFF, 0x00, 0x11, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x7F, 0x7F, 0x7F, 0x00, 0x00 };
587 for (
int idx = 0; idx < 16; ++idx) {
588 cmap.red[idx] = ((reds[idx]) << 8)|reds[idx];
589 cmap.green[idx] = ((greens[idx]) << 8)|greens[idx];
590 cmap.blue[idx] = ((blues[idx]) << 8)|blues[idx];
591 cmap.transp[idx] = 0;
600 int bval = screencols == 256 ? i : (i << 4);
601 ushort val = (bval << 8) | bval;
611 for(
int ir = 0x0; ir <= 0xff; ir+=0x33) {
612 for(
int ig = 0x0; ig <= 0xff; ig+=0x33) {
613 for(
int ib = 0x0; ib <= 0xff; ib+=0x33) {
614 cmap.red[idx] = (ir << 8)|ir;
615 cmap.green[idx] = (ig << 8)|ig;
616 cmap.blue[idx] = (ib << 8)|ib;
617 cmap.transp[idx] = 0;
624 for (
int loopc=0; loopc<40; ++loopc) {
631 }
else if(finfo.visual==FB_VISUAL_DIRECTCOLOR) {
633 int rbits=0,gbits=0,bbits=0;
634 switch (vinfo.bits_per_pixel) {
636 rbits=vinfo.red.length;
637 gbits=vinfo.green.length;
638 bbits=vinfo.blue.length;
639 if(rbits==0 && gbits==0 && bbits==0) {
667 cmap.red=(
unsigned short int *)
668 malloc(
sizeof(
unsigned short int)*256);
669 cmap.green=(
unsigned short int *)
670 malloc(
sizeof(
unsigned short int)*256);
671 cmap.blue=(
unsigned short int *)
672 malloc(
sizeof(
unsigned short int)*256);
673 cmap.transp=(
unsigned short int *)
674 malloc(
sizeof(
unsigned short int)*256);
675 for(
unsigned int i = 0x0; i < cmap.len; i++) {
676 cmap.red[i] = i*65535/((1<<rbits)-1);
677 cmap.green[i] = i*65535/((1<<gbits)-1);
678 cmap.blue[i] = i*65535/((1<<bbits)-1);
701 fb_var_screeninfo vinfo;
702 fb_fix_screeninfo finfo;
705 memset(&vinfo, 0,
sizeof(vinfo));
706 memset(&finfo, 0,
sizeof(finfo));
709 if (ioctl(
d_ptr->
fd, FBIOGET_VSCREENINFO, &vinfo)) {
710 perror(
"QLinuxFbScreen::initDevice");
711 qFatal(
"Error reading variable information in card init");
716 qDebug(
"Greyscale %d",vinfo.grayscale);
717 qDebug(
"Nonstd %d",vinfo.nonstd);
718 qDebug(
"Red %d %d %d",vinfo.red.offset,vinfo.red.length,
719 vinfo.red.msb_right);
720 qDebug(
"Green %d %d %d",vinfo.green.offset,vinfo.green.length,
721 vinfo.green.msb_right);
722 qDebug(
"Blue %d %d %d",vinfo.blue.offset,vinfo.blue.length,
723 vinfo.blue.msb_right);
724 qDebug(
"Transparent %d %d %d",vinfo.transp.offset,vinfo.transp.length,
725 vinfo.transp.msb_right);
728 if (ioctl(
d_ptr->
fd, FBIOGET_FSCREENINFO, &finfo)) {
729 perror(
"QLinuxFbScreen::initDevice");
730 qCritical(
"Error reading fixed information in card init");
745 if(!::getenv(
"QWS_NOMTRR")) {
751 sentry.base=(
unsigned long int)finfo.smem_start;
757 unsigned int size=finfo.smem_len;
761 sentry.type=MTRR_TYPE_WRCOMB;
762 if(ioctl(mfd,MTRRIOC_ADD_ENTRY,&sentry)==-1) {
772 if ((vinfo.bits_per_pixel==8) || (vinfo.bits_per_pixel==4) || (finfo.visual==FB_VISUAL_DIRECTCOLOR))
776 if (ioctl(
d_ptr->
fd, FBIOPUTCMAP, &cmap)) {
777 perror(
"QLinuxFbScreen::initDevice");
778 qWarning(
"Error writing palette to framebuffer");
801 #ifdef QT_QWS_DEPTH_GENERIC 803 &&
d_ptr->doGenericColors)
805 qt_set_generic_blit(
this, vinfo.bits_per_pixel,
806 vinfo.red.length, vinfo.green.length,
807 vinfo.blue.length, vinfo.transp.length,
808 vinfo.red.offset, vinfo.green.offset,
809 vinfo.blue.offset, vinfo.transp.offset);
813 #ifndef QT_NO_QWS_CURSOR 838 if (pos > *
entryp || pos < 0) {
844 qDebug(
"Remove entry: %d", pos);
860 int size = (*entryp)-pos;
872 qDebug(
"Insert entry: %d, %d -> %d", pos, start, end);
875 if (start < (
int)*
lowest) {
878 qDebug(
" moved lowest to %d", *lowest);
890 int size=(*entryp)-pos;
923 if (startp >= (
int)*
lowest) {
926 qDebug(
"No room for pool entry in VRAM");
936 for (
int loopc = 0; loopc < *
entryp-1; loopc++) {
939 if (freestart != freeend) {
940 while (freestart % align) {
943 int len=freeend-freestart;
947 return data+freestart;
955 int newlowest = (*lowest)-amount;
956 if (newlowest % align) {
958 while (newlowest % align) {
962 if (startp >= newlowest) {
965 qDebug(
"No VRAM available for %d bytes", amount);
972 return data + newlowest;
1013 unsigned long pos=(
unsigned long)c;
1014 pos-=((
unsigned long)
data);
1015 unsigned int hold=(*entryp);
1016 for(
unsigned int loopc=1;loopc<hold;loopc++) {
1017 if (
entries[loopc].start==pos) {
1021 qWarning(
"Attempt to delete client id %d cache entry",
1028 qWarning(
"Attempt to delete unknown offset %ld",pos);
1046 for (
int loopc = 0; loopc < *(screen->
entryp); loopc++) {
1068 unsigned long pos = (
unsigned long)
data;
1071 lowest = ((
unsigned int *)pos)+1;
1072 pos += (
sizeof(int))*4;
1125 cmap.
red=(
unsigned short int *)
1126 malloc(
sizeof(
unsigned short int)*256);
1127 cmap.green=(
unsigned short int *)
1128 malloc(
sizeof(
unsigned short int)*256);
1129 cmap.blue=(
unsigned short int *)
1130 malloc(
sizeof(
unsigned short int)*256);
1131 cmap.transp=(
unsigned short int *)
1132 malloc(
sizeof(
unsigned short int)*256);
1134 cmap.green[0]=g << 8;
1135 cmap.blue[0]=b << 8;
1137 ioctl(
d_ptr->
fd, FBIOPUTCMAP, &cmap);
1165 fb_fix_screeninfo finfo;
1166 fb_var_screeninfo vinfo;
1169 memset(&vinfo, 0,
sizeof(vinfo));
1170 memset(&finfo, 0,
sizeof(finfo));
1173 if (ioctl(
d_ptr->
fd, FBIOGET_VSCREENINFO, &vinfo)) {
1174 perror(
"QLinuxFbScreen::setMode");
1175 qFatal(
"Error reading variable information in mode change");
1180 vinfo.bits_per_pixel=nd;
1182 if (ioctl(
d_ptr->
fd, FBIOPUT_VSCREENINFO, &vinfo)) {
1183 perror(
"QLinuxFbScreen::setMode");
1184 qCritical(
"Error writing variable information in mode change");
1187 if (ioctl(
d_ptr->
fd, FBIOGET_VSCREENINFO, &vinfo)) {
1188 perror(
"QLinuxFbScreen::setMode");
1189 qFatal(
"Error reading changed variable information in mode change");
1192 if (ioctl(
d_ptr->
fd, FBIOGET_FSCREENINFO, &finfo)) {
1193 perror(
"QLinuxFbScreen::setMode");
1194 qFatal(
"Error reading fixed information");
1239 if ((
d == 8) || (
d == 4)) {
1243 cmap.red=(
unsigned short int *)
1244 malloc(
sizeof(
unsigned short int)*256);
1245 cmap.green=(
unsigned short int *)
1246 malloc(
sizeof(
unsigned short int)*256);
1247 cmap.blue=(
unsigned short int *)
1248 malloc(
sizeof(
unsigned short int)*256);
1249 cmap.transp=(
unsigned short int *)
1250 malloc(
sizeof(
unsigned short int)*256);
1251 for (
int loopc = 0; loopc <
screencols; loopc++) {
1255 cmap.transp[loopc] = 0;
1257 ioctl(
d_ptr->
fd, FBIOPUTCMAP, &cmap);
1307 #if defined(QT_QWS_IPAQ) 1309 system(
"apm -suspend");
1315 #if defined(FBIOBLANK) 1316 #if defined(VESA_POWERDOWN) && defined(VESA_NO_BLANKING) 1317 ioctl(
d_ptr->
fd, FBIOBLANK, on ? VESA_POWERDOWN : VESA_NO_BLANKING);
1319 ioctl(
d_ptr->
fd, FBIOBLANK, on ? 1 : 0);
1329 const fb_bitfield rgba[4] = { info.red, info.green,
1330 info.blue, info.transp };
1336 const fb_bitfield argb8888[4] = {{16, 8, 0}, {8, 8, 0},
1337 {0, 8, 0}, {24, 8, 0}};
1338 const fb_bitfield abgr8888[4] = {{0, 8, 0}, {8, 8, 0},
1339 {16, 8, 0}, {24, 8, 0}};
1340 if (memcmp(rgba, argb8888, 4 *
sizeof(fb_bitfield)) == 0) {
1342 }
else if (memcmp(rgba, argb8888, 3 *
sizeof(fb_bitfield)) == 0) {
1344 }
else if (memcmp(rgba, abgr8888, 3 *
sizeof(fb_bitfield)) == 0) {
1351 const fb_bitfield rgb888[4] = {{16, 8, 0}, {8, 8, 0},
1352 {0, 8, 0}, {0, 0, 0}};
1353 const fb_bitfield bgr888[4] = {{0, 8, 0}, {8, 8, 0},
1354 {16, 8, 0}, {0, 0, 0}};
1355 if (memcmp(rgba, rgb888, 3 *
sizeof(fb_bitfield)) == 0) {
1357 }
else if (memcmp(rgba, bgr888, 3 *
sizeof(fb_bitfield)) == 0) {
1364 const fb_bitfield rgb666[4] = {{12, 6, 0}, {6, 6, 0},
1365 {0, 6, 0}, {0, 0, 0}};
1366 if (memcmp(rgba, rgb666, 3 *
sizeof(fb_bitfield)) == 0)
1371 const fb_bitfield rgb565[4] = {{11, 5, 0}, {5, 6, 0},
1372 {0, 5, 0}, {0, 0, 0}};
1373 const fb_bitfield bgr565[4] = {{0, 5, 0}, {5, 6, 0},
1374 {11, 5, 0}, {0, 0, 0}};
1375 if (memcmp(rgba, rgb565, 3 *
sizeof(fb_bitfield)) == 0) {
1377 }
else if (memcmp(rgba, bgr565, 3 *
sizeof(fb_bitfield)) == 0) {
1384 const fb_bitfield rgb1555[4] = {{10, 5, 0}, {5, 5, 0},
1385 {0, 5, 0}, {15, 1, 0}};
1386 const fb_bitfield bgr1555[4] = {{0, 5, 0}, {5, 5, 0},
1387 {10, 5, 0}, {15, 1, 0}};
1388 if (memcmp(rgba, rgb1555, 3 *
sizeof(fb_bitfield)) == 0) {
1390 }
else if (memcmp(rgba, bgr1555, 3 *
sizeof(fb_bitfield)) == 0) {
1397 const fb_bitfield rgb444[4] = {{8, 4, 0}, {4, 4, 0},
1398 {0, 4, 0}, {0, 0, 0}};
1399 if (memcmp(rgba, rgb444, 3 *
sizeof(fb_bitfield)) == 0)
1427 #endif // QT_NO_QWS_LINUXFB QLinuxFbScreen::DriverTypes driverType
int screencols
the number of entries in the color table
QLinuxFbScreenPrivate * d_ptr
Format
The following image formats are available in Qt.
virtual bool useOffscreen()
static mach_timebase_info_data_t info
QString cap(int nth=0) const
Returns the text captured by the nth subexpression.
#define QT_END_NAMESPACE
This macro expands to.
virtual void setDirty(const QRect &)
Reimplemented Function
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 ...
Q_GUI_EXPORT QWSDisplay * qt_fbdpy
DriverTypes
This enum describes the driver type.
int length() const
Returns the number of characters in this string.
QRgb screenclut[256]
the color table
int left() const
Returns the x-coordinate of the rectangle's left edge.
int width() const
Returns the width of the rectangle.
bool startsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string starts with s; otherwise returns false.
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
virtual void setMode(int, int, int)
Sets the framebuffer to a new resolution and bit depth.
volatile unsigned int rop
static ClearCacheFunc clearCacheFunc
int physHeight
the physical height of the screen in millimeters.
ushort red
Returns the red color component of this color.
int height() const
Returns the height of the rectangle.
The QString class provides a Unicode character string.
int size
the number of bytes in the visible region of the frame buffer
The QObject class is the base class of all Qt objects.
static void initSoftwareCursor()
Initializes the screen cursor.
virtual int pixmapOffsetAlignment()
Returns the value (in bits) to which the start address of pixmaps held in the graphics card's memory...
virtual ~QLinuxFbScreen()
Destroys this QLinuxFbScreen object.
PixelType pixeltype
set to BGRPixel
int physWidth
the physical width of the screen in millimeters.
virtual void save()
This doesn't do anything; accelerated drivers may wish to reimplement it to save graphics cards regis...
void addObject(QObject *object)
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
Q_GUI_EXPORT_INLINE int qRed(QRgb rgb)
void setPixelFormat(QImage::Format format)
Sets the screen's pixel format to format.
static QWSSignalHandler * instance()
Q_CORE_EXPORT void qDebug(const char *,...)
virtual QRegion region() const
Returns the region covered by this screen driver.
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.
int access(const char *, int)
virtual void uncache(uchar *)
Deletes the specified memoryBlock allocated from the graphics card memory.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
virtual uchar * cache(int)
Requests the specified amount of offscreen graphics card memory from the memory manager, and returns a pointer to the data within the framebuffer (or 0 if there is no free memory).
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.
Q_CORE_EXPORT void qWarning(const char *,...)
virtual void blank(bool on)
Reimplemented Function
void createPalette(fb_cmap &cmap, fb_var_screeninfo &vinfo, fb_fix_screeninfo &finfo)
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal...
static QScreen * instance()
Returns a pointer to the application's QScreen instance.
QBool contains(const QString &str, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the list contains the string str; otherwise returns false.
QByteArray toLatin1() const Q_REQUIRED_RESULT
Returns a Latin-1 representation of the string as a QByteArray.
virtual void fixupScreenInfo(fb_fix_screeninfo &finfo, fb_var_screeninfo &vinfo)
Adjust the values returned by the framebuffer driver, to work around driver bugs or nonstandard behav...
virtual void restore()
This is called when the virtual console is switched back to Qt for Embedded Linux and restores the pa...
Q_GUI_EXPORT_INLINE int qBlue(QRgb rgb)
const char * constData() const
Returns a pointer to the data stored in the byte array.
virtual bool connect(const QString &displaySpec)
This is called by Qt for Embedded Linux clients to map in the framebuffer.
Q_CORE_EXPORT void qFatal(const char *,...)
int top() const
Returns the y-coordinate of the rectangle's top edge.
QImage::Format pixelFormat() const
Returns the pixel format of the screen, or QImage::Format_Invalid if the pixel format is not a suppor...
QLinuxFbScreen(int display_id)
Constructs a QLinuxFbScreen object.
void deleteEntry(uchar *)
Deletes the specified memoryBlock allocated from the graphics card memory.
virtual bool initDevice()
This is called by the Qt for Embedded Linux server at startup time.
static void clearCache(QScreen *instance, int)
Removes all entries from the cache for the specified screen instance and client identified by the giv...
void setFrameBufferLittleEndian(bool littleEndian)
Q_GUI_EXPORT_INLINE QRgb qRgb(int r, int g, int b)
virtual void disconnect()
This unmaps the framebuffer.
QByteArray toAscii() const Q_REQUIRED_RESULT
Returns an 8-bit representation of the string as a QByteArray.
if(void) toggleToolbarShown
The QRect class defines a rectangle in the plane using integer precision.
bool grayscale
the gray scale screen mode flag
void setPixelFormat(struct fb_var_screeninfo)
The QScreen class is a base class for screen drivers in Qt for Embedded Linux.
Q_GUI_EXPORT_INLINE int qGreen(QRgb rgb)
bool exactMatch(const QString &str) const
Returns true if str is matched exactly by this regular expression; otherwise returns false...
QScopedPointer< QObjectData > d_ptr
int lstep
the number of bytes representing a line in the frame buffer.
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...
int h
the logical height of the screen.
void insert_entry(int, int, int)
virtual void exposeRegion(QRegion r, int changing)
This function is called by the Qt for Embedded Linux server whenever a screen update is required...
volatile unsigned int buffer_offset
static const KeyPair *const end
int mapsize
the total number of bytes in the frame buffer
The QLinuxFbScreen class implements a screen driver for the Linux framebuffer.
#define qPrintable(string)
static Type type()
Returns the type of application (Tty , GuiClient, or GuiServer).
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
virtual int sharedRamSize(void *)
Q_DECL_CONSTEXPR int qRound(qreal d)
virtual void shutdownDevice()
This is called by the Qt for Embedded Linux server when it shuts down, and should be inherited if you...
Q_CORE_EXPORT void qCritical(const char *,...)
virtual void set(unsigned int, unsigned int, unsigned int, unsigned int)
Sets the specified color index to the specified RGB value, (red, green, blue), when in paletted graph...