xkbcomp: Add non-xkbfile XkbConfigText
authorDan Nicholson <dbn.lists@gmail.com>
Sat, 28 Mar 2009 01:55:13 +0000 (18:55 -0700)
committerDan Nicholson <dbn.lists@gmail.com>
Sat, 28 Mar 2009 01:55:13 +0000 (18:55 -0700)
src/xkbcomp/misc.c
src/xkbcomp/misc.h

index 0e4f61d..1607ff5 100644 (file)
@@ -574,3 +574,33 @@ FindKeyNameForAlias(XkbDescPtr xkb, unsigned long lname,
     }
     return False;
 }
+
+char *
+XkbConfigText(unsigned config, unsigned format)
+{
+    switch (config) {
+    case XkmSemanticsFile:
+        return "Semantics";
+    case XkmLayoutFile:
+        return "Layout";
+    case XkmKeymapFile:
+        return "Keymap";
+    case XkmGeometryFile:
+    case XkmGeometryIndex:
+        return "Geometry";
+    case XkmTypesIndex:
+        return "Types";
+    case XkmCompatMapIndex:
+        return "CompatMap";
+    case XkmSymbolsIndex:
+        return "Symbols";
+    case XkmIndicatorsIndex:
+        return "Indicators";
+    case XkmKeyNamesIndex:
+        return "KeyNames";
+    case XkmVirtualModsIndex:
+        return "VirtualMods";
+    default:
+        return "unknown";
+    }
+}
index 4fa4b6d..4a802d8 100644 (file)
@@ -108,4 +108,7 @@ extern Bool FindKeyNameForAlias(XkbDescPtr /* xkb */ ,
                                 unsigned long * /* real_name */
     );
 
+extern char *
+XkbConfigText(unsigned config, unsigned format);
+
 #endif /* MISC_H */