diff options
Diffstat (limited to 'src/kernel/qapplication_x11.cpp')
| -rw-r--r-- | src/kernel/qapplication_x11.cpp | 492 |
1 files changed, 246 insertions, 246 deletions
diff --git a/src/kernel/qapplication_x11.cpp b/src/kernel/qapplication_x11.cpp index e0c95a6e0..deeedca87 100644 --- a/src/kernel/qapplication_x11.cpp +++ b/src/kernel/qapplication_x11.cpp @@ -193,20 +193,20 @@ static const char *mwGeometry = 0; // main widget geometry static const char *mwTitle = 0; // main widget title //Ming-Che 10/10 TQ_EXPORT char *qt_ximServer = 0; // XIM Server will connect to -static bool mwIconic = FALSE; // main widget iconified +static bool mwIconic = false; // main widget iconified //Ming-Che 10/10 static Display *appDpy = 0; // X11 application display static char *appDpyName = 0; // X11 display name -static bool appForeignDpy = FALSE; // we didn't create display -static bool appSync = FALSE; // X11 synchronization +static bool appForeignDpy = false; // we didn't create display +static bool appSync = false; // X11 synchronization #if defined(QT_DEBUG) -static bool appNoGrab = FALSE; // X11 grabbing enabled -static bool appDoGrab = FALSE; // X11 grabbing override (gdb) +static bool appNoGrab = false; // X11 grabbing enabled +static bool appDoGrab = false; // X11 grabbing override (gdb) #endif static int appScreen; // X11 screen number static int appScreenCount; // X11 screen count -static bool app_save_rootinfo = FALSE; // save root info -static bool app_do_modal = FALSE; // modal mode +static bool app_save_rootinfo = false; // save root info +static bool app_do_modal = false; // modal mode static Window curWin = 0; // current window static GC* app_gc_ro = 0; // read-only GC @@ -246,7 +246,7 @@ Atom qt_utf8_string = 0; // detect broken window managers Atom qt_sgi_desks_manager = 0; -bool qt_broken_wm = FALSE; +bool qt_broken_wm = false; static void qt_detect_broken_window_manager(); // NET WM support @@ -320,19 +320,19 @@ static const int FocusModel_PointerRoot = 1; static int qt_focus_model = -1; #ifndef TQT_NO_XRANDR -// TRUE if TQt is compiled w/ XRandR support and XRandR exists on the connected +// true if TQt is compiled w/ XRandR support and XRandR exists on the connected // Display -bool qt_use_xrandr = FALSE; +bool qt_use_xrandr = false; static int xrandr_eventbase; #endif -// TRUE if TQt is compiled w/ XRender support and XRender exists on the connected +// true if TQt is compiled w/ XRender support and XRender exists on the connected // Display -TQ_EXPORT bool tqt_use_xrender = FALSE; +TQ_EXPORT bool tqt_use_xrender = false; #ifndef TQT_NO_XSYNC // True if SYNC extension exists on the connected display -bool qt_use_xsync = FALSE; +bool qt_use_xsync = false; static int xsync_eventbase; static int xsync_errorbase; #endif @@ -346,8 +346,8 @@ static long qt_meta_mask = 0; static long qt_mode_switch_remove_mask = 0; // flags for extensions for special Languages, currently only for RTL languages -static bool qt_use_rtl_extensions = FALSE; -TQ_EXPORT bool tqt_hebrew_keyboard_hack = FALSE; +static bool qt_use_rtl_extensions = false; +TQ_EXPORT bool tqt_hebrew_keyboard_hack = false; static Window mouseActWindow = 0; // window where mouse is static int mouseButtonPressed = 0; // last mouse button pressed @@ -357,16 +357,16 @@ static short mouseXPos, mouseYPos; // mouse pres position in act window static short mouseGlobalXPos, mouseGlobalYPos; // global mouse press position extern TQWidgetList *tqt_modal_stack; // stack of modal widgets -static bool ignoreNextMouseReleaseEvent = FALSE; // ignore the next mouse release +static bool ignoreNextMouseReleaseEvent = false; // ignore the next mouse release // event if return from a modal // widget static TQWidget *popupButtonFocus = 0; static TQWidget *popupOfPopupButtonFocus = 0; -static bool popupCloseDownMode = FALSE; +static bool popupCloseDownMode = false; static bool popupGrabOk; -static bool sm_blockUserInput = FALSE; // session management +static bool sm_blockUserInput = false; // session management int qt_xfocusout_grab_counter = 0; @@ -415,7 +415,7 @@ TQ_EXPORT QX11EventFilter tqt_set_x11_event_filter(QX11EventFilter filter) static bool qt_x11EventFilter( XEvent* ev ) { if ( qt_x11_event_filter && qt_x11_event_filter( ev ) ) - return TRUE; + return true; return tqApp->x11EventFilter( ev ); } @@ -443,7 +443,7 @@ bool tqt_try_modal( TQWidget *, XEvent * ); int qt_ncols_option = 216; // used in qcolor_x11.cpp int qt_visual_option = -1; -bool qt_cmap_option = FALSE; +bool qt_cmap_option = false; TQWidget *qt_button_down = 0; // widget got last button-down extern bool tqt_tryAccelEvent( TQWidget*, TQKeyEvent* ); // def in qaccel.cpp @@ -530,7 +530,7 @@ void qt_deferred_map_take( TQWidget* w ) bool qt_deferred_map_contains( TQWidget* w ) { if (!deferred_map_list) - return FALSE; + return false; else return deferred_map_list->contains( w ); } @@ -544,7 +544,7 @@ public: void setWFlags( WFlags f ) { TQWidget::setWFlags(f); } void clearWFlags( WFlags f ) { TQWidget::clearWFlags(f); } bool translateMouseEvent( const XEvent * ); - bool translateKeyEventInternal( const XEvent *, int& count, TQString& text, int& state, char& ascii, int &code, TQEvent::Type &type, bool willRepeat=FALSE, bool statefulTranslation=TRUE ); + bool translateKeyEventInternal( const XEvent *, int& count, TQString& text, int& state, char& ascii, int &code, TQEvent::Type &type, bool willRepeat=false, bool statefulTranslation=true ); bool translateKeyEvent( const XEvent *, bool grab ); bool translatePaintEvent( const XEvent * ); bool translateConfigEvent( const XEvent * ); @@ -754,15 +754,15 @@ static bool x11_badwindow; // starts to ignore bad window errors from X void qt_ignore_badwindow() { - x11_ignore_badwindow = TRUE; - x11_badwindow = FALSE; + x11_ignore_badwindow = true; + x11_badwindow = false; } // ends ignoring bad window errors and returns whether an error // had happen. bool qt_badwindow() { - x11_ignore_badwindow = FALSE; + x11_ignore_badwindow = false; return x11_badwindow; } @@ -772,7 +772,7 @@ static int (*original_xio_errhandler)( Display *dpy ); static int qt_x_errhandler( Display *dpy, XErrorEvent *err ) { if ( err->error_code == BadWindow ) { - x11_badwindow = TRUE; + x11_badwindow = true; if ( err->request_code == 25 /* X_SendEvent */ && qt_xdnd_handle_badwindow() ) return 0; @@ -841,7 +841,7 @@ void qt_x11_intern_atom( const char *name, Atom *result) } else { if ( !atoms_to_be_created ) { atoms_to_be_created = new TQAsciiDict<Atom>; - atoms_to_be_created->setAutoDelete( FALSE ); + atoms_to_be_created->setAutoDelete( false ); } atoms_to_be_created->insert( name, result ); *result = 0; @@ -889,7 +889,7 @@ static void qt_x11_process_intern_atoms() #endif delete atoms_to_be_created; atoms_to_be_created = 0; - create_atoms_now = TRUE; + create_atoms_now = true; } } @@ -908,7 +908,7 @@ bool TQApplication::x11_apply_settings() unsigned long nitems, after = 1; unsigned char *data = 0; TQDateTime timestamp, settingsstamp; - bool update_timestamp = FALSE; + bool update_timestamp = false; if (XGetWindowProperty(appDpy, TQPaintDevice::x11AppRootWindow( 0 ), qt_settings_timestamp, 0, 0, @@ -940,14 +940,14 @@ bool TQApplication::x11_apply_settings() TQSettings settings; settingsstamp = settings.lastModificationTime( "/qt/font" ); if (! settingsstamp.isValid()) - return FALSE; + return false; if ( appliedstamp && appliedstamp == settingsstamp.toTime_t() ) - return TRUE; + return true; appliedstamp = settingsstamp.toTime_t(); if (! timestamp.isValid() || settingsstamp > timestamp) - update_timestamp = TRUE; + update_timestamp = true; /* TQt settings. This is now they are written into the datastream. @@ -998,7 +998,7 @@ bool TQApplication::x11_apply_settings() } if (pal != *tqt_std_pal && pal != TQApplication::palette()) { - TQApplication::setPalette(pal, TRUE); + TQApplication::setPalette(pal, true); *tqt_std_pal = pal; } @@ -1010,7 +1010,7 @@ bool TQApplication::x11_apply_settings() font.fromString(str); if (font != TQApplication::font()) - TQApplication::setFont(font, TRUE); + TQApplication::setFont(font, true); } } @@ -1029,8 +1029,8 @@ bool TQApplication::x11_apply_settings() TQString stylename = settings.readEntry( "/qt/style" ); if ( !stylename.isEmpty() && !tqt_explicit_app_style ) { TQApplication::setStyle( stylename ); - // took the style from the user settings, so mark the explicit flag FALSE - tqt_explicit_app_style = FALSE; + // took the style from the user settings, so mark the explicit flag false + tqt_explicit_app_style = false; } num = @@ -1103,10 +1103,10 @@ bool TQApplication::x11_apply_settings() settings.readBoolEntry("/qt/brokenWindowManager", qt_broken_wm); tqt_resolve_symlinks = - settings.readBoolEntry("/qt/resolveSymlinks", TRUE); + settings.readBoolEntry("/qt/resolveSymlinks", true); qt_use_rtl_extensions = - settings.readBoolEntry("/qt/useRtlExtensions", FALSE); + settings.readBoolEntry("/qt/useRtlExtensions", false); #ifndef TQT_NO_XIM if (qt_xim_preferred_style == 0) { @@ -1157,7 +1157,7 @@ bool TQApplication::x11_apply_settings() stamp.buffer().size()); } - return TRUE; + return true; } @@ -1205,13 +1205,13 @@ static void qt_set_x11_resources( const char* font = 0, const char* fg = 0, TQCString resFont, resFG, resBG, resEF, sysFont; - TQApplication::setEffectEnabled( TQt::UI_General, FALSE); - TQApplication::setEffectEnabled( TQt::UI_AnimateMenu, FALSE); - TQApplication::setEffectEnabled( TQt::UI_FadeMenu, FALSE); - TQApplication::setEffectEnabled( TQt::UI_AnimateCombo, FALSE ); - TQApplication::setEffectEnabled( TQt::UI_AnimateTooltip, FALSE ); - TQApplication::setEffectEnabled( TQt::UI_FadeTooltip, FALSE ); - TQApplication::setEffectEnabled( TQt::UI_AnimateToolBox, FALSE ); + TQApplication::setEffectEnabled( TQt::UI_General, false); + TQApplication::setEffectEnabled( TQt::UI_AnimateMenu, false); + TQApplication::setEffectEnabled( TQt::UI_FadeMenu, false); + TQApplication::setEffectEnabled( TQt::UI_AnimateCombo, false ); + TQApplication::setEffectEnabled( TQt::UI_AnimateTooltip, false ); + TQApplication::setEffectEnabled( TQt::UI_FadeTooltip, false ); + TQApplication::setEffectEnabled( TQt::UI_AnimateToolBox, false ); if ( TQApplication::desktopSettingsAware() && !TQApplication::x11_apply_settings() ) { int format; @@ -1247,7 +1247,7 @@ static void qt_set_x11_resources( const char* font = 0, const char* fg = 0, r = resl; while ( isspace((uchar) res[l]) ) l++; - bool mine = FALSE; + bool mine = false; if ( res[l] == '*' && (res[l+1] == 'f' || res[l+1] == 'b' || res[l+1] == 'g' || res[l+1] == 'F' || res[l+1] == 'B' || res[l+1] == 'G' || @@ -1258,20 +1258,20 @@ static void qt_set_x11_resources( const char* font = 0, const char* fg = 0, int i = item.find( ":" ); key = item.left( i ).stripWhiteSpace().mid(1).lower(); value = item.right( item.length() - i - 1 ).stripWhiteSpace(); - mine = TRUE; + mine = true; } else if ( res[l] == appName[0] || (appClass && res[l] == appClass[0]) ) { if (res.mid(l,apnl) == apn && (res[l+apnl] == '.' || res[l+apnl] == '*')) { TQCString item = res.mid( l, r - l ).simplifyWhiteSpace(); int i = item.find( ":" ); key = item.left( i ).stripWhiteSpace().mid(apnl+1).lower(); value = item.right( item.length() - i - 1 ).stripWhiteSpace(); - mine = TRUE; + mine = true; } else if (res.mid(l,apcl) == apc && (res[l+apcl] == '.' || res[l+apcl] == '*')) { TQCString item = res.mid( l, r - l ).simplifyWhiteSpace(); int i = item.find( ":" ); key = item.left( i ).stripWhiteSpace().mid(apcl+1).lower(); value = item.right( item.length() - i - 1 ).stripWhiteSpace(); - mine = TRUE; + mine = true; } } @@ -1327,7 +1327,7 @@ static void qt_set_x11_resources( const char* font = 0, const char* fg = 0, } if ( fnt != TQApplication::font() ) { - TQApplication::setFont( fnt, TRUE ); + TQApplication::setFont( fnt, true ); } } @@ -1353,10 +1353,10 @@ static void qt_set_x11_resources( const char* font = 0, const char* fg = 0, int h,s,v; fg.hsv(&h,&s,&v); TQColor base = TQt::white; - bool bright_mode = FALSE; + bool bright_mode = false; if (v >= 255-50) { base = btn.dark(150); - bright_mode = TRUE; + bright_mode = true; } TQColorGroup cg( fg, btn, btn.light(), @@ -1382,7 +1382,7 @@ static void qt_set_x11_resources( const char* font = 0, const char* fg = 0, } TQPalette pal( cg, dcg, cg ); if ( pal != *tqt_std_pal && pal != TQApplication::palette() ) - TQApplication::setPalette( pal, TRUE ); + TQApplication::setPalette( pal, true ); *tqt_std_pal = pal; } @@ -1415,7 +1415,7 @@ static void qt_detect_broken_window_manager() if (e == Success && type == XA_WINDOW && format == 32 && nitems == 1 && after == 0) { // detected SGI 4Dwm - qt_broken_wm = TRUE; + qt_broken_wm = true; } } @@ -1473,13 +1473,13 @@ void qt_get_net_supported() bool qt_net_supports(Atom atom) { if (! qt_net_supported_list) - return FALSE; + return false; - bool supported = FALSE; + bool supported = false; int i = 0; while (qt_net_supported_list[i] != 0) { if (qt_net_supported_list[i++] == atom) { - supported = TRUE; + supported = true; break; } } @@ -1667,7 +1667,7 @@ void tqt_init_internal( int *argcptr, char **argv, if ( display && ((!argcptr) || (!argv)) ) { // TQt part of other application - appForeignDpy = TRUE; + appForeignDpy = true; appDpy = display; // Set application name and class @@ -1776,7 +1776,7 @@ void tqt_init_internal( int *argcptr, char **argv, } #endif } else if ( arg == "-cmap" ) { // xv uses this name - qt_cmap_option = TRUE; + qt_cmap_option = true; } #if defined(QT_DEBUG) else if ( arg == "-sync" ) @@ -1807,7 +1807,7 @@ void tqt_init_internal( int *argcptr, char **argv, s += (char)c; } if ( s == "gdb" ) { - appNoGrab = TRUE; + appNoGrab = true; tqDebug( "TQt: gdb: -nograb added to command-line options.\n" "\t Use the -dograb option to enforce grabbing." ); } @@ -1818,7 +1818,7 @@ void tqt_init_internal( int *argcptr, char **argv, if ( display ) { // Display connection already opened by another application - appForeignDpy = TRUE; + appForeignDpy = true; appDpy = display; } else { @@ -1833,7 +1833,7 @@ void tqt_init_internal( int *argcptr, char **argv, } if ( appSync ) // if "-sync" argument - XSynchronize( appDpy, TRUE ); + XSynchronize( appDpy, true ); } } } @@ -1867,7 +1867,7 @@ void tqt_init_internal( int *argcptr, char **argv, int screen; TQString serverVendor( ServerVendor( appDpy) ); if (serverVendor.contains("XFree86") && VendorRelease(appDpy) < 40300000) - tqt_hebrew_keyboard_hack = TRUE; + tqt_hebrew_keyboard_hack = true; for ( screen = 0; screen < appScreenCount; ++screen ) { TQPaintDevice::x_appdepth_arr[ screen ] = DefaultDepth(appDpy, screen); @@ -1890,7 +1890,7 @@ void tqt_init_internal( int *argcptr, char **argv, TQPaintDevice::x_appdepth_arr[ screen ] = vi->depth; TQPaintDevice::x_appcells_arr[ screen ] = vi->visual->map_entries; TQPaintDevice::x_appvisual_arr[ screen ] = vi->visual; - TQPaintDevice::x_appdefvisual_arr[ screen ] = FALSE; + TQPaintDevice::x_appdefvisual_arr[ screen ] = false; XFree(vi); } else { // couldn't get info about the visual, use the default instead @@ -1901,7 +1901,7 @@ void tqt_init_internal( int *argcptr, char **argv, if (!vis) { // use the default visual vis = DefaultVisual(appDpy, screen); - TQPaintDevice::x_appdefvisual_arr[ screen ] = TRUE; + TQPaintDevice::x_appdefvisual_arr[ screen ] = true; if ( qt_visual_option == TrueColor || TQApplication::colorSpec() == TQApplication::ManyColor ) { @@ -1933,7 +1933,7 @@ void tqt_init_internal( int *argcptr, char **argv, if ( colormap && screen == appScreen ) { // use the provided colormap for the default screen only TQPaintDevice::x_appcolormap_arr[ screen ] = colormap; - TQPaintDevice::x_appdefcolormap_arr[ screen ] = FALSE; + TQPaintDevice::x_appdefcolormap_arr[ screen ] = false; } else { if ( vis->c_class == TrueColor ) { TQPaintDevice::x_appdefcolormap_arr[ screen ] = @@ -2099,7 +2099,7 @@ void tqt_init_internal( int *argcptr, char **argv, Q_UNUSED( xrandr_eventbase ); if ( XRRQueryExtension( appDpy, &xrandr_eventbase, &xrandr_errorbase ) ) { // XRandR is supported - qt_use_xrandr = TRUE; + qt_use_xrandr = true; } #endif // TQT_NO_XRANDR @@ -2121,7 +2121,7 @@ void tqt_init_internal( int *argcptr, char **argv, int xsync_major, xsync_minor; if ( XSyncQueryExtension( appDpy, &xsync_eventbase, &xsync_errorbase ) && XSyncInitialize( appDpy, &xsync_major, &xsync_minor ) ) { - qt_use_xsync = TRUE; + qt_use_xsync = true; } #endif @@ -2291,7 +2291,7 @@ void tqt_init_internal( int *argcptr, char **argv, } dev = NULL; for ( devs = devices, i = 0; i < ndev; i++, devs++ ) { - gotEraser = FALSE; + gotEraser = false; #if defined(Q_OS_IRIX) gotStylus = ( !strncmp(devs->name, @@ -2416,7 +2416,7 @@ void tqt_init_internal( int *argcptr, char **argv, } tqt_resolve_symlinks = - settings.readBoolEntry("/qt/resolveSymlinks", TRUE); + settings.readBoolEntry("/qt/resolveSymlinks", true); } } } @@ -2615,7 +2615,7 @@ void qt_save_rootinfo() // save new root info void qt_updated_rootinfo() { - app_save_rootinfo = TRUE; + app_save_rootinfo = true; } bool qt_wstate_iconified( WId winid ) @@ -2627,7 +2627,7 @@ bool qt_wstate_iconified( WId winid ) int r = XGetWindowProperty( appDpy, winid, tqt_wm_state, 0, 2, False, AnyPropertyType, &type, &format, &length, &after, &data ); - bool iconic = FALSE; + bool iconic = false; if ( r == Success && data && format == 32 ) { // TQ_UINT32 *wstate = (TQ_UINT32*)data; unsigned long *wstate = (unsigned long *) data; @@ -2673,7 +2673,7 @@ bool qt_nograb() // application no-grab option #if defined(QT_DEBUG) return appNoGrab; #else - return FALSE; + return false; #endif } @@ -2717,13 +2717,13 @@ GC tqt_xget_readonly_gc( int scrn, bool monochrome ) // get read-only GC if ( !app_gc_ro_m ) // create GC for bitmap memset( (app_gc_ro_m = new GC[appScreenCount]), 0, appScreenCount * sizeof( GC ) ); if ( !app_gc_ro_m[scrn] ) - app_gc_ro_m[scrn] = create_gc( scrn, TRUE ); + app_gc_ro_m[scrn] = create_gc( scrn, true ); gc = app_gc_ro_m[scrn]; } else { // create standard GC if ( !app_gc_ro ) memset( (app_gc_ro = new GC[appScreenCount]), 0, appScreenCount * sizeof( GC ) ); if ( !app_gc_ro[scrn] ) - app_gc_ro[scrn] = create_gc( scrn, FALSE ); + app_gc_ro[scrn] = create_gc( scrn, false ); gc = app_gc_ro[scrn]; } return gc; @@ -2741,13 +2741,13 @@ GC tqt_xget_temp_gc( int scrn, bool monochrome ) // get temporary GC if ( !app_gc_tmp_m ) // create GC for bitmap memset( (app_gc_tmp_m = new GC[appScreenCount]), 0, appScreenCount * sizeof( GC ) ); if ( !app_gc_tmp_m[scrn] ) - app_gc_tmp_m[scrn] = create_gc( scrn, TRUE ); + app_gc_tmp_m[scrn] = create_gc( scrn, true ); gc = app_gc_tmp_m[scrn]; } else { // create standard GC if ( !app_gc_tmp ) memset( (app_gc_tmp = new GC[appScreenCount]), 0, appScreenCount * sizeof( GC ) ); if ( !app_gc_tmp[scrn] ) - app_gc_tmp[scrn] = create_gc( scrn, FALSE ); + app_gc_tmp[scrn] = create_gc( scrn, false ); gc = app_gc_tmp[scrn]; } return gc; @@ -2874,9 +2874,9 @@ static TQCursorList *cursorStack = 0; corresponding restoreOverrideCursor(), otherwise the stack will never be emptied. - If \a replace is TRUE, the new cursor will replace the last + If \a replace is true, the new cursor will replace the last override cursor (the stack keeps its depth). If \a replace is - FALSE, the new stack is pushed onto the top of the stack. + false, the new stack is pushed onto the top of the stack. Example: \code @@ -2893,7 +2893,7 @@ void TQApplication::setOverrideCursor( const TQCursor &cursor, bool replace ) if ( !cursorStack ) { cursorStack = new TQCursorList; TQ_CHECK_PTR( cursorStack ); - cursorStack->setAutoDelete( TRUE ); + cursorStack->setAutoDelete( true ); } app_cursor = new TQCursor( cursor ); TQ_CHECK_PTR( app_cursor ); @@ -2949,15 +2949,15 @@ void TQApplication::restoreOverrideCursor() /*! \fn bool TQApplication::hasGlobalMouseTracking() - Returns TRUE if global mouse tracking is enabled; otherwise - returns FALSE. + Returns true if global mouse tracking is enabled; otherwise + returns false. \sa setGlobalMouseTracking() */ /*! - Enables global mouse tracking if \a enable is TRUE, or disables it - if \a enable is FALSE. + Enables global mouse tracking if \a enable is true, or disables it + if \a enable is false. Enabling global mouse tracking makes it possible for widget event filters or application event filters to get all mouse move events, @@ -2966,18 +2966,18 @@ void TQApplication::restoreOverrideCursor() Global mouse tracking does not affect widgets and their mouseMoveEvent(). For a widget to get mouse move events when no - button is depressed, it must do TQWidget::setMouseTracking(TRUE). + button is depressed, it must do TQWidget::setMouseTracking(true). This function uses an internal counter. Each - setGlobalMouseTracking(TRUE) must have a corresponding - setGlobalMouseTracking(FALSE): + setGlobalMouseTracking(true) must have a corresponding + setGlobalMouseTracking(false): \code // at this point global mouse tracking is off - TQApplication::setGlobalMouseTracking( TRUE ); - TQApplication::setGlobalMouseTracking( TRUE ); - TQApplication::setGlobalMouseTracking( FALSE ); + TQApplication::setGlobalMouseTracking( true ); + TQApplication::setGlobalMouseTracking( true ); + TQApplication::setGlobalMouseTracking( false ); // at this point it's still on - TQApplication::setGlobalMouseTracking( FALSE ); + TQApplication::setGlobalMouseTracking( false ); // but now it's off \endcode @@ -2998,13 +2998,13 @@ void TQApplication::setGlobalMouseTracking( bool enable ) while ( (w=it.current()) ) { if ( app_tracking > 0 ) { // switch on if ( !w->testWState(WState_MouseTracking) ) { - w->setMouseTracking( TRUE ); + w->setMouseTracking( true ); w->clearWState( WState_MouseTracking ); } } else { // switch off if ( !w->testWState(WState_MouseTracking) ) { w->setWState( WState_MouseTracking ); - w->setMouseTracking( FALSE ); + w->setMouseTracking( false ); } } ++it; @@ -3025,7 +3025,7 @@ Window qt_x11_findClientWindow( Window win, Atom property, bool leaf ) uchar *data; Window root, parent, target=0, *children=0; uint nchildren; - if ( XGetWindowProperty( appDpy, win, property, 0, 0, FALSE, AnyPropertyType, + if ( XGetWindowProperty( appDpy, win, property, 0, 0, false, AnyPropertyType, &type, &format, &nitems, &after, &data ) == Success ) { if ( data ) XFree( (char *)data ); @@ -3049,9 +3049,9 @@ Window qt_x11_findClientWindow( Window win, Atom property, bool leaf ) Returns a pointer to the widget at global screen position \a (x, y), or 0 if there is no TQt widget there. - If \a child is FALSE and there is a child widget at position \a + If \a child is false and there is a child widget at position \a (x, y), the top-level widget containing it is returned. If \a child - is TRUE the child widget at position \a (x, y) is returned. + is true the child widget at position \a (x, y) is returned. This function is normally rather slow. @@ -3077,7 +3077,7 @@ TQWidget *TQApplication::widgetAt( int x, int y, bool child ) if ( !w ) { qt_ignore_badwindow(); - target = qt_x11_findClientWindow( target, tqt_wm_state, TRUE ); + target = qt_x11_findClientWindow( target, tqt_wm_state, true ); if (qt_badwindow() ) return 0; w = TQWidget::find( (WId)target ); @@ -3123,9 +3123,9 @@ TQWidget *TQApplication::widgetAt( int x, int y, bool child ) Returns a pointer to the widget at global screen position \a pos, or 0 if there is no TQt widget there. - If \a child is FALSE and there is a child widget at position \a + If \a child is false and there is a child widget at position \a pos, the top-level widget containing it is returned. If \a child - is TRUE the child widget at position \a pos is returned. + is true the child widget at position \a pos is returned. */ @@ -3317,7 +3317,7 @@ int TQApplication::x11ProcessEvent( XEvent* event ) { switch ( event->type ) { case ButtonPress: - ignoreNextMouseReleaseEvent = FALSE; + ignoreNextMouseReleaseEvent = false; tqt_x_user_time = event->xbutton.time; // fallthrough intended case ButtonRelease: @@ -3365,11 +3365,11 @@ int TQApplication::x11ProcessEvent( XEvent* event ) } TQETWidget *keywidget=0; - bool grabbed=FALSE; + bool grabbed=false; if ( event->type==XKeyPress || event->type==XKeyRelease ) { keywidget = (TQETWidget*)TQWidget::keyboardGrabber(); if ( keywidget ) { - grabbed = TRUE; + grabbed = true; } else { if ( focus_widget ) keywidget = (TQETWidget*)focus_widget; @@ -3398,12 +3398,12 @@ int TQApplication::x11ProcessEvent( XEvent* event ) // #endif if( ( event->type==XKeyPress || event->type==XKeyRelease ) && sm_blockUserInput ) // block user interaction during session management - return TRUE; + return true; // for XIM handling TQInputContext *qic = keywidget->getInputContext(); if( qic && qic->x11FilterEvent( keywidget, event ) ) - return TRUE; + return true; // filterEvent() accepts TQEvent *event rather than preexpanded key // event attribute values. This is intended to pass other IM-related @@ -3421,20 +3421,20 @@ int TQApplication::x11ProcessEvent( XEvent* event ) keywidget->translateKeyEventInternal( event, count, text, state, ascii, code, type, - FALSE, FALSE ); + false, false ); // both key press/release is required for some complex // input methods. don't eliminate anything. - TQKeyEvent keyevent( type, code, ascii, state, text, FALSE, count ); + TQKeyEvent keyevent( type, code, ascii, state, text, false, count ); if( qic && qic->filterEvent( &keyevent ) ) - return TRUE; + return true; } } else #endif // TQT_NO_IM { if ( XFilterEvent( event, None ) ) - return TRUE; + return true; } if ( qt_x11EventFilter(event) ) // send through app filter @@ -3548,7 +3548,7 @@ int TQApplication::x11ProcessEvent( XEvent* event ) if ( app_do_modal ) // modal event handling if ( !tqt_try_modal(widget, event) ) { if ( event->type == ClientMessage ) - x11ClientMessage( widget, event, TRUE ); + x11ClientMessage( widget, event, true ); return 1; } @@ -3568,7 +3568,7 @@ int TQApplication::x11ProcessEvent( XEvent* event ) case ButtonRelease: // mouse event if ( ignoreNextMouseReleaseEvent ) { - ignoreNextMouseReleaseEvent = FALSE; + ignoreNextMouseReleaseEvent = false; break; } // fall through intended @@ -3589,7 +3589,7 @@ int TQApplication::x11ProcessEvent( XEvent* event ) widget->translateMouseEvent( event ); #if defined(QT_TABLET_SUPPORT) } else { - chokeMouse = FALSE; + chokeMouse = false; } #endif break; @@ -3734,7 +3734,7 @@ int TQApplication::x11ProcessEvent( XEvent* event ) widget->topData()->spont_unmapped = 1; TQHideEvent e; TQApplication::sendSpontaneousEvent( widget, &e ); - widget->hideChildren( TRUE ); + widget->hideChildren( true ); } break; @@ -3742,7 +3742,7 @@ int TQApplication::x11ProcessEvent( XEvent* event ) if ( widget->isTopLevel() && widget->topData()->spont_unmapped ) { widget->topData()->spont_unmapped = 0; - widget->showChildren( TRUE ); + widget->showChildren( true ); TQShowEvent e; TQApplication::sendSpontaneousEvent( widget, &e ); } @@ -3840,15 +3840,15 @@ int TQApplication::x11ProcessEvent( XEvent* event ) reimplement this function, you get direct access to all X events that the are received from the X server. - Return TRUE if you want to stop the event from being processed. - Return FALSE for normal event dispatching. + Return true if you want to stop the event from being processed. + Return false for normal event dispatching. \sa x11ProcessEvent() */ bool TQApplication::x11EventFilter( XEvent * ) { - return FALSE; + return false; } @@ -3888,9 +3888,9 @@ void tqt_enter_modal( TQWidget *widget ) tqt_dispatchEnterLeave( 0, TQWidget::find((WId)curWin) ); tqt_modal_stack->insert( 0, widget ); - app_do_modal = TRUE; + app_do_modal = true; curWin = 0; - ignoreNextMouseReleaseEvent = FALSE; + ignoreNextMouseReleaseEvent = false; } @@ -3901,13 +3901,13 @@ void tqt_leave_modal( TQWidget *widget ) delete tqt_modal_stack; tqt_modal_stack = 0; TQPoint p( TQCursor::pos() ); - TQWidget* w = TQApplication::widgetAt( p.x(), p.y(), TRUE ); + TQWidget* w = TQApplication::widgetAt( p.x(), p.y(), true ); tqt_dispatchEnterLeave( w, TQWidget::find( curWin ) ); // send synthetic enter event curWin = w? w->winId() : 0; } } app_do_modal = tqt_modal_stack != 0; - ignoreNextMouseReleaseEvent = TRUE; + ignoreNextMouseReleaseEvent = true; if (widget->parentWidget()) { TQEvent e(TQEvent::WindowUnblocked); @@ -3924,16 +3924,16 @@ TQ_EXPORT bool tqt_try_modal( TQWidget *widget, XEvent *event ) case ButtonPress: case ButtonRelease: case MotionNotify: - return TRUE; + return true; default: break; } } if ( tqt_tryModalHelper( widget ) ) - return TRUE; + return true; - bool block_event = FALSE; + bool block_event = false; switch ( event->type ) { case ButtonPress: // disallow mouse/key events case ButtonRelease: @@ -3943,7 +3943,7 @@ TQ_EXPORT bool tqt_try_modal( TQWidget *widget, XEvent *event ) case EnterNotify: case LeaveNotify: case ClientMessage: - block_event = TRUE; + block_event = true; break; default: break; @@ -3979,10 +3979,10 @@ void TQApplication::openPopup( TQWidget *popup ) popupWidgets->append( popup ); // add to end of list if ( popupWidgets->count() == 1 && !qt_nograb() ){ // grab mouse/keyboard - int r = XGrabKeyboard( popup->x11Display(), popup->winId(), FALSE, + int r = XGrabKeyboard( popup->x11Display(), popup->winId(), false, GrabModeSync, GrabModeAsync, CurrentTime ); if ( (popupGrabOk = (r == GrabSuccess)) ) { - r = XGrabPointer( popup->x11Display(), popup->winId(), TRUE, + r = XGrabPointer( popup->x11Display(), popup->winId(), true, (uint)(ButtonPressMask | ButtonReleaseMask | ButtonMotionMask | EnterWindowMask | LeaveWindowMask | PointerMotionMask), @@ -4019,7 +4019,7 @@ void TQApplication::closePopup( TQWidget *popup ) popupOfPopupButtonFocus = 0; } if ( popupWidgets->count() == 0 ) { // this was the last popup - popupCloseDownMode = TRUE; // control mouse events + popupCloseDownMode = true; // control mouse events delete popupWidgets; popupWidgets = 0; if ( !qt_nograb() && popupGrabOk ) { // grabbing not disabled @@ -4056,10 +4056,10 @@ void TQApplication::closePopup( TQWidget *popup ) aw->setFocus(); TQFocusEvent::resetReason(); if ( popupWidgets->count() == 1 && !qt_nograb() ){ // grab mouse/keyboard - int r = XGrabKeyboard( aw->x11Display(), aw->winId(), FALSE, + int r = XGrabKeyboard( aw->x11Display(), aw->winId(), false, GrabModeSync, GrabModeAsync, CurrentTime ); if ( (popupGrabOk = (r == GrabSuccess)) ) { - r = XGrabPointer( aw->x11Display(), aw->winId(), TRUE, + r = XGrabPointer( aw->x11Display(), aw->winId(), true, (uint)(ButtonPressMask | ButtonReleaseMask | ButtonMotionMask | EnterWindowMask | LeaveWindowMask | PointerMotionMask), @@ -4110,7 +4110,7 @@ int qt_x11_translateButtonState( int s ) bool TQETWidget::translateMouseEvent( const XEvent *event ) { - static bool manualGrab = FALSE; + static bool manualGrab = false; TQEvent::Type type; // event parameters TQPoint pos; TQPoint globalPos; @@ -4119,14 +4119,14 @@ bool TQETWidget::translateMouseEvent( const XEvent *event ) XEvent nextEvent; if ( sm_blockUserInput ) // block user interaction during session management - return TRUE; + return true; static int x_root_save = -1, y_root_save = -1; if ( event->type == MotionNotify ) { // mouse move if (event->xmotion.root != RootWindow(appDpy, x11Screen()) && ! qt_xdnd_dragging ) - return FALSE; + return false; XMotionEvent lastMotion = event->xmotion; while( XPending( appDpy ) ) { // compres mouse moves @@ -4162,14 +4162,14 @@ bool TQETWidget::translateMouseEvent( const XEvent *event ) // throw away mouse move events that are sent multiple times to the same // position - bool throw_away = FALSE; + bool throw_away = false; if ( x_root_save == globalPos.x() && y_root_save == globalPos.y() ) - throw_away = TRUE; + throw_away = true; x_root_save = globalPos.x(); y_root_save = globalPos.y(); if ( throw_away ) - return TRUE; + return true; } else if ( event->type == EnterNotify || event->type == LeaveNotify) { XEvent *xevent = (XEvent *)event; //unsigned int xstate = event->xcrossing.state; @@ -4235,7 +4235,7 @@ bool TQETWidget::translateMouseEvent( const XEvent *event ) (btn == 6 || btn == 7) ); translateWheelEvent( globalPos.x(), globalPos.y(), delta, state, (hor)?Horizontal:Vertical ); } - return TRUE; + return true; // history navigation buttons case 8: button = HistoryBackButton; break; @@ -4248,8 +4248,8 @@ bool TQETWidget::translateMouseEvent( const XEvent *event ) if ( translateXinputEvent( &myEv ) ) { //Spontaneous event sent. Check if we need to continue. if ( chokeMouse ) { - chokeMouse = FALSE; - return FALSE; + chokeMouse = false; + return false; } } } @@ -4281,14 +4281,14 @@ bool TQETWidget::translateMouseEvent( const XEvent *event ) if ( translateXinputEvent( &myEv ) ) { //Spontaneous event sent. Check if we need to continue. if ( chokeMouse ) { - chokeMouse = FALSE; - return FALSE; + chokeMouse = false; + return false; } } } #endif if ( manualGrab ) { // release manual grab - manualGrab = FALSE; + manualGrab = false; XUngrabPointer( x11Display(), CurrentTime ); XFlush( x11Display() ); } @@ -4299,7 +4299,7 @@ bool TQETWidget::translateMouseEvent( const XEvent *event ) mouseActWindow = winId(); // save some event params mouseButtonState = state; if ( type == 0 ) // don't send event - return FALSE; + return false; if ( tqApp->inPopupMode() ) { // in popup mode TQWidget *popup = tqApp->activePopupWidget(); @@ -4309,7 +4309,7 @@ bool TQETWidget::translateMouseEvent( const XEvent *event ) else // send to last popup pos = popup->mapFromGlobal( globalPos ); } - bool releaseAfter = FALSE; + bool releaseAfter = false; TQWidget *popupChild = popup->childAt( pos ); TQWidget *popupTarget = popupChild ? popupChild : popup; @@ -4330,7 +4330,7 @@ bool TQETWidget::translateMouseEvent( const XEvent *event ) popupOfPopupButtonFocus = popup; break; case TQEvent::MouseButtonRelease: - releaseAfter = TRUE; + releaseAfter = true; break; default: break; // nothing for mouse move @@ -4377,7 +4377,7 @@ bool TQETWidget::translateMouseEvent( const XEvent *event ) } else { if ( type != TQEvent::MouseButtonRelease && state != 0 && TQWidget::find((WId)mouseActWindow) ) { - manualGrab = TRUE; // need to manually grab + manualGrab = true; // need to manually grab XGrabPointer( dpy, mouseActWindow, False, (uint)(ButtonPressMask | ButtonReleaseMask | ButtonMotionMask | @@ -4398,9 +4398,9 @@ bool TQETWidget::translateMouseEvent( const XEvent *event ) } if ( popupCloseDownMode ) { - popupCloseDownMode = FALSE; + popupCloseDownMode = false; if ( testWFlags(WType_Popup) ) // ignore replayed event - return TRUE; + return true; } if ( type == TQEvent::MouseButtonRelease && @@ -4420,7 +4420,7 @@ bool TQETWidget::translateMouseEvent( const XEvent *event ) TQApplication::sendSpontaneousEvent( widget, &e ); } } - return TRUE; + return true; } @@ -4437,7 +4437,7 @@ bool TQETWidget::translateWheelEvent( int global_x, int global_y, int delta, int TQWheelEvent e( mapFromGlobal(TQPoint( global_x, global_y)), TQPoint(global_x, global_y), delta, state, orient ); if ( TQApplication::sendSpontaneousEvent( this, &e ) ) - return TRUE; + return true; } // send the event to the widget that has the focus or its ancestors, if different @@ -4449,9 +4449,9 @@ bool TQETWidget::translateWheelEvent( int global_x, int global_y, int delta, int TQWheelEvent e( mapFromGlobal(TQPoint( global_x, global_y)), TQPoint(global_x, global_y), delta, state, orient ); if ( TQApplication::sendSpontaneousEvent( w, &e ) ) - return TRUE; + return true; } - return FALSE; + return false; } @@ -4565,7 +4565,7 @@ bool TQETWidget::translateXinputEvent( const XEvent *ev ) #if defined (Q_OS_IRIX) s = XQueryDeviceState( appDpy, dev ); if ( s == NULL ) - return FALSE; + return false; iClass = s->data; for ( j = 0; j < s->num_classes; j++ ) { if ( iClass->c_class == ValuatorClass ) { @@ -4628,13 +4628,13 @@ bool TQETWidget::translateXinputEvent( const XEvent *ev ) TQTabletEvent e( t, curr, global, deviceType, pressure, xTilt, yTilt, tId ); TQApplication::sendSpontaneousEvent( w, &e ); - return TRUE; + return true; } #endif bool TQETWidget::translatePropertyEvent(const XEvent *event) { - if (!isTopLevel()) return TRUE; + if (!isTopLevel()) return true; Atom ret; int format, e; @@ -4661,8 +4661,8 @@ bool TQETWidget::translatePropertyEvent(const XEvent *event) } } } else if (event->xproperty.atom == qt_net_wm_state) { - bool max = FALSE; - bool full = FALSE; + bool max = false; + bool full = false; if (event->xproperty.state == PropertyNewValue) { // using length of 1024 should be safe for all current and @@ -4676,33 +4676,33 @@ bool TQETWidget::translatePropertyEvent(const XEvent *event) unsigned long i; for (i = 0; i < nitems; i++) { if (states[i] == qt_net_wm_state_max_v || states[i] == qt_net_wm_state_max_h) - max = TRUE; + max = true; else if (states[i] == qt_net_wm_state_fullscreen) - full = TRUE; + full = true; } } } - bool send_event = FALSE; + bool send_event = false; if (qt_net_supports(qt_net_wm_state_max_v) && qt_net_supports(qt_net_wm_state_max_h)) { if (max && !isMaximized()) { setWState(WState_Maximized); - send_event = TRUE; + send_event = true; } else if (!max && isMaximized()) { clearWState(WState_Maximized); - send_event = TRUE; + send_event = true; } } if (qt_net_supports(qt_net_wm_state_fullscreen)) { if (full && !isFullScreen()) { setWState(WState_FullScreen); - send_event = TRUE; + send_event = true; } else if (!full && isFullScreen()) { clearWState(WState_FullScreen); - send_event = TRUE; + send_event = true; } } @@ -4782,7 +4782,7 @@ bool TQETWidget::translatePropertyEvent(const XEvent *event) if (data) XFree(data); - return TRUE; + return true; } #ifndef XK_ISO_Left_Tab @@ -5223,9 +5223,9 @@ bool TQETWidget::translateKeyEventInternal( const XEvent *event, int& count, if ( !keyDict ) { keyDict = new TQIntDict<void>( 13 ); - keyDict->setAutoDelete( FALSE ); + keyDict->setAutoDelete( false ); textDict = new TQIntDict<void>( 13 ); - textDict->setAutoDelete( FALSE ); + textDict->setAutoDelete( false ); tqAddPostRoutine( deleteKeyDicts ); } @@ -5256,7 +5256,7 @@ bool TQETWidget::translateKeyEventInternal( const XEvent *event, int& count, int keycode = event->xkey.keycode; if ( type == TQEvent::KeyPress ) { - bool mb=FALSE; + bool mb=false; // commit string handling is done by // TQXIMInputContext::x11FilterEvent() and are passed to // widgets via TQIMEvent regardless of XIM style, so the @@ -5266,7 +5266,7 @@ bool TQETWidget::translateKeyEventInternal( const XEvent *event, int& count, TQTLWExtra* xd = tlw->topData(); TQInputContext *qic = (TQInputContext *) xd->xic; if ( qic ) { - mb=TRUE; + mb=true; count = qic->lookupString(&xkeyevent, chars, &key, &status); } } @@ -5362,7 +5362,7 @@ bool TQETWidget::translateKeyEventInternal( const XEvent *event, int& count, chars[0] = 0; directionKeyEvent = 0; lastWinId = 0; - return TRUE; + return true; } else { directionKeyEvent = 0; lastWinId = 0; @@ -5493,7 +5493,7 @@ bool TQETWidget::translateKeyEventInternal( const XEvent *event, int& count, text = converted; else text = chars; - return TRUE; + return true; } @@ -5516,14 +5516,14 @@ extern "C" { static Bool qt_keypress_scanner(Display *, XEvent *event, XPointer arg) { if (event->type != XKeyPress && event->type != XKeyRelease) - return FALSE; + return false; qt_auto_repeat_data *d = (qt_auto_repeat_data *) arg; if (d->error || event->xkey.window != d->window || event->xkey.keycode != d->keycode) { - d->error = TRUE; - return FALSE; + d->error = true; + return false; } if (event->type == XKeyPress) { @@ -5534,15 +5534,15 @@ static Bool qt_keypress_scanner(Display *, XEvent *event, XPointer arg) // must be XKeyRelease event if (d->release) { // found a second release - d->error = TRUE; - return FALSE; + d->error = true; + return false; } // found a single release - d->release = TRUE; + d->release = true; d->timestamp = event->xkey.time; - return FALSE; + return false; } static Bool qt_keyrelease_scanner(Display *, XEvent *event, XPointer arg) @@ -5565,15 +5565,15 @@ bool TQETWidget::translateKeyEvent( const XEvent *event, bool grab ) char ascii = 0; if ( sm_blockUserInput ) // block user interaction during session management - return TRUE; + return true; Display *dpy = x11Display(); if ( !isEnabled() ) - return TRUE; + return true; TQEvent::Type type; - bool autor = FALSE; + bool autor = false; TQString text; translateKeyEventInternal( event, count, text, state, ascii, code, type, @@ -5588,18 +5588,18 @@ bool TQETWidget::translateKeyEvent( const XEvent *event, bool grab ) if ( event->type == XKeyPress ) { if ( curr_autorep == event->xkey.keycode ) { - autor = TRUE; + autor = true; curr_autorep = 0; } } else { // look ahead for auto-repeat XEvent nextpress; - auto_repeat_data.release = TRUE; - auto_repeat_data.error = FALSE; + auto_repeat_data.release = true; + auto_repeat_data.error = false; if (XCheckIfEvent(dpy, &nextpress, &qt_keypress_scanner, (XPointer) &auto_repeat_data)) { - autor = TRUE; + autor = true; // Put it back... we COULD send the event now and not need // the static curr_autorep variable. @@ -5614,7 +5614,7 @@ bool TQETWidget::translateKeyEvent( const XEvent *event, bool grab ) TQKeyEvent a( type, code, ascii, state, text, autor, TQMAX( TQMAX(count,1), int(text.length())) ); if ( tqt_tryAccelEvent( this, &a ) ) - return TRUE; + return true; } long save = 0; @@ -5670,7 +5670,7 @@ bool TQETWidget::translateKeyEvent( const XEvent *event, bool grab ) XEvent evPress; // sync the event queue, this makes key compress work better - XSync( dpy, FALSE ); + XSync( dpy, false ); for (;;) { TQString textIntern; @@ -5722,8 +5722,8 @@ bool TQETWidget::translateKeyEvent( const XEvent *event, bool grab ) XEvent dummy; for (;;) { - auto_repeat_data.release = FALSE; - auto_repeat_data.error = FALSE; + auto_repeat_data.release = false; + auto_repeat_data.error = false; if (! XCheckIfEvent(dpy, &dummy, &qt_keypress_scanner, (XPointer) &auto_repeat_data)) break; @@ -5748,7 +5748,7 @@ bool TQETWidget::translateKeyEvent( const XEvent *event, bool grab ) TQContextMenuEvent e( TQContextMenuEvent::Keyboard, TQPoint( 5, 5 ), mapToGlobal( TQPoint( 5, 5 ) ), 0 ); TQApplication::sendSpontaneousEvent( this, &e ); if( e.isAccepted() ) - return TRUE; + return true; } TQKeyEvent e( type, code, ascii, state, text, autor, @@ -5795,7 +5795,7 @@ void qt_insert_sip( TQWidget* scrolled_widget, int dx, int dy ) { if ( !sip_list ) { sip_list = new TQPtrList<TQScrollInProgress>; - sip_list->setAutoDelete( TRUE ); + sip_list->setAutoDelete( true ); } TQScrollInProgress* sip = new TQScrollInProgress( scrolled_widget, dx, dy ); @@ -5848,10 +5848,10 @@ bool translateBySips( TQWidget* that, TQRect& paintRect ) } if ( sips > 1 ) { paintRect.moveBy( dx, dy ); - return TRUE; + return true; } } - return FALSE; + return false; } bool TQETWidget::translatePaintEvent( const XEvent *event ) @@ -5880,7 +5880,7 @@ bool TQETWidget::translatePaintEvent( const XEvent *event ) xevent.xexpose.width, xevent.xexpose.height); if ( translateBySips( this, exposure ) ) - should_clip = TRUE; + should_clip = true; paintRegion = paintRegion.unite( exposure ); } else { translateScrollDoneEvent( &xevent ); @@ -5891,7 +5891,7 @@ bool TQETWidget::translatePaintEvent( const XEvent *event ) if ( should_clip ) { paintRegion = paintRegion.intersect( rect() ); if ( paintRegion.isEmpty() ) - return TRUE; + return true; } TQPaintEvent e( paintRegion ); @@ -5902,7 +5902,7 @@ bool TQETWidget::translatePaintEvent( const XEvent *event ) TQApplication::sendSpontaneousEvent( this, &e ); qt_clear_paintevent_clipping(); clearWState( WState_InPaintEvent ); - return TRUE; + return true; } // @@ -5911,7 +5911,7 @@ bool TQETWidget::translatePaintEvent( const XEvent *event ) bool TQETWidget::translateScrollDoneEvent( const XEvent *event ) { - if ( !sip_list ) return FALSE; + if ( !sip_list ) return false; long id = event->xclient.data.l[0]; @@ -5919,11 +5919,11 @@ bool TQETWidget::translateScrollDoneEvent( const XEvent *event ) for (TQScrollInProgress* sip = sip_list->first(); sip; sip=sip_list->next()) { if ( sip->id == id ) { sip_list->remove( sip_list->current() ); - return TRUE; + return true; } } - return FALSE; + return false; } #if defined(Q_C_CALLBACKS) @@ -6009,7 +6009,7 @@ bool TQETWidget::translateConfigEvent( const XEvent *event ) TQRect cr ( geometry() ); if ( newSize != cr.size() ) { // size changed - was_resize = TRUE; + was_resize = true; TQSize oldSize = size(); cr.setSize( newSize ); crect = cr; @@ -6060,7 +6060,7 @@ bool TQETWidget::translateConfigEvent( const XEvent *event ) incrementSyncCounter(); - return TRUE; + return true; } @@ -6069,7 +6069,7 @@ bool TQETWidget::translateConfigEvent( const XEvent *event ) // bool TQETWidget::translateCloseEvent( const XEvent * ) { - return close(FALSE); + return close(false); } @@ -6167,7 +6167,7 @@ int TQApplication::wheelScrollLines() } /*! - Enables the UI effect \a effect if \a enable is TRUE, otherwise + Enables the UI effect \a effect if \a enable is true, otherwise the effect will not be used. Note: All effects are disabled on screens running at less than @@ -6179,24 +6179,24 @@ void TQApplication::setEffectEnabled( TQt::UIEffect effect, bool enable ) { switch (effect) { case UI_AnimateMenu: - if ( enable ) fade_menu = FALSE; + if ( enable ) fade_menu = false; animate_menu = enable; break; case UI_FadeMenu: if ( enable ) - animate_menu = TRUE; + animate_menu = true; fade_menu = enable; break; case UI_AnimateCombo: animate_combo = enable; break; case UI_AnimateTooltip: - if ( enable ) fade_tooltip = FALSE; + if ( enable ) fade_tooltip = false; animate_tooltip = enable; break; case UI_FadeTooltip: if ( enable ) - animate_tooltip = TRUE; + animate_tooltip = true; fade_tooltip = enable; break; case UI_AnimateToolBox: @@ -6209,10 +6209,10 @@ void TQApplication::setEffectEnabled( TQt::UIEffect effect, bool enable ) } /*! - Returns TRUE if \a effect is enabled; otherwise returns FALSE. + Returns true if \a effect is enabled; otherwise returns false. By default, TQt will try to use the desktop settings. Call - setDesktopSettingsAware(FALSE) to prevent this. + setDesktopSettingsAware(false) to prevent this. Note: All effects are disabled on screens running at less than 16-bit color depth. @@ -6222,7 +6222,7 @@ void TQApplication::setEffectEnabled( TQt::UIEffect effect, bool enable ) bool TQApplication::isEffectEnabled( TQt::UIEffect effect ) { if ( TQColor::numBitPlanes() < 16 || !animate_ui ) - return FALSE; + return false; switch( effect ) { case UI_AnimateMenu: @@ -6308,16 +6308,16 @@ static void sm_performSaveYourself( TQSessionManagerData* ); static void resetSmState() { -// sm_waitingForPhase2 = FALSE; ### never used?!? - sm_waitingForInteraction = FALSE; - sm_interactionActive = FALSE; +// sm_waitingForPhase2 = false; ### never used?!? + sm_waitingForInteraction = false; + sm_interactionActive = false; sm_interactStyle = SmInteractStyleNone; - sm_smActive = FALSE; - sm_blockUserInput = FALSE; - sm_isshutdown = FALSE; -// sm_shouldbefast = FALSE; ### never used?!? - sm_phase2 = FALSE; - sm_in_phase2 = FALSE; + sm_smActive = false; + sm_blockUserInput = false; + sm_isshutdown = false; +// sm_shouldbefast = false; ### never used?!? + sm_phase2 = false; + sm_in_phase2 = false; } @@ -6377,8 +6377,8 @@ static void sm_saveYourselfCallback( SmcConn smcConn, SmPointer clientData, { if (smcConn != smcConnection ) return; - sm_cancel = FALSE; - sm_smActive = TRUE; + sm_cancel = false; + sm_smActive = true; sm_isshutdown = shutdown; sm_saveType = saveType; sm_interactStyle = interactStyle; @@ -6386,9 +6386,9 @@ static void sm_saveYourselfCallback( SmcConn smcConn, SmPointer clientData, // ugly workaround for broken libSM. libSM should do that _before_ // actually invoking the callback in sm_process.c - ( (QT_smcConn*)smcConn )->save_yourself_in_progress = TRUE; + ( (QT_smcConn*)smcConn )->save_yourself_in_progress = true; if ( sm_isshutdown ) - ( (QT_smcConn*)smcConn )->shutdown_in_progress = TRUE; + ( (QT_smcConn*)smcConn )->shutdown_in_progress = true; sm_performSaveYourself( (TQSessionManagerData*) clientData ); if ( !sm_isshutdown ) // we cannot expect a confirmation message in that case @@ -6398,7 +6398,7 @@ static void sm_saveYourselfCallback( SmcConn smcConn, SmPointer clientData, static void sm_performSaveYourself( TQSessionManagerData* smd ) { if ( sm_isshutdown ) - sm_blockUserInput = TRUE; + sm_blockUserInput = true; TQSessionManager* sm = smd->sm; @@ -6441,7 +6441,7 @@ static void sm_performSaveYourself( TQSessionManagerData* smd ) if ( sm_phase2 && !sm_in_phase2 ) { SmcRequestSaveYourselfPhase2( smcConnection, sm_saveYourselfPhase2Callback, (SmPointer*) smd ); - sm_blockUserInput = FALSE; + sm_blockUserInput = false; } else { // close eventual interaction monitors and cancel the @@ -6449,12 +6449,12 @@ static void sm_performSaveYourself( TQSessionManagerData* smd ) // performing a shutdown, it does not work for checkpoints if ( sm_interactionActive ) { SmcInteractDone( smcConnection, sm_isshutdown && sm_cancel); - sm_interactionActive = FALSE; + sm_interactionActive = false; } else if ( sm_cancel && sm_isshutdown ) { if ( sm->allowsErrorInteraction() ) { SmcInteractDone( smcConnection, True ); - sm_interactionActive = FALSE; + sm_interactionActive = false; } } @@ -6511,7 +6511,7 @@ static void sm_saveYourselfPhase2Callback( SmcConn smcConn, SmPointer clientData { if (smcConn != smcConnection ) return; - sm_in_phase2 = TRUE; + sm_in_phase2 = true; sm_performSaveYourself( (TQSessionManagerData*) clientData ); } @@ -6602,10 +6602,10 @@ void* TQSessionManager::handle() const bool TQSessionManager::allowsInteraction() { if ( sm_interactionActive ) - return TRUE; + return true; if ( sm_waitingForInteraction ) - return FALSE; + return false; if ( sm_interactStyle == SmInteractStyleAny ) { sm_waitingForInteraction = SmcInteractRequest( smcConnection, SmDialogNormal, @@ -6613,23 +6613,23 @@ bool TQSessionManager::allowsInteraction() } if ( sm_waitingForInteraction ) { tqApp->enter_loop(); - sm_waitingForInteraction = FALSE; + sm_waitingForInteraction = false; if ( sm_smActive ) { // not cancelled - sm_interactionActive = TRUE; - sm_blockUserInput = FALSE; - return TRUE; + sm_interactionActive = true; + sm_blockUserInput = false; + return true; } } - return FALSE; + return false; } bool TQSessionManager::allowsErrorInteraction() { if ( sm_interactionActive ) - return TRUE; + return true; if ( sm_waitingForInteraction ) - return FALSE; + return false; if ( sm_interactStyle == SmInteractStyleAny || sm_interactStyle == SmInteractStyleErrors ) { sm_waitingForInteraction = SmcInteractRequest( smcConnection, SmDialogError, @@ -6637,29 +6637,29 @@ bool TQSessionManager::allowsErrorInteraction() } if ( sm_waitingForInteraction ) { tqApp->enter_loop(); - sm_waitingForInteraction = FALSE; + sm_waitingForInteraction = false; if ( sm_smActive ) { // not cancelled - sm_interactionActive = TRUE; - sm_blockUserInput = FALSE; - return TRUE; + sm_interactionActive = true; + sm_blockUserInput = false; + return true; } } - return FALSE; + return false; } void TQSessionManager::release() { if ( sm_interactionActive ) { SmcInteractDone( smcConnection, False ); - sm_interactionActive = FALSE; + sm_interactionActive = false; if ( sm_smActive && sm_isshutdown ) - sm_blockUserInput = TRUE; + sm_blockUserInput = true; } } void TQSessionManager::cancel() { - sm_cancel = TRUE; + sm_cancel = true; } void TQSessionManager::setRestartHint( TQSessionManager::RestartHint hint) @@ -6720,7 +6720,7 @@ bool TQSessionManager::isPhase2() const void TQSessionManager::requestPhase2() { - sm_phase2 = TRUE; + sm_phase2 = true; } |
