diff options
Diffstat (limited to 'libgnomecanvas')
-rw-r--r-- | libgnomecanvas/Makefile.am | 3 | ||||
-rw-r--r-- | libgnomecanvas/gnome-canvas-util.c | 61 | ||||
-rw-r--r-- | libgnomecanvas/gnome-canvas-util.h | 22 | ||||
-rw-r--r-- | libgnomecanvas/libgnomecanvas.h | 7 | ||||
-rw-r--r-- | libgnomecanvas/libgnomecanvastypes.c | 43 |
5 files changed, 1 insertions, 135 deletions
diff --git a/libgnomecanvas/Makefile.am b/libgnomecanvas/Makefile.am index 14b44a0d07..c8fbf1e836 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 bc6b1ba968..d396db0a1e 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 74e112f0fd..1a29221f29 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 6dff7de8dd..8cb0c3f37a 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 */ diff --git a/libgnomecanvas/libgnomecanvastypes.c b/libgnomecanvas/libgnomecanvastypes.c deleted file mode 100644 index c7c4fcf3cf..0000000000 --- a/libgnomecanvas/libgnomecanvastypes.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 1999, 2000 Red Hat, Inc. - * All rights reserved. - * - * This file is part of the Gnome Library. - * - * The Gnome Library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * The Gnome Library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with the Gnome Library; see the file COPYING.LIB. If not, - * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -/* - @NOTATION@ - */ - -#include <config.h> -#include <glib-object.h> - -#include <libgnomecanvas/libgnomecanvas.h> - -GType -gnome_canvas_points_get_type (void) -{ - static GType type_canvas_points = 0; - - if (!type_canvas_points) - type_canvas_points = g_boxed_type_register_static - ("GnomeCanvasPoints", - (GBoxedCopyFunc) gnome_canvas_points_ref, - (GBoxedFreeFunc) gnome_canvas_points_unref); - - return type_canvas_points; -} |