[libdazzle] shortcuts: add getter for controllers widget



commit 227dcb1298ecfbcba3b0c94dea260e33a6f3a00f
Author: Christian Hergert <chergert redhat com>
Date:   Sat Aug 10 17:40:13 2019 -0700

    shortcuts: add getter for controllers widget

 src/shortcuts/dzl-shortcut-controller.c | 18 ++++++++++++++++++
 src/shortcuts/dzl-shortcut-controller.h |  2 ++
 2 files changed, 20 insertions(+)
---
diff --git a/src/shortcuts/dzl-shortcut-controller.c b/src/shortcuts/dzl-shortcut-controller.c
index 4d73f6a..e02c385 100644
--- a/src/shortcuts/dzl-shortcut-controller.c
+++ b/src/shortcuts/dzl-shortcut-controller.c
@@ -1231,3 +1231,21 @@ _dzl_shortcut_controller_clear (DzlShortcutController *self)
   g_clear_pointer (&priv->current_chord, dzl_shortcut_chord_free);
   g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_CURRENT_CHORD]);
 }
+
+/**
+ * dzl_shortcut_controller_get_widget:
+ * @self: a #DzlShortcutController
+ *
+ * Returns: (transfer none): the widget for the controller
+ *
+ * Since: 3.34
+ */
+GtkWidget *
+dzl_shortcut_controller_get_widget (DzlShortcutController *self)
+{
+  DzlShortcutControllerPrivate *priv = dzl_shortcut_controller_get_instance_private (self);
+
+  g_return_val_if_fail (DZL_IS_SHORTCUT_CONTROLLER (self), NULL);
+
+  return priv->widget;
+}
diff --git a/src/shortcuts/dzl-shortcut-controller.h b/src/shortcuts/dzl-shortcut-controller.h
index 4cccac7..73bd6d5 100644
--- a/src/shortcuts/dzl-shortcut-controller.h
+++ b/src/shortcuts/dzl-shortcut-controller.h
@@ -36,6 +36,8 @@ G_DECLARE_FINAL_TYPE (DzlShortcutController, dzl_shortcut_controller, DZL, SHORT
 
 DZL_AVAILABLE_IN_ALL
 DzlShortcutController  *dzl_shortcut_controller_new                   (GtkWidget             *widget);
+DZL_AVAILABLE_IN_3_34
+GtkWidget              *dzl_shortcut_controller_get_widget            (DzlShortcutController *self);
 DZL_AVAILABLE_IN_ALL
 DzlShortcutManager     *dzl_shortcut_controller_get_manager           (DzlShortcutController *self);
 DZL_AVAILABLE_IN_ALL


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