Commit 97243662 authored by Johannes Schmid's avatar Johannes Schmid

native-layout: Don't expose extra gtk_widget_* function that are similar to...

native-layout: Don't expose extra gtk_widget_* function that are similar to the GtkExtendedLayout interface
parent c659d1a5
......@@ -482,15 +482,15 @@ gtk_box_size_allocate (GtkWidget *widget,
if (GTK_WIDGET_VISIBLE (child->widget))
{
if (private->orientation == GTK_ORIENTATION_HORIZONTAL)
gtk_widget_get_width_for_height (child->widget,
allocation->height,
&sizes[i].minimum_size,
&sizes[i].natural_size);
gtk_extended_layout_get_width_for_height (GTK_EXTENDED_LAYOUT (child->widget),
allocation->height,
&sizes[i].minimum_size,
&sizes[i].natural_size);
else
gtk_widget_get_height_for_width (child->widget,
allocation->width,
&sizes[i].minimum_size,
&sizes[i].natural_size);
gtk_extended_layout_get_width_for_height (GTK_EXTENDED_LAYOUT (child->widget),
allocation->width,
&sizes[i].minimum_size,
&sizes[i].natural_size);
size -= sizes[i].minimum_size;
......
......@@ -10593,41 +10593,21 @@ gtk_widget_real_get_desired_size (GtkExtendedLayout *layout,
*natural_size = requisition;
}
/**
* gtk_widget_get_desired_size:
* @widget: a #GtkWidget
* @minimum_size: location for storing the @widget's minimum size, or %NULL
* @natural_size: location for storing the @widget's preferred size, or %NULL
*
* Retreives a widget's desired size, considering restrictions imposed by
* #GtkSizeGroup<!-- -->s. See also: gtk_extended_layout_get_desired_size().
*
* Since: 2.20
*/
void
gtk_widget_get_desired_size (GtkWidget *widget,
GtkRequisition *minimum_size,
GtkRequisition *natural_size)
{
g_return_if_fail (GTK_IS_WIDGET (widget));
_gtk_size_group_compute_desired_size (widget, minimum_size, natural_size);
}
void
gtk_widget_get_height_for_width (GtkWidget *widget,
gint width,
gint *minimum_height,
gint *natural_height)
static void
gtk_widget_real_get_height_for_width (GtkExtendedLayout *layout,
gint width,
gint *minimum_height,
gint *natural_height)
{
GtkRequisition minimum_size;
GtkRequisition natural_size;
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (GTK_IS_WIDGET (layout));
#if 0
TODO: integrate height-for-width with size-groups
#else
gtk_widget_get_desired_size (widget,
gtk_widget_get_desired_size (GTK_WIDGET(layout),
minimum_height ? &minimum_size : NULL,
natural_height ? &natural_size : NULL);
......@@ -10638,21 +10618,21 @@ gtk_widget_get_height_for_width (GtkWidget *widget,
#endif
}
void
gtk_widget_get_width_for_height (GtkWidget *widget,
gint height,
gint *minimum_width,
gint *natural_width)
static void
gtk_widget_real_get_width_for_height (GtkExtendedLayout *layout,
gint height,
gint *minimum_width,
gint *natural_width)
{
GtkRequisition minimum_size;
GtkRequisition natural_size;
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (GTK_IS_WIDGET (layout));
#if 0
TODO: integrate width-for-height with size-groups
#else
gtk_widget_get_desired_size (widget,
gtk_widget_get_desired_size (GTK_WIDGET(layout),
minimum_width ? &minimum_size : NULL,
natural_width ? &natural_size : NULL);
......@@ -10663,10 +10643,32 @@ gtk_widget_get_width_for_height (GtkWidget *widget,
#endif
}
/**
* gtk_widget_get_desired_size:
* @widget: a #GtkWidget
* @minimum_size: location for storing the @widget's minimum size, or %NULL
* @natural_size: location for storing the @widget's preferred size, or %NULL
*
* Retreives a widget's desired size, considering restrictions imposed by
* #GtkSizeGroup<!-- -->s. See also: gtk_extended_layout_get_desired_size().
*
* Since: 2.20
*/
void
gtk_widget_get_desired_size (GtkWidget *widget,
GtkRequisition *minimum_size,
GtkRequisition *natural_size)
{
g_return_if_fail (GTK_IS_WIDGET (widget));
_gtk_size_group_compute_desired_size (widget, minimum_size, natural_size);
}
static void
gtk_widget_layout_interface_init (GtkExtendedLayoutIface *iface)
{
iface->get_desired_size = gtk_widget_real_get_desired_size;
iface->get_width_for_height = gtk_widget_real_get_width_for_height;
iface->get_height_for_width = gtk_widget_real_get_height_for_width;
}
......
......@@ -777,14 +777,6 @@ void gtk_widget_size_allocate (GtkWidget *widget,
void gtk_widget_get_desired_size (GtkWidget *widget,
GtkRequisition *minimum_size,
GtkRequisition *natural_size);
void gtk_widget_get_height_for_width(GtkWidget *widget,
gint width,
gint *minimum_height,
gint *natural_height);
void gtk_widget_get_width_for_height(GtkWidget *widget,
gint height,
gint *minimum_width,
gint *natural_width);
void gtk_widget_get_child_requisition (GtkWidget *widget,
GtkRequisition *requisition);
void gtk_widget_add_accelerator (GtkWidget *widget,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment