diff options
Diffstat (limited to 'tdecore/kkeyserver_x11.cpp')
-rw-r--r-- | tdecore/kkeyserver_x11.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/tdecore/kkeyserver_x11.cpp b/tdecore/kkeyserver_x11.cpp index ebe06de97..77ca61763 100644 --- a/tdecore/kkeyserver_x11.cpp +++ b/tdecore/kkeyserver_x11.cpp @@ -25,7 +25,7 @@ #include <tqnamespace.h> #include <tqwindowdefs.h> -#if defined(Q_WS_X11) || defined(Q_WS_WIN) || defined(Q_WS_MACX) // Only compile this module if we're compiling for X11, mac or win32 +#if defined(TQ_WS_X11) || defined(TQ_WS_WIN) || defined(TQ_WS_MACX) // Only compile this module if we're compiling for X11, mac or win32 #include "kkeyserver_x11.h" #include "kkeynative.h" @@ -36,7 +36,7 @@ #include <tdeglobal.h> #include <tdelocale.h> -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 # define XK_MISCELLANY # define XK_XKB_KEYS # include <X11/X.h> @@ -78,7 +78,7 @@ struct ModInfo { KKey::ModFlag mod; int modQt; -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 uint modX; #endif const char* psName; @@ -140,7 +140,7 @@ static const SymName g_rgSymNames[] = { { 0, 0 } }; -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 static SymVariation g_rgSymVariation[] = { { '/', XK_KP_Divide, false }, @@ -327,14 +327,14 @@ static const TransKey g_rgQtToSymX[] = { TQt::Key_KeyboardBrightnessDown, XF86XK_KbdBrightnessDown }, #endif }; -#endif //Q_WS_X11 +#endif //TQ_WS_X11 //--------------------------------------------------------------------- // Initialization //--------------------------------------------------------------------- static bool g_bInitializedMods, g_bInitializedVariations, g_bInitializedKKeyLabels; static bool g_bMacLabels; -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 static uint g_modXNumLock, g_modXScrollLock, g_modXModeSwitch; bool initializeMods() @@ -386,7 +386,7 @@ static void initializeVariations() g_rgSymVariation[i].bActive = (XKeysymToKeycode( tqt_xdisplay(), g_rgSymVariation[i].symVariation ) != 0); g_bInitializedVariations = true; } -#endif //Q_WS_X11 +#endif //TQ_WS_X11 static void intializeKKeyLabels() { @@ -421,10 +421,10 @@ bool Sym::initQt( int keyQt ) return true; } -#ifdef Q_WS_WIN +#ifdef TQ_WS_WIN m_sym = symQt; return true; -#elif defined(Q_WS_X11) +#elif defined(TQ_WS_X11) for( uint i = 0; i < sizeof(g_rgQtToSymX)/sizeof(TransKey); i++ ) { if( g_rgQtToSymX[i].keySymQt == symQt ) { m_sym = g_rgQtToSymX[i].keySymX; @@ -437,7 +437,7 @@ bool Sym::initQt( int keyQt ) symQt != TQt::Key_Meta && symQt != TQt::Key_Direction_L && symQt != TQt::Key_Direction_R ) kdDebug(125) << "Sym::initQt( " << TQString::number(keyQt,16) << " ): failed to convert key." << endl; return false; -#elif defined(Q_WS_MACX) +#elif defined(TQ_WS_MACX) m_sym = symQt; return true; #endif @@ -459,7 +459,7 @@ bool Sym::init( const TQString& s ) } } -#ifdef Q_WS_WIN +#ifdef TQ_WS_WIN // search for name in KKeys array for ( KKeys const *pKey = kde_KKEYS; pKey->code != 0xffff; pKey++) { if( tqstricmp( s.latin1(), pKey->name ) == 0 ) { @@ -468,7 +468,7 @@ bool Sym::init( const TQString& s ) } } m_sym = 0; -#elif defined(Q_WS_X11) +#elif defined(TQ_WS_X11) // search X list: 's' as is, all lower, first letter in caps m_sym = XStringToKeysym( s.latin1() ); if( !m_sym ) { @@ -490,10 +490,10 @@ int Sym::qt() const return TQChar(m_sym).upper(); return m_sym; } -#ifdef Q_WS_WIN +#ifdef TQ_WS_WIN if( m_sym < 0x3000 ) return m_sym; -#elif defined(Q_WS_X11) +#elif defined(TQ_WS_X11) if( m_sym < 0x3000 ) return m_sym | TQt::UNICODE_ACCEL; @@ -511,7 +511,7 @@ TQString Sym::toString( bool bUserSpace ) const } // If it's a unicode character, -#ifdef Q_WS_WIN +#ifdef TQ_WS_WIN else if( m_sym < 0x1000 ) { #else else if( m_sym < 0x3000 ) { @@ -533,9 +533,9 @@ TQString Sym::toString( bool bUserSpace ) const } TQString s; -#ifdef Q_WS_WIN +#ifdef TQ_WS_WIN s = TQKeySequence( m_sym ); -#elif defined(Q_WS_X11) +#elif defined(TQ_WS_X11) // Get X-name s = XKeysymToString( m_sym ); #endif @@ -549,7 +549,7 @@ TQString Sym::toString() const { return toString( true ); } uint Sym::getModsRequired() const { uint mod = 0; -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 // FIXME: This might not be true on all keyboard layouts! if( m_sym == XK_Sys_Req ) return KKey::ALT; if( m_sym == XK_Break ) return KKey::CTRL; @@ -580,7 +580,7 @@ uint Sym::getModsRequired() const uint Sym::getSymVariation() const { -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 if( !g_bInitializedVariations ) initializeVariations(); for( int i = 0; g_rgSymVariation[i].sym != 0; i++ ) @@ -603,7 +603,7 @@ void Sym::capitalizeKeyname( TQString& s ) // Public functions //--------------------------------------------------------------------- -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 uint modX( KKey::ModFlag mod ) { if( mod == KKey::WIN && !g_bInitializedMods ) @@ -632,7 +632,7 @@ uint accelModMaskX() initializeMods(); return ShiftMask | ControlMask | Mod1Mask | g_rgModInfo[3].modX; } -#endif //Q_WS_X11 +#endif //TQ_WS_X11 bool keyQtToSym( int keyQt, uint& keySym ) { @@ -678,7 +678,7 @@ bool modToModQt( uint mod, int& modQt ) return true; } -#ifdef Q_WS_WIN +#ifdef TQ_WS_WIN //wrapped bool modXToModQt( uint modX, int& modQt ) { @@ -699,7 +699,7 @@ bool keyboardHasWinKey() { return true; } -#elif defined(Q_WS_MACX) +#elif defined(TQ_WS_MACX) bool modXToModQt(uint modX, int& modQt) { @@ -715,7 +715,7 @@ bool modXToMod( uint , uint& ) { return false; } -#elif defined(Q_WS_X11) +#elif defined(TQ_WS_X11) bool modToModX( uint mod, uint& modX ) { @@ -785,7 +785,7 @@ bool codeXToSym( uchar codeX, uint modX, uint& sym ) sym = (uint) keySym; return true; } -#endif //!Q_WS_WIN +#endif //!TQ_WS_WIN static TQString modToString( uint mod, bool bUserSpace ) { @@ -954,7 +954,7 @@ KKey Key::key() const if( m_code == CODE_FOR_QT ) return KKey( keyCodeQt() ); else { -#if defined(Q_WS_WIN) || defined(Q_WS_MACX) +#if defined(TQ_WS_WIN) || defined(TQ_WS_MACX) return KKey(); #else uint mod; @@ -1043,7 +1043,7 @@ void Variations::init( const KKey& key, bool bQt ) // Ctrl+Pause => Ctrl+Break void KKey::simplify() { -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 if( m_sym == XK_Sys_Req ) { m_sym = XK_Print; m_mod |= ALT; @@ -1066,5 +1066,5 @@ void KKey::simplify() #endif } -#endif //Q_WS_X11 || Q_WS_WIN +#endif //TQ_WS_X11 || TQ_WS_WIN |