From 208c527fb32757f4f27588a94dcd5c292cfa3ae4 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 10 Jun 2021 08:35:24 -0400 Subject: [PATCH] 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__ */