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



commit 367a5fa560253168291986e96d7a822ee7701dec
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]