summaryrefslogtreecommitdiff
path: root/gtk/gtktogglebutton.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/gtktogglebutton.c')
-rw-r--r--gtk/gtktogglebutton.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gtk/gtktogglebutton.c b/gtk/gtktogglebutton.c
index 732526cce2..c5fbdb373d 100644
--- a/gtk/gtktogglebutton.c
+++ b/gtk/gtktogglebutton.c
@@ -267,6 +267,7 @@ gtk_toggle_button_set_mode (GtkToggleButton *toggle_button,
}
}
+
void
gtk_toggle_button_set_active (GtkToggleButton *toggle_button,
gboolean is_active)
@@ -280,6 +281,17 @@ gtk_toggle_button_set_active (GtkToggleButton *toggle_button,
gtk_button_clicked (GTK_BUTTON (toggle_button));
}
+
+gboolean
+gtk_toggle_button_get_active (GtkToggleButton *toggle_button)
+{
+ g_return_val_if_fail (toggle_button != NULL, FALSE);
+ g_return_val_if_fail (GTK_IS_TOGGLE_BUTTON (toggle_button), FALSE);
+
+ return (toggle_button->active) ? TRUE : FALSE;
+}
+
+
void
gtk_toggle_button_toggled (GtkToggleButton *toggle_button)
{