summaryrefslogtreecommitdiff
path: root/gtk/gtkbin.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2001-05-25 03:42:40 +0000
committerHavoc Pennington <hp@src.gnome.org>2001-05-25 03:42:40 +0000
commitb995aae44d144c9eb659437814aeb6afab58186c (patch)
tree5d7b15260f3ea9424d9e4b0b0e35c4828dae11cb /gtk/gtkbin.c
parent92afa2ecc4adf260fdd1154559fe6a198ad226ec (diff)
downloadgtk+-b995aae44d144c9eb659437814aeb6afab58186c.tar.gz
New function
2001-05-22 Havoc Pennington <hp@pobox.com> * gtk/gtkbin.c (gtk_bin_get_child): New function
Diffstat (limited to 'gtk/gtkbin.c')
-rw-r--r--gtk/gtkbin.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gtk/gtkbin.c b/gtk/gtkbin.c
index 315819835b..bd18758ffa 100644
--- a/gtk/gtkbin.c
+++ b/gtk/gtkbin.c
@@ -232,3 +232,21 @@ gtk_bin_forall (GtkContainer *container,
if (bin->child)
(* callback) (bin->child, callback_data);
}
+
+/**
+ * gtk_bin_get_child:
+ * @bin: a #GtkBin
+ *
+ * Gets the child of the #GtkBin, or %NULL if the bin contains
+ * no child widget. The returned widget does not have a reference
+ * added, so you do not need to unref it.
+ *
+ * Return value: pointer to child of the #GtkBin
+ **/
+GtkWidget*
+gtk_bin_get_child (GtkBin *bin)
+{
+ g_return_val_if_fail (GTK_IS_BIN (bin), NULL);
+
+ return bin->child;
+}