Commit 2a527264 authored by Tristan Van Berkom's avatar Tristan Van Berkom

Mega commit backing out everything from the native-layout branch that

is not ready for integration

This commit makes the native-layout branch into a reasonable
patch applicable to git master, it pulls out GtkCellRenderer
support, ComboBox support, the Plug/Socket api is also not ready
and is pulled out.
parent 9306a73d
......@@ -212,7 +212,6 @@ gtk_public_h_sources = \
gtkenums.h \
gtkeventbox.h \
gtkexpander.h \
gtkextendedcell.h \
gtkextendedlayout.h \
gtkfilechooser.h \
gtkfilechooserbutton.h \
......@@ -468,7 +467,6 @@ gtk_base_c_sources = \
gtkentrycompletion.c \
gtkeventbox.c \
gtkexpander.c \
gtkextendedcell.c \
gtkextendedlayout.c \
gtkfilechooser.c \
gtkfilechooserbutton.c \
......
......@@ -83,7 +83,6 @@
#include <gtk/gtkenums.h>
#include <gtk/gtkeventbox.h>
#include <gtk/gtkexpander.h>
#include <gtk/gtkextendedcell.h>
#include <gtk/gtkextendedlayout.h>
#include <gtk/gtkfixed.h>
#include <gtk/gtkfilechooser.h>
......
......@@ -719,8 +719,6 @@ gtk_cell_renderer_toggle_set_radio
#ifndef GTK_DISABLE_DEPRECATED
gtk_cell_view_get_cell_renderers
#endif
gtk_cell_view_get_desired_height_of_row
gtk_cell_view_get_desired_width_of_row
gtk_cell_view_get_displayed_row
gtk_cell_view_get_model
gtk_cell_view_get_size_of_row
......@@ -1505,16 +1503,6 @@ gtk_expander_set_use_underline
#endif
#endif
#if IN_HEADER(__GTK_EXTENDED_CELL_H__)
#if IN_FILE(__GTK_EXTENDED_CELL_C__)
gtk_extended_cell_get_type G_GNUC_CONST
gtk_extended_cell_get_desired_height
gtk_extended_cell_get_desired_width
gtk_extended_cell_get_height_for_width
gtk_extended_cell_get_width_for_height
#endif
#endif
#if IN_HEADER(__GTK_EXTENDED_LAYOUT_H__)
#if IN_FILE(__GTK_EXTENDED_LAYOUT_C__)
gtk_extended_layout_get_type G_GNUC_CONST
......@@ -4819,7 +4807,6 @@ gtk_tree_view_column_get_alignment
gtk_tree_view_column_get_cell_renderers
#endif
gtk_tree_view_column_get_clickable
gtk_tree_view_column_get_desired_size
gtk_tree_view_column_get_expand
gtk_tree_view_column_get_fixed_width
gtk_tree_view_column_get_max_width
......
......@@ -19,15 +19,12 @@
#include "config.h"
#include "gtkcellrenderer.h"
#include "gtkextendedcell.h"
#include "gtkintl.h"
#include "gtkmarshalers.h"
#include "gtkprivate.h"
#include "gtktreeprivate.h"
#include "gtkalias.h"
static void gtk_cell_renderer_init (GtkCellRenderer *cell);
static void gtk_cell_renderer_class_init (GtkCellRendererClass *class);
static void gtk_cell_renderer_get_property (GObject *object,
guint param_id,
GValue *value,
......@@ -39,28 +36,6 @@ static void gtk_cell_renderer_set_property (GObject *object,
static void set_cell_bg_color (GtkCellRenderer *cell,
GdkColor *color);
/* Fallback GtkExtendedCell implementation to use remaining ->get_size() implementations */
static void gtk_cell_renderer_extended_cell_init (GtkExtendedCellIface *iface);
static void gtk_cell_renderer_get_desired_width (GtkExtendedCell *cell,
GtkWidget *widget,
gint *minimum_size,
gint *natural_size);
static void gtk_cell_renderer_get_desired_height (GtkExtendedCell *cell,
GtkWidget *widget,
gint *minimum_size,
gint *natural_size);
static void gtk_cell_renderer_get_height_for_width (GtkExtendedCell *cell,
GtkWidget *widget,
gint width,
gint *minimum_height,
gint *natural_height);
static void gtk_cell_renderer_get_width_for_height (GtkExtendedCell *cell,
GtkWidget *widget,
gint height,
gint *minimum_width,
gint *natural_width);
#define GTK_CELL_RENDERER_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_CELL_RENDERER, GtkCellRendererPrivate))
......@@ -97,50 +72,9 @@ enum {
LAST_SIGNAL
};
static guint cell_renderer_signals[LAST_SIGNAL] = { 0 };
/* Do a manual _get_type() here to avoid a deadlock implementing
* the interface which we are a prerequisite of.
*/
GType
gtk_cell_renderer_get_type (void)
{
static GType cell_renderer_type = 0;
if (G_UNLIKELY (cell_renderer_type == 0))
{
const GTypeInfo cell_renderer_info =
{
sizeof (GtkCellRendererClass),
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc) gtk_cell_renderer_class_init,
NULL, /* class_finalize */
NULL, /* class_init */
sizeof (GtkCellRenderer),
0, /* n_preallocs */
(GInstanceInitFunc) gtk_cell_renderer_init,
NULL, /* value_table */
};
const GInterfaceInfo extended_cell_info =
{
(GInterfaceInitFunc) gtk_cell_renderer_extended_cell_init,
(GInterfaceFinalizeFunc) NULL,
NULL /* interface data */
};
cell_renderer_type = g_type_register_static (GTK_TYPE_OBJECT, "GtkCellRenderer",
&cell_renderer_info, G_TYPE_FLAG_ABSTRACT);
g_type_add_interface_static (cell_renderer_type, GTK_TYPE_EXTENDED_CELL,
&extended_cell_info) ;
}
return cell_renderer_type;
}
static guint cell_renderer_signals[LAST_SIGNAL] = { 0 };
G_DEFINE_ABSTRACT_TYPE (GtkCellRenderer, gtk_cell_renderer, GTK_TYPE_OBJECT)
static void
gtk_cell_renderer_init (GtkCellRenderer *cell)
......@@ -1056,96 +990,5 @@ gtk_cell_renderer_stop_editing (GtkCellRenderer *cell,
}
}
static void
gtk_cell_renderer_extended_cell_init (GtkExtendedCellIface *iface)
{
iface->get_desired_width = gtk_cell_renderer_get_desired_width;
iface->get_desired_height = gtk_cell_renderer_get_desired_height;
iface->get_width_for_height = gtk_cell_renderer_get_width_for_height;
iface->get_height_for_width = gtk_cell_renderer_get_height_for_width;
}
static void
gtk_cell_renderer_get_desired_size (GtkExtendedCell *cell,
GtkWidget *widget,
GtkOrientation orientation,
gint *minimum_size,
gint *natural_size)
{
GtkRequisition min_req;
/* Fallback on the old API to get the size. */
if (GTK_CELL_RENDERER_GET_CLASS (cell)->get_size)
gtk_cell_renderer_get_size (GTK_CELL_RENDERER (cell), widget, NULL, NULL, NULL,
&min_req.width, &min_req.height);
else
{
min_req.width = 0;
min_req.height = 0;
}
if (orientation == GTK_ORIENTATION_HORIZONTAL)
{
if (minimum_size)
*minimum_size = min_req.width;
if (natural_size)
*natural_size = min_req.width;
}
else
{
if (minimum_size)
*minimum_size = min_req.height;
if (natural_size)
*natural_size = min_req.height;
}
}
static void
gtk_cell_renderer_get_desired_width (GtkExtendedCell *cell,
GtkWidget *widget,
gint *minimum_size,
gint *natural_size)
{
gtk_cell_renderer_get_desired_size (cell, widget, GTK_ORIENTATION_HORIZONTAL,
minimum_size, natural_size);
}
static void
gtk_cell_renderer_get_desired_height (GtkExtendedCell *cell,
GtkWidget *widget,
gint *minimum_size,
gint *natural_size)
{
gtk_cell_renderer_get_desired_size (cell, widget, GTK_ORIENTATION_VERTICAL,
minimum_size, natural_size);
}
static void
gtk_cell_renderer_get_height_for_width (GtkExtendedCell *cell,
GtkWidget *widget,
gint width,
gint *minimum_height,
gint *natural_height)
{
/* Fall back on the height reported from ->get_size() */
gtk_extended_cell_get_desired_height (cell, widget, minimum_height, natural_height);
}
static void
gtk_cell_renderer_get_width_for_height (GtkExtendedCell *cell,
GtkWidget *widget,
gint height,
gint *minimum_width,
gint *natural_width)
{
/* Fall back on the width reported from ->get_size() */
gtk_extended_cell_get_desired_width (cell, widget, minimum_width, natural_width);
}
#define __GTK_CELL_RENDERER_C__
#include "gtkaliasdef.c"
......@@ -21,7 +21,6 @@
#include <stdlib.h>
#include "gtkcellrenderertext.h"
#include "gtkeditable.h"
#include "gtkextendedcell.h"
#include "gtkentry.h"
#include "gtkmarshalers.h"
#include "gtkintl.h"
......@@ -62,16 +61,6 @@ static GtkCellEditable *gtk_cell_renderer_text_start_editing (GtkCellRenderer
GdkRectangle *cell_area,
GtkCellRendererState flags);
static void gtk_cell_renderer_text_extended_cell_init (GtkExtendedCellIface *iface);
static void gtk_cell_renderer_text_get_desired_width (GtkExtendedCell *cell,
GtkWidget *widget,
gint *minimal_size,
gint *desired_size);
static void gtk_cell_renderer_text_get_desired_height (GtkExtendedCell *cell,
GtkWidget *widget,
gint *minimal_size,
gint *desired_size);
enum {
EDITED,
LAST_SIGNAL
......@@ -161,9 +150,7 @@ struct _GtkCellRendererTextPrivate
GtkWidget *entry;
};
G_DEFINE_TYPE_WITH_CODE (GtkCellRendererText, gtk_cell_renderer_text, GTK_TYPE_CELL_RENDERER,
G_IMPLEMENT_INTERFACE (GTK_TYPE_EXTENDED_CELL,
gtk_cell_renderer_text_extended_cell_init))
G_DEFINE_TYPE (GtkCellRendererText, gtk_cell_renderer_text, GTK_TYPE_CELL_RENDERER)
static void
gtk_cell_renderer_text_init (GtkCellRendererText *celltext)
......@@ -1943,80 +1930,5 @@ gtk_cell_renderer_text_set_fixed_height_from_font (GtkCellRendererText *renderer
}
}
static void
gtk_cell_renderer_text_extended_cell_init (GtkExtendedCellIface *iface)
{
/* Currently cell renderers do natural widths for ellipsizing text
* but dont yet do height-for-width/width-for-height calculations for
* wordwrapping
*/
iface->get_desired_width = gtk_cell_renderer_text_get_desired_width;
iface->get_desired_height = gtk_cell_renderer_text_get_desired_height;
}
static void
gtk_cell_renderer_text_get_desired_size (GtkExtendedCell *cell,
GtkWidget *widget,
GtkOrientation orientation,
gint *minimal_size,
gint *desired_size)
{
GtkCellRendererTextPrivate *priv;
priv = GTK_CELL_RENDERER_TEXT_GET_PRIVATE (cell);
if (minimal_size)
{
if (orientation == GTK_ORIENTATION_HORIZONTAL)
get_size (GTK_CELL_RENDERER (cell),
widget, NULL, NULL, NULL, NULL,
minimal_size, NULL);
else
get_size (GTK_CELL_RENDERER (cell),
widget, NULL, NULL, NULL, NULL,
NULL, minimal_size);
}
if (desired_size)
{
PangoEllipsizeMode ellipsize;
ellipsize = priv->ellipsize;
priv->ellipsize = PANGO_ELLIPSIZE_NONE;
if (orientation == GTK_ORIENTATION_HORIZONTAL)
get_size (GTK_CELL_RENDERER (cell),
widget, NULL, NULL, NULL, NULL,
desired_size, NULL);
else
get_size (GTK_CELL_RENDERER (cell),
widget, NULL, NULL, NULL, NULL,
NULL, desired_size);
priv->ellipsize = ellipsize;
}
}
static void
gtk_cell_renderer_text_get_desired_width (GtkExtendedCell *cell,
GtkWidget *widget,
gint *minimum_size,
gint *desired_size)
{
gtk_cell_renderer_text_get_desired_size (cell, widget, GTK_ORIENTATION_HORIZONTAL,
minimum_size, desired_size);
}
static void
gtk_cell_renderer_text_get_desired_height (GtkExtendedCell *cell,
GtkWidget *widget,
gint *minimum_size,
gint *desired_size)
{
gtk_cell_renderer_text_get_desired_size (cell, widget, GTK_ORIENTATION_VERTICAL,
minimum_size, desired_size);
}
#define __GTK_CELL_RENDERER_TEXT_C__
#include "gtkaliasdef.c"
......@@ -24,8 +24,6 @@
#include "gtkintl.h"
#include "gtkcellrenderertext.h"
#include "gtkcellrendererpixbuf.h"
#include "gtkextendedlayout.h"
#include "gtkextendedcell.h"
#include "gtkprivate.h"
#include <gobject/gmarshal.h>
#include "gtkbuildable.h"
......@@ -37,7 +35,6 @@ struct _GtkCellViewCellInfo
GtkCellRenderer *cell;
gint requested_width;
gint natural_width;
gint real_width;
guint expand : 1;
guint pack : 1;
......@@ -71,6 +68,8 @@ static void gtk_cell_view_set_property (GObject *obj
const GValue *value,
GParamSpec *pspec);
static void gtk_cell_view_finalize (GObject *object);
static void gtk_cell_view_size_request (GtkWidget *widget,
GtkRequisition *requisition);
static void gtk_cell_view_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
static gboolean gtk_cell_view_expose (GtkWidget *widget,
......@@ -121,14 +120,6 @@ static void gtk_cell_view_buildable_custom_tag_end (GtkBuildable
const gchar *tagname,
gpointer *data);
static void gtk_cell_view_extended_layout_init (GtkExtendedLayoutIface *iface);
static void gtk_cell_view_get_desired_width (GtkExtendedLayout *layout,
gint *minimum_size,
gint *natural_size);
static void gtk_cell_view_get_desired_height (GtkExtendedLayout *layout,
gint *minimum_size,
gint *natural_size);
static GtkBuildableIface *parent_buildable_iface;
#define GTK_CELL_VIEW_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_CELL_VIEW, GtkCellViewPrivate))
......@@ -146,10 +137,7 @@ G_DEFINE_TYPE_WITH_CODE (GtkCellView, gtk_cell_view, GTK_TYPE_WIDGET,
G_IMPLEMENT_INTERFACE (GTK_TYPE_CELL_LAYOUT,
gtk_cell_view_cell_layout_init)
G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE,
gtk_cell_view_buildable_init)
G_IMPLEMENT_INTERFACE (GTK_TYPE_EXTENDED_LAYOUT,
gtk_cell_view_extended_layout_init))
gtk_cell_view_buildable_init))
static void
gtk_cell_view_class_init (GtkCellViewClass *klass)
......@@ -163,6 +151,7 @@ gtk_cell_view_class_init (GtkCellViewClass *klass)
widget_class->expose_event = gtk_cell_view_expose;
widget_class->size_allocate = gtk_cell_view_size_allocate;
widget_class->size_request = gtk_cell_view_size_request;
/* properties */
g_object_class_install_property (gobject_class,
......@@ -320,16 +309,53 @@ gtk_cell_view_finalize (GObject *object)
G_OBJECT_CLASS (gtk_cell_view_parent_class)->finalize (object);
}
static void
gtk_cell_view_size_request (GtkWidget *widget,
GtkRequisition *requisition)
{
GList *i;
gboolean first_cell = TRUE;
GtkCellView *cellview;
cellview = GTK_CELL_VIEW (widget);
requisition->width = 0;
requisition->height = 0;
if (cellview->priv->displayed_row)
gtk_cell_view_set_cell_data (cellview);
for (i = cellview->priv->cell_list; i; i = i->next)
{
gint width, height;
GtkCellViewCellInfo *info = (GtkCellViewCellInfo *)i->data;
if (!info->cell->visible)
continue;
if (!first_cell)
requisition->width += cellview->priv->spacing;
gtk_cell_renderer_get_size (info->cell, widget, NULL, NULL, NULL,
&width, &height);
info->requested_width = width;
requisition->width += width;
requisition->height = MAX (requisition->height, height);
first_cell = FALSE;
}
}
static void
gtk_cell_view_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
GtkCellView *cellview;
GList *i;
gint nexpand_cells = 0;
gint requested_width = 0;
gint natural_width = 0;
gint available, natural, extra;
gint expand_cell_count = 0;
gint full_requested_width = 0;
gint extra_space;
GtkCellView *cellview;
widget->allocation = *allocation;
......@@ -344,20 +370,16 @@ gtk_cell_view_size_allocate (GtkWidget *widget,
continue;
if (info->expand)
nexpand_cells++;
expand_cell_count++;
requested_width += info->requested_width;
natural_width += info->natural_width - info->requested_width;
full_requested_width += info->requested_width;
}
available = MAX (0, widget->allocation.width - requested_width);
natural = MIN (available, natural_width);
available -= natural;
if (nexpand_cells > 0)
extra = available / nexpand_cells;
else
extra = 0;
extra_space = widget->allocation.width - full_requested_width;
if (extra_space < 0)
extra_space = 0;
else if (extra_space > 0 && expand_cell_count > 0)
extra_space /= expand_cell_count;
for (i = cellview->priv->cell_list; i; i = i->next)
{
......@@ -366,21 +388,8 @@ gtk_cell_view_size_allocate (GtkWidget *widget,
if (!info->cell->visible)
continue;
info->real_width = info->requested_width;
if (natural_width > 0)
info->real_width += natural * (info->natural_width - info->requested_width) / natural_width;
if (info->expand)
{
if (nexpand_cells == 1)
info->real_width += available;
else
info->real_width += extra;
nexpand_cells -= 1;
available -= extra;
}
info->real_width = info->requested_width +
(info->expand ? extra_space : 0);
}
}
......@@ -571,8 +580,6 @@ gtk_cell_view_cell_layout_pack_start (GtkCellLayout *layout,
info->pack = GTK_PACK_START;
cellview->priv->cell_list = g_list_append (cellview->priv->cell_list, info);
gtk_widget_queue_resize (GTK_WIDGET (cellview));
}
static void
......@@ -593,8 +600,6 @@ gtk_cell_view_cell_layout_pack_end (GtkCellLayout *layout,
info->pack = GTK_PACK_END;
cellview->priv->cell_list = g_list_append (cellview->priv->cell_list, info);
gtk_widget_queue_resize (GTK_WIDGET (cellview));
}
static void
......@@ -974,108 +979,32 @@ gtk_cell_view_get_displayed_row (GtkCellView *cell_view)
* Return value: %TRUE
*
* Since: 2.6
*
* Deprecated: 3.0: Use gtk_cell_view_get_desired_width_of_row() and
* gtk_cell_view_get_desired_height_of_row() instead.
*/
gboolean
gtk_cell_view_get_size_of_row (GtkCellView *cell_view,
GtkTreePath *path,
GtkRequisition *requisition)
{
GtkTreeRowReference *tmp;
GtkRequisition req;
g_return_val_if_fail (GTK_IS_CELL_VIEW (cell_view), FALSE);
g_return_val_if_fail (path != NULL, FALSE);
gtk_cell_view_get_desired_width_of_row (cell_view, path, &req.width, NULL);
gtk_cell_view_get_desired_height_of_row (cell_view, path, &req.height, NULL);
if (requisition)
*requisition = req;
return TRUE;
}
static void
gtk_cell_view_get_desired_size_of_row (GtkCellView *cell_view,
GtkTreePath *path,
GtkOrientation orientation,
gint *minimum_size,
gint *natural_size)
{
GtkTreeRowReference *tmp;
g_return_val_if_fail (requisition != NULL, FALSE);
tmp = cell_view->priv->displayed_row;
cell_view->priv->displayed_row =
gtk_tree_row_reference_new (cell_view->priv->model, path);
if (orientation == GTK_ORIENTATION_HORIZONTAL)
gtk_cell_view_get_desired_width (GTK_EXTENDED_LAYOUT (cell_view), minimum_size, natural_size);
else
gtk_cell_view_get_desired_height (GTK_EXTENDED_LAYOUT (cell_view), minimum_size, natural_size);
gtk_cell_view_size_request (GTK_WIDGET (cell_view), requisition);
gtk_tree_row_reference_free (cell_view->priv->displayed_row);
cell_view->priv->displayed_row = tmp;
/* Restore active size */
if (orientation == GTK_ORIENTATION_HORIZONTAL)
gtk_cell_view_get_desired_width (GTK_EXTENDED_LAYOUT (cell_view), NULL, NULL);
else
gtk_cell_view_get_desired_height (GTK_EXTENDED_LAYOUT (cell_view), NULL, NULL);
}
/**
* gtk_cell_view_get_desired_width_of_row:
* @cell_view: a #GtkCellView
* @path: a #GtkTreePath
* @minimum_size: location to store the minimum size
* @natural_size: location to store the natural size
*
* Sets @minimum_size and @natural_size to the width desired by @cell_view
* to display the model row pointed to by @path.
*
* Since: 3.0
*/
void
gtk_cell_view_get_desired_width_of_row (GtkCellView *cell_view,
GtkTreePath *path,
gint *minimum_size,
gint *natural_size)
{
g_return_if_fail (GTK_IS_CELL_VIEW (cell_view));
g_return_if_fail (path != NULL);
g_return_if_fail (minimum_size != NULL || natural_size != NULL);
gtk_cell_view_get_desired_size_of_row (cell_view, path, GTK_ORIENTATION_HORIZONTAL, minimum_size, natural_size);
}
/**
* gtk_cell_view_get_desired_height_of_row:
* @cell_view: a #GtkCellView
* @path: a #GtkTreePath
* @minimum_size: location to store the minimum size
* @natural_size: location to store the natural size
*
* Sets @minimum_size and @natural_size to the height desired by @cell_view
* to display the model row pointed to by @path.
*
* Since: 3.0
*/
void
gtk_cell_view_get_desired_height_of_row (GtkCellView *cell_view,
GtkTreePath *path,
gint *minimum_size,
gint *natural_size)
{
g_return_if_fail (GTK_IS_CELL_VIEW (cell_view));
g_return_if_fail (path != NULL);
g_return_if_fail (minimum_size != NULL || natural_size != NULL);
/* restore actual size info */
gtk_cell_view_size_request (GTK_WIDGET (cell_view), &req);
gtk_cell_view_get_desired_size_of_row (cell_view, path, GTK_ORIENTATION_VERTICAL, minimum_size, natural_size);
return TRUE;
}
/**
......@@ -1188,88 +1117,5 @@ gtk_cell_view_buildable_custom_tag_end (GtkBuildable *buildable,
}
static void
gtk_cell_view_extended_layout_init (GtkExtendedLayoutIface *iface)
{
iface->get_desired_width = gtk_cell_view_get_desired_width;
iface->get_desired_height = gtk_cell_view_get_desired_height;
}
static void
gtk_cell_view_get_desired_size (GtkExtendedLayout *layout,
GtkOrientation orientation,
gint *minimum_size,
gint *natural_size)
{
GList *i;
gint cell_min, cell_nat;
gboolean first_cell = TRUE;
GtkCellView *cellview = GTK_CELL_VIEW (layout);
gint minimum, natural;
minimum = natural = 0;
if (cellview->priv->displayed_row)
gtk_cell_view_set_cell_data (cellview);
for (i = cellview->priv->cell_list; i; i = i->next)
{
GtkCellViewCellInfo *info = (GtkCellViewCellInfo *)i->data;
if (info->cell->visible)
{
if (!first_cell && orientation == GTK_ORIENTATION_HORIZONTAL)
{
minimum += cellview->priv->spacing;
natural += cellview->priv->spacing;
}
if (orientation == GTK_ORIENTATION_HORIZONTAL)
{
gtk_extended_cell_get_desired_width (GTK_EXTENDED_CELL (info->cell),
GTK_WIDGET (cellview), &cell_min, &cell_nat);
info->requested_width = cell_min;
info->natural_width = cell_nat;
minimum += info->requested_width;
natural += info->natural_width;
}
else
{
gtk_extended_cell_get_desired_height (GTK_EXTENDED_CELL (info->cell),
GTK_WIDGET (cellview), &cell_min, &cell_nat);
minimum = MAX (minimum, cell_min);
natural = MAX (natural, cell_nat);
}
first_cell = FALSE;
}
}
if (minimum_size)
*minimum_size = minimum;
if (natural_size)
*natural_size = natural;
}
static void
gtk_cell_view_get_desired_width (GtkExtendedLayout *layout,
gint *minimum_size,
gint *natural_size)
{
gtk_cell_view_get_desired_size (layout, GTK_ORIENTATION_HORIZONTAL, minimum_size, natural_size);
}
static void
gtk_cell_view_get_desired_height (GtkExtendedLayout *layout,