+/* Default implementation is to fall back on an underlying cell area */
+static void
+gtk_cell_layout_default_pack_start (GtkCellLayout *cell_layout,
+ GtkCellRenderer *cell,
+ gboolean expand)
+{
+ GtkCellLayoutIface *iface;
+ GtkCellArea *area;
+
+ iface = GTK_CELL_LAYOUT_GET_IFACE (cell_layout);
+
+ if (iface->get_area)
+ {
+ area = iface->get_area (cell_layout);
+
+ if (area)
+ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (area), cell, expand);
+ else
+ warn_no_cell_area ("GtkCellLayoutIface->pack_start()");
+ }
+}
+
+static void
+gtk_cell_layout_default_pack_end (GtkCellLayout *cell_layout,
+ GtkCellRenderer *cell,
+ gboolean expand)
+{
+ GtkCellLayoutIface *iface;
+ GtkCellArea *area;
+
+ iface = GTK_CELL_LAYOUT_GET_IFACE (cell_layout);
+
+ if (iface->get_area)
+ {
+ area = iface->get_area (cell_layout);
+
+ if (area)
+ gtk_cell_layout_pack_end (GTK_CELL_LAYOUT (area), cell, expand);
+ else
+ warn_no_cell_area ("GtkCellLayoutIface->pack_end()");
+ }
+}
+
+static void
+gtk_cell_layout_default_clear (GtkCellLayout *cell_layout)
+{
+ GtkCellLayoutIface *iface;
+ GtkCellArea *area;
+
+ iface = GTK_CELL_LAYOUT_GET_IFACE (cell_layout);
+
+ if (iface->get_area)
+ {
+ area = iface->get_area (cell_layout);
+
+ if (area)
+ gtk_cell_layout_clear (GTK_CELL_LAYOUT (area));
+ else
+ warn_no_cell_area ("GtkCellLayoutIface->clear()");
+ }
+}
+
+static void
+gtk_cell_layout_default_add_attribute (GtkCellLayout *cell_layout,
+ GtkCellRenderer *cell,
+ const gchar *attribute,
+ gint column)
+{
+ GtkCellLayoutIface *iface;
+ GtkCellArea *area;
+
+ iface = GTK_CELL_LAYOUT_GET_IFACE (cell_layout);
+
+ if (iface->get_area)
+ {
+ area = iface->get_area (cell_layout);
+
+ if (area)
+ gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (area), cell, attribute, column);
+ else
+ warn_no_cell_area ("GtkCellLayoutIface->add_attribute()");
+ }
+}
+
+static void
+gtk_cell_layout_default_set_cell_data_func (GtkCellLayout *cell_layout,
+ GtkCellRenderer *cell,
+ GtkCellLayoutDataFunc func,
+ gpointer func_data,
+ GDestroyNotify destroy)
+{
+ GtkCellLayoutIface *iface;
+ GtkCellArea *area;
+
+ iface = GTK_CELL_LAYOUT_GET_IFACE (cell_layout);
+
+ if (iface->get_area)
+ {
+ area = iface->get_area (cell_layout);
+
+ if (area)
+ _gtk_cell_area_set_cell_data_func_with_proxy (area, cell,
+ (GFunc)func, func_data, destroy,
+ cell_layout);
+ else
+ warn_no_cell_area ("GtkCellLayoutIface->set_cell_data_func()");
+ }
+}
+
+static void
+gtk_cell_layout_default_clear_attributes (GtkCellLayout *cell_layout,
+ GtkCellRenderer *cell)
+{
+ GtkCellLayoutIface *iface;
+ GtkCellArea *area;
+
+ iface = GTK_CELL_LAYOUT_GET_IFACE (cell_layout);
+
+ if (iface->get_area)
+ {
+ area = iface->get_area (cell_layout);
+
+ if (area)
+ gtk_cell_layout_clear_attributes (GTK_CELL_LAYOUT (area), cell);
+ else
+ warn_no_cell_area ("GtkCellLayoutIface->clear_attributes()");
+ }
+}
+
+static void
+gtk_cell_layout_default_reorder (GtkCellLayout *cell_layout,
+ GtkCellRenderer *cell,
+ gint position)
+{
+ GtkCellLayoutIface *iface;
+ GtkCellArea *area;
+
+ iface = GTK_CELL_LAYOUT_GET_IFACE (cell_layout);
+
+ if (iface->get_area)
+ {
+ area = iface->get_area (cell_layout);
+
+ if (area)
+ gtk_cell_layout_reorder (GTK_CELL_LAYOUT (area), cell, position);
+ else
+ warn_no_cell_area ("GtkCellLayoutIface->reorder()");
+ }
+}
+
+static GList *
+gtk_cell_layout_default_get_cells (GtkCellLayout *cell_layout)
+{
+ GtkCellLayoutIface *iface;
+ GtkCellArea *area;
+
+ iface = GTK_CELL_LAYOUT_GET_IFACE (cell_layout);
+
+ if (iface->get_area)
+ {
+ area = iface->get_area (cell_layout);
+
+ if (area)
+ return gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (area));
+ else
+ warn_no_cell_area ("GtkCellLayoutIface->get_cells()");
+ }
+ return NULL;
+}
+
+