uterm: input: add uterm_input_keysym_to_string()

There is no much gain from having an internal kbd_desc_keysym_to_string()
function if we cannot get access to the kbd_desc object. Therefore, add a
forward helper to uterm_input() which forwards the call to its internal
kbd_desc object. This allows outside access to the keysym_to_string()
function.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2012-07-31 10:00:03 +02:00
parent 99b2038f7f
commit dd3d67a6f4
2 changed files with 16 additions and 0 deletions

View File

@ -298,6 +298,9 @@ void uterm_input_sleep(struct uterm_input *input);
void uterm_input_wake_up(struct uterm_input *input);
bool uterm_input_is_awake(struct uterm_input *input);
void uterm_input_keysym_to_string(struct uterm_input *input,
uint32_t keysym, char *str, size_t size);
/*
* System Monitor
* This watches the system for new seats, graphics devices or other devices that

View File

@ -465,3 +465,16 @@ bool uterm_input_is_awake(struct uterm_input *input)
return input->awake;
}
void uterm_input_keysym_to_string(struct uterm_input *input,
uint32_t keysym, char *str, size_t size)
{
if (!str || !size)
return;
if (!input) {
*str = 0;
return;
}
kbd_desc_keysym_to_string(input->desc, keysym, str, size);
}