summaryrefslogtreecommitdiff
path: root/src/libply-splash-core
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2019-09-30 14:06:51 +0200
committerHans de Goede <hdegoede@redhat.com>2019-10-01 00:43:34 +0200
commit9306edbc17ac4144ff9289679c7888cf47f0e6a4 (patch)
tree0600a831a4b659e3b0bccdba451052596e2ceb23 /src/libply-splash-core
parentf91e78f446701b729d359cde61171d0dc340fb80 (diff)
renderer: Add ply_renderer_get_keymap function
Add a function to get the keymap from a renderer and implement this for the drm and frame-buffer renderers. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'src/libply-splash-core')
-rw-r--r--src/libply-splash-core/ply-renderer-plugin.h1
-rw-r--r--src/libply-splash-core/ply-renderer.c9
-rw-r--r--src/libply-splash-core/ply-renderer.h1
3 files changed, 11 insertions, 0 deletions
diff --git a/src/libply-splash-core/ply-renderer-plugin.h b/src/libply-splash-core/ply-renderer-plugin.h
index b0c3e7d1..367d922f 100644
--- a/src/libply-splash-core/ply-renderer-plugin.h
+++ b/src/libply-splash-core/ply-renderer-plugin.h
@@ -75,6 +75,7 @@ typedef struct
ply_pixel_buffer_rotation_t *rotation,
int *scale);
bool (*get_capslock_state)(ply_renderer_backend_t *backend);
+ const char * (*get_keymap)(ply_renderer_backend_t *backend);
} ply_renderer_plugin_interface_t;
#endif /* PLY_RENDERER_PLUGIN_H */
diff --git a/src/libply-splash-core/ply-renderer.c b/src/libply-splash-core/ply-renderer.c
index c2210912..3462bfe2 100644
--- a/src/libply-splash-core/ply-renderer.c
+++ b/src/libply-splash-core/ply-renderer.c
@@ -443,4 +443,13 @@ ply_renderer_get_capslock_state (ply_renderer_t *renderer)
return renderer->plugin_interface->get_capslock_state (renderer->backend);
}
+const char *
+ply_renderer_get_keymap (ply_renderer_t *renderer)
+{
+ if (!renderer->plugin_interface->get_keymap)
+ return NULL;
+
+ return renderer->plugin_interface->get_keymap (renderer->backend);
+}
+
/* vim: set ts=4 sw=4 expandtab autoindent cindent cino={.5s,(0: */
diff --git a/src/libply-splash-core/ply-renderer.h b/src/libply-splash-core/ply-renderer.h
index e4dbdb1c..ed2db34c 100644
--- a/src/libply-splash-core/ply-renderer.h
+++ b/src/libply-splash-core/ply-renderer.h
@@ -86,6 +86,7 @@ bool ply_renderer_get_panel_properties (ply_renderer_t *renderer,
int *scale);
bool ply_renderer_get_capslock_state (ply_renderer_t *renderer);
+const char *ply_renderer_get_keymap (ply_renderer_t *renderer);
#endif
#endif /* PLY_RENDERER_H */