summaryrefslogtreecommitdiff
path: root/gtk/gtkcontainer.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@src.gnome.org>1998-11-06 22:05:02 +0000
committerOwen Taylor <otaylor@src.gnome.org>1998-11-06 22:05:02 +0000
commite2a521922085c8010028e227f61bba59ea6b8242 (patch)
tree2500d6aa6f63aab4b58c17546532ecce8fdcca37 /gtk/gtkcontainer.c
parent3c0df19a588bd96f328bda975db8eb9fa7f79e81 (diff)
downloadgtk+-e2a521922085c8010028e227f61bba59ea6b8242.tar.gz
Merge from themes-2. See the ChangeLog for a somewhat detailed
history of the evolution of the changes involved. Most of this is actually minor painting tweaks.
Diffstat (limited to 'gtk/gtkcontainer.c')
-rw-r--r--gtk/gtkcontainer.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index 80e770115f..e430da3b74 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -50,6 +50,9 @@ struct _GtkChildArgInfo
guint seq_id;
};
+/* The global list of toplevel windows */
+static GList *toplevel_list = NULL;
+
static void gtk_container_base_class_init (GtkContainerClass *klass);
static void gtk_container_class_init (GtkContainerClass *klass);
static void gtk_container_init (GtkContainer *container);
@@ -1235,6 +1238,10 @@ gtk_container_children (GtkContainer *container)
void
gtk_container_register_toplevel (GtkContainer *container)
{
+ g_return_if_fail (container != NULL);
+
+ toplevel_list = g_list_prepend (toplevel_list, container);
+
gtk_widget_ref (GTK_WIDGET (container));
gtk_object_sink (GTK_OBJECT (container));
}
@@ -1242,9 +1249,28 @@ gtk_container_register_toplevel (GtkContainer *container)
void
gtk_container_unregister_toplevel (GtkContainer *container)
{
+ GList *node;
+
+ g_return_if_fail (container != NULL);
+
+ node = g_list_find (toplevel_list, container);
+ g_return_if_fail (node != NULL);
+
+ toplevel_list = g_list_remove_link (toplevel_list, node);
+ g_list_free_1 (node);
+
gtk_widget_unref (GTK_WIDGET (container));
}
+GList *
+gtk_container_get_toplevels (void)
+{
+ /* XXX: fixme we should ref all these widgets and duplicate
+ * the list.
+ */
+ return toplevel_list;
+}
+
void
gtk_container_real_set_focus_child (GtkContainer *container,
GtkWidget *child)