summaryrefslogtreecommitdiff
path: root/gtk/gtkcellarea.h
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.van.berkom@gmail.com>2010-12-08 21:18:05 +0900
committerTristan Van Berkom <tristan.van.berkom@gmail.com>2010-12-08 21:18:05 +0900
commit34f4b5c190e8a1f9a7e942cb46d33858a8723161 (patch)
tree3187d281ee0718f61b6ac2e781396c6226b005e8 /gtk/gtkcellarea.h
parenta47a557fc3e17ed99d125df781055a399f72891b (diff)
downloadgtk+-34f4b5c190e8a1f9a7e942cb46d33858a8723161.tar.gz
Added 'background_area' calculation to GtkCellAreaClass->foreach_alloc vfunc
This allows us to reduce code allocation code paths in subclasses, as a result GtkCellArea implements the ->render() vfunc and the subclass only decides the cell area and background area distributions in a single code path.
Diffstat (limited to 'gtk/gtkcellarea.h')
-rw-r--r--gtk/gtkcellarea.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/gtk/gtkcellarea.h b/gtk/gtkcellarea.h
index c8021f73c7..15d2856711 100644
--- a/gtk/gtkcellarea.h
+++ b/gtk/gtkcellarea.h
@@ -76,6 +76,8 @@ typedef gboolean (*GtkCellCallback) (GtkCellRenderer *renderer,
* GtkCellAllocCallback:
* @renderer: the cell renderer to operate on
* @cell_area: the area allocated to @renderer inside the rectangle provided to gtk_cell_area_foreach_alloc().
+ * @cell_background: the background area for @renderer inside the background
+ * area provided to gtk_cell_area_foreach_alloc().
* @data: user-supplied data
*
* The type of the callback functions used for iterating over
@@ -86,6 +88,7 @@ typedef gboolean (*GtkCellCallback) (GtkCellRenderer *renderer,
*/
typedef gboolean (*GtkCellAllocCallback) (GtkCellRenderer *renderer,
const GdkRectangle *cell_area,
+ const GdkRectangle *cell_background,
gpointer data);
@@ -174,6 +177,7 @@ struct _GtkCellAreaClass
GtkCellAreaContext *context,
GtkWidget *widget,
const GdkRectangle *cell_area,
+ const GdkRectangle *background_area,
GtkCellAllocCallback callback,
gpointer callback_data);
gint (* event) (GtkCellArea *area,
@@ -273,6 +277,7 @@ void gtk_cell_area_foreach_alloc (GtkCellArea
GtkCellAreaContext *context,
GtkWidget *widget,
const GdkRectangle *cell_area,
+ const GdkRectangle *background_area,
GtkCellAllocCallback callback,
gpointer callback_data);
gint gtk_cell_area_event (GtkCellArea *area,
@@ -308,7 +313,6 @@ GtkCellRenderer *gtk_cell_area_get_cell_at_position (GtkCellArea
gint y,
GdkRectangle *alloc_area);
-
/* Geometry */
GtkCellAreaContext *gtk_cell_area_create_context (GtkCellArea *area);
GtkSizeRequestMode gtk_cell_area_get_request_mode (GtkCellArea *area);