xkbcomp: Add non-xkbfile XkbConfigText
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
diff --git a/src/xkbcomp/misc.c b/src/xkbcomp/misc.c
index 0e4f61d..1607ff5 100644
--- a/src/xkbcomp/misc.c
+++ b/src/xkbcomp/misc.c
@@ -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";
+ }
+}
diff --git a/src/xkbcomp/misc.h b/src/xkbcomp/misc.h
index 4fa4b6d..4a802d8 100644
--- a/src/xkbcomp/misc.h
+++ b/src/xkbcomp/misc.h
@@ -108,4 +108,7 @@ extern Bool FindKeyNameForAlias(XkbDescPtr /* xkb */ ,
unsigned long * /* real_name */
);
+extern char *
+XkbConfigText(unsigned config, unsigned format);
+
#endif /* MISC_H */