[gtk/checkbutton-fixes: 1/5] actionhelper: Add a getter
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/checkbutton-fixes: 1/5] actionhelper: Add a getter
- Date: Tue, 1 Sep 2020 20:31:46 +0000 (UTC)
commit 3569360949b24cb0da9df63ebe221c1d78050d97
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Sep 1 15:48:10 2020 -0400
actionhelper: Add a getter
Add a getter for the GtkActionHelper:role property.
gtk/gtkactionhelper.c | 9 +++++++++
gtk/gtkactionhelperprivate.h | 4 ++++
2 files changed, 13 insertions(+)
---
diff --git a/gtk/gtkactionhelper.c b/gtk/gtkactionhelper.c
index ccc2153c33..36eaa7bf24 100644
--- a/gtk/gtkactionhelper.c
+++ b/gtk/gtkactionhelper.c
@@ -598,3 +598,12 @@ gtk_action_helper_activate (GtkActionHelper *helper)
helper->action_name,
helper->target);
}
+
+GtkButtonRole
+gtk_action_helper_get_role (GtkActionHelper *helper)
+{
+ g_return_val_if_fail (GTK_IS_ACTION_HELPER (helper), GTK_BUTTON_ROLE_NORMAL);
+
+ return helper->role;
+}
+
diff --git a/gtk/gtkactionhelperprivate.h b/gtk/gtkactionhelperprivate.h
index f68ef104f9..06f5a474b4 100644
--- a/gtk/gtkactionhelperprivate.h
+++ b/gtk/gtkactionhelperprivate.h
@@ -22,6 +22,7 @@
#include <gtk/gtkapplication.h>
#include <gtk/gtkactionable.h>
+#include <gtk/gtkmodelbuttonprivate.h>
#define GTK_TYPE_ACTION_HELPER (gtk_action_helper_get_type ())
#define GTK_ACTION_HELPER(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst),
\
@@ -56,4 +57,7 @@ gboolean gtk_action_helper_get_active (GtkActi
G_GNUC_INTERNAL
void gtk_action_helper_activate (GtkActionHelper *helper);
+GtkButtonRole gtk_action_helper_get_role (GtkActionHelper *helper);
+
+
#endif /* __GTK_ACTION_HELPER_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]