summaryrefslogtreecommitdiff
path: root/gtk/gtkcellarea.h
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.van.berkom@gmail.com>2010-12-06 12:41:38 +0900
committerTristan Van Berkom <tristan.van.berkom@gmail.com>2010-12-06 12:41:38 +0900
commit4b065f53899204725b4fafd2ccac1a21afe1c24b (patch)
treee48e804ea7a49a2a03c2781320ab2d71e6633d58 /gtk/gtkcellarea.h
parentd28cbd6e6db15a77929719d08e014f560c73b0ba (diff)
downloadgtk+-4b065f53899204725b4fafd2ccac1a21afe1c24b.tar.gz
Changed gtk_cell_area_forall to gtk_cell_area_foreach since thats more widely used semantics.
Also gave a boolean return value to the callback to allow breaking out of the loop.
Diffstat (limited to 'gtk/gtkcellarea.h')
-rw-r--r--gtk/gtkcellarea.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/gtk/gtkcellarea.h b/gtk/gtkcellarea.h
index cf396c638a..aa0560c20c 100644
--- a/gtk/gtkcellarea.h
+++ b/gtk/gtkcellarea.h
@@ -65,10 +65,12 @@ typedef struct _GtkCellAreaContext GtkCellAreaContext;
* @data: user-supplied data
*
* The type of the callback functions used for iterating over
- * the cell renderers of a #GtkCellArea, see gtk_cell_area_forall().
+ * the cell renderers of a #GtkCellArea, see gtk_cell_area_foreach().
+ *
+ * Return value: %TRUE to stop iterating over cells.
*/
-typedef void (*GtkCellCallback) (GtkCellRenderer *renderer,
- gpointer data);
+typedef gboolean (*GtkCellCallback) (GtkCellRenderer *renderer,
+ gpointer data);
struct _GtkCellArea
@@ -84,8 +86,8 @@ struct _GtkCellArea
* GtkCellAreaClass:
* @add: adds a #GtkCellRenderer to the area.
* @remove: removes a #GtkCellRenderer from the area.
- * @forall: Calls the #GtkCellCallback function on every #GtkCellRenderer in the area
- * with the provided user data.
+ * @foreach: Calls the #GtkCellCallback function on every #GtkCellRenderer in the area
+ * with the provided user data until the callback returns %TRUE.
* @get_cell_allocation: Gets the position (relative to the passed @cell_area rectangle)
* and size of a #GtkCellRenderer.
* @event: Handle an event in the area, this is generally used to activate a cell
@@ -149,7 +151,7 @@ struct _GtkCellAreaClass
GtkCellRenderer *renderer);
void (* remove) (GtkCellArea *area,
GtkCellRenderer *renderer);
- void (* forall) (GtkCellArea *area,
+ void (* foreach) (GtkCellArea *area,
GtkCellCallback callback,
gpointer callback_data);
void (* get_cell_allocation) (GtkCellArea *area,
@@ -248,7 +250,7 @@ void gtk_cell_area_remove (GtkCellArea
GtkCellRenderer *renderer);
gboolean gtk_cell_area_has_renderer (GtkCellArea *area,
GtkCellRenderer *renderer);
-void gtk_cell_area_forall (GtkCellArea *area,
+void gtk_cell_area_foreach (GtkCellArea *area,
GtkCellCallback callback,
gpointer callback_data);
void gtk_cell_area_get_cell_allocation (GtkCellArea *area,