summaryrefslogtreecommitdiff
path: root/gtk/gtkcellareacontext.h
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.van.berkom@gmail.com>2010-12-13 00:18:00 +0900
committerTristan Van Berkom <tristan.van.berkom@gmail.com>2010-12-13 00:29:21 +0900
commit0431dd67f82def7af57119b27bcc4dea0b7a2167 (patch)
tree94dceaea7c9f8b34b5674aacc98dd0e663ba838c /gtk/gtkcellareacontext.h
parentff39c76bfd9ea882c80c60313b594cf73035fa6e (diff)
downloadgtk+-0431dd67f82def7af57119b27bcc4dea0b7a2167.tar.gz
Added apis to GtkCellArea for GtkIconView purposes.
Added a few apis, - GtkCellAreaContext get_preferred_height_for_width & width for height apis and vfuncs, this lets the icon view request the collective (and aligned) height for width for a said row. - gtk_cell_area_copy_context() this creates a duplicate of an already created and requested context, this way the icon view uses a global context to request the widths of all rows and then makes a copy with all the stored alignments and uses a separate copy to calculate the height and alignments of each row separately.
Diffstat (limited to 'gtk/gtkcellareacontext.h')
-rw-r--r--gtk/gtkcellareacontext.h52
1 files changed, 34 insertions, 18 deletions
diff --git a/gtk/gtkcellareacontext.h b/gtk/gtkcellareacontext.h
index 2731a73db4..d2b462cfce 100644
--- a/gtk/gtkcellareacontext.h
+++ b/gtk/gtkcellareacontext.h
@@ -65,10 +65,18 @@ struct _GtkCellAreaContextClass
GObjectClass parent_class;
/*< public >*/
- void (* allocate) (GtkCellAreaContext *context,
- gint width,
- gint height);
- void (* reset) (GtkCellAreaContext *context);
+ void (* allocate) (GtkCellAreaContext *context,
+ gint width,
+ gint height);
+ void (* reset) (GtkCellAreaContext *context);
+ void (* get_preferred_height_for_width) (GtkCellAreaContext *context,
+ gint width,
+ gint *minimum_height,
+ gint *natural_height);
+ void (* get_preferred_width_for_height) (GtkCellAreaContext *context,
+ gint height,
+ gint *minimum_width,
+ gint *natural_width);
/*< private >*/
/* Padding for future expansion */
@@ -81,22 +89,30 @@ struct _GtkCellAreaContextClass
GType gtk_cell_area_context_get_type (void) G_GNUC_CONST;
/* Main apis */
-GtkCellArea *gtk_cell_area_context_get_area (GtkCellAreaContext *context);
-void gtk_cell_area_context_allocate (GtkCellAreaContext *context,
- gint width,
- gint height);
-void gtk_cell_area_context_reset (GtkCellAreaContext *context);
+GtkCellArea *gtk_cell_area_context_get_area (GtkCellAreaContext *context);
+void gtk_cell_area_context_allocate (GtkCellAreaContext *context,
+ gint width,
+ gint height);
+void gtk_cell_area_context_reset (GtkCellAreaContext *context);
/* Apis for GtkCellArea clients to consult cached values for a series of GtkTreeModel rows */
-void gtk_cell_area_context_get_preferred_width (GtkCellAreaContext *context,
- gint *minimum_width,
- gint *natural_width);
-void gtk_cell_area_context_get_preferred_height (GtkCellAreaContext *context,
- gint *minimum_height,
- gint *natural_height);
-void gtk_cell_area_context_get_allocation (GtkCellAreaContext *context,
- gint *width,
- gint *height);
+void gtk_cell_area_context_get_preferred_width (GtkCellAreaContext *context,
+ gint *minimum_width,
+ gint *natural_width);
+void gtk_cell_area_context_get_preferred_height (GtkCellAreaContext *context,
+ gint *minimum_height,
+ gint *natural_height);
+void gtk_cell_area_context_get_preferred_height_for_width (GtkCellAreaContext *context,
+ gint width,
+ gint *minimum_height,
+ gint *natural_height);
+void gtk_cell_area_context_get_preferred_width_for_height (GtkCellAreaContext *context,
+ gint height,
+ gint *minimum_width,
+ gint *natural_width);
+void gtk_cell_area_context_get_allocation (GtkCellAreaContext *context,
+ gint *width,
+ gint *height);
/* Apis for GtkCellArea implementations to update cached values for multiple GtkTreeModel rows */
void gtk_cell_area_context_push_preferred_width (GtkCellAreaContext *context,