From: Dan Nicholson Date: Sat, 28 Mar 2009 03:20:01 +0000 (-0700) Subject: libxkbcomp: Add non-xkbfile XkbActionTypeText X-Git-Tag: accepted/2.0alpha-wayland/20121109.204519~487 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6a578de9cbac1645633b424630594bd90c53f27e;p=profile%2Fivi%2Flibxkbcommon.git libxkbcomp: Add non-xkbfile XkbActionTypeText --- diff --git a/src/xkbcomp/misc.c b/src/xkbcomp/misc.c index 750359c..b26c9fa 100644 --- a/src/xkbcomp/misc.c +++ b/src/xkbcomp/misc.c @@ -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"; +} diff --git a/src/xkbcomp/misc.h b/src/xkbcomp/misc.h index 49de73b..240233f 100644 --- a/src/xkbcomp/misc.h +++ b/src/xkbcomp/misc.h @@ -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 */