keyboard: add helper to get the keyboard's renderer, if applicable

Based on an original patch from Gert van de Kraats on Ubuntu's Launchpad: Mathieu Trudel-Lapierre's avatarMathieu Trudel-Lapierre <>
parent 0cd06137
......@@ -587,4 +587,20 @@ ply_keyboard_remove_enter_handler (ply_keyboard_t *keyboard,
ply_renderer_t *
ply_keyboard_get_renderer (ply_keyboard_t *keyboard)
assert (keyboard != NULL);
switch (keyboard->provider_type) {
return keyboard->provider.if_renderer->renderer;
return NULL;
/* vim: set ts=4 sw=4 et ai ci cino={.5s,^-2,+.5s,t0,g0,e-2,n-2,p2s,(0,=.5s,:.5s */
......@@ -72,6 +72,7 @@ void ply_keyboard_remove_enter_handler (ply_keyboard_t *keyboard,
bool ply_keyboard_watch_for_input (ply_keyboard_t *keyboard);
void ply_keyboard_stop_watching_for_input (ply_keyboard_t *keyboard);
bool ply_keyboard_is_active (ply_keyboard_t *keyboard);
ply_renderer_t *ply_keyboard_get_renderer (ply_keyboard_t *keyboard);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment