00001 #ifndef __EXTENSION_H__
00002 #define __EXTENSION_H__
00003
00004 #include <X11/Xlib.h>
00005
00006
00007 class XKBExtension
00008 {
00009 public:
00010 XKBExtension(Display *display=NULL);
00011 ~XKBExtension();
00012 bool init();
00013 void reset();
00014
00015 static bool setXkbOptions(const TQString& options, bool resetOldOptions);
00016 bool setLayout(const TQString& model,
00017 const TQString& layout, const TQString& variant,
00018 const TQString& includeGroup, bool useCompiledLayouts=true);
00019 bool setGroup(unsigned int group);
00020 unsigned int getGroup() const;
00021
00022 private:
00023 Display *m_dpy;
00024 TQString m_tempDir;
00025 static TQMap<TQString, FILE*> fileCache;
00026
00027 bool setLayoutInternal(const TQString& model,
00028 const TQString& layout, const TQString& variant,
00029 const TQString& includeGroup);
00030 bool compileCurrentLayout(const TQString& layoutKey);
00031 bool setCompiledLayout(const TQString& layoutKey);
00032
00033 TQString getPrecompiledLayoutFilename(const TQString& layoutKey);
00034
00035 };
00036
00037 #endif