summaryrefslogtreecommitdiff
path: root/gtk/gtkcelllayout.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2006-12-29 07:53:01 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2006-12-29 07:53:01 +0000
commit6fa25d074e3bc5b06c7346a97bd06da74064a63a (patch)
tree13a1cf5d0fc4804efbc3f96c8fbc014d684b8a1d /gtk/gtkcelllayout.c
parentb3ef93d8ee2139996d1a43b498a6314d5a2b2370 (diff)
downloadgtk+-6fa25d074e3bc5b06c7346a97bd06da74064a63a.tar.gz
New function to get the cell renderers of a cell layout.
2006-12-29 Matthias Clasen <mclasen@redhat.com> * gtk/gtk.symbols: * gtk/gtkcelllayout.[hc] (gtk_cell_layout_get_cells): New function to get the cell renderers of a cell layout. * gtk/gtktreeviewcolumn.c: * gtk/gtkcellview.c: * gtk/gtkiconview.c: Implement get_cells.
Diffstat (limited to 'gtk/gtkcelllayout.c')
-rw-r--r--gtk/gtkcelllayout.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/gtk/gtkcelllayout.c b/gtk/gtkcelllayout.c
index e866271a44..10cf3c4267 100644
--- a/gtk/gtkcelllayout.c
+++ b/gtk/gtkcelllayout.c
@@ -283,5 +283,31 @@ gtk_cell_layout_reorder (GtkCellLayout *cell_layout,
position);
}
+/**
+ * gtk_cell_layout_get_cells:
+ * @cell_layout: a #GtkCellLayout
+ *
+ * Returns the cell renderers which have been added to @cell_layout.
+ *
+ * Return value: a list of cell renderers. The list, but not the
+ * renderers has been newly allocated and should be freed with
+ * g_list_free() when no longer needed.
+ *
+ * Since: 2.12
+ */
+GList *
+gtk_cell_layout_get_cells (GtkCellLayout *cell_layout)
+{
+ GtkCellLayoutIface *iface;
+
+ g_return_val_if_fail (GTK_IS_CELL_LAYOUT (cell_layout), NULL);
+
+ iface = GTK_CELL_LAYOUT_GET_IFACE (cell_layout);
+ if (iface->get_cells)
+ return iface->get_cells (cell_layout);
+
+ return NULL;
+}
+
#define __GTK_CELL_LAYOUT_C__
#include "gtkaliasdef.c"