46 #include "private/qapplication_p.h" 61 #include "private/qtransportauth_qws_p.h" 63 #include "private/qwscommand_qws_p.h" 68 #include "private/qlock_p.h" 69 #include "private/qwslock_p.h" 74 #include "private/qwindowsystem_p.h" 78 #include "private/qwsdisplay_qws_p.h" 79 #include "private/qwsinputcontext_p.h" 84 #include "private/qcursor_p.h" 88 #if !defined(QT_NO_GLIB) 93 #include "private/qwidget_p.h" 94 #include "private/qbackingstore_p.h" 95 #include "private/qwindowsurface_qws_p.h" 96 #include "private/qfont_p.h" 105 #include <sys/stat.h> 106 #include <sys/types.h> 112 #ifndef QT_NO_DIRECTPAINTER 115 #ifndef QT_NO_QWSEMBEDWIDGET 119 #endif // QT_NO_DIRECTPAINTER 150 #ifndef QT_NO_QWS_MANAGER 157 #if defined(QT_DEBUG) 189 #if defined(Q_OS_INTEGRITY) 191 WaitForFileSystemInitialization();
194 if (QT_MKDIR(dataDir, 0700)) {
195 if (
errno != EEXIST) {
196 qFatal(
"Cannot create Qt for Embedded Linux data directory: %s", dataDir.
constData());
201 if (QT_LSTAT(dataDir, &buf))
202 qFatal(
"stat failed for Qt for Embedded Linux data directory: %s", dataDir.
constData());
207 #if !defined(Q_OS_INTEGRITY) && !defined(Q_OS_VXWORKS) && !defined(Q_OS_QNX) 208 if (buf.st_uid != getuid())
209 qFatal(
"Qt for Embedded Linux data directory is not owned by user %d: %s", getuid(), dataDir.
constData());
211 if ((buf.st_mode & 0677) != 0600)
212 qFatal(
"Qt for Embedded Linux data directory has incorrect permissions: %s", dataDir.
constData());
231 for (
int i = 0; i < subScreens.
size(); ++i) {
233 screen = subScreens.
at(i);
253 for (
int i = 0; i < l.
size(); ++i) {
255 QScreen *s = w->d_func()->getScreen();
258 w->d_func()->setMaxWindowState_helper();
260 w->d_func()->setFullScreenSize_helper();
264 if ( qt_desktopWidget )
268 #ifndef QT_NO_QWS_DYNAMICSCREENTRANSFORMATION 271 #ifndef QT_NO_QWS_TRANSFORMED 279 #ifdef QT_NO_QWS_TRANSFORMED 280 # ifndef QT_NO_LIBRARY 283 foreach (
const QString &path, paths) {
286 "qws_setScreenTransformation");
312 if (screenNo == -1 && !subScreens.
isEmpty())
315 if (subScreens.
isEmpty() && screenNo == 0) {
317 }
else if (screenNo < 0 || screenNo >= subScreens.
size()) {
318 qWarning(
"setScreenTransformation: invalid screen %i", screenNo);
322 if (screenNo < subScreens.
size())
323 screen = subScreens.
at(screenNo);
336 transformed = static_cast<QProxyScreen*>(transformed)->screen();
342 if (!setScreenTransformation)
364 if (qt_desktopWidget) {
381 for (
int i = list.
size() - 1; i >= 0; --i) {
384 w->d_func()->setFullScreenSize_helper();
386 w->d_func()->setMaxWindowState_helper();
390 #endif // QT_NO_QWS_DYNAMICSCREENTRANSFORMATION 435 bool translateKeyEvent(
const QWSKeyEvent *,
bool grab);
437 #ifndef QT_NO_QWSEMBEDWIDGET 441 void repaintDecoration(
QRegion r,
bool post);
449 return !isMaximized() && !isFullScreen();
456 #if !defined(QT_NO_GLIB) 500 #ifdef QT_NO_QWS_MULTIPROCESS 522 #ifndef QT_NO_QWS_CURSOR 525 #ifndef QT_NO_QWS_MULTIPROCESS 529 shutdownCmd.
write(csocket);
536 delete connected_event;
538 delete current_event;
541 delete qcop_response;
545 #ifndef QT_NO_QWS_MULTIPROCESS 548 return !clientLock || clientLock->lock(type, timeout);
553 if (clientLock) clientLock->unlock(type);
558 return !clientLock || clientLock->wait(type, timeout);
565 #endif // QT_NO_QWS_MULTIPROCESS 569 #ifndef QT_NO_QWS_MULTIPROCESS 571 csocket->waitForReadyRead(0);
578 void QWSDisplay::Data::debugQueue() {
579 for (
int i = 0; i < queue.size(); ++i) {
588 return mouse_event||queue.count() > 0;
597 region_events_count--;
598 }
else if (mouse_event) {
601 #ifdef QAPPLICATION_EXTRA_DEBUG 602 mouse_event_count = 0;
610 return queue.first();
615 #ifndef QT_NO_QWS_MULTIPROCESS 630 #ifndef QT_NO_QWS_MULTIPROCESS 638 #ifndef QT_NO_QWS_MULTIPROCESS 648 #ifndef QT_NO_QWS_MULTIPROCESS 653 while (csocket->bytesToWrite() > 0) {
654 if (!csocket->waitForBytesWritten(-1)) {
655 qCritical(
"QWSDisplay::Data::sendSynchronousCommand: %s",
670 int unusedIdCount = unused_identifiers.count();
671 if (unusedIdCount <= 10)
673 if (unusedIdCount == 0) {
678 return unused_identifiers.takeFirst();
686 #ifndef QT_NO_QWS_MULTIPROCESS 695 #endif // QT_NO_QWS_MULTIPROCESS 699 #ifndef QT_NO_QWS_MULTIPROCESS 704 delete connected_event;
706 region_events_count = 0;
711 region_offset_window = 0;
713 delete qcop_response;
716 delete current_event;
718 #ifdef QAPPLICATION_EXTRA_DEBUG 719 mouse_event_count = 0;
723 qt_desktopWidget = 0;
725 QWSDisplay::Data::clientLock = 0;
731 unused_identifiers.clear();
734 appName = newAppName;
735 qApp->setObjectName( appName );
740 csocket->connectToLocalFile(pipe);
742 QWSDisplay::Data::clientLock =
new QWSLock();
745 cmd.
setId(appName, QWSDisplay::Data::clientLock->
id());
752 csocket->socketDescriptor());
767 qFatal(
"Cannot get display lock");
769 if (shm.attach(connected_event->simpleData.servershmid)) {
770 sharedRam =
static_cast<uchar *
>(shm.address());
775 perror(
"QWSDisplay::Data::init");
776 qFatal(
"Client can't attach to main ram memory.");
787 sharedRamSize -=
sizeof(int);
788 qt_last_x =
reinterpret_cast<int *
>(sharedRam + sharedRamSize);
789 sharedRamSize -=
sizeof(int);
790 qt_last_y =
reinterpret_cast<int *
>(sharedRam + sharedRamSize);
802 region_events_count = 0;
808 region_offset_window = 0;
813 #ifdef QAPPLICATION_EXTRA_DEBUG 814 mouse_event_count = 0;
822 #ifndef QT_NO_QWS_MULTIPROCESS 828 QWSDisplay::Data::clientLock =
new QWSLock();
831 cmd.
setId(appName, QWSDisplay::Data::clientLock->
id());
837 csocket->socketDescriptor());
856 qFatal(
"Cannot get display lock");
858 if (shm.attach(connected_event->simpleData.servershmid)) {
859 sharedRam =
static_cast<uchar *
>(shm.address());
864 perror(
"QWSDisplay::Data::init");
865 qFatal(
"Client can't attach to main ram memory.");
880 qFatal(
"Cannot get display lock");
886 #ifndef QT_NO_QWS_MULTIPROCESS 888 if (!shm.create(sharedRamSize)) {
889 perror(
"Cannot create main ram shared memory\n");
890 qFatal(
"Unable to allocate %d bytes of shared memory", sharedRamSize);
893 sharedRam =
static_cast<uchar *
>(shm.address());
895 sharedRam=
static_cast<uchar *
>(malloc(sharedRamSize));
899 memset(sharedRam,0,sharedRamSize);
902 cmd.
setId(appName, -1);
911 #ifndef QT_NO_QWS_MULTIPROCESS 917 qFatal(
"Unable to initialize screen driver!");
920 sharedRamSize -=
sizeof(int);
921 qt_last_x =
reinterpret_cast<int *
>(sharedRam + sharedRamSize);
922 sharedRamSize -=
sizeof(int);
923 qt_last_y =
reinterpret_cast<int *
>(sharedRam + sharedRamSize);
936 #ifndef QT_NO_QWS_MULTIPROCESS 945 #ifdef QT_NO_QWS_MULTIPROCESS 951 if (!current_event) {
954 if (event_type >= 0) {
960 if (current_event->read(csocket)) {
977 #ifndef QT_NO_QWS_MULTIPROCESS 978 int bytesAvailable = csocket ? csocket->bytesAvailable() : 0;
982 #ifndef QT_NO_QWS_MULTIPROCESS 992 for (
int i = 0; i < count; ++i)
993 unused_identifiers.append(
id++);
1002 #ifdef QAPPLICATION_EXTRA_DEBUG 1003 static const char *defaultAction=
"INITIAL";
1004 const char * action = defaultAction;
1007 if (mouse_winid != me->
window ()
1010 mouse_winid = me->
window();
1013 #ifdef QAPPLICATION_EXTRA_DEBUG 1014 mouse_event_count = 0;
1018 #ifdef QAPPLICATION_EXTRA_DEBUG 1020 action =
"COMPRESS";
1021 mouse_event_count++;
1025 #ifdef QAPPLICATION_EXTRA_DEBUG 1026 if (me->
simpleData.
state !=0 || action != defaultAction || mouse_event_count != 0)
1027 qDebug(
"fillQueue %s (%d,%d), state %x win %d count %d", action,
1029 me->
window(), mouse_event_count);
1032 #ifndef QT_NO_QWS_MULTIPROCESS 1035 region_events_count++;
1039 #ifndef QT_NO_QWS_PROPERTIES 1047 data =
new char[len];
1048 memcpy(data, pe->
data, len) ;
1053 #endif // QT_NO_QWS_PROPERTIES 1056 setMaxWindowRect((static_cast<QWSMaxWindowRectEvent*>(e))->simpleData.rect);
1058 #ifndef QT_NO_QWS_DYNAMICSCREENTRANSFORMATION 1078 #ifndef QT_NO_QWS_MULTIPROCESS 1079 if (csocket && bytesRead >= bytesAvailable)
1086 #ifndef QT_NO_QWS_MULTIPROCESS 1094 int timeout =
qgetenv(
"QWS_CONNECTION_TIMEOUT").
toInt();
1096 qws_connection_timeout = timeout;
1100 while (!csocket->connectToLocalFile(pipe)) {
1101 if (++i > qws_connection_timeout) {
1102 qWarning(
"No Qt for Embedded Linux server appears to be running.");
1103 qWarning(
"If you want to run this program as a server,");
1104 qWarning(
"add the \"-qws\" command-line option.");
1113 connected_event = 0;
1117 if (connected_event)
1120 csocket->waitForReadyRead(1000);
1124 if (!connected_event)
1125 qFatal(
"Did not receive a connection event from the qws server");
1137 while (i < queue.size()) {
1149 csocket->waitForReadyRead(1000);
1154 for (
int i = 0; i < queue.size(); ) {
1169 qApp->qwsProcessEvent(ack);
1171 region_events_count--;
1179 int removedEventsCount = 0;
1183 bool ungrabbed =
false;
1194 csocket->waitForReadyRead(1000);
1203 for (
int i = 0; i < queue.size(); ) {
1212 removedEventsCount++;
1219 qApp->qwsProcessEvent(regionEvent);
1222 region_events_count -= removedEventsCount;
1230 return region_events_count > 0;
1233 #endif // QT_NO_QWS_MULTIPROCESS 1238 #ifndef QT_NO_QWS_MULTIPROCESS 1239 while (unused_identifiers.count() == 0) {
1242 csocket->waitForReadyRead(1000);
1250 #ifndef QT_NO_QWS_MULTIPROCESS 1258 csocket->waitForReadyRead(1000);
1271 #ifndef QT_NO_QWS_MULTIPROCESS 1274 csocket->waitForReadyRead(1000);
1278 queue.prepend(qcop_response);
1309 return lock->locked();
1328 QWSRegionManager *QWSDisplay::regionManager()
const 1336 #ifndef QT_NO_QWS_MULTIPROCESS 1340 return d->queueNotEmpty();
1365 #ifndef QT_NO_QWS_PROPERTIES 1372 d->sendCommand(cmd);
1382 d->sendCommand(cmd);
1392 cmd.
setData(data, strlen(data));
1393 d->sendCommand(cmd);
1401 d->sendCommand(cmd);
1409 if (
d->directServerConnection()) {
1410 const char *propertyData;
1411 bool retval =
qwsServer->d_func()->get_property(winId, property, propertyData, len);
1415 data =
new char[len];
1416 memcpy(data, propertyData, len) ;
1423 d->sendCommand(cmd);
1425 getPropertyLen = -2;
1426 getPropertyData = 0;
1428 #ifndef QT_NO_QWS_MULTIPROCESS 1429 d->waitForPropertyReply();
1432 len = getPropertyLen;
1433 data = getPropertyData;
1435 getPropertyLen = -2;
1436 getPropertyData = 0;
1441 #endif // QT_NO_QWS_PROPERTIES 1452 if (
d->directServerConnection()) {
1453 qwsServer->d_func()->set_altitude(&cmd);
1455 d->sendSynchronousCommand(cmd);
1464 if (
d->directServerConnection()) {
1467 d->sendCommand(cmd);
1478 if (
d->directServerConnection())
1479 qwsServer->d_func()->request_focus(&cmd);
1481 d->sendCommand(cmd);
1487 #ifdef QT_NO_QWS_MULTIPROCESS 1490 const int id = QWSDisplay::Data::clientLock ? QWSDisplay::Data::clientLock->
id() : -1;
1492 cmd.
setId(appName,
id);
1493 if (
d->directServerConnection())
1494 qwsServer->d_func()->set_identity(&cmd);
1496 d->sendCommand(cmd);
1504 if (
d->directServerConnection())
1507 d->sendCommand(cmd);
1514 if (
d->directServerConnection()) {
1515 qwsServer->d_func()->request_region(winId, surfaceKey,
1516 surfaceData, region);
1519 cmd.
setData(winId, surfaceKey, surfaceData, region);
1520 d->sendSynchronousCommand(cmd);
1526 if (
d->directServerConnection()) {
1527 qwsServer->d_func()->repaint_region(winId, windowFlags, opaque, r);
1552 d->sendSynchronousCommand(cmd);
1564 if (
d->directServerConnection()) {
1567 d->sendSynchronousCommand(cmd);
1576 if (
d->directServerConnection()) {
1577 qwsServer->d_func()->destroy_region(&cmd);
1579 d->sendCommand(cmd);
1583 #ifndef QT_NO_QWS_INPUTMETHODS 1593 if (
d->directServerConnection()) {
1596 d->sendCommand(cmd);
1608 if (
d->directServerConnection()) {
1611 d->sendCommand(cmd);
1625 if (
d->directServerConnection()) {
1626 qwsServer->d_func()->send_im_mouse(&cmd);
1628 d->sendCommand(cmd);
1642 lock =
new QLock(filename,
'd', create);
1644 if (!
lock->isValid()) {
1662 d->sendCommand(cmd);
1667 #ifdef QT_NO_QWS_PROPERTIES 1677 cmd.simpleData.selection = selectionProperty;
1679 d->sendCommand(cmd);
1699 const int dst_bpl = (width + 7) / 8;
1701 int dataLen = dst_bpl *
height;
1707 for (
int i = 0; i <
height; ++i) {
1708 memcpy(dst, cursSrc + i*src_bpl, dst_bpl);
1714 for (
int i = 0; i <
height; ++i) {
1715 memcpy(dst, maskSrc + i*src_bpl, dst_bpl);
1719 cmd.
setData(reinterpret_cast<char*>(data), dataLen*2);
1721 d->sendCommand(cmd);
1734 d->sendCommand(cmd);
1742 d->sendCommand(cmd);
1784 d->sendCommand(cmd);
1791 static_cast<QETWidget *
>(w)->repaintDecoration(
qApp->desktop()->rect(),
true);
1804 d->sendCommand(cmd);
1814 d->sendCommand(cmd);
1827 d->sendCommand(cmd);
1840 d->sendCommand(cmd);
1847 if(
d->directServerConnection()) {
1849 for (
int i = 0; i < qin->
count(); ++i) {
1867 if(
d->directServerConnection()) {
1870 return win->
winId();
1906 QApplicationPrivate::qws_apply_settings();
1932 bool bright_mode =
false;
1933 if (v >= 255 - 50) {
1970 bool QApplicationPrivate::qws_apply_settings()
1972 #ifndef QT_NO_SETTINGS 2019 #ifndef QT_NO_LIBRARY 2046 #ifndef QT_NO_WHEELEVENT 2064 #ifndef QT_NO_TEXTCODEC 2100 for (; it != fontsubs.
end(); ++
it) {
2121 #endif // QT_NO_SETTINGS 2140 #ifndef QT_NO_CURSOR 2144 qApp->setObjectName(appName);
2147 #ifdef QT_NO_FREETYPE 2169 char *
x = ::getenv(var);
2170 return (x && *x) ? (strcmp(x,
"0") != 0) : defaultvalue;
2177 return ok ? r : defaultvalue;
2182 #ifdef QT_NO_QWS_MULTIPROCESS 2191 const char *
display = ::getenv(
"QWS_DISPLAY");
2193 #ifdef QT_QWS_DEFAULT_DRIVER_NAME 2194 if (!display) display = QT_QWS_DEFAULT_DRIVER_NAME;
2215 if (argv && *argv) {
2216 p = strrchr(argv[0],
'/');
2224 for (
int i=1; i<
argc; i++) {
2225 if (argv[i] && *argv[i] !=
'-') {
2226 argv[j++] = argv[i];
2230 if (arg ==
"-fn" || arg ==
"-font") {
2233 }
else if (arg ==
"-bg" || arg ==
"-background") {
2236 }
else if (arg ==
"-btn" || arg ==
"-button") {
2239 }
else if (arg ==
"-fg" || arg ==
"-foreground") {
2242 }
else if (arg ==
"-name") {
2245 }
else if (arg ==
"-title") {
2248 }
else if (arg ==
"-geometry") {
2251 }
else if (arg ==
"-shared") {
2253 }
else if (arg ==
"-noshared") {
2255 }
else if (arg ==
"-savefonts") {
2257 }
else if (arg ==
"-nosavefonts") {
2259 }
else if (arg ==
"-swcursor") {
2261 }
else if (arg ==
"-noswcursor") {
2263 }
else if (arg ==
"-keyboard") {
2265 }
else if (arg ==
"-nokeyboard") {
2267 }
else if (arg ==
"-mouse") {
2269 }
else if (arg ==
"-nomouse") {
2271 }
else if (arg ==
"-qws") {
2273 }
else if (arg ==
"-interlaced") {
2275 }
else if (arg ==
"-display") {
2278 }
else if (arg ==
"-decoration") {
2282 argv[j++] = argv[i];
2285 if(j < priv->argc) {
2297 int id = capture.
toInt(&ok);
2312 #ifndef QT_NO_QWS_MANAGER 2313 if (decoration.
isEmpty() && !qws_decoration) {
2316 decoration = keys.
first();
2319 qws_decoration = QApplication::qwsSetDecoration(decoration);
2320 #endif // QT_NO_QWS_MANAGER 2321 #ifndef QT_NO_QWS_INPUTMETHODS 2339 #ifndef QT_NO_CURSOR 2359 #ifndef QT_NO_QWS_MANAGER 2360 delete qws_decoration;
2367 #if !defined(QT_NO_IM) 2387 #define NoValue 0x0000 2388 #define XValue 0x0001 2389 #define YValue 0x0002 2390 #define WidthValue 0x0004 2391 #define HeightValue 0x0008 2392 #define AllValues 0x000F 2393 #define XNegative 0x0010 2394 #define YNegative 0x0020 2440 register int Result = 0;
2445 else if (*
string ==
'-')
2450 for (; (*
string >=
'0') && (*
string <=
'9');
string++)
2452 Result = (Result * 10) + (*
string -
'0');
2454 *NextString = string;
2465 register char *strind;
2466 unsigned int tempWidth=0, tempHeight=0;
2467 int tempX=0, tempY=0;
2468 char *nextCharacter;
2470 if (!
string || (*
string ==
'\0'))
return mask;
2474 strind =
const_cast<char *
>(string);
2475 if (*strind !=
'+' && *strind !=
'-' && *strind !=
'x') {
2477 if (strind == nextCharacter)
2479 strind = nextCharacter;
2483 if (*strind ==
'x' || *strind ==
'X') {
2486 if (strind == nextCharacter)
2488 strind = nextCharacter;
2492 if ((*strind ==
'+') || (*strind ==
'-')) {
2493 if (*strind ==
'-') {
2496 if (strind == nextCharacter)
2498 strind = nextCharacter;
2505 if (strind == nextCharacter)
2507 strind = nextCharacter;
2510 if ((*strind ==
'+') || (*strind ==
'-')) {
2511 if (*strind ==
'-') {
2514 if (strind == nextCharacter)
2516 strind = nextCharacter;
2524 if (strind == nextCharacter)
2526 strind = nextCharacter;
2535 if (*strind !=
'\0')
return 0;
2544 *height = tempHeight;
2549 void QApplication::setMainWidget(
QWidget *mainWidget)
2559 static bool beenHereDoneThat =
false;
2560 if (beenHereDoneThat)
2562 beenHereDoneThat =
true;
2580 w = main_widget->
width();
2582 h = main_widget->
height();
2588 x =
qApp->desktop()->width() + x - w;
2591 x += (main_widget->
geometry().
x() - main_widget->
x());
2594 y =
qApp->desktop()->height() + y - h;
2596 y += (main_widget->
geometry().
y() - main_widget->
y());
2606 #ifndef QT_NO_CURSOR 2609 qApp->d_func()->cursor_list.prepend(cursor);
2621 if (
qApp->d_func()->cursor_list.isEmpty())
2623 qApp->d_func()->cursor_list.removeFirst();
2632 if (
qApp->d_func()->cursor_list.isEmpty()) {
2638 cursor_handle =
qApp->d_func()->cursor_list.first().handle();
2642 #endif// QT_NO_CURSOR 2658 for (
int i = list.
size()-1; i >= 0; --i) {
2688 for (
int i = list.
size()-1; i >= 0; --i) {
2709 return keyboardModifiers();
2717 bool isMove =
false;
2728 if (filterEvent(event, &unused))
2731 if (qwsEventFilter(event))
2735 #ifndef QT_NO_QWS_PROPERTIES 2739 #ifndef QT_NO_CLIPBOARD 2747 #endif //QT_NO_QWS_PROPERTIES 2755 #if !defined(QT_NO_QWS_QPF2) 2765 #ifdef Q_BACKINGSTORE_SUBSURFACES 2774 #ifndef QT_NO_DIRECTPAINTER 2775 if (!widget &&
d->directPainters) {
2784 #ifndef QT_NO_QWSEMBEDWIDGET 2789 #endif // QT_NO_QWSEMBEDWIDGET 2792 #endif // QT_NO_DIRECTPAINTER 2794 #ifndef QT_NO_QWS_MANAGER 2797 if (!
d->last_manager->cachedRegion().contains(pos)) {
2801 d->last_manager = 0;
2805 #endif // QT_NO_QWS_MANAGER 2815 if (popup->focusWidget())
2816 keywidget = static_cast<QETWidget*>(popup->focusWidget());
2818 keywidget =
static_cast<QETWidget*
>(popup);
2828 #ifndef QT_NO_QWS_DYNAMICSCREENTRANSFORMATION 2840 event->asMouse()->simpleData.y_root);
2842 static int btnstate = 0;
2845 if (w && !mouseButtonState && qt_pressGrab == w)
2847 #ifndef QT_NO_QWS_MANAGER 2849 w =
static_cast<QETWidget*
>(QWSManager::grabbedMouse());
2870 #ifndef QT_NO_CURSOR 2874 if (!
qApp->d_func()->cursor_list.isEmpty())
2875 curs = &
qApp->d_func()->cursor_list.first();
2884 if (pw->d_func()->extraData())
2885 curs = pw->d_func()->extraData()->curs;
2900 if (mouseButtonState && !btnstate) {
2919 #ifndef QT_NO_QWS_MANAGER
2920 && !QWSManager::grabbedMouse()
2939 switch (event->
type) {
2944 }
while ((popup =
qApp->activePopupWidget()));
2950 (*mouseInWidget) = 0;
2962 switch (event->
type) {
2982 if (mouse.
delta != 0)
2985 if (qt_button_down && (
mouse_state & Qt::MouseButtonMask) == 0)
2995 #ifndef QT_NO_QWS_INPUTMETHODS 3014 if ((static_cast<QWSFocusEvent*>(event))->simpleData.get_focus) {
3015 if (widget == static_cast<QWidget *>(desktop()))
3017 if (activeWindow() != widget) {
3018 setActiveWindow(widget);
3021 if (widget && !
d->inPopupMode()) {
3028 widget->QWidget::focusNextPrevChild(
true);
3038 if (widget == static_cast<QWidget *>(desktop()))
3055 if (static_cast<QWidget *>(widget) == desktop())
3057 switch ((static_cast<QWSWindowOperationEvent *>(event))->simpleData.op) {
3078 #ifndef QT_NO_QWSEMBEDWIDGET 3097 if (start < 0 || start > 39) {
3098 qWarning(
"QApplication::qwsSetCustomColors: start < 0 || start > 39");
3101 if (start + numColors > 40) {
3102 numColors = 40 - start;
3103 qWarning(
"QApplication::qwsSetCustomColors: Too many colors");
3108 qBlue(colorTable[i]));
3112 #ifndef QT_NO_QWS_MANAGER 3115 return *qws_decoration;
3121 delete qws_decoration;
3122 qws_decoration =
dec;
3124 for (
int i = 0; i < widgets.
size(); ++i) {
3127 static_cast<QETWidget *
>(w)->updateRegion();
3128 static_cast<QETWidget *
>(w)->repaintDecoration(desktop()->rect(),
false);
3142 qwsSetDecoration(decore);
3155 if (!qt_modal_stack)
3157 qt_modal_stack->
insert(0, widget);
3163 if (qt_modal_stack && qt_modal_stack->
removeAll(widget)) {
3164 if (qt_modal_stack->
isEmpty()) {
3179 bool block_event =
false;
3180 bool paint_event =
false;
3182 switch (event->
type) {
3184 if (!static_cast<QWSFocusEvent*>(event)->simpleData.get_focus)
3193 if (top->
parentWidget() == 0 && (block_event || paint_event))
3196 return !block_event;
3232 if (popup == popupOfPopupButtonFocus) {
3233 popupButtonFocus = 0;
3234 popupOfPopupButtonFocus = 0;
3290 #ifdef QT_NO_WHEELEVENT 3300 int axis = mouse.
delta / 120;
3309 if (popup &&
window() != popup)
3319 if (w !=
qApp->focusWidget() && (w =
qApp->focusWidget())) {
3321 if (popup && w != popup)
3332 static bool manualGrab =
false;
3353 if (mouse.
state == prevstate) {
3356 }
else if ((mouse.
state&AnyButton) != (prevstate&AnyButton)) {
3359 if ((mouse.
state&button) != (current_buttons&button)) {
3361 current_buttons = Qt::MouseButtons(current_buttons ^ button);
3363 #ifndef QT_NO_QWS_INPUTMETHODS 3371 if (mouse.
state&button) {
3372 qt_button_down =
childAt(pos);
3373 if (!qt_button_down)
3374 qt_button_down =
this;
3408 if (
qApp->d_func()->inPopupMode()) {
3424 bool releaseAfter =
false;
3426 QWidget *popupTarget = popupChild ? popupChild : popup;
3428 if (popup != popupOfPopupButtonFocus){
3429 popupButtonFocus = 0;
3430 popupOfPopupButtonFocus = 0;
3440 popupButtonFocus = popupChild;
3441 popupOfPopupButtonFocus = popup;
3444 releaseAfter =
true;
3452 if (popupButtonFocus) {
3457 popupButtonFocus = 0;
3458 popupOfPopupButtonFocus = 0;
3460 }
else if (popupChild) {
3468 #ifndef QT_NO_CONTEXTMENU 3471 if(popupButtonFocus)
3474 popupEvent = popupChild;
3478 #endif // QT_NO_CONTEXTMENU 3486 if (!w && qt_button_down)
3488 if (w && w !=
this) {
3507 if (widget == qt_button_down && (pos.
x() < 0 || pos.
y() < 0))
3515 #ifndef QT_NO_QWS_MANAGER 3516 if (widget->
isWindow() && widget->d_func()->topData()->qwsManager
3517 && (widget->d_func()->topData()->qwsManager->region().contains(globalPos)
3518 || QWSManager::grabbedMouse() )) {
3519 if ((*mouseInWidget)) {
3521 (*mouseInWidget) = 0;
3524 qApp->d_func()->last_manager = widget->d_func()->topData()->qwsManager;
3528 if (widget != (*mouseInWidget)) {
3530 (*mouseInWidget) =
widget;
3531 qt_last_mouse_receiver =
widget;
3538 leaveAfterRelease = 0;
3541 #ifndef QT_NO_CONTEXTMENU 3546 #endif // QT_NO_CONTEXTMENU 3556 static Qt::KeyboardModifiers
oldstate;
3557 Qt::KeyboardModifiers state =
oldstate;
3558 oldstate =
event->simpleData.modifiers;
3568 bool autor =
event->simpleData.is_auto_repeat;
3572 code =
event->simpleData.keycode;
3574 #if defined QT3_SUPPORT && !defined(QT_NO_SHORTCUT) 3576 && static_cast<QApplicationPrivate*>(
qApp->d_ptr.data())->use_compat()) {
3579 if (static_cast<QApplicationPrivate*>(
qApp->d_ptr.data())->qt_tryAccelEvent(
this, &a))
3608 #ifdef QT_QWS_CLIENTBLIT 3609 case QWSRegionEvent::DirectPaint:
3610 surface->setDirectRegion(region, event->
simpleData.id);
3620 #ifndef QT_NO_QWSEMBEDWIDGET 3624 const QRegion region =
event->region;
3629 #endif // QT_NO_QWSEMBEDWIDGET 3634 #ifdef QT_NO_QWS_MANAGER 3644 r &= manager->region();
3659 QRegion myregion =
d->localRequestedRegion();
3662 #ifndef QT_NO_QWS_MANAGER 3665 myregion += manager->region();
3670 d->data.crect.y() - br.y(),
3671 br.right() -
d->data.crect.right(),
3672 br.bottom() -
d->data.crect.bottom());
3706 #ifndef QT_NO_WHEELEVENT
The QVariant class acts like a union for the most common Qt data types.
struct QWSPropertyReplyEvent::SimpleData simpleData
Q_GUI_EXPORT QScreen * qt_screen
static int keyboardInputInterval()
static QPointer< QWidget > leaveAfterRelease
void moveRegion(int winId, int dx, int dy)
struct QWSAddPropertyCommand::SimpleData simpleData
struct QWSRepaintRegionCommand::SimpleData simpleData
The QColor class provides colors based on RGB, HSV or CMYK values.
HCURSOR_or_HANDLE handle() const
Returns a platform-specific cursor handle.
void nameRegion(int winId, const QString &n, const QString &c)
struct QWSIMResponseCommand::SimpleData simpleData
void sendFontCommand(int type, const QByteArray &fontName)
static QWidget * main_widget
static int openPopupCount
QImage toImage() const
Converts the pixmap to a QImage.
The QWSWindowSurface class provides the drawing area for top-level windows in Qt for Embedded Linux...
The QWSDisplay class provides a display for QWS; it is an internal class.
The QApplication class manages the GUI application's control flow and main settings.
bool qws_screen_is_interlaced
void reinit(const QString &newAppName)
#define QT_QWS_PROPERTY_CONVERTSELECTION
void setMaxWindowRect(const QScreen *screen, int screenNo, const QRect &rect)
static QColormap instance(int screen=-1)
QRect maxWindowRect(const QScreen *screen) const
Q_CORE_EXPORT QByteArray qgetenv(const char *varName)
static QWidgetList topLevelWidgets()
The QKeyEvent class describes a key event.
static const char * appBGCol
static QString fromLocal8Bit(const char *, int size=-1)
Returns a QString initialized with the first size characters of the 8-bit string str.
The QProxyScreen class provides a generic interface to QScreen implementations.
static void beep()
Sounds the bell, using the default volume and sound.
QVariant value(const QString &key, const QVariant &defaultValue=QVariant()) const
Returns the value for setting key.
int height() const
Returns the logical height of the framebuffer in pixels.
static bool versionSupported()
void setArgs(int, char **)
static bool translateIMQueryEvent(QWidget *w, const QWSIMQueryEvent *e)
QApplication::Type qt_appType
The QCursor class provides a mouse cursor with an arbitrary shape.
void registerChannel(const QString &channel)
struct QWSRegionMoveCommand::SimpleData simpleData
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
QString cap(int nth=0) const
Returns the text captured by the nth subexpression.
#define QT_END_NAMESPACE
This macro expands to.
void setScreen(QScreen *screen)
Sets the real screen to be used by the proxy screen.
void removeProperty(int winId, int property)
int width() const
Returns the width of the pixmap.
void setData(const char *d, int len, bool allocateMem=true)
int lastIndexIn(const QString &str, int offset=-1, CaretMode caretMode=CaretAtZero) const
Attempts to find a match backwards in str from position offset.
QPointer< QWidget > widget
virtual int sharedRamSize(void *)
void setOpacity(int winId, int opacity)
void qws_setScreenTransformation(QScreen *, int)
void selectCursor(QWidget *w, unsigned int id)
static void setTransformation(int transformation, int screenNo=-1)
ColorRole
The ColorRole enum defines the different symbolic color roles used in current GUIs.
static void setStyle(QStyle *)
Sets the application's GUI style to style.
void setAltitude(int winId, int altitude, bool fixed=false)
static QWSServer * instance()
QAuthDevice * authBuf(QTransportAuth::Data *, QIODevice *)
Return a QIODevice pointer (to an internal QBuffer) which can be used to write data onto...
void setCursorPosition(int x, int y)
static void qt_set_qws_resources()
The QRegExp class provides pattern matching using regular expressions.
static QWSDisplay * qwsDisplay()
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 unlock()
Unlocks the lock.
void refresh()
Refreshes the display by making the screen driver update the entire display.
static QWSCommand * factory(int type)
const int qwsSharedRamSize
#define it(className, varName)
void setChannel(const QString &n)
void repaintRegion(int winId, int windowFlags, bool opaque, QRegion)
int count(const T &t) const
Returns the number of occurrences of value in the vector.
bool fromString(const QString &)
Sets this font to match the description descrip.
QList< QWidget * > QWidgetList
The QWheelEvent class contains parameters that describe a wheel event.
The QSettings class provides persistent platform-independent application settings.
void sendIMResponse(int winId, int property, const QVariant &result)
void endGroup()
Resets the group to what it was before the corresponding beginGroup() call.
static void initializeWidgetPaletteHash()
QTransportAuth::Data * connectTransport(unsigned char, int)
Record a new transport connection with properties and descriptor.
struct QWSPositionCursorCommand::SimpleData simpleData
static bool read_bool_env_var(const char *var, bool defaultvalue)
The QByteArray class provides an array of bytes.
static Expression::Ptr create(Expression *const expr, const YYLTYPE &sourceLocator, const ParserContext *const parseInfo)
bool hasPendingRegionEvents() const
QWSMouseEvent * asMouse()
int length() const
Returns the number of characters in this string.
void setData(const char *d, int len, bool allocateMem=true)
void initializeMultitouch_sys()
void setFileName(const QString &n)
void copyFrom(const QWSProtocolItem *item)
static void addLibraryPath(const QString &)
Prepends path to the beginning of the library path list, ensuring that it is searched for libraries f...
bool setProperty(const char *name, const QVariant &value)
Sets the value of the object's name property to value.
void beginGroup(const QString &prefix)
Appends prefix to the current group.
void sendIMUpdate(int type, int winId, int widgetid)
iterator begin()
Returns an STL-style iterator pointing to the first item in the list.
static int wheel_scroll_lines
QString toString() const
Returns the variant as a QString if the variant has type() String , Bool , ByteArray ...
Pass-through QIODevice sub-class for authentication.
void qt_directpainter_region(QDirectPainter *dp, const QRegion &alloc, int type)
void createEventDispatcher()
const_iterator constBegin() const
Returns a const STL-style iterator pointing to the first item in the list.
int qws_read_uint(QIODevice *socket)
int width() const
Returns the width of the rectangle.
static bool testAttribute(uint flag)
static TransformFunc getTransformationFunction()
int & ry()
Returns a reference to the y coordinate of this point.
void insert(int i, const T &t)
Inserts value at index position i in the list.
static QWidget * active_window
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
struct QWSRequestFocusCommand::SimpleData simpleData
Q_GUI_EXPORT QScreen * qt_get_screen(int display_id, const char *spec)
static void cleanup()
Internal function that cleans up the font system.
static QApplicationPrivate * instance()
int msec() const
Returns the millisecond part (0 to 999) of the time.
int bytesPerLine() const
Returns the number of bytes per image scanline.
long ASN1_INTEGER_get ASN1_INTEGER * a
int count(const T &t) const
Returns the number of occurrences of value in the list.
QRect boundingRect() const
Returns the bounding rectangle of this region.
static bool qws_single_process
static QStyle * style()
Returns the application's style object.
void waitForPropertyReply()
void closePopup(QWidget *popup)
void * resolve(const char *symbol)
Returns the address of the exported symbol symbol.
static int cursorFlashTime()
void Q_GUI_EXPORT qt_app_reinit(const QString &newAppName)
ushort red
Returns the red color component of this color.
static const char * mwTitle
static QWidget * popupOfPopupButtonFocus
bool eventPending() const
The QDirectPainter class provides direct access to the underlying hardware in Qt for Embedded Linux...
The QString class provides a Unicode character string.
QClipboard * qt_clipboard
struct QWSIMMouseCommand::SimpleData simpleData
void cleanupMultitouch_sys()
void updateWindowRegions() const
Q_DECL_CONSTEXPR T qAbs(const T &t)
The QObject class is the base class of all Qt objects.
struct QWSSetPropertyCommand::SimpleData simpleData
struct QWSMouseEvent::SimpleData simpleData
void(* TransformFunc)(QScreen *, int)
const QColor & color(ColorGroup cg, ColorRole cr) const
Returns the color in the specified color group, used for the given color role.
int qwsProcessEvent(QWSEvent *)
static int wheelScrollLines()
static QWSLock * clientLock
struct QWSSetSelectionOwnerCommand::SimpleData simpleData
struct QWSEmbedEvent::SimpleData simpleData
static bool waitClient(QWSLock::LockType, int timeout=-1)
The QChar class provides a 16-bit Unicode character.
static int qws_connection_timeout
QWSQCopMessageEvent * waitForQCopResponse()
void destroyRegion(int winId)
void setId(const QString &i, int lock)
Q_CORE_EXPORT QTextStream & dec(QTextStream &s)
bool directServerConnection()
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
iterator Iterator
Qt-style synonym for QList::iterator.
static const char * appFGCol
void getHsv(int *h, int *s, int *v, int *a=0) const
Sets the contents pointed to by h, s, v, and a, to the hue, saturation, value, and alpha-channel (tra...
static void processEventQueue()
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
Q_GUI_EXPORT_INLINE int qRed(QRgb rgb)
static QWidget * focus_widget
static QFontCache * instance()
static int mouseButtonPressTime
QList< QWSCommand * > * qt_get_server_queue()
static bool initLock(const QString &filename, bool create=false)
static QFont font()
Returns the default application font.
static void sendLocally(const QString &ch, const QString &msg, const QByteArray &data)
Client side: distribute received event to the QCop instance managing the channel. ...
The QDecoration class is a base class for window decorations in Qt for Embedded Linux.
Q_CORE_EXPORT QTextStream & fixed(QTextStream &s)
int toInt(bool *ok=0) const
Returns the variant as an int if the variant has type() Int , Bool , ByteArray , Char ...
The QWSEvent class encapsulates an event in Qt for Embedded Linux.
struct QWSRegionDestroyCommand::SimpleData simpleData
struct QWSSetOpacityCommand::SimpleData simpleData
void setData(const char *d, int len, bool allocateMem=true)
static QStringList keys()
Returns the list of valid keys, i.e., the available decorations.
QWidgetList * qt_modal_stack
void setFontName(const QByteArray &name)
void waitForRegionAck(int winId)
void sendCommand(QWSCommand &cmd)
#define QT_VFB_DATADIR(DISPLAY)
static int keyboard_input_time
Q_CORE_EXPORT void qDebug(const char *,...)
The QWSWindow class encapsulates a top-level window in Qt for Embedded Linux.
static QWidget * widgetAt(const QPoint &p)
Returns the widget at global screen position point, or 0 if there is no Qt widget there...
static void setRawMouseEventFilter(void(*filter)(QWSMouseEvent *))
struct QWSQCopMessageEvent::SimpleData simpleData
virtual void disconnect()=0
This function is called by every Qt for Embedded Linux application before exiting, and must be implemented to unmap the framebuffer.
struct QWSChangeAltitudeCommand::SimpleData simpleData
QColor darker(int f=200) const
Returns a darker (or lighter) color, but does not change this object.
virtual QRegion region() const
Returns the region covered by this screen driver.
The QBitmap class provides monochrome (1-bit depth) pixmaps.
int width() const
Returns the logical width of the framebuffer in pixels.
int width() const
Returns the width.
void sendIMMouseEvent(int index, bool isPress)
static QWidget * activeModalWidget()
Returns the active modal widget.
QStringList toStringList() const
Returns the variant as a QStringList if the variant has type() StringList, String ...
void append(const T &t)
Inserts value at the end of the list.
static int parseGeometry(const char *string, int *x, int *y, int *width, int *height)
static void setSystemFont(const QFont &font)
void setName(const QString &n, const QString &c)
void requestRegion(int winId, const QString &surfacekey, const QByteArray &surfaceData, const QRegion ®ion)
The QTime class provides clock time functions.
#define QT_BEGIN_NAMESPACE
This macro expands to.
void removeEngineForFont(const QByteArray &fontName)
Q_GUI_EXPORT EGLDisplay display()
static void init_display()
static bool isEmpty(const char *str)
void setMessage(const QString &c, const QString &m, const QByteArray &data)
struct QWSKeyEvent::SimpleData simpleData
T takeFirst()
Removes the first item in the list and returns it.
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
bool isEmpty() const
Returns true if the region is empty; otherwise returns false.
static void initialize()
Internal function that initializes the font system.
struct QWSPropertyNotifyEvent::SimpleData simpleData
iterator end()
Returns an STL-style iterator pointing to the imaginary item after the last item in the list...
virtual bool initDevice()=0
This function is called by the Qt for Embedded Linux server to initialize the framebuffer.
static QWidgetList * popupWidgets
static const char * mwGeometry
const T value(const Key &key) const
Returns the value associated with the key key.
struct QWSFontEvent::SimpleData simpleData
static void insertSubstitutions(const QString &, const QStringList &)
Inserts the list of families substituteNames into the substitution list for familyName.
void destroyCursor(int id)
const T & at(int i) const
Returns the item at index position i in the list.
static int ReadInteger(char *string, char **NextString)
The QStringList class provides a list of strings.
The QLock class is a wrapper for a system shared semaphore.
void grabMouse(QWidget *w, bool grab)
static void clear()
Removes all pixmaps from the cache.
#define QT_PREPEND_NAMESPACE(name)
This macro qualifies identifier with the full namespace.
static bool sendSpontaneousEvent(QObject *receiver, QEvent *event)
static int mouse_double_click_time
void waitForRegionEvents(int winId, bool ungrabDisplay)
Q_CORE_EXPORT void qWarning(const char *,...)
int & rx()
Returns a reference to the x coordinate of this point.
int second() const
Returns the second part (0 to 59) of the time.
The QImage class provides a hardware-independent image representation that allows direct access to th...
void setResult(const QVariant &v)
bool contains(const QPoint &p) const
Returns true if the region contains the point p; otherwise returns false.
static const char * data(const QByteArray &arr)
QByteArray qws_display_spec(":0")
static void setKeyboardInputInterval(int)
struct QWSSelectCursorCommand::SimpleData simpleData
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal...
void convertSelection(int winId, int selectionProperty, const QString &mimeTypes)
static QTextCodec * codec(MYSQL *mysql)
static QScreen * instance()
Returns a pointer to the application's QScreen instance.
static bool animate_combo
static void alert(QWidget *widget, int duration=0)
static bool lockClient(QWSLock::LockType, int timeout=-1)
static bool sendEvent(QObject *receiver, QEvent *event)
Sends event event directly to receiver receiver, using the notify() function.
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.
static QPalette * sys_pal
Data(QObject *parent, bool singleProcess=false)
QByteArray toLatin1() const Q_REQUIRED_RESULT
Returns a Latin-1 representation of the string as a QByteArray.
void clear()
Removes all items from the list.
struct QWSRegionNameCommand::SimpleData simpleData
int minute() const
Returns the minute part (0 to 59) of the time.
QStringList childKeys() const
Returns a list of all top-level keys that can be read using the QSettings object. ...
void setCoords(int x1, int y1, int x2, int y2)
Sets the coordinates of the rectangle's top-left corner to (x1, y1), and the coordinates of its botto...
void qt_applyFontDatabaseSettings(const QSettings &settings)
static void startup(int flags)
static QWSLock * getClientLock()
void setIdentity(const QString &appName)
QByteArray toLocal8Bit() const Q_REQUIRED_RESULT
Returns the local 8-bit representation of the string as a QByteArray.
QWSWindow * windowAt(const QPoint &pos)
Returns the window containing the given position.
Q_GUI_EXPORT_INLINE int qBlue(QRgb rgb)
static QWidgetList topLevelWidgets()
Returns a list of the top-level widgets (windows) in the application.
static QWidget * topLevelAt(const QPoint &p)
Returns the top-level widget at the given point; returns 0 if there is no such widget.
static QWidget * popupButtonFocus
bool contains(const QPoint &p, bool proper=false) const
Returns true if the given point is inside or on the edge of the rectangle, otherwise returns false...
Q_GUI_EXPORT QWSDisplay * qt_fbdpy
QList< QWSWindowInfo > windowList()
void qt_init(QApplicationPrivate *priv, int type)
QT_DEPRECATED int numColors() const
static bool startingUp()
Returns true if an application object has not been created yet; otherwise returns false...
static void enterModal_sys(QWidget *)
static bool translateIMEvent(QWidget *w, const QWSIMEvent *e)
The QMouseEvent class contains parameters that describe a mouse event.
#define QTE_PIPE(DISPLAY)
static QDesktopWidget * desktop()
Returns the desktop widget (also called the root window).
static QList< QWSEvent * > incoming
T & first()
Returns a reference to the first item in the list.
const char * constData() const
Returns a pointer to the data stored in the byte array.
static QDecoration * create(const QString &)
static bool animate_tooltip
bool isNull() const
Returns true if this string is null; otherwise returns false.
void qt_server_enqueue(const QWSCommand *command)
static void setColorSpec(int)
Sets the color specification for the application to spec.
uchar * base() const
Returns a pointer to the beginning of the framebuffer.
uchar * bits()
Returns a pointer to the first pixel data.
static bool tryModalHelper(QWidget *widget, QWidget **rettop=0)
static QAuServer & server()
void setData(const char *d, int len, bool allocateMem=true)
Q_CORE_EXPORT void qFatal(const char *,...)
static int read_int_env_var(const char *var, int defaultvalue)
bool isWidgetType() const
Returns true if the object is a widget; otherwise returns false.
static Qt::KeyboardModifiers queryKeyboardModifiers()
Queries and returns the state of the modifier keys on the keyboard.
QString arg(qlonglong a, int fieldwidth=0, int base=10, const QChar &fillChar=QLatin1Char(' ')) const Q_REQUIRED_RESULT
static void setCursorFlashTime(int)
static bool isEffectEnabled(Qt::UIEffect)
Returns true if effect is enabled; otherwise returns false.
int winId() const
Returns the window's ID.
static Qt::MouseButtons mouseButtonState
QImage convertToFormat(Format f, Qt::ImageConversionFlags flags=Qt::AutoColor) const Q_REQUIRED_RESULT
Returns a copy of the image in the given format.
uchar * sharedRam() const
static QWidget * activePopupWidget()
Returns the active popup widget.
void setRects(const QRect *rect, int num)
Sets the region using the array of rectangles specified by rects and number.
QString & append(QChar c)
ushort blue
Returns the blue color component of this color.
void qt_directpainter_embedevent(QDirectPainter *dp, const QWSEmbedEvent *e)
The QWSServer class encapsulates a server process in Qt for Embedded Linux.
virtual int memoryNeeded(const QString &)
Type
This enum type defines the valid event types in Qt.
static bool sm_blockUserInput
static QAbstractEventDispatcher * eventDispatcher
static QInputContext * inputContext
void setSelectionOwner(int winId, const QTime &time)
#define QWS_PROTOCOL_ITEM_SIZE(item)
void setClipRegion(const QRegion &)
Sets the region currently visible on the screen to be the given clip region.
The QFont class specifies a font used for drawing text.
int y() const
Returns the y-coordinate of the rectangle's top edge.
static QWSEvent * factory(int type)
static QList< QWSCommand * > outgoing
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
virtual bool qwsEventFilter(QWSEvent *)
This virtual function is only implemented under Qt for Embedded Linux.
Q_GUI_EXPORT int qws_display_id
struct QWSRegionEvent::SimpleData simpleData
static const int AnyButton
static void unlockClient(QWSLock::LockType)
static QStringList libraryPaths()
Returns a list of paths that the application will search when dynamically loading libraries...
void addProperty(int winId, int property)
int x() const
Returns the x-coordinate of the rectangle's left edge.
static bool animate_toolbox
int toInt(bool *ok=0, int base=10) const
Returns the byte array converted to an int using base base, which is 10 by default and must be betwee...
virtual QList< QScreen * > subScreens() const
struct QWSDefineCursorCommand::SimpleData simpleData
const_iterator ConstIterator
Qt-style synonym for QList::const_iterator.
int sharedRamSize() const
The QPoint class defines a point in the plane using integer precision.
static void setWheelScrollLines(int)
void setColor(ColorGroup cg, ColorRole cr, const QColor &color)
Sets the color in the specified color group, used for the given color role, to the specified solid co...
QVector< QRect > rects() const
Returns an array of non-overlapping rectangles that make up the region.
T & last()
Returns a reference to the last item in the list.
int size() const
Returns the number of items in the list.
static QList< QWSInternalWindowInfo * > * windowList()
static bool desktopSettingsAware()
Returns true if Qt is set to use the system's standard colors, fonts, etc.
static int mouse_double_click_distance
QString objectName() const
static QReadWriteLock lock
void defineCursor(int id, const QBitmap &curs, const QBitmap &mask, int hotX, int hotY)
int height() const
Returns the height.
QMap< const QScreen *, QRect > maxWindowRects
if(void) toggleToolbarShown
The QRect class defines a rectangle in the plane using integer precision.
bool isValid() const
Returns true if both the width and height is equal to or greater than 0; otherwise returns false...
void setClient(QObject *)
QFuture< void > filter(Sequence &sequence, FilterFunction filterFunction)
static QTextCodec * codecForName(const QByteArray &name)
Searches all installed QTextCodec objects and returns the one which best matches name; the match is c...
struct QWSGrabMouseCommand::SimpleData simpleData
The QScreen class is a base class for screen drivers in Qt for Embedded Linux.
void sendSynchronousCommand(QWSCommand &cmd)
static void dispatchEnterLeave(QWidget *enter, QWidget *leave)
int size() const
Returns the number of bytes in this byte array.
static void setSystemPalette(const QPalette &pal)
int y() const
Returns the y coordinate of this point.
static void setMaxWindowRect(const QRect &rect)
Q_GUI_EXPORT_INLINE int qGreen(QRgb rgb)
static QString styleOverride
Q_CORE_EXPORT bool qputenv(const char *varName, const QByteArray &value)
static const char * appBTNCol
static void setOverrideCursor(const QCursor &)
Use changeOverrideCursor(cursor) (if replace is true) or setOverrideCursor(cursor) (if replace is fal...
T takeLast()
Removes the last item in the list and returns it.
int height() const
Returns the height of the pixmap.
bool getProperty(int winId, int property, char *&data, int &len)
QPointer< QWidget > qt_last_mouse_receiver
void translate(int dx, int dy)
Translates (moves) the region dx along the X axis and dy along the Y axis.
ClassId classId() const
Returns the class identifier for the screen object.
struct QWSConvertSelectionCommand::SimpleData simpleData
void grabKeyboard(QWidget *w, bool grab)
The QClipboardEvent class provides the parameters used in a clipboard event.
static const char * appFont
The QSize class defines the size of a two-dimensional object using integer point precision.
uchar * frameBuffer() const
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...
Authenticate a message transport.
void waitForQCopResponse()
static void setDoubleClickInterval(int)
static QWSDisplay * instance()
void playSoundFile(const QString &)
const T * constData() const
Returns a const pointer to the data stored in the vector.
int x() const
Returns the x coordinate of this point.
Q_GUI_EXPORT QString qws_qtePipeFilename()
static bool popupCloseDownMode
bool supportsDepth(int) const
struct QWSFontCommand::SimpleData simpleData
virtual void set(unsigned int, unsigned int, unsigned int, unsigned int)
QScreen * screen() const
Returns the real screen used by the proxy screen.
void qwsSetCustomColors(QRgb *colortable, int start, int numColors)
Set Qt for Embedded Linux custom color table.
Q_GUI_EXPORT QScreenCursor * qt_screencursor
static int mouseButtonPressed
void setProperty(int winId, int property, int mode, const QByteArray &data)
static void restoreOverrideCursor()
Undoes the last setOverrideCursor().
struct QWSGrabKeyboardCommand::SimpleData simpleData
Q_GUI_EXPORT int qws_client_id
virtual bool supportsDepth(int) const
Returns true if the screen supports the specified color depth; otherwise returns false.
The QTextCodec class provides conversions between text encodings.
QColor lighter(int f=150) const
Returns a lighter (or darker) color, but does not change this object.
char at(int i) const
Returns the character at index position i in the byte array.
static void leaveModal_sys(QWidget *)
static void setFont(const QFont &, const char *className=0)
Changes the default application font to font.
struct QWSRemovePropertyCommand::SimpleData simpleData
static QPointer< QWidget > * mouseInWidget
void requestFocus(int winId, bool get)
static bool qt_try_modal(QWidget *, QWSEvent *)
static bool translateIMInitEvent(const QWSIMInitEvent *e)
#define qPrintable(string)
static int doubleClickInterval()
static QWidget * focusWidget()
Returns the application widget that has the keyboard input focus, or 0 if no widget in this applicati...
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
ushort green
Returns the green color component of this color.
Q_OUTOFLINE_TEMPLATE void qDeleteAll(ForwardIterator begin, ForwardIterator end)
void qt_client_enqueue(const QWSEvent *event)
virtual int pixmapDepth() const
Returns the preferred depth for pixmaps, in bits per pixel.
void setScreenTransformation(QScreen *screen, int screenNo, int transformation)
struct QWSCreationEvent::SimpleData simpleData
int windowAt(const QPoint &)
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
struct QWSGetPropertyCommand::SimpleData simpleData
QWidget * window() const
Returns a pointer to the top-level window associated with this surface.
The QFocusEvent class contains event parameters for widget focus events.
struct QWSIMUpdateCommand::SimpleData simpleData
static void setGlobalStrut(const QSize &)
static void setCodecForTr(QTextCodec *c)
static void setEffectEnabled(Qt::UIEffect, bool enable=true)
Enables the UI effect effect if enable is true, otherwise the effect will not be used.
void openPopup(QWidget *popup)
Q_CORE_EXPORT void qCritical(const char *,...)
QWSServer Q_GUI_EXPORT * qwsServer
void sendMessage(const QString &channel, const QString &msg, const QByteArray &data)
int depth() const
Returns the depth of the framebuffer, in bits per pixel.
static QTransportAuth * getInstance()
Return a pointer to the instance of this process's QTransportAuth object.
void setWindowCaption(QWidget *w, const QString &)
int hour() const
Returns the hour part (0 to 23) of the time.
The QList class is a template class that provides lists.
static Qt::KeyboardModifiers oldstate
void setMouseFilter(void(*filter)(QWSMouseEvent *))
const_iterator constEnd() const
Returns a const STL-style iterator pointing to the imaginary item after the last item in the list...
static int cursor_flash_time
QPoint topLeft() const
Returns the position of the rectangle's top-left corner.
int removeAll(const T &t)
Removes all occurrences of value in the list and returns the number of entries removed.
#define QT_VERSION
This macro expands a numeric value of the form 0xMMNNPP (MM = major, NN = minor, PP = patch) that spe...
static void reregisterAll()
QDesktopWidget * qt_desktopWidget
The QPalette class contains color groups for each widget state.