[evolution] gnome-canvas: Remove GnomeCanvasPoints



commit cf21582a93e0b40b1400891b0ea2b0d52482c759
Author: Benjamin Otte <otte redhat com>
Date:   Wed Oct 13 17:58:50 2010 +0200

    gnome-canvas: Remove GnomeCanvasPoints
    
    It's unused by now.

 libgnomecanvas/Makefile.am           |    3 +-
 libgnomecanvas/gnome-canvas-util.c   |   61 ----------------------------------
 libgnomecanvas/gnome-canvas-util.h   |   22 ------------
 libgnomecanvas/libgnomecanvas.h      |    7 ----
 libgnomecanvas/libgnomecanvastypes.c |   43 ------------------------
 5 files changed, 1 insertions(+), 135 deletions(-)
---
diff --git a/libgnomecanvas/Makefile.am b/libgnomecanvas/Makefile.am
index 14b44a0..c8fbf1e 100644
--- a/libgnomecanvas/Makefile.am
+++ b/libgnomecanvas/Makefile.am
@@ -56,8 +56,7 @@ libgnomecanvas_la_SOURCES =			\
 	gnome-canvas-text.c			\
 	gnome-canvas-util.c			\
 	gnome-canvas-widget.c			\
-	gnome-canvas.c				\
-	libgnomecanvastypes.c
+	gnome-canvas.c
 
 include $(top_srcdir)/glib-gen.mak
 glib_enum_prefix=gnome_canvas
diff --git a/libgnomecanvas/gnome-canvas-util.c b/libgnomecanvas/gnome-canvas-util.c
index bc6b1ba..d396db0 100644
--- a/libgnomecanvas/gnome-canvas-util.c
+++ b/libgnomecanvas/gnome-canvas-util.c
@@ -53,67 +53,6 @@
 #include <libart_lgpl/art_rect_svp.h>
 
 /**
- * gnome_canvas_points_new:
- * @num_points: The number of points to allocate space for in the array.
- *
- * Creates a structure that should be used to pass an array of points to
- * items.
- *
- * Return value: A newly-created array of points.  It should be filled in
- * by the user.
- **/
-GnomeCanvasPoints *
-gnome_canvas_points_new (gint num_points)
-{
-	GnomeCanvasPoints *points;
-
-	g_return_val_if_fail (num_points > 1, NULL);
-
-	points = g_new (GnomeCanvasPoints, 1);
-	points->num_points = num_points;
-	points->coords = g_new (double, 2 * num_points);
-	points->ref_count = 1;
-
-	return points;
-}
-
-/**
- * gnome_canvas_points_ref:
- * @points: A canvas points structure.
- *
- * Increases the reference count of the specified points structure.
- *
- * Return value: The canvas points structure itself.
- **/
-GnomeCanvasPoints *
-gnome_canvas_points_ref (GnomeCanvasPoints *points)
-{
-	g_return_val_if_fail (points != NULL, NULL);
-
-	points->ref_count += 1;
-	return points;
-}
-
-/**
- * gnome_canvas_points_free:
- * @points: A canvas points structure.
- *
- * Decreases the reference count of the specified points structure.  If it
- * reaches zero, then the structure is freed.
- **/
-void
-gnome_canvas_points_free (GnomeCanvasPoints *points)
-{
-	g_return_if_fail (points != NULL);
-
-	points->ref_count -= 1;
-	if (points->ref_count == 0) {
-		g_free (points->coords);
-		g_free (points);
-	}
-}
-
-/**
  * gnome_canvas_get_miter_points:
  * @x1: X coordinate of the first point
  * @y1: Y coordinate of the first point
diff --git a/libgnomecanvas/gnome-canvas-util.h b/libgnomecanvas/gnome-canvas-util.h
index 74e112f..1a29221 100644
--- a/libgnomecanvas/gnome-canvas-util.h
+++ b/libgnomecanvas/gnome-canvas-util.h
@@ -41,28 +41,6 @@
 
 G_BEGIN_DECLS
 
-typedef struct _GnomeCanvasPoints GnomeCanvasPoints;
-
-/* This structure defines an array of points.  X coordinates are stored in the even-numbered
- * indices, and Y coordinates are stored in the odd-numbered indices.  num_points indicates the
- * number of points, so the array is 2*num_points elements big.
- */
-struct _GnomeCanvasPoints {
-	gdouble *coords;
-	gint num_points;
-	gint ref_count;
-};
-
-/* Allocate a new GnomeCanvasPoints structure with enough space for the specified number of points */
-GnomeCanvasPoints *gnome_canvas_points_new (gint num_points);
-
-/* Increate ref count */
-GnomeCanvasPoints *gnome_canvas_points_ref (GnomeCanvasPoints *points);
-#define gnome_canvas_points_unref gnome_canvas_points_free
-
-/* Decrease ref count and free structure if it has reached zero */
-void gnome_canvas_points_free (GnomeCanvasPoints *points);
-
 /* Given three points forming an angle, compute the coordinates of the inside and outside points of
  * the mitered corner formed by a line of a given width at that angle.
  *
diff --git a/libgnomecanvas/libgnomecanvas.h b/libgnomecanvas/libgnomecanvas.h
index 6dff7de..8cb0c3f 100644
--- a/libgnomecanvas/libgnomecanvas.h
+++ b/libgnomecanvas/libgnomecanvas.h
@@ -35,11 +35,4 @@
 #include <libgnomecanvas/gnome-canvas-util.h>
 #include <libgnomecanvas/gnome-canvas-clipgroup.h>
 
-G_BEGIN_DECLS
-
-GType gnome_canvas_points_get_type (void);
-#define GNOME_TYPE_CANVAS_POINTS gnome_canvas_points_get_type()
-
-G_END_DECLS
-
 #endif /* LIBGNOMECANVAS_H */



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