[goocanvas] Use GOO_CANVAS_POLYLINE_ prefix for NUM_POINTS to silence gir warnings.



commit c05850920175789263a462d4bfcacfb874274c76
Author: Damon Chaplin <damon gnome org>
Date:   Sun Oct 9 19:14:53 2011 +0100

    Use GOO_CANVAS_POLYLINE_ prefix for NUM_POINTS to silence gir warnings.

 src/goocanvaspolyline.c |   24 ++++++++++++++----------
 src/goocanvaspolyline.h |    6 +++---
 2 files changed, 17 insertions(+), 13 deletions(-)
---
diff --git a/src/goocanvaspolyline.c b/src/goocanvaspolyline.c
index 88a9418..50b525b 100644
--- a/src/goocanvaspolyline.c
+++ b/src/goocanvaspolyline.c
@@ -95,11 +95,13 @@ goo_canvas_points_unref (GooCanvasPoints *points)
 /**
  * goo_canvas_points_set_point:
  * @points: a #GooCanvasPoints struct.
- * @idx: index of point to set
- * @x: x value to set point coordinate to
- * @y: y value to set point coordinate to
+ * @idx: index of point to set.
+ * @x: x value to set point coordinate to.
+ * @y: y value to set point coordinate to.
  * 
- * Sets the coordinates of idx in the #GooCanvasPoints struct. For bindings
+ * Sets the coordinates of a point in the #GooCanvasPoints struct.
+ *
+ * Since: 2.0.1
  **/
 void
 goo_canvas_points_set_point(GooCanvasPoints *points, int idx, double x, double y)
@@ -112,11 +114,13 @@ goo_canvas_points_set_point(GooCanvasPoints *points, int idx, double x, double y
 /**
  * goo_canvas_points_get_point:
  * @points: a #GooCanvasPoints struct.
- * @idx: index of point to get
- * @x: (out): location to store x coordinate
- * @y: (out): location to store y coordinate
+ * @idx: index of point to get.
+ * @x: (out): location to store x coordinate.
+ * @y: (out): location to store y coordinate.
  * 
- * Gets the coordinates of idx in the #GooCanvasPoints struct. For bindings
+ * Gets the coordinates of a point in the #GooCanvasPoints struct.
+ *
+ * Since: 2.0.1
  **/
 void
 goo_canvas_points_get_point(GooCanvasPoints *points, int idx, double *x, double *y)
@@ -877,7 +881,7 @@ goo_canvas_polyline_create_start_arrow_path (GooCanvasPolyline *polyline,
 
   cairo_move_to (cr, arrow->start_arrow_coords[0],
 		 arrow->start_arrow_coords[1]);
-  for (i = 1; i < NUM_ARROW_POINTS; i++)
+  for (i = 1; i < GOO_CANVAS_POLYLINE_NUM_ARROW_POINTS; i++)
     {
       cairo_line_to (cr, arrow->start_arrow_coords[i * 2],
 		     arrow->start_arrow_coords[i * 2 + 1]);
@@ -901,7 +905,7 @@ goo_canvas_polyline_create_end_arrow_path (GooCanvasPolyline *polyline,
 
   cairo_move_to (cr, arrow->end_arrow_coords[0],
 		 arrow->end_arrow_coords[1]);
-  for (i = 1; i < NUM_ARROW_POINTS; i++)
+  for (i = 1; i < GOO_CANVAS_POLYLINE_NUM_ARROW_POINTS; i++)
     {
       cairo_line_to (cr, arrow->end_arrow_coords[i * 2],
 		     arrow->end_arrow_coords[i * 2 + 1]);
diff --git a/src/goocanvaspolyline.h b/src/goocanvaspolyline.h
index ef322a6..2ce724e 100644
--- a/src/goocanvaspolyline.h
+++ b/src/goocanvaspolyline.h
@@ -38,7 +38,7 @@ void             goo_canvas_points_unref    (GooCanvasPoints *points);
 void             goo_canvas_points_set_point(GooCanvasPoints *points, int idx, double x, double y);
 void             goo_canvas_points_get_point(GooCanvasPoints *points, int idx, double *x, double *y);
 
-#define NUM_ARROW_POINTS     5		/* number of points in an arrowhead */
+#define GOO_CANVAS_POLYLINE_NUM_ARROW_POINTS     5		/* number of points in an arrowhead */
 
 typedef struct _GooCanvasPolylineArrowData GooCanvasPolylineArrowData;
 struct _GooCanvasPolylineArrowData
@@ -48,8 +48,8 @@ struct _GooCanvasPolylineArrowData
   gdouble arrow_width, arrow_length, arrow_tip_length;
 
   gdouble line_start[2], line_end[2];
-  gdouble start_arrow_coords[NUM_ARROW_POINTS * 2];
-  gdouble end_arrow_coords[NUM_ARROW_POINTS * 2];
+  gdouble start_arrow_coords[GOO_CANVAS_POLYLINE_NUM_ARROW_POINTS * 2];
+  gdouble end_arrow_coords[GOO_CANVAS_POLYLINE_NUM_ARROW_POINTS * 2];
 };
 
 



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