summaryrefslogtreecommitdiffstats
path: root/kxkb/x11helper.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit4aed2c8219774f5d797760606b8489a92ddc5163 (patch)
tree3f8c130f7d269626bf6a9447407ef6c35954426a /kxkb/x11helper.h
downloadtdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz
tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kxkb/x11helper.h')
-rw-r--r--kxkb/x11helper.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/kxkb/x11helper.h b/kxkb/x11helper.h
new file mode 100644
index 000000000..a4faba899
--- /dev/null
+++ b/kxkb/x11helper.h
@@ -0,0 +1,41 @@
+#ifndef X11HELPER_H_
+#define X11HELPER_H_
+
+#include <qdict.h>
+#include <qstringlist.h>
+
+
+struct RulesInfo {
+ QDict<char> models;
+ QDict<char> layouts;
+ QDict<char> options;
+};
+
+struct OldLayouts {
+ QStringList oldLayouts;
+ QStringList nonLatinLayouts;
+};
+
+class X11Helper
+{
+ static bool m_layoutsClean;
+
+public:
+ static const WId UNKNOWN_WINDOW_ID = (WId) 0;
+ static const QString X11_WIN_CLASS_ROOT;
+ static const QString X11_WIN_CLASS_UNKNOWN;
+ /**
+ * Tries to find X11 xkb config dir
+ */
+ static const QString findX11Dir();
+ static const QString findXkbRulesFile(QString x11Dir, Display* dpy);
+ static QString getWindowClass(WId winId, Display* dpy);
+ static QStringList* getVariants(const QString& layout, const QString& x11Dir, bool oldLayouts=false);
+ static RulesInfo* loadRules(const QString& rulesFile, bool layoutsOnly=false);
+ static OldLayouts* loadOldLayouts(const QString& rulesFile);
+
+ static bool areLayoutsClean() { return m_layoutsClean; }
+ static bool areSingleGroupsSupported();
+};
+
+#endif /*X11HELPER_H_*/