[gtk+] Drop gtk_cell_renderer_get_size



commit 5bdc67f3f6ea5ff46d4a2c0f484b221e6b1b0085
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Oct 25 22:27:19 2017 -0400

    Drop gtk_cell_renderer_get_size
    
    This function has been deprecated since 3.0, time to drop it.

 docs/reference/gtk/gtk4-sections.txt |    1 -
 gtk/gtkcellrenderer.c                |   49 +---------------------------------
 gtk/gtkcellrenderer.h                |    9 ------
 3 files changed, 1 insertions(+), 58 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index 5951c46..5768d2c 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -4163,7 +4163,6 @@ GtkCellRenderer
 GtkCellRendererClass
 gtk_cell_renderer_class_set_accessible_type
 gtk_cell_renderer_get_aligned_area
-gtk_cell_renderer_get_size
 gtk_cell_renderer_snapshot
 gtk_cell_renderer_activate
 gtk_cell_renderer_start_editing
diff --git a/gtk/gtkcellrenderer.c b/gtk/gtkcellrenderer.c
index a76474c..93ba426 100644
--- a/gtk/gtkcellrenderer.c
+++ b/gtk/gtkcellrenderer.c
@@ -42,7 +42,7 @@
  * draw many cells on the screen.  To this extent, it isn’t expected that a
  * CellRenderer keep any permanent state around.  Instead, any state is set
  * just prior to use using #GObjects property system.  Then, the
- * cell is measured using gtk_cell_renderer_get_size(). Finally, the cell
+ * cell is measured using gtk_cell_renderer_get_preferred_size(). Finally, the cell
  * is rendered in the correct location using gtk_cell_renderer_snapshot().
  *
  * There are a number of rules that must be followed when writing a new
@@ -669,53 +669,6 @@ set_cell_bg_color (GtkCellRenderer *cell,
 }
 
 /**
- * gtk_cell_renderer_get_size:
- * @cell: a #GtkCellRenderer
- * @widget: the widget the renderer is rendering to
- * @cell_area: (allow-none): The area a cell will be allocated, or %NULL
- * @x_offset: (out) (allow-none): location to return x offset of cell relative to @cell_area, or %NULL
- * @y_offset: (out) (allow-none): location to return y offset of cell relative to @cell_area, or %NULL
- * @width: (out) (allow-none): location to return width needed to render a cell, or %NULL
- * @height: (out) (allow-none): location to return height needed to render a cell, or %NULL
- *
- * Obtains the width and height needed to render the cell. Used by view 
- * widgets to determine the appropriate size for the cell_area passed to
- * gtk_cell_renderer_snapshot().  If @cell_area is not %NULL, fills in the
- * x and y offsets (if set) of the cell relative to this location. 
- *
- * Please note that the values set in @width and @height, as well as those 
- * in @x_offset and @y_offset are inclusive of the xpad and ypad properties.
- *
- *
- * Deprecated: 3.0: Use gtk_cell_renderer_get_preferred_size() instead.
- **/
-void
-gtk_cell_renderer_get_size (GtkCellRenderer    *cell,
-                           GtkWidget          *widget,
-                           const GdkRectangle *cell_area,
-                           gint               *x_offset,
-                           gint               *y_offset,
-                           gint               *width,
-                           gint               *height)
-{
-  GtkRequisition request;
-
-  g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
-
-  gtk_cell_renderer_get_preferred_size (cell, widget, &request, NULL);
-
-  if (width)
-    *width = request.width;
-  
-  if (height)
-    *height = request.height;
-
-  if (cell_area)
-    _gtk_cell_renderer_calc_offset (cell, cell_area, gtk_widget_get_direction (widget),
-                                    request.width, request.height, x_offset, y_offset);
-}
-
-/**
  * gtk_cell_renderer_snapshot:
  * @cell: a #GtkCellRenderer
  * @snapshot: a #GtkSnapshot to draw to
diff --git a/gtk/gtkcellrenderer.h b/gtk/gtkcellrenderer.h
index cc71027..59d7a03 100644
--- a/gtk/gtkcellrenderer.h
+++ b/gtk/gtkcellrenderer.h
@@ -220,15 +220,6 @@ void               gtk_cell_renderer_get_aligned_area               (GtkCellRend
                                                                     GtkCellRendererState flags,
                                                                     const GdkRectangle *cell_area,
                                                                     GdkRectangle       *aligned_area);
-
-GDK_DEPRECATED_IN_3_0_FOR(gtk_cell_renderer_get_preferred_size)
-void             gtk_cell_renderer_get_size       (GtkCellRenderer      *cell,
-                                                   GtkWidget            *widget,
-                                                   const GdkRectangle   *cell_area,
-                                                   gint                 *x_offset,
-                                                   gint                 *y_offset,
-                                                   gint                 *width,
-                                                   gint                 *height);
 GDK_AVAILABLE_IN_3_90
 void             gtk_cell_renderer_snapshot       (GtkCellRenderer      *cell,
                                                    GtkSnapshot          *snapshot,


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