diff options
author | Michael Natterer <mitch@gimp.org> | 2009-10-10 18:26:07 +0200 |
---|---|---|
committer | Michael Natterer <mitch@gimp.org> | 2009-10-10 18:26:07 +0200 |
commit | 59f2a62e9c2fd0377ca19326800b15a0b7962a46 (patch) | |
tree | ce44bdea7feb6493d098d7166557251b79514722 /gtk/gtkcontainer.c | |
parent | 0e3a46915eabaf1bb8fd0559616c0cec92025678 (diff) | |
download | gtk+-59f2a62e9c2fd0377ca19326800b15a0b7962a46.tar.gz |
Revert "Remove deprecated GtkContainer function and macros"
This reverts commit 0e3a46915eabaf1bb8fd0559616c0cec92025678.
Diffstat (limited to 'gtk/gtkcontainer.c')
-rw-r--r-- | gtk/gtkcontainer.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c index 76661857eb..6563af965f 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 |