From a3809b1340998a6babd13cb161bb24f06f21bdd7 Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Fri, 27 Mar 2009 18:55:13 -0700 Subject: [PATCH] xkbcomp: Add non-xkbfile XkbConfigText --- src/xkbcomp/misc.c | 30 ++++++++++++++++++++++++++++++ src/xkbcomp/misc.h | 3 +++ 2 files changed, 33 insertions(+) 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 */