[gtk/actionable-fixes: 4/6] button: Add a private getter for the action helper




commit 208c527fb32757f4f27588a94dcd5c292cfa3ae4
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Jun 10 08:35:24 2021 -0400

    button: Add a private getter for the action helper
    
    GtkToggleButton needs to know if it needs to actively
    maintain its state, or defer to the action helper.

 gtk/gtkbutton.c        | 8 ++++++++
 gtk/gtkbuttonprivate.h | 4 +++-
 2 files changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index 58e6b34210..295fd83119 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -1015,6 +1015,14 @@ gtk_button_get_gesture (GtkButton *button)
   return priv->gesture;
 }
 
+GtkActionHelper *
+gtk_button_get_action_helper (GtkButton *button)
+{
+  GtkButtonPrivate *priv = gtk_button_get_instance_private (button);
+
+  return priv->action_helper;
+}
+
 /**
  * gtk_button_set_child: (attributes org.gtk.Method.set_property=child)
  * @button: a `GtkButton`
diff --git a/gtk/gtkbuttonprivate.h b/gtk/gtkbuttonprivate.h
index cc2759f25b..07eb23e6f0 100644
--- a/gtk/gtkbuttonprivate.h
+++ b/gtk/gtkbuttonprivate.h
@@ -22,7 +22,9 @@
 #include "gtkbutton.h"
 
 #include "gtkgesture.h"
+#include "gtkactionhelperprivate.h"
 
-GtkGesture * gtk_button_get_gesture (GtkButton *button);
+GtkGesture      * gtk_button_get_gesture       (GtkButton *button);
+GtkActionHelper * gtk_button_get_action_helper (GtkButton *button);
 
 #endif /* __GTK_BUTTON_PRIVATE_H__ */


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