libxkbcomp: Add non-xkbfile XkbActionTypeText

master
Dan Nicholson 2009-03-27 20:20:01 -07:00
parent 4fe322aa99
commit 6a578de9cb
2 changed files with 27 additions and 0 deletions

View File

@ -604,3 +604,27 @@ XkbConfigText(unsigned config, unsigned format)
return "unknown";
}
}
static char *actionTypeNames[XkbSA_NumActions]= {
"NoAction",
"SetMods", "LatchMods", "LockMods",
"SetGroup", "LatchGroup", "LockGroup",
"MovePtr",
"PtrBtn", "LockPtrBtn",
"SetPtrDflt",
"ISOLock",
"Terminate", "SwitchScreen",
"SetControls", "LockControls",
"ActionMessage",
"RedirectKey",
"DeviceBtn", "LockDeviceBtn"
};
char *
XkbActionTypeText(unsigned type, unsigned format)
{
if (type <= XkbSA_LastAction)
return actionTypeNames[type];
return "Private";
}

View File

@ -111,4 +111,7 @@ extern Bool FindKeyNameForAlias(XkbcDescPtr /* xkb */ ,
extern char *
XkbConfigText(unsigned config, unsigned format);
extern char *
XkbActionTypeText(unsigned type, unsigned format);
#endif /* MISC_H */