23 #ifndef _KKEYSERVER_X11_H
24 #define _KKEYSERVER_X11_H
26 #include "tdeshortcut.h"
27 #include "kkeynative.h"
47 struct TDECORE_EXPORT
Sym
67 Sym(
const TQString& s )
76 bool initQt(
int keyQt );
84 bool init(
const TQString &s );
95 TQString toStringInternal()
const;
101 TQString toString()
const;
110 uint getModsRequired()
const;
115 uint getSymVariation()
const;
120 operator uint()
const {
return m_sym; }
125 Sym& operator =( uint sym ) { m_sym = sym;
return *
this; }
128 TQString toString(
bool bUserSpace )
const;
130 static void capitalizeKeyname( TQString& );
140 enum { CODE_FOR_QT = 256 };
159 bool init(
const KKey& key,
bool bQt );
168 bool isNative()
const {
return m_code != CODE_FOR_QT; }
174 uint
code()
const {
return m_code; }
180 uint
mod()
const {
return m_mod; }
186 uint
sym()
const {
return m_sym; }
198 void setKeycodeQt(
int keyQt )
199 { m_code = CODE_FOR_QT; m_sym = keyQt; }
218 int compare(
const Key& key )
const;
224 bool operator ==(
const Key& b )
const
225 {
return compare( b ) == 0; }
231 bool operator <(
const Key& b )
const
232 {
return compare( b ) < 0; }
246 enum { MAX_VARIATIONS = 4 };
248 Key m_rgkey[MAX_VARIATIONS];
253 void init(
const KKey&,
bool bQt );
255 uint count()
const {
return m_nVariations; }
256 const Key& key( uint i )
const {
return m_rgkey[i]; }
357 TDECORE_EXPORT
bool keyQtToSym(
int keyQt, uint& sym );
367 TDECORE_EXPORT
bool keyQtToMod(
int keyQt, uint& mod );
377 TDECORE_EXPORT
bool symToKeyQt( uint sym,
int& keyQt );
389 TDECORE_EXPORT
bool modToModQt( uint mod,
int& modQt );
441 TDECORE_EXPORT
bool codeXToSym( uchar codeX, uint
modX, uint& symX );
446 TDECORE_EXPORT TQString modToStringInternal( uint mod );
468 TDECORE_EXPORT
bool stringToSymMod(
const TQString&, uint& sym, uint& mod );
474 TDECORE_EXPORT
void keyQtToKeyX( uint keyCombQt,
unsigned char *pKeyCodeX, uint *pKeySymX, uint *pKeyModX );
477 #endif // !_KKEYSERVER_X11_H