[gtk+/wip/baedert/children: 2/13] widget: Add gtk_widget_forall
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/children: 2/13] widget: Add gtk_widget_forall
- Date: Fri, 18 Nov 2016 09:18:05 +0000 (UTC)
commit f12e93034327eddfee51fae9abf2b5c8a4824610
Author: Timm Bäder <mail baedert org>
Date: Fri Nov 18 09:31:45 2016 +0100
widget: Add gtk_widget_forall
gtk/gtkwidget.c | 13 +++++++++++++
gtk/gtkwidget.h | 3 +++
2 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 3f40a7c..316a4f1 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -15773,3 +15773,16 @@ gtk_widget_render (GtkWidget *widget,
gdk_window_end_draw_frame (window, context);
}
+
+void
+gtk_widget_forall (GtkWidget *widget, GtkCallback cb, gpointer user_data)
+{
+ GtkWidget *p;
+
+ for (p = gtk_widget_get_first_child (widget);
+ p != NULL;
+ p = gtk_widget_get_next_sibling (p))
+ {
+ cb (p, user_data);
+ }
+}
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index 7a3f061..ccef7b0 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -1311,6 +1311,9 @@ void gtk_widget_set_font_map (GtkWidget *
GDK_AVAILABLE_IN_3_18
PangoFontMap * gtk_widget_get_font_map (GtkWidget *widget);
+GDK_AVAILABLE_IN_3_90
+void gtk_widget_forall (GtkWidget *widget, GtkCallback cb, gpointer user_data);
+
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkWidget, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkRequisition, gtk_requisition_free)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]