[mutter/wip/carlosg/clutter-keymap: 75/75] clutter: Add ClutterKeymap getter



commit 5f1a4b8a77dbade1923f07fed85bbb4e31d388c3
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Jan 14 23:38:26 2019 +0100

    clutter: Add ClutterKeymap getter
    
    It is fetched from the ClutterBackend so far.

 clutter/clutter/clutter-backend.c | 14 ++++++++++++++
 clutter/clutter/clutter-backend.h |  4 ++++
 2 files changed, 18 insertions(+)
---
diff --git a/clutter/clutter/clutter-backend.c b/clutter/clutter/clutter-backend.c
index 7f3d182c2..c0844d8e6 100644
--- a/clutter/clutter/clutter-backend.c
+++ b/clutter/clutter/clutter-backend.c
@@ -1412,3 +1412,17 @@ clutter_backend_set_input_method (ClutterBackend     *backend,
 {
   g_set_object (&backend->input_method, method);
 }
+
+/**
+ * clutter_backend_get_keymap:
+ * @backend: the #ClutterBackend
+ *
+ * Gets the keymap used by Clutter
+ *
+ * Returns: (transfer none): the keymap
+ **/
+ClutterKeymap *
+clutter_backend_get_keymap (ClutterBackend *backend)
+{
+  return CLUTTER_BACKEND_GET_CLASS (backend)->get_keymap (backend);
+}
diff --git a/clutter/clutter/clutter-backend.h b/clutter/clutter/clutter-backend.h
index 6517381be..93bd72b51 100644
--- a/clutter/clutter/clutter-backend.h
+++ b/clutter/clutter/clutter-backend.h
@@ -34,6 +34,7 @@
 #include <cogl/cogl.h>
 
 #include <clutter/clutter-config.h>
+#include <clutter/clutter-keymap.h>
 #include <clutter/clutter-types.h>
 
 G_BEGIN_DECLS
@@ -83,6 +84,9 @@ ClutterInputMethod *            clutter_backend_get_input_method        (Clutter
 CLUTTER_EXPORT
 void                            clutter_backend_set_input_method        (ClutterBackend             *backend,
                                                                          ClutterInputMethod         *method);
+CLUTTER_EXPORT
+ClutterKeymap *                 clutter_backend_get_keymap              (ClutterBackend             
*backend);
+
 G_END_DECLS
 
 #endif /* __CLUTTER_BACKEND_H__ */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]