[gtk+/rendering-cleanup-next] cell-size-request: Rename to gtk_cell_size_request_get_preferred_foo()



commit fb4c4a4dc3c4802fa78c6d515f82024b8f431e2b
Author: Benjamin Otte <otte redhat com>
Date:   Tue Sep 21 16:52:59 2010 +0200

    cell-size-request: Rename to gtk_cell_size_request_get_preferred_foo()
    
    This mostly goes to keep consistency with the changes to GtkSizeRequest
    in the last patch.
    
    This patch renames the functions:
    gtk_cell_size_request_get_width()
      => gtk_cell_size_request_get_preferred_width()
    gtk_cell_size_request_get_height()
      => gtk_cell_size_request_get_preferred_height()
    gtk_cell_size_request_get_size()
      => gtk_cell_size_request_get_preferred_size()
    gtk_cell_size_request_get_width_for_height()
      => gtk_cell_size_request_get_preferred_width_for_height()
    gtk_cell_size_request_get_height_for_width()
      => gtk_cell_size_request_get_preferred_height_for_width()
    ... and the corresponding vfuncs.
    
    The patch also renames the implementations of these functions in cell
    renderers to include the word "preferrred".

 gtk/gtk.symbols           |   10 ++--
 gtk/gtkcellrenderer.c     |  111 ++++++++++++++++++++++-----------------------
 gtk/gtkcellrenderertext.c |   66 +++++++++++++-------------
 gtk/gtkcellsizerequest.c  |   82 +++++++++++++++++-----------------
 gtk/gtkcellsizerequest.h  |   86 +++++++++++++++++-----------------
 gtk/gtkcellview.c         |   18 ++++----
 6 files changed, 186 insertions(+), 187 deletions(-)
---
diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols
index 81aa528..c535a6a 100644
--- a/gtk/gtk.symbols
+++ b/gtk/gtk.symbols
@@ -668,13 +668,13 @@ gtk_cell_renderer_toggle_set_radio
 
 #if IN_HEADER(__GTK_CELL_SIZE_REQUEST_H__)
 #if IN_FILE(__GTK_CELL_SIZE_REQUEST_C__)
-gtk_cell_size_request_get_height
-gtk_cell_size_request_get_height_for_width
+gtk_cell_size_request_get_preferred_height
+gtk_cell_size_request_get_preferred_height_for_width
 gtk_cell_size_request_get_request_mode
-gtk_cell_size_request_get_size
+gtk_cell_size_request_get_preferred_size
 gtk_cell_size_request_get_type G_GNUC_CONST
-gtk_cell_size_request_get_width
-gtk_cell_size_request_get_width_for_height
+gtk_cell_size_request_get_preferred_width
+gtk_cell_size_request_get_preferred_width_for_height
 #endif
 #endif
 
diff --git a/gtk/gtkcellrenderer.c b/gtk/gtkcellrenderer.c
index ca0e157..71067a0 100644
--- a/gtk/gtkcellrenderer.c
+++ b/gtk/gtkcellrenderer.c
@@ -40,25 +40,25 @@ static void set_cell_bg_color               (GtkCellRenderer      *cell,
 					     GdkColor             *color);
 
 /* Fallback GtkCellSizeRequest implementation to use remaining ->get_size() implementations */
-static void gtk_cell_renderer_cell_size_request_init   (GtkCellSizeRequestIface *iface);
-static void gtk_cell_renderer_get_width                (GtkCellSizeRequest      *cell,
-							GtkWidget               *widget,
-							gint                    *minimum_size,
-							gint                    *natural_size);
-static void gtk_cell_renderer_get_height               (GtkCellSizeRequest      *cell,
-							GtkWidget               *widget,
-							gint                    *minimum_size,
-							gint                    *natural_size);
-static void gtk_cell_renderer_get_height_for_width     (GtkCellSizeRequest      *cell,
-							GtkWidget               *widget,
-							gint                     width,
-							gint                    *minimum_height,
-							gint                    *natural_height);
-static void gtk_cell_renderer_get_width_for_height     (GtkCellSizeRequest      *cell,
-							GtkWidget               *widget,
-							gint                     height,
-							gint                    *minimum_width,
-							gint                    *natural_width);
+static void gtk_cell_renderer_cell_size_request_init             (GtkCellSizeRequestIface *iface);
+static void gtk_cell_renderer_get_preferred_width                (GtkCellSizeRequest      *cell,
+                                                                  GtkWidget               *widget,
+                                                                  gint                    *minimum_size,
+                                                                  gint                    *natural_size);
+static void gtk_cell_renderer_get_preferred_height               (GtkCellSizeRequest      *cell,
+                                                                  GtkWidget               *widget,
+                                                                  gint                    *minimum_size,
+                                                                  gint                    *natural_size);
+static void gtk_cell_renderer_get_preferred_height_for_width     (GtkCellSizeRequest      *cell,
+                                                                  GtkWidget               *widget,
+                                                                  gint                     width,
+                                                                  gint                    *minimum_height,
+                                                                  gint                    *natural_height);
+static void gtk_cell_renderer_get_preferred_width_for_height     (GtkCellSizeRequest      *cell,
+                                                                  GtkWidget               *widget,
+                                                                  gint                     height,
+                                                                  gint                    *minimum_width,
+                                                                  gint                    *natural_width);
 
 
 
@@ -582,7 +582,7 @@ set_cell_bg_color (GtkCellRenderer *cell,
  * in @x_offset and @y_offset are inclusive of the xpad and ypad properties.
  *
  *
- * Deprecated: 3.0: Use gtk_cell_size_request_get_size() instead.
+ * Deprecated: 3.0: Use gtk_cell_size_request_get_preferred_size() instead.
  **/
 void
 gtk_cell_renderer_get_size (GtkCellRenderer    *cell,
@@ -597,8 +597,8 @@ gtk_cell_renderer_get_size (GtkCellRenderer    *cell,
 
   g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
 
-  gtk_cell_size_request_get_size (GTK_CELL_SIZE_REQUEST (cell),
-				  widget, &request, NULL);
+  gtk_cell_size_request_get_preferred_size (GTK_CELL_SIZE_REQUEST (cell),
+                                            widget, &request, NULL);
 
   if (width)
     *width = request.width;
@@ -1095,19 +1095,18 @@ gtk_cell_renderer_stop_editing (GtkCellRenderer *cell,
 static void
 gtk_cell_renderer_cell_size_request_init (GtkCellSizeRequestIface *iface)
 {
-  iface->get_width     = gtk_cell_renderer_get_width;
-  iface->get_height    = gtk_cell_renderer_get_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;
+  iface->get_preferred_width            = gtk_cell_renderer_get_preferred_width;
+  iface->get_preferred_height           = gtk_cell_renderer_get_preferred_height;
+  iface->get_preferred_width_for_height = gtk_cell_renderer_get_preferred_width_for_height;
+  iface->get_preferred_height_for_width = gtk_cell_renderer_get_preferred_height_for_width;
 }
 
 static void
-gtk_cell_renderer_get_desired_size (GtkCellSizeRequest   *cell,
-				    GtkWidget         *widget,
-				    GtkOrientation     orientation,
-				    gint              *minimum_size,
-				    gint              *natural_size)
+gtk_cell_renderer_get_preferred_size (GtkCellSizeRequest   *cell,
+                                      GtkWidget         *widget,
+                                      GtkOrientation     orientation,
+                                      gint              *minimum_size,
+                                      gint              *natural_size)
 {
   GtkRequisition min_req;
 
@@ -1140,46 +1139,46 @@ gtk_cell_renderer_get_desired_size (GtkCellSizeRequest   *cell,
 }
 
 static void
-gtk_cell_renderer_get_width (GtkCellSizeRequest   *cell,
-			     GtkWidget         *widget,
-			     gint              *minimum_size,
-			     gint              *natural_size)
+gtk_cell_renderer_get_preferred_width (GtkCellSizeRequest   *cell,
+                                       GtkWidget         *widget,
+                                       gint              *minimum_size,
+                                       gint              *natural_size)
 {
-  gtk_cell_renderer_get_desired_size (cell, widget, GTK_ORIENTATION_HORIZONTAL, 
-				      minimum_size, natural_size);
+  gtk_cell_renderer_get_preferred_size (cell, widget, GTK_ORIENTATION_HORIZONTAL, 
+                                        minimum_size, natural_size);
 }
 
 static void
-gtk_cell_renderer_get_height (GtkCellSizeRequest   *cell,
-			      GtkWidget         *widget,
-			      gint              *minimum_size,
-			      gint              *natural_size)
+gtk_cell_renderer_get_preferred_height (GtkCellSizeRequest   *cell,
+                                        GtkWidget         *widget,
+                                        gint              *minimum_size,
+                                        gint              *natural_size)
 {
-  gtk_cell_renderer_get_desired_size (cell, widget, GTK_ORIENTATION_VERTICAL, 
-				      minimum_size, natural_size);
+  gtk_cell_renderer_get_preferred_size (cell, widget, GTK_ORIENTATION_VERTICAL, 
+                                        minimum_size, natural_size);
 }
 
 
 static void
-gtk_cell_renderer_get_height_for_width (GtkCellSizeRequest *cell,
-					GtkWidget       *widget,
-					gint             width,
-					gint            *minimum_height,
-					gint            *natural_height)
+gtk_cell_renderer_get_preferred_height_for_width (GtkCellSizeRequest *cell,
+                                                  GtkWidget       *widget,
+                                                  gint             width,
+                                                  gint            *minimum_height,
+                                                  gint            *natural_height)
 {
   /* Fall back on the height reported from ->get_size() */
-  gtk_cell_size_request_get_height (cell, widget, minimum_height, natural_height);
+  gtk_cell_size_request_get_preferred_height (cell, widget, minimum_height, natural_height);
 }
 
 static void
-gtk_cell_renderer_get_width_for_height (GtkCellSizeRequest *cell,
-					GtkWidget       *widget,
-					gint             height,
-					gint            *minimum_width,
-					gint            *natural_width)
+gtk_cell_renderer_get_preferred_width_for_height (GtkCellSizeRequest *cell,
+                                                  GtkWidget       *widget,
+                                                  gint             height,
+                                                  gint            *minimum_width,
+                                                  gint            *natural_width)
 {
   /* Fall back on the width reported from ->get_size() */
-  gtk_cell_size_request_get_width (cell, widget, minimum_width, natural_width);
+  gtk_cell_size_request_get_preferred_width (cell, widget, minimum_width, natural_width);
 }
 
 /* An internal convenience function for some containers to peek at the
diff --git a/gtk/gtkcellrenderertext.c b/gtk/gtkcellrenderertext.c
index e38aad0..cd95939 100644
--- a/gtk/gtkcellrenderertext.c
+++ b/gtk/gtkcellrenderertext.c
@@ -54,20 +54,20 @@ static GtkCellEditable *gtk_cell_renderer_text_start_editing (GtkCellRenderer
 							      GdkRectangle         *cell_area,
 							      GtkCellRendererState  flags);
 
-static void       gtk_cell_renderer_text_cell_size_request_init (GtkCellSizeRequestIface  *iface);
-static void       gtk_cell_renderer_text_get_width              (GtkCellSizeRequest       *cell,
-							        GtkWidget                 *widget,
-							        gint                      *minimal_size,
-							        gint                      *natural_size);
-static void       gtk_cell_renderer_text_get_height            (GtkCellSizeRequest        *cell,
-							        GtkWidget                 *widget,
-							        gint                      *minimal_size,
-							        gint                      *natural_size);
-static void       gtk_cell_renderer_text_get_height_for_width  (GtkCellSizeRequest        *cell,
-								GtkWidget                 *widget,
-								gint                       width,
-								gint                      *minimum_height,
-								gint                      *natural_height);
+static void       gtk_cell_renderer_text_cell_size_request_init         (GtkCellSizeRequestIface  *iface);
+static void       gtk_cell_renderer_text_get_preferred_width            (GtkCellSizeRequest       *cell,
+                                                                         GtkWidget                 *widget,
+                                                                         gint                      *minimal_size,
+                                                                         gint                      *natural_size);
+static void       gtk_cell_renderer_text_get_preferred_height           (GtkCellSizeRequest        *cell,
+                                                                         GtkWidget                 *widget,
+                                                                         gint                      *minimal_size,
+                                                                         gint                      *natural_size);
+static void       gtk_cell_renderer_text_get_preferred_height_for_width (GtkCellSizeRequest        *cell,
+                                                                         GtkWidget                 *widget,
+                                                                         gint                       width,
+                                                                         gint                      *minimum_height,
+                                                                         gint                      *natural_height);
 
 enum {
   EDITED,
@@ -2010,16 +2010,16 @@ gtk_cell_renderer_text_set_fixed_height_from_font (GtkCellRendererText *renderer
 static void
 gtk_cell_renderer_text_cell_size_request_init (GtkCellSizeRequestIface *iface)
 {
-  iface->get_width            = gtk_cell_renderer_text_get_width;
-  iface->get_height           = gtk_cell_renderer_text_get_height;
-  iface->get_height_for_width = gtk_cell_renderer_text_get_height_for_width;
+  iface->get_preferred_width            = gtk_cell_renderer_text_get_preferred_width;
+  iface->get_preferred_height           = gtk_cell_renderer_text_get_preferred_height;
+  iface->get_preferred_height_for_width = gtk_cell_renderer_text_get_preferred_height_for_width;
 }
 
 static void
-gtk_cell_renderer_text_get_width (GtkCellSizeRequest *cell,
-				  GtkWidget          *widget,
-				  gint               *minimum_size,
-				  gint               *natural_size)
+gtk_cell_renderer_text_get_preferred_width (GtkCellSizeRequest *cell,
+                                            GtkWidget          *widget,
+                                            gint               *minimum_size,
+                                            gint               *natural_size)
 {
   GtkCellRendererTextPrivate    *priv;
   GtkCellRendererText        *celltext;
@@ -2110,11 +2110,11 @@ gtk_cell_renderer_text_get_width (GtkCellSizeRequest *cell,
 }
 
 static void
-gtk_cell_renderer_text_get_height_for_width (GtkCellSizeRequest *cell,
-					     GtkWidget          *widget,
-					     gint                width,
-					     gint               *minimum_height,
-					     gint               *natural_height)
+gtk_cell_renderer_text_get_preferred_height_for_width (GtkCellSizeRequest *cell,
+                                                       GtkWidget          *widget,
+                                                       gint                width,
+                                                       gint               *minimum_height,
+                                                       gint               *natural_height)
 {
   GtkCellRendererTextPrivate    *priv;
   GtkCellRendererText        *celltext;
@@ -2142,10 +2142,10 @@ gtk_cell_renderer_text_get_height_for_width (GtkCellSizeRequest *cell,
 }
 
 static void
-gtk_cell_renderer_text_get_height (GtkCellSizeRequest *cell,
-				   GtkWidget          *widget,
-				   gint               *minimum_size,
-				   gint               *natural_size)
+gtk_cell_renderer_text_get_preferred_height (GtkCellSizeRequest *cell,
+                                             GtkWidget          *widget,
+                                             gint               *minimum_size,
+                                             gint               *natural_size)
 {
   gint min_width;
 
@@ -2156,8 +2156,8 @@ gtk_cell_renderer_text_get_height (GtkCellSizeRequest *cell,
    * Note this code path wont be followed by GtkTreeView which is
    * height-for-width specifically.
    */
-  gtk_cell_size_request_get_width (cell, widget, &min_width, NULL);
-  gtk_cell_renderer_text_get_height_for_width (cell, widget, min_width,
-					       minimum_size, natural_size);
+  gtk_cell_size_request_get_preferred_width (cell, widget, &min_width, NULL);
+  gtk_cell_renderer_text_get_preferred_height_for_width (cell, widget, min_width,
+                                                         minimum_size, natural_size);
 }
 
diff --git a/gtk/gtkcellsizerequest.c b/gtk/gtkcellsizerequest.c
index 8ae6a39..98d5c17 100644
--- a/gtk/gtkcellsizerequest.c
+++ b/gtk/gtkcellsizerequest.c
@@ -67,7 +67,7 @@ gtk_cell_size_request_get_request_mode (GtkCellSizeRequest *cell)
 }
 
 /**
- * gtk_cell_size_request_get_width:
+ * gtk_cell_size_request_get_preferred_width:
  * @cell: a #GtkCellSizeRequest instance
  * @widget: the #GtkWidget this cell will be rendering to
  * @minimum_size: location to store the minimum size, or %NULL
@@ -78,10 +78,10 @@ gtk_cell_size_request_get_request_mode (GtkCellSizeRequest *cell)
  * Since: 3.0
  */
 void
-gtk_cell_size_request_get_width (GtkCellSizeRequest *cell,
-				 GtkWidget          *widget,
-				 gint               *minimum_size,
-				 gint               *natural_size)
+gtk_cell_size_request_get_preferred_width (GtkCellSizeRequest *cell,
+                                           GtkWidget          *widget,
+                                           gint               *minimum_size,
+                                           gint               *natural_size)
 {
   GtkCellSizeRequestIface *iface;
   gint width;
@@ -95,7 +95,7 @@ gtk_cell_size_request_get_width (GtkCellSizeRequest *cell,
   if (width < 0)
     {
       iface = GTK_CELL_SIZE_REQUEST_GET_IFACE (cell);
-      iface->get_width (cell, widget, minimum_size, natural_size);
+      iface->get_preferred_width (cell, widget, minimum_size, natural_size);
     }
   else
     {
@@ -115,7 +115,7 @@ gtk_cell_size_request_get_width (GtkCellSizeRequest *cell,
 
 
 /**
- * gtk_cell_size_request_get_height:
+ * gtk_cell_size_request_get_preferred_height:
  * @cell: a #GtkCellSizeRequest instance
  * @widget: the #GtkWidget this cell will be rendering to
  * @minimum_size: location to store the minimum size, or %NULL
@@ -126,10 +126,10 @@ gtk_cell_size_request_get_width (GtkCellSizeRequest *cell,
  * Since: 3.0
  */
 void
-gtk_cell_size_request_get_height (GtkCellSizeRequest *cell,
-				  GtkWidget          *widget,
-				  gint               *minimum_size,
-				  gint               *natural_size)
+gtk_cell_size_request_get_preferred_height (GtkCellSizeRequest *cell,
+                                            GtkWidget          *widget,
+                                            gint               *minimum_size,
+                                            gint               *natural_size)
 {
   GtkCellSizeRequestIface *iface;
   gint height;
@@ -143,7 +143,7 @@ gtk_cell_size_request_get_height (GtkCellSizeRequest *cell,
   if (height < 0)
     {
       iface = GTK_CELL_SIZE_REQUEST_GET_IFACE (cell);
-      iface->get_height (cell, widget, minimum_size, natural_size);
+      iface->get_preferred_height (cell, widget, minimum_size, natural_size);
     }
   else
     {
@@ -163,7 +163,7 @@ gtk_cell_size_request_get_height (GtkCellSizeRequest *cell,
 
 
 /**
- * gtk_cell_size_request_get_width_for_height:
+ * gtk_cell_size_request_get_preferred_width_for_height:
  * @cell: a #GtkCellSizeRequest instance
  * @widget: the #GtkWidget this cell will be rendering to
  * @height: the size which is available for allocation
@@ -176,11 +176,11 @@ gtk_cell_size_request_get_height (GtkCellSizeRequest *cell,
  * Since: 3.0
  */
 void
-gtk_cell_size_request_get_width_for_height (GtkCellSizeRequest *cell,
-					    GtkWidget          *widget,
-					    gint                height,
-					    gint               *minimum_width,
-					    gint               *natural_width)
+gtk_cell_size_request_get_preferred_width_for_height (GtkCellSizeRequest *cell,
+                                                      GtkWidget          *widget,
+                                                      gint                height,
+                                                      gint               *minimum_width,
+                                                      gint               *natural_width)
 {
   GtkCellSizeRequestIface *iface;
   gint width;
@@ -194,7 +194,7 @@ gtk_cell_size_request_get_width_for_height (GtkCellSizeRequest *cell,
   if (width < 0)
     {
       iface = GTK_CELL_SIZE_REQUEST_GET_IFACE (cell);
-      iface->get_width_for_height (cell, widget, height, minimum_width, natural_width);
+      iface->get_preferred_width_for_height (cell, widget, height, minimum_width, natural_width);
     }
   else
     {
@@ -213,7 +213,7 @@ gtk_cell_size_request_get_width_for_height (GtkCellSizeRequest *cell,
 }
 
 /**
- * gtk_cell_size_request_get_height_for_width:
+ * gtk_cell_size_request_get_preferred_height_for_width:
  * @cell: a #GtkCellSizeRequest instance
  * @widget: the #GtkWidget this cell will be rendering to
  * @width: the size which is available for allocation
@@ -226,11 +226,11 @@ gtk_cell_size_request_get_width_for_height (GtkCellSizeRequest *cell,
  * Since: 3.0
  */
 void
-gtk_cell_size_request_get_height_for_width (GtkCellSizeRequest *cell,
-					    GtkWidget          *widget,
-					    gint                width,
-					    gint               *minimum_height,
-					    gint               *natural_height)
+gtk_cell_size_request_get_preferred_height_for_width (GtkCellSizeRequest *cell,
+                                                      GtkWidget          *widget,
+                                                      gint                width,
+                                                      gint               *minimum_height,
+                                                      gint               *natural_height)
 {
   GtkCellSizeRequestIface *iface;
   gint height;
@@ -244,7 +244,7 @@ gtk_cell_size_request_get_height_for_width (GtkCellSizeRequest *cell,
   if (height < 0)
     {
       iface = GTK_CELL_SIZE_REQUEST_GET_IFACE (cell);
-      iface->get_height_for_width (cell, widget, width, minimum_height, natural_height);
+      iface->get_preferred_height_for_width (cell, widget, width, minimum_height, natural_height);
     }
   else
     {
@@ -263,7 +263,7 @@ gtk_cell_size_request_get_height_for_width (GtkCellSizeRequest *cell,
 }
 
 /**
- * gtk_cell_size_request_get_size:
+ * gtk_cell_size_request_get_preferred_size:
  * @cell: a #GtkCellSizeRequest instance
  * @widget: the #GtkWidget this cell will be rendering to
  * @request_natural: Whether to base the contextual request off of the
@@ -280,10 +280,10 @@ gtk_cell_size_request_get_height_for_width (GtkCellSizeRequest *cell,
  * Since: 3.0
  */
 void
-gtk_cell_size_request_get_size (GtkCellSizeRequest *cell,
-				GtkWidget          *widget,
-				GtkRequisition     *minimum_size,
-				GtkRequisition     *natural_size)
+gtk_cell_size_request_get_preferred_size (GtkCellSizeRequest *cell,
+                                          GtkWidget          *widget,
+                                          GtkRequisition     *minimum_size,
+                                          GtkRequisition     *natural_size)
 {
   gint min_width, nat_width;
   gint min_height, nat_height;
@@ -292,38 +292,38 @@ gtk_cell_size_request_get_size (GtkCellSizeRequest *cell,
 
   if (gtk_cell_size_request_get_request_mode (cell) == GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH)
     {
-      gtk_cell_size_request_get_width (cell, widget, &min_width, &nat_width);
+      gtk_cell_size_request_get_preferred_width (cell, widget, &min_width, &nat_width);
 
       if (minimum_size)
 	{
 	  minimum_size->width = min_width;
-	  gtk_cell_size_request_get_height_for_width (cell, widget, min_width,
-						      &minimum_size->height, NULL);
+	  gtk_cell_size_request_get_preferred_height_for_width (cell, widget, min_width,
+                                                                &minimum_size->height, NULL);
 	}
 
       if (natural_size)
 	{
 	  natural_size->width = nat_width;
-	  gtk_cell_size_request_get_height_for_width (cell, widget, nat_width,
-						      NULL, &natural_size->height);
+	  gtk_cell_size_request_get_preferred_height_for_width (cell, widget, nat_width,
+                                                                NULL, &natural_size->height);
 	}
     }
   else /* GTK_SIZE_REQUEST_WIDTH_FOR_HEIGHT */
     {
-      gtk_cell_size_request_get_height (cell, widget, &min_height, &nat_height);
+      gtk_cell_size_request_get_preferred_height (cell, widget, &min_height, &nat_height);
 
       if (minimum_size)
 	{
 	  minimum_size->height = min_height;
-	  gtk_cell_size_request_get_width_for_height (cell, widget, min_height,
-						      &minimum_size->width, NULL);
+	  gtk_cell_size_request_get_preferred_width_for_height (cell, widget, min_height,
+                                                                &minimum_size->width, NULL);
 	}
 
       if (natural_size)
 	{
 	  natural_size->height = nat_height;
-	  gtk_cell_size_request_get_width_for_height (cell, widget, nat_height,
-						      NULL, &natural_size->width);
+	  gtk_cell_size_request_get_preferred_width_for_height (cell, widget, nat_height,
+                                                                NULL, &natural_size->width);
 	}
     }
 }
diff --git a/gtk/gtkcellsizerequest.h b/gtk/gtkcellsizerequest.h
index c69fce8..60c4df0 100644
--- a/gtk/gtkcellsizerequest.h
+++ b/gtk/gtkcellsizerequest.h
@@ -41,51 +41,51 @@ struct _GtkCellSizeRequestIface
   GTypeInterface g_iface;
 
   /* virtual table */
-  GtkSizeRequestMode (* get_request_mode)     (GtkCellSizeRequest *cell);
-  void               (* get_width)            (GtkCellSizeRequest *cell,
-					       GtkWidget          *widget,
-					       gint               *minimum_size,
-					       gint               *natural_size);
-  void               (* get_height_for_width) (GtkCellSizeRequest *cell,
-					       GtkWidget          *widget,
-					       gint                width,
-					       gint               *minimum_height,
-					       gint               *natural_height);
-  void               (* get_height)           (GtkCellSizeRequest *cell,
-					       GtkWidget          *widget,
-					       gint               *minimum_size,
-					       gint               *natural_size);
-  void               (* get_width_for_height) (GtkCellSizeRequest *cell,
-					       GtkWidget          *widget,
-					       gint                height,
-					       gint               *minimum_width,
-					       gint               *natural_width);
+  GtkSizeRequestMode (* get_request_mode)               (GtkCellSizeRequest *cell);
+  void               (* get_preferred_width)            (GtkCellSizeRequest *cell,
+                                                         GtkWidget          *widget,
+                                                         gint               *minimum_size,
+                                                         gint               *natural_size);
+  void               (* get_preferred_height_for_width) (GtkCellSizeRequest *cell,
+                                                         GtkWidget          *widget,
+                                                         gint                width,
+                                                         gint               *minimum_height,
+                                                         gint               *natural_height);
+  void               (* get_preferred_height)           (GtkCellSizeRequest *cell,
+                                                         GtkWidget          *widget,
+                                                         gint               *minimum_size,
+                                                         gint               *natural_size);
+  void               (* get_preferred_width_for_height) (GtkCellSizeRequest *cell,
+                                                         GtkWidget          *widget,
+                                                         gint                height,
+                                                         gint               *minimum_width,
+                                                         gint               *natural_width);
 };
 
-GType              gtk_cell_size_request_get_type             (void) G_GNUC_CONST;
-GtkSizeRequestMode gtk_cell_size_request_get_request_mode     (GtkCellSizeRequest *cell);
-void               gtk_cell_size_request_get_width            (GtkCellSizeRequest *cell,
-							       GtkWidget          *widget,
-							       gint               *minimum_size,
-							       gint               *natural_size);
-void               gtk_cell_size_request_get_height_for_width (GtkCellSizeRequest *cell,
-							       GtkWidget          *widget,
-							       gint                width,
-							       gint               *minimum_height,
-							       gint               *natural_height);
-void               gtk_cell_size_request_get_height           (GtkCellSizeRequest *cell,
-							       GtkWidget          *widget,
-							       gint               *minimum_size,
-							       gint               *natural_size);
-void               gtk_cell_size_request_get_width_for_height (GtkCellSizeRequest *cell,
-							       GtkWidget          *widget,
-							       gint                height,
-							       gint               *minimum_width,
-							       gint               *natural_width);
-void               gtk_cell_size_request_get_size             (GtkCellSizeRequest *cell,
-							       GtkWidget          *widget,
-							       GtkRequisition     *minimum_size,
-							       GtkRequisition     *natural_size);
+GType              gtk_cell_size_request_get_type                       (void) G_GNUC_CONST;
+GtkSizeRequestMode gtk_cell_size_request_get_request_mode               (GtkCellSizeRequest *cell);
+void               gtk_cell_size_request_get_preferred_width            (GtkCellSizeRequest *cell,
+                                                                         GtkWidget          *widget,
+                                                                         gint               *minimum_size,
+                                                                         gint               *natural_size);
+void               gtk_cell_size_request_get_preferred_height_for_width (GtkCellSizeRequest *cell,
+                                                                         GtkWidget          *widget,
+                                                                         gint                width,
+                                                                         gint               *minimum_height,
+                                                                         gint               *natural_height);
+void               gtk_cell_size_request_get_preferred_height           (GtkCellSizeRequest *cell,
+                                                                         GtkWidget          *widget,
+                                                                         gint               *minimum_size,
+                                                                         gint               *natural_size);
+void               gtk_cell_size_request_get_preferred_width_for_height (GtkCellSizeRequest *cell,
+                                                                         GtkWidget          *widget,
+                                                                         gint                height,
+                                                                         gint               *minimum_width,
+                                                                         gint               *natural_width);
+void               gtk_cell_size_request_get_preferred_size             (GtkCellSizeRequest *cell,
+                                                                         GtkWidget          *widget,
+                                                                         GtkRequisition     *minimum_size,
+                                                                         GtkRequisition     *natural_size);
 
 G_END_DECLS
 
diff --git a/gtk/gtkcellview.c b/gtk/gtkcellview.c
index 9c76606..4d24487 100644
--- a/gtk/gtkcellview.c
+++ b/gtk/gtkcellview.c
@@ -1226,8 +1226,8 @@ gtk_cell_view_get_preferred_width  (GtkSizeRequest      *widget,
 	      natural += cellview->priv->spacing;
 	    }
 
-	  gtk_cell_size_request_get_width (GTK_CELL_SIZE_REQUEST (info->cell),
-                                           GTK_WIDGET (cellview), &cell_min, &cell_nat);
+	  gtk_cell_size_request_get_preferred_width (GTK_CELL_SIZE_REQUEST (info->cell),
+                                                     GTK_WIDGET (cellview), &cell_min, &cell_nat);
 	  
 	  info->requested_width = cell_min;
 	  info->natural_width   = cell_nat;
@@ -1302,10 +1302,10 @@ gtk_cell_view_get_preferred_height_for_width (GtkSizeRequest      *widget,
         {
 	  GtkRequestedSize requested;
 
-	  gtk_cell_size_request_get_width (GTK_CELL_SIZE_REQUEST (info->cell),
-                                           GTK_WIDGET (cellview), 
-                                           &requested.minimum_size, 
-                                           &requested.natural_size);
+	  gtk_cell_size_request_get_preferred_width (GTK_CELL_SIZE_REQUEST (info->cell),
+                                                     GTK_WIDGET (cellview), 
+                                                     &requested.minimum_size, 
+                                                     &requested.natural_size);
 
 	  requested.data = info;
 	  g_array_append_val (array, requested);
@@ -1358,9 +1358,9 @@ gtk_cell_view_get_preferred_height_for_width (GtkSizeRequest      *widget,
 	    }
 
 	  /* Get the height for the real width of this cell */
-	  gtk_cell_size_request_get_height_for_width (GTK_CELL_SIZE_REQUEST (info->cell),
-                                                      GTK_WIDGET (widget),
-                                                      cell_width, &cell_minimum, &cell_natural);
+	  gtk_cell_size_request_get_preferred_height_for_width (GTK_CELL_SIZE_REQUEST (info->cell),
+                                                                GTK_WIDGET (widget),
+                                                                cell_width, &cell_minimum, &cell_natural);
 
 	  minimum = MAX (minimum, cell_minimum);
 	  natural = MAX (natural, cell_natural);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]