summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@ximian.com>2004-01-20 23:07:40 +0000
committerFederico Mena Quintero <federico@src.gnome.org>2004-01-20 23:07:40 +0000
commit3ccf6187e3a781288976c43f44d2ac60cb7d887f (patch)
tree102b262986e96a43007bb2c983f599904d8a21dc /gtk
parenteafbfd636736ce3602a6f0f0561a1eebed6164cb (diff)
downloadgtk+-3ccf6187e3a781288976c43f44d2ac60cb7d887f.tar.gz
Fix #99425, add accessor functions for GtkPaned's children.
2004-01-20 Federico Mena Quintero <federico@ximian.com> Fix #99425, add accessor functions for GtkPaned's children. * gtk/gtkpaned.c (gtk_paned_get_child1): New function. (gtk_paned_get_child2): New function.
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkpaned.c36
-rw-r--r--gtk/gtkpaned.h3
2 files changed, 39 insertions, 0 deletions
diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c
index f3141a7afb..288dad7218 100644
--- a/gtk/gtkpaned.c
+++ b/gtk/gtkpaned.c
@@ -1126,6 +1126,42 @@ gtk_paned_set_position (GtkPaned *paned,
gtk_widget_queue_resize (GTK_WIDGET (paned));
}
+/**
+ * gtk_paned_get_child1:
+ * @paned: a #GtkPaned widget
+ *
+ * Obtains the first child of the paned widget.
+ *
+ * Return value: first child, or %NULL if it is not set.
+ *
+ * Since: 2.4
+ **/
+GtkWidget *
+gtk_paned_get_child1 (GtkPaned *paned)
+{
+ g_return_val_if_fail (GTK_IS_PANED (paned), NULL);
+
+ return paned->child1;
+}
+
+/**
+ * gtk_paned_get_child2:
+ * @paned: a #GtkPaned widget
+ *
+ * Obtains the second child of the paned widget.
+ *
+ * Return value: second child, or %NULL if it is not set.
+ *
+ * Since: 2.4
+ **/
+GtkWidget *
+gtk_paned_get_child2 (GtkPaned *paned)
+{
+ g_return_val_if_fail (GTK_IS_PANED (paned), NULL);
+
+ return paned->child2;
+}
+
void
gtk_paned_compute_position (GtkPaned *paned,
gint allocation,
diff --git a/gtk/gtkpaned.h b/gtk/gtkpaned.h
index ee24b8ce88..b79781522d 100644
--- a/gtk/gtkpaned.h
+++ b/gtk/gtkpaned.h
@@ -123,6 +123,9 @@ gint gtk_paned_get_position (GtkPaned *paned);
void gtk_paned_set_position (GtkPaned *paned,
gint position);
+GtkWidget *gtk_paned_get_child1 (GtkPaned *paned);
+GtkWidget *gtk_paned_get_child2 (GtkPaned *paned);
+
/* Internal function */
#if !defined (GTK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION)
void gtk_paned_compute_position (GtkPaned *paned,