summaryrefslogtreecommitdiffstats
path: root/kxkb/extension.h
diff options
context:
space:
mode:
Diffstat (limited to 'kxkb/extension.h')
-rw-r--r--kxkb/extension.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/kxkb/extension.h b/kxkb/extension.h
new file mode 100644
index 000000000..24a0324bc
--- /dev/null
+++ b/kxkb/extension.h
@@ -0,0 +1,37 @@
+#ifndef __EXTENSION_H__
+#define __EXTENSION_H__
+
+#include <X11/Xlib.h>
+
+
+class XKBExtension
+{
+public:
+ XKBExtension(Display *display=NULL);
+ ~XKBExtension();
+ bool init();
+ void reset();
+
+ static bool setXkbOptions(const QString& options, bool resetOldOptions);
+ bool setLayout(const QString& model,
+ const QString& layout, const QString& variant,
+ const QString& includeGroup, bool useCompiledLayouts=true);
+ bool setGroup(unsigned int group);
+ unsigned int getGroup() const;
+
+private:
+ Display *m_dpy;
+ QString m_tempDir;
+ static QMap<QString, FILE*> fileCache;
+
+ bool setLayoutInternal(const QString& model,
+ const QString& layout, const QString& variant,
+ const QString& includeGroup);
+ bool compileCurrentLayout(const QString& layoutKey);
+ bool setCompiledLayout(const QString& layoutKey);
+
+ QString getPrecompiledLayoutFilename(const QString& layoutKey);
+// void deletePrecompiledLayouts();
+};
+
+#endif