[gtk+/gtk-2-24] Add GtkRadioButton constructor GI annotations
- From: Martin Pitt <martinpitt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-24] Add GtkRadioButton constructor GI annotations
- Date: Sun, 9 Jan 2011 18:15:31 +0000 (UTC)
commit af45513d78a64ad4e6915a38a69b88234e0c8e6d
Author: Martin Pitt <martin pitt ubuntu com>
Date: Sun Jan 9 12:15:03 2011 -0600
Add GtkRadioButton constructor GI annotations
Taken from GTK 3. This allows programs to sensibly use radio buttons with
either GTK2 or GTK3 with g-i.
gtk/gtkradiobutton.c | 42 ++++++++++++++++++++++++++++++++++++++++--
1 files changed, 40 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkradiobutton.c b/gtk/gtkradiobutton.c
index b544a86..df0066c 100644
--- a/gtk/gtkradiobutton.c
+++ b/gtk/gtkradiobutton.c
@@ -254,6 +254,16 @@ gtk_radio_button_set_group (GtkRadioButton *radio_button,
g_object_unref (radio_button);
}
+/**
+ * gtk_radio_button_new:
+ * @group: (allow-none): an existing radio button group, or %NULL if you are
+ * creating a new group.
+ *
+ * Creates a new #GtkRadioButton. To be of any practical value, a widget should
+ * then be packed into the radio button.
+ *
+ * Returns: a new radio button
+ */
GtkWidget*
gtk_radio_button_new (GSList *group)
{
@@ -267,6 +277,16 @@ gtk_radio_button_new (GSList *group)
return GTK_WIDGET (radio_button);
}
+/**
+ * gtk_radio_button_new_with_label:
+ * @group: (allow-none): an existing radio button group, or %NULL if you are
+ * creating a new group.
+ * @label: the text label to display next to the radio button.
+ *
+ * Creates a new #GtkRadioButton with a text label.
+ *
+ * Returns: (transfer full): a new radio button.
+ */
GtkWidget*
gtk_radio_button_new_with_label (GSList *group,
const gchar *label)
@@ -281,7 +301,6 @@ gtk_radio_button_new_with_label (GSList *group,
return radio_button;
}
-
/**
* gtk_radio_button_new_with_mnemonic:
* @group: the radio button group
@@ -311,6 +330,16 @@ gtk_radio_button_new_with_mnemonic (GSList *group,
return radio_button;
}
+/**
+ * gtk_radio_button_new_from_widget:
+ * @radio_group_member: (allow-none): an existing #GtkRadioButton.
+ *
+ * Creates a new #GtkRadioButton, adding it to the same group as
+ * @radio_group_member. As with gtk_radio_button_new(), a widget
+ * should be packed into the radio button.
+ *
+ * Returns: (transfer full): a new radio button.
+ */
GtkWidget*
gtk_radio_button_new_from_widget (GtkRadioButton *radio_group_member)
{
@@ -320,7 +349,16 @@ gtk_radio_button_new_from_widget (GtkRadioButton *radio_group_member)
return gtk_radio_button_new (l);
}
-
+/**
+ * gtk_radio_button_new_with_label_from_widget:
+ * @radio_group_member: (allow-none): widget to get radio group from or %NULL
+ * @label: a text string to display next to the radio button.
+ *
+ * Creates a new #GtkRadioButton with a text label, adding it to
+ * the same group as @radio_group_member.
+ *
+ * Returns: (transfer none): a new radio button.
+ */
GtkWidget*
gtk_radio_button_new_with_label_from_widget (GtkRadioButton *radio_group_member,
const gchar *label)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]