summaryrefslogtreecommitdiff
path: root/src/keysym.c
diff options
context:
space:
mode:
authorRan Benita <ran234@gmail.com>2017-12-11 22:41:55 +0200
committerRan Benita <ran234@gmail.com>2017-12-11 23:01:18 +0200
commit18d6aebec003c2de7957f3c94fdc24edf533d084 (patch)
tree4f0029cc618278a5264990067e7a622934c12933 /src/keysym.c
parent6456835f1c547e4f9da3dc8728d1fe09eeca8593 (diff)
downloadxorg-lib-libxkbcommon-18d6aebec003c2de7957f3c94fdc24edf533d084.tar.gz
keysym: add xkb_keysym_to_{lower,upper} to public API
These can be useful in some odd cases. There is already an implementation (+ tests) for internal use, so all that's needed is to export them. If xkbcommon were to provide a way to convert a Unicode codepoint to a keysym, this could have been implemented externally as follows: uint32_t codepoint = xkb_keysym_to_utf32(keysym); uint32_t upper_codepoint = my_unicode_library_to_upper(codepoint); xkb_keysym_t upper_keysym = theoretical_xkb_keysym_from_utf32(upper_codepoint); However keysym -> codepoint is not injective so such a function is not possible strictly speaking. Signed-off-by: Ran Benita <ran234@gmail.com>
Diffstat (limited to 'src/keysym.c')
-rw-r--r--src/keysym.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/keysym.c b/src/keysym.c
index 9e7b4fb..6d06de0 100644
--- a/src/keysym.c
+++ b/src/keysym.c
@@ -264,7 +264,7 @@ xkb_keysym_is_upper(xkb_keysym_t ks)
return (ks == upper ? true : false);
}
-xkb_keysym_t
+XKB_EXPORT xkb_keysym_t
xkb_keysym_to_lower(xkb_keysym_t ks)
{
xkb_keysym_t lower, upper;
@@ -274,7 +274,7 @@ xkb_keysym_to_lower(xkb_keysym_t ks)
return lower;
}
-xkb_keysym_t
+XKB_EXPORT xkb_keysym_t
xkb_keysym_to_upper(xkb_keysym_t ks)
{
xkb_keysym_t lower, upper;