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.
This commit is contained in:
Matthias Clasen 2021-06-10 08:35:24 -04:00
parent 28990285e2
commit 208c527fb3
2 changed files with 11 additions and 1 deletions

View File

@ -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`

View File

@ -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__ */