[gtk+/gtk-2.90] Revert "Remove deprecated GtkContainer function and macros"



commit 13a5ce421ea865a4c56819c532103297dc00b8d7
Author: Michael Natterer <mitch gimp org>
Date:   Sat Oct 10 18:26:07 2009 +0200

    Revert "Remove deprecated GtkContainer function and macros"
    
    This reverts commit 0e3a46915eabaf1bb8fd0559616c0cec92025678.

 gtk/gtkcontainer.c |   30 ++++++++++++++++++++++++++++++
 gtk/gtkcontainer.h |   14 ++++++++++++++
 2 files changed, 44 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index 7666185..6563af9 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -1553,6 +1553,36 @@ gtk_container_foreach_unmarshal (GtkWidget *child,
   fdata->callback (fdata->container, fdata->callback_data, 1, args);
 }
 
+void
+gtk_container_foreach_full (GtkContainer       *container,
+			    GtkCallback         callback,
+			    GtkCallbackMarshal  marshal,
+			    gpointer            callback_data,
+			    GDestroyNotify      notify)
+{
+  g_return_if_fail (GTK_IS_CONTAINER (container));
+
+  if (marshal)
+    {
+      GtkForeachData fdata;
+  
+      fdata.container     = GTK_OBJECT (container);
+      fdata.callback      = marshal;
+      fdata.callback_data = callback_data;
+
+      gtk_container_foreach (container, gtk_container_foreach_unmarshal, &fdata);
+    }
+  else
+    {
+      g_return_if_fail (callback != NULL);
+
+      gtk_container_foreach (container, callback, &callback_data);
+    }
+
+  if (notify)
+    notify (callback_data);
+}
+
 /**
  * gtk_container_set_focus_child:
  * @container: a #GtkContainer
diff --git a/gtk/gtkcontainer.h b/gtk/gtkcontainer.h
index 9215bd0..0bf30b9 100644
--- a/gtk/gtkcontainer.h
+++ b/gtk/gtkcontainer.h
@@ -122,8 +122,19 @@ void    gtk_container_check_resize       (GtkContainer     *container);
 void     gtk_container_foreach      (GtkContainer       *container,
 				     GtkCallback         callback,
 				     gpointer            callback_data);
+#ifndef GTK_DISABLE_DEPRECATED
+void     gtk_container_foreach_full (GtkContainer       *container,
+				     GtkCallback         callback,
+				     GtkCallbackMarshal  marshal,
+				     gpointer            callback_data,
+				     GDestroyNotify      notify);
+#endif /*  GTK_DISABLE_DEPRECATED */
 GList*   gtk_container_get_children     (GtkContainer       *container);
 
+#ifndef GTK_DISABLE_DEPRECATED
+#define gtk_container_children gtk_container_get_children
+#endif
+
 void     gtk_container_propagate_expose (GtkContainer   *container,
 					 GtkWidget      *child,
 					 GdkEventExpose *event);
@@ -209,6 +220,9 @@ GList *_gtk_container_focus_sort             (GtkContainer     *container,
 					      GtkDirectionType  direction,
 					      GtkWidget        *old_focus);
 
+#ifndef GTK_DISABLE_DEPRECATED
+#define	gtk_container_border_width		gtk_container_set_border_width
+#endif /* GTK_DISABLE_DEPRECATED */
 
 G_END_DECLS
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]