diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-06-13 15:22:11 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-07-27 12:35:23 +0900 |
commit | d346b0f7afcf92a76466c5aaff5fed80d74dcb59 (patch) | |
tree | d80acbed6056b2cf501f717c294f572d91dbc0f2 /src/kernel/tqeventloop_x11_glib.cpp | |
parent | 9dd062934387e59553bfea7402e840ee487aca77 (diff) | |
download | tqt-d346b0f7afcf92a76466c5aaff5fed80d74dcb59.tar.gz tqt-d346b0f7afcf92a76466c5aaff5fed80d74dcb59.zip |
Rename 'guiThread' and related functions to 'coreThread'.
A TTY TQApplication is GUI-less, so the usage of the term 'GUI' is
misleading.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src/kernel/tqeventloop_x11_glib.cpp')
-rw-r--r-- | src/kernel/tqeventloop_x11_glib.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/kernel/tqeventloop_x11_glib.cpp b/src/kernel/tqeventloop_x11_glib.cpp index ba638aac9..fa449ca07 100644 --- a/src/kernel/tqeventloop_x11_glib.cpp +++ b/src/kernel/tqeventloop_x11_glib.cpp @@ -207,7 +207,7 @@ void TQEventLoop::init() // intitialize the X11 parts of the event loop d->xfd = -1; - if ( tqt_is_gui_used && TQApplication::isGuiThread() ) { + if ( tqt_is_gui_used && TQApplication::isCoreThread() ) { d->xfd = XConnectionNumber( TQPaintDevice::x11AppDisplay() ); } @@ -231,7 +231,7 @@ void TQEventLoop::init() d->gSource = (GSource*)qtGSource; // poll for X11 events - if ( tqt_is_gui_used && TQApplication::isGuiThread() ) { + if ( tqt_is_gui_used && TQApplication::isCoreThread() ) { d->x_gPollFD.fd = d->xfd; d->x_gPollFD.events = G_IO_IN | G_IO_HUP | G_IO_ERR; g_source_add_poll(d->gSource, &d->x_gPollFD); @@ -315,7 +315,7 @@ bool TQEventLoop::processX11Events() if ( tqt_is_gui_used ) { TQApplication::sendPostedEvents(); - if (TQApplication::isGuiThread()) { + if (TQApplication::isCoreThread()) { // Two loops so that posted events accumulate while ( XPending( TQPaintDevice::x11AppDisplay() ) ) { // also flushes output buffer @@ -407,7 +407,7 @@ bool TQEventLoop::gsourcePrepare(GSource *gs, int * timeout) static timeval zerotm; timeval *tm = 0; if ( ! ( flags & ExcludeTimers ) ) { - if (TQApplication::isGuiThread()) { + if (TQApplication::isCoreThread()) { tm = qt_wait_timer(); // wait for TQt timers if ( !canWait ) { if ( !tm ) { @@ -422,7 +422,7 @@ bool TQEventLoop::gsourcePrepare(GSource *gs, int * timeout) // Include or exclude SocketNotifiers (by setting or cleaning poll events) // Socket notifier events are only activated in the core application event loop, // so filter them out in other event loops. - if (!(flags & ExcludeSocketNotifiers) && TQApplication::isGuiThread()) { + if (!(flags & ExcludeSocketNotifiers) && TQApplication::isCoreThread()) { TQPtrListIterator<TQSockNotGPollFD> it( d->sn_list ); TQSockNotGPollFD *sn; while ( (sn=it.current()) ) { @@ -496,7 +496,7 @@ bool TQEventLoop::gsourceCheck(GSource *gs) { ProcessEventsFlags flags = d->pev_flags; // Socketnotifier events? - if (!(flags & ExcludeSocketNotifiers) && TQApplication::isGuiThread()) + if (!(flags & ExcludeSocketNotifiers) && TQApplication::isCoreThread()) { TQPtrListIterator<TQSockNotGPollFD> it( d->sn_list ); TQSockNotGPollFD *sn; @@ -531,7 +531,7 @@ bool TQEventLoop::gsourceCheck(GSource *gs) { } // check if we have timers to activate? - if (TQApplication::isGuiThread()) { + if (TQApplication::isCoreThread()) { timeval *tm = qt_wait_timer(); if (tm && (tm->tv_sec == 0 && tm->tv_usec == 0 )) { #ifdef DEBUG_QT_GLIBMAINLOOP @@ -571,7 +571,7 @@ bool TQEventLoop::gsourceDispatch(GSource *gs) { // we are awake, broadcast it emit awake(); - emit tqApp->guiThreadAwake(); + emit tqApp->coreThreadAwake(); // some other thread woke us up... consume the data on the thread pipe so that // select doesn't immediately return next time @@ -603,14 +603,14 @@ bool TQEventLoop::gsourceDispatch(GSource *gs) { } // } - if (TQApplication::isGuiThread()) { + if (TQApplication::isCoreThread()) { nevents += activateSocketNotifiers(); } } // activate timers if ( ! ( flags & ExcludeTimers ) ) { - if (TQApplication::isGuiThread()) { + if (TQApplication::isCoreThread()) { nevents += activateTimers(); } } @@ -653,14 +653,14 @@ bool TQEventLoop::hasPendingEvents() const #endif // TQT_THREAD_SUPPORT extern uint qGlobalPostedEventsCount(); // from tqapplication.cpp - return ( qGlobalPostedEventsCount() || ( (tqt_is_gui_used && TQApplication::isGuiThread()) ? XPending( TQPaintDevice::x11AppDisplay() ) : 0)); + return ( qGlobalPostedEventsCount() || ( (tqt_is_gui_used && TQApplication::isCoreThread()) ? XPending( TQPaintDevice::x11AppDisplay() ) : 0)); } void TQEventLoop::appStartingUp() { if ( tqt_is_gui_used ) { d->xfd = XConnectionNumber( TQPaintDevice::x11AppDisplay() ); - if ( (d->x_gPollFD.fd == -1) && TQApplication::isGuiThread() ) { + if ( (d->x_gPollFD.fd == -1) && TQApplication::isCoreThread() ) { d->x_gPollFD.fd = d->xfd; d->x_gPollFD.events = G_IO_IN | G_IO_HUP | G_IO_ERR; g_source_add_poll(d->gSource, &d->x_gPollFD); |