[cairo-commit] goocanvas/src Makefile.am, 1.5, 1.6 goocanvasgroup.c, 1.4, 1.5 goocanvasgroupview.c, 1.6, 1.7 goocanvasimage.c, 1.2, 1.3 goocanvasitem.h, 1.3, 1.4 goocanvasitemsimple.c, 1.3, 1.4 goocanvasitemsimple.h, 1.3, 1.4 goocanvaspath.h, 1.2, 1.3 goocanvaspolyline.h, 1.2, 1.3 goocanvasprivate.h, NONE, 1.1 goocanvasutils.c, 1.3, 1.4 goocanvasutils.h, 1.3, 1.4

Damon Chaplin commit at pdx.freedesktop.org
Fri Apr 14 05:49:13 PDT 2006


Committed by: damon

Update of /cvs/cairo/goocanvas/src
In directory kemper:/tmp/cvs-serv25336/src

Modified Files:
	Makefile.am goocanvasgroup.c goocanvasgroupview.c 
	goocanvasimage.c goocanvasitem.h goocanvasitemsimple.c 
	goocanvasitemsimple.h goocanvaspath.h goocanvaspolyline.h 
	goocanvasutils.c goocanvasutils.h 
Added Files:
	goocanvasprivate.h 
Log Message:
2006-04-14  Damon Chaplin  <damon at gnome.org>

	* src/goocanvasutils.h: renamed goo_cairo_dash* to goo_canvas_dash*
	for consistency.

	* src/goocanvasprivate.h: new header to contain private declarations
	that we don't install.

	* src/*.[hc]: documented enums & structs on the types page.



Index: Makefile.am
===================================================================
RCS file: /cvs/cairo/goocanvas/src/Makefile.am,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- Makefile.am	12 Apr 2006 15:29:21 -0000	1.5
+++ Makefile.am	14 Apr 2006 12:49:10 -0000	1.6
@@ -56,6 +56,7 @@
 	goocanvaspolylineview.c			\
 	goocanvaspath.c				\
 	goocanvaspathview.c			\
+	goocanvasprivate.h			\
 	goocanvasrect.c				\
 	goocanvasrectview.c			\
 	goocanvastext.c				\

Index: goocanvasgroup.c
===================================================================
RCS file: /cvs/cairo/goocanvas/src/goocanvasgroup.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- goocanvasgroup.c	13 Apr 2006 16:06:04 -0000	1.4
+++ goocanvasgroup.c	14 Apr 2006 12:49:10 -0000	1.5
@@ -30,6 +30,7 @@
 #include <config.h>
 #include <glib/gi18n-lib.h>
 #include <gtk/gtk.h>
+#include "goocanvasprivate.h"
 #include "goocanvasgroup.h"
 #include "goocanvasgroupview.h"
 #include "goocanvasmarshal.h"

Index: goocanvasgroupview.c
===================================================================
RCS file: /cvs/cairo/goocanvas/src/goocanvasgroupview.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- goocanvasgroupview.c	13 Apr 2006 17:07:44 -0000	1.6
+++ goocanvasgroupview.c	14 Apr 2006 12:49:10 -0000	1.7
@@ -26,6 +26,7 @@
  */
 #include <config.h>
 #include <gtk/gtk.h>
+#include "goocanvasprivate.h"
 #include "goocanvasgroupview.h"
 #include "goocanvasgroup.h"
 #include "goocanvasview.h"
@@ -63,6 +64,7 @@
 
 /**
  * goo_canvas_group_view_new:
+ * @canvas_view: the canvas view.
  * @parent_view: the parent view.
  * @group: the group item.
  * 

Index: goocanvasimage.c
===================================================================
RCS file: /cvs/cairo/goocanvas/src/goocanvasimage.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- goocanvasimage.c	13 Apr 2006 16:06:04 -0000	1.2
+++ goocanvasimage.c	14 Apr 2006 12:49:10 -0000	1.3
@@ -31,6 +31,7 @@
 #include <config.h>
 #include <glib/gi18n-lib.h>
 #include <gtk/gtk.h>
+#include "goocanvasprivate.h"
 #include "goocanvasimage.h"
 #include "goocanvasimageview.h"
 #include "goocanvasutils.h"

Index: goocanvasitem.h
===================================================================
RCS file: /cvs/cairo/goocanvas/src/goocanvasitem.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- goocanvasitem.h	12 Apr 2006 10:42:20 -0000	1.3
+++ goocanvasitem.h	14 Apr 2006 12:49:10 -0000	1.4
@@ -12,15 +12,18 @@
 G_BEGIN_DECLS
 
 
-/* Specifies what to do when the end of an animation has been reached. */
-typedef enum
-{
-  GOO_CANVAS_VISIBLE,
-  GOO_CANVAS_VISIBLE_ABOVE_THRESHOLD,
-  GOO_CANVAS_INVISIBLE
-} GooCanvasVisibility;
-
-/* Specifies what to do when the end of an animation has been reached. */
+/**
+ * GooCanvasAnimateType
+ * @GOO_CANVAS_ANIMATE_FREEZE: the item remains in the final position.
+ * @GOO_CANVAS_ANIMATE_RESET: the item is moved back to the initial position.
+ * @GOO_CANVAS_ANIMATE_RESTART: the animation is restarted from the initial
+ *  position.
+ * @GOO_CANVAS_ANIMATE_BOUNCE: the animation bounces back and forth between the
+ *  start and end positions.
+ *
+ * #GooCanvasAnimateType is used to specify what happens when the end of an
+ * animation is reached.
+ */
 typedef enum
 {
   GOO_CANVAS_ANIMATE_FREEZE,
@@ -29,7 +32,16 @@
   GOO_CANVAS_ANIMATE_BOUNCE
 } GooCanvasAnimateType;
 
-/* This represents the bounds of an item. */
+
+/**
+ * GooCanvasBounds
+ * @x1: the left edge.
+ * @y1: the top edge.
+ * @x2: the right edge.
+ * @y2: the bottom edge.
+ *
+ * #GooCanvasBounds represents the bounding box of an item in the canvas.
+ */
 typedef struct _GooCanvasBounds GooCanvasBounds;
 struct _GooCanvasBounds
 {

Index: goocanvasitemsimple.c
===================================================================
RCS file: /cvs/cairo/goocanvas/src/goocanvasitemsimple.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- goocanvasitemsimple.c	8 Apr 2006 13:14:17 -0000	1.3
+++ goocanvasitemsimple.c	14 Apr 2006 12:49:10 -0000	1.4
@@ -6,6 +6,7 @@
  */
 #include <config.h>
 #include <gtk/gtk.h>
+#include "goocanvasprivate.h"
 #include "goocanvasitemsimple.h"
 #include "goocanvasutils.h"
 #include "goocanvasmarshal.h"
@@ -72,6 +73,14 @@
 /*
  * GooCanvasStyle.
  */
+
+/**
+ * goo_canvas_style_new:
+ * 
+ * Creates a new #GooCanvasStyle, using the default settings.
+ * 
+ * Returns: a new #GooCanvasStyle.
+ **/
 GooCanvasStyle*
 goo_canvas_style_new (void)
 {
@@ -92,6 +101,14 @@
 }
 
 
+/**
+ * goo_canvas_style_copy:
+ * @orig_style: the style to copy.
+ * 
+ * Copies a #GooCanvasStyle.
+ * 
+ * Returns: a copy of the #GooCanvasStyle.
+ **/
 GooCanvasStyle*
 goo_canvas_style_copy (GooCanvasStyle *orig_style)
 {
@@ -105,7 +122,7 @@
   style->fill_pattern = cairo_pattern_reference (orig_style->fill_pattern);
   style->line_width = orig_style->line_width;
   style->line_join_miter_limit = orig_style->line_join_miter_limit;
-  style->dash = goo_cairo_line_dash_ref (orig_style->dash);
+  style->dash = goo_canvas_line_dash_ref (orig_style->dash);
   style->fill_rule = orig_style->fill_rule;
   style->operator = orig_style->operator;
   style->antialias = orig_style->antialias;
@@ -116,6 +133,14 @@
 }
 
 
+/**
+ * goo_canvas_style_ref:
+ * @style: a #GooCanvasStyle.
+ * 
+ * Increments the reference count of a #GooCanvasStyle.
+ * 
+ * Returns: the #GooCanvasStyle.
+ **/
 GooCanvasStyle*
 goo_canvas_style_ref (GooCanvasStyle *style)
 {
@@ -126,6 +151,13 @@
 }
 
 
+/**
+ * goo_canvas_style_unref:
+ * @style: a #GooCanvasStyle.
+ * 
+ * Decrements the reference count of the #GooCanvasStyle.
+ * If the reference count falls to 0, the #GooCanvasStyle is freed.
+ **/
 void
 goo_canvas_style_unref (GooCanvasStyle *style)
 {
@@ -134,7 +166,7 @@
       /* Free all the resources used by the style. */
       cairo_pattern_destroy (style->stroke_pattern);
       cairo_pattern_destroy (style->fill_pattern);
-      goo_cairo_line_dash_unref (style->dash);
+      goo_canvas_line_dash_unref (style->dash);
 
       g_free (style);
     }
@@ -479,9 +511,9 @@
       recompute_bounds = TRUE;
       break;
     case PROP_LINE_DASH:
-      goo_cairo_line_dash_unref (style->dash);
+      goo_canvas_line_dash_unref (style->dash);
       style->dash = g_value_get_boxed (value);
-      goo_cairo_line_dash_ref (style->dash);
+      goo_canvas_line_dash_ref (style->dash);
       style->mask |= GOO_CANVAS_STYLE_LINE_DASH;
       recompute_bounds = TRUE;
       break;

Index: goocanvasitemsimple.h
===================================================================
RCS file: /cvs/cairo/goocanvas/src/goocanvasitemsimple.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- goocanvasitemsimple.h	8 Apr 2006 13:14:17 -0000	1.3
+++ goocanvasitemsimple.h	14 Apr 2006 12:49:10 -0000	1.4
@@ -14,6 +14,22 @@
 G_BEGIN_DECLS
 
 
+/**
+ * GooCanvasStyleValuesMask
+ * @GOO_CANVAS_STYLE_STROKE_PATTERN: the stroke pattern has been set.
+ * @GOO_CANVAS_STYLE_FILL_PATTERN: the fill pattern has been set.
+ * @GOO_CANVAS_STYLE_FILL_RULE: the fill rule has been set.
+ * @GOO_CANVAS_STYLE_OPERATOR: the operator has been set.
+ * @GOO_CANVAS_STYLE_ANTIALIAS: the antialias setting has been set.
+ * @GOO_CANVAS_STYLE_LINE_WIDTH: the line width has been set.
+ * @GOO_CANVAS_STYLE_LINE_CAP: the line cap style has been set.
+ * @GOO_CANVAS_STYLE_LINE_JOIN: the line join style has been set.
+ * @GOO_CANVAS_STYLE_LINE_JOIN_MITER_LIMIT: the miter limit of line joins has
+ *  been set.
+ * @GOO_CANVAS_STYLE_LINE_DASH: the line dash pattern has been set.
+ *
+ * Specifies which fields of a #GooCanvasStyle object have been set.
+ */
 typedef enum
 {
   GOO_CANVAS_STYLE_STROKE_PATTERN	 = 1 << 0,
@@ -32,6 +48,25 @@
 
 /* These are the standard cairo drawing attributes. We allow the style to
    be shared between multiple objects to avoid wasting memory. */
+/**
+ * GooCanvasStyle
+ * @ref_count: the reference count of the struct.
+ * @mask: a mask specifying which fields of the #GooCanvasStyle have been set.
+ * @stroke_pattern: the stroke pattern (or color).
+ * @fill_pattern: the fill pattern (or color).
+ * @line_width: the line width.
+ * @line_join_miter_limit: the minimum angle in degrees at which the miter
+ *  join style will be used. For smaller angles a bevel join is used instead.
+ * @dash: the dash pattern.
+ * @fill_rule: the fill rule.
+ * @operator: the drawing operator.
+ * @antialias: the type of antialiasing to do.
+ * @line_cap: the line cap style.
+ * @line_join: the line join style.
+ *
+ * #GooCanvasStyle describes the style in which an item is to be drawn, e.g.
+ * its stroke and fill colors or patterns, and its line width and style.
+ */
 typedef struct _GooCanvasStyle GooCanvasStyle;
 struct _GooCanvasStyle
 {
@@ -46,7 +81,7 @@
 
   double line_width, line_join_miter_limit;
 
-  GooCairoLineDash *dash;
+  GooCanvasLineDash *dash;
 
   /* We use bitmasks here to cut down on memory use a bit. I've given each
      field a few bits more than it needs to allow for new values. */

Index: goocanvaspath.h
===================================================================
RCS file: /cvs/cairo/goocanvas/src/goocanvaspath.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- goocanvaspath.h	13 Apr 2006 16:06:04 -0000	1.2
+++ goocanvaspath.h	14 Apr 2006 12:49:10 -0000	1.3
@@ -23,8 +23,31 @@
 
 /**
  * GooCanvasPathCommandType
+ * @GOO_CANVAS_PATH_MOVE_TO: move to the given point.
+ * @GOO_CANVAS_PATH_CLOSE_PATH: close the current path, drawing a line from the
+ *  current position to the start of the path.
+ * @GOO_CANVAS_PATH_LINE_TO: draw a line to the given point.
+ * @GOO_CANVAS_PATH_HORIZONTAL_LINE_TO: draw a horizontal line to the given
+ *  x coordinate.
+ * @GOO_CANVAS_PATH_VERTICAL_LINE_TO: draw a vertical line to the given y
+ *  coordinate.
+ * @GOO_CANVAS_PATH_CURVE_TO: draw a bezier curve using two control
+ *  points to the given point.
+ * @GOO_CANVAS_PATH_SMOOTH_CURVE_TO: draw a bezier curve using a reflection
+ *  of the last control point of the last curve as the first control point,
+ *  and one new control point, to the given point.
+ * @GOO_CANVAS_PATH_QUADRATIC_CURVE_TO: draw a quadratic bezier curve using
+ *  a single control point to the given point.
+ * @GOO_CANVAS_PATH_SMOOTH_QUADRATIC_CURVE_TO: draw a quadratic bezier curve
+ *  using a reflection of the control point from the previous curve as the
+ *  control point, to the given point.
+ * @GOO_CANVAS_PATH_ELLIPTICAL_ARC: draw an elliptical arc, using the given
+ *  2 radii, the x axis rotation, and the 2 flags to disambiguate the arc,
+ *  to the given point.
  *
  * GooCanvasPathCommandType specifies the type of each command in the path.
+ * See the path element in the <ulink url="http://www.w3.org/Graphics/SVG/">
+ * Scalable Vector Graphics (SVG) specification</ulink> for more details.
  */
 typedef enum
 {

Index: goocanvaspolyline.h
===================================================================
RCS file: /cvs/cairo/goocanvas/src/goocanvaspolyline.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- goocanvaspolyline.h	13 Apr 2006 16:06:04 -0000	1.2
+++ goocanvaspolyline.h	14 Apr 2006 12:49:11 -0000	1.3
@@ -13,6 +13,14 @@
 G_BEGIN_DECLS
 
 
+/**
+ * GooCanvasPoints
+ * @coords: the coordinates of the points, in pairs.
+ * @num_points: the number of points.
+ * @ref_count: the reference count of the struct.
+ *
+ * #GooCairoPoints represents an array of points.
+ */
 typedef struct {
   double *coords;
   int num_points;

--- NEW FILE: goocanvasprivate.h ---
/*
 * GooCanvas. Copyright (C) 2005-6 Damon Chaplin.
 * Released under the GNU LGPL license. See COPYING for details.
 *
 * goocanvasprivate.h - private types & utility functions.
 */
#ifndef __GOO_CANVAS_PRIVATE_H__
#define __GOO_CANVAS_PRIVATE_H__

#include <gtk/gtk.h>

G_BEGIN_DECLS


/*
 * GPtrArray extensions.
 */
void goo_canvas_util_ptr_array_insert     (GPtrArray *ptr_array,
					   gpointer   data,
					   gint       index);

void goo_canvas_util_ptr_array_move       (GPtrArray *ptr_array,
					   gint       old_index,
					   gint       new_index);

gint goo_canvas_util_ptr_array_find_index (GPtrArray *ptr_array,
					   gpointer   data);


#define GOO_TYPE_CAIRO_PATTERN	   (goo_cairo_pattern_get_type ())
#define GOO_TYPE_CAIRO_FILL_RULE   (goo_cairo_fill_rule_get_type ())
#define GOO_TYPE_CAIRO_OPERATOR    (goo_cairo_operator_get_type())
#define GOO_TYPE_CAIRO_ANTIALIAS   (goo_cairo_antialias_get_type())
#define GOO_TYPE_CAIRO_LINE_CAP    (goo_cairo_line_cap_get_type ())
#define GOO_TYPE_CAIRO_LINE_JOIN   (goo_cairo_line_join_get_type ())
#define GOO_TYPE_CAIRO_LINE_DASH   (goo_cairo_line_dash_get_type ())
#define GOO_TYPE_CAIRO_MATRIX	   (goo_cairo_matrix_get_type())

GType goo_cairo_pattern_get_type   (void) G_GNUC_CONST;
GType goo_cairo_fill_rule_get_type (void) G_GNUC_CONST;
GType goo_cairo_operator_get_type  (void) G_GNUC_CONST;
GType goo_cairo_antialias_get_type (void) G_GNUC_CONST;
GType goo_cairo_line_cap_get_type  (void) G_GNUC_CONST;
GType goo_cairo_line_join_get_type (void) G_GNUC_CONST;
GType goo_cairo_line_dash_get_type (void) G_GNUC_CONST;
GType goo_cairo_matrix_get_type    (void) G_GNUC_CONST;

cairo_matrix_t*  goo_cairo_matrix_copy         (cairo_matrix_t   *matrix);

cairo_pattern_t* goo_canvas_cairo_pattern_from_pixbuf (GdkPixbuf *pixbuf);
cairo_surface_t* goo_canvas_cairo_surface_from_pixbuf (GdkPixbuf *pixbuf);


G_END_DECLS

#endif /* __GOO_CANVAS_PRIVATE_H__ */

Index: goocanvasutils.c
===================================================================
RCS file: /cvs/cairo/goocanvas/src/goocanvasutils.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- goocanvasutils.c	8 Apr 2006 13:14:17 -0000	1.3
+++ goocanvasutils.c	14 Apr 2006 12:49:11 -0000	1.4
@@ -4,6 +4,14 @@
  *
  * goocanvasutils.c - utility functions.
  */
+
+/**
+ * SECTION:goocanvasutils
+ * @Title: GooCanvas Types
+ * @Short_Description: types used in GooCanvas.
+ *
+ * This section describes the types used throughout GooCanvas.
+ */
 #include <config.h>
 #include <gtk/gtk.h>
 #include "goocanvasutils.h"
@@ -347,8 +355,16 @@
 }
 
 
-GooCairoLineDash*
-goo_cairo_line_dash_ref   (GooCairoLineDash *dash)
+/**
+ * goo_canvas_line_dash_ref:
+ * @dash: a #GooCanvasLineDash.
+ * 
+ * Increments the reference count of the dash pattern.
+ * 
+ * Returns: the dash pattern.
+ **/
+GooCanvasLineDash*
+goo_canvas_line_dash_ref   (GooCanvasLineDash *dash)
 {
   if (dash)
     dash->ref_count++;
@@ -356,8 +372,15 @@
 }
 
 
+/**
+ * goo_canvas_line_dash_unref:
+ * @dash: a #GooCanvasLineDash.
+ * 
+ * Decrements the reference count of the dash pattern. If it falls to 0
+ * it is freed.
+ **/
 void
-goo_cairo_line_dash_unref (GooCairoLineDash *dash)
+goo_canvas_line_dash_unref (GooCanvasLineDash *dash)
 {
   if (dash && --dash->ref_count == 0) {
     g_free (dash->dashes);
@@ -374,22 +397,31 @@
   if (cairo_line_dash_type == 0)
     cairo_line_dash_type = g_boxed_type_register_static
       ("GooCairoLineDash",
-       (GBoxedCopyFunc) goo_cairo_line_dash_ref,
-       (GBoxedFreeFunc) goo_cairo_line_dash_unref);
+       (GBoxedCopyFunc) goo_canvas_line_dash_ref,
+       (GBoxedFreeFunc) goo_canvas_line_dash_unref);
 
   return cairo_line_dash_type;
 }
 
 
-GooCairoLineDash*
-goo_cairo_line_dash_new (gint num_dashes,
-			 ...)
+/**
+ * goo_canvas_line_dash_new:
+ * @num_dashes: the number of dashes and gaps in the pattern.
+ * @...: the length of each dash and gap.
+ * 
+ * Creates a new dash pattern.
+ * 
+ * Returns: a new dash pattern.
+ **/
+GooCanvasLineDash*
+goo_canvas_line_dash_new (gint num_dashes,
+			  ...)
 {
-  GooCairoLineDash *dash;
+  GooCanvasLineDash *dash;
   va_list var_args;
   gint i;
 
-  dash = g_new (GooCairoLineDash, 1);
+  dash = g_new (GooCanvasLineDash, 1);
   dash->ref_count = 1;
   dash->num_dashes = num_dashes;
   dash->dashes = g_new (double, num_dashes);

Index: goocanvasutils.h
===================================================================
RCS file: /cvs/cairo/goocanvas/src/goocanvasutils.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- goocanvasutils.h	8 Apr 2006 13:14:17 -0000	1.3
+++ goocanvasutils.h	14 Apr 2006 12:49:11 -0000	1.4
@@ -13,25 +13,41 @@
 
 
 /*
- * GPtrArray extensions.
- */
-void goo_canvas_util_ptr_array_insert     (GPtrArray *ptr_array,
-					   gpointer   data,
-					   gint       index);
-
-void goo_canvas_util_ptr_array_move       (GPtrArray *ptr_array,
-					   gint       old_index,
-					   gint       new_index);
-
-gint goo_canvas_util_ptr_array_find_index (GPtrArray *ptr_array,
-					   gpointer   data);
-
-
-/*
  * Enum types.
  */
 #define GOO_TYPE_CANVAS_POINTER_EVENTS   (goo_canvas_pointer_events_get_type ())
 GType goo_canvas_pointer_events_get_type   (void) G_GNUC_CONST;
+
+/**
+ * GooCanvasPointerEvents
+ * @GOO_CANVAS_EVENTS_VISIBLE_MASK: a mask indicating that the item only
+ *  receives events when it is visible.
+ * @GOO_CANVAS_EVENTS_PAINTED_MASK: a mask indicating that the item only
+ *  receives events when the specified parts of it are painted.
+ * @GOO_CANVAS_EVENTS_FILL_MASK: a mask indicating that the filled part of
+ *  the item receives events.
+ * @GOO_CANVAS_EVENTS_STROKE_MASK: a mask indicating that the stroked part
+ *  of the item receives events.
+ * @GOO_CANVAS_EVENTS_NONE: the item doesn't receive events at all.
+ * @GOO_CANVAS_EVENTS_VISIBLE_PAINTED: the item receives events in its
+ *  painted areas when it is visible (the default).
+ * @GOO_CANVAS_EVENTS_VISIBLE_FILL: the item's interior receives events
+ *  when it is visible.
+ * @GOO_CANVAS_EVENTS_VISIBLE_STROKE: the item's perimeter receives
+ *  events when it is visible.
+ * @GOO_CANVAS_EVENTS_VISIBLE: the item receives events when it is visible,
+ *  whether it is painted or not.
+ * @GOO_CANVAS_EVENTS_PAINTED: the item receives events in its painted areas,
+ *  whether it is visible or not.
+ * @GOO_CANVAS_EVENTS_FILL: the item's interior receives events, whether it
+ *  is visible or painted or not.
+ * @GOO_CANVAS_EVENTS_STROKE: the item's perimeter receives events, whether
+ *  it is visible or painted or not.
+ * @GOO_CANVAS_EVENTS_ALL: the item's perimeter and interior receive events,
+ *  whether it is visible or painted or not.
+ *
+ * Specifies when an item receives pointer events such as mouse clicks.
+ */
 typedef enum
 {
   /* If the item must be visible to receive events. */
@@ -73,6 +89,18 @@
 
 #define GOO_TYPE_CANVAS_ITEM_VISIBILITY   (goo_canvas_item_visibility_get_type ())
 GType goo_canvas_item_visibility_get_type   (void) G_GNUC_CONST;
+
+/**
+ * GooCanvasItemVisibility
+ * @GOO_CANVAS_ITEM_VISIBLE: the item is visible.
+ * @GOO_CANVAS_ITEM_VISIBLE_ABOVE_THRESHOLD: the item is visible when the
+ *  canvas scale setting is greater than or equal to the item's visibility
+ *  threshold setting.
+ * @GOO_CANVAS_ITEM_INVISIBLE: the item is invisible.
+ *
+ * The #GooCanvasItemVisibility enumeration is used to specify when a canvas
+ * item is visible.
+ */
 typedef enum
 {
   GOO_CANVAS_ITEM_VISIBLE,
@@ -84,8 +112,18 @@
 /*
  * Cairo utilities.
  */
-typedef struct _GooCairoLineDash GooCairoLineDash;
-struct _GooCairoLineDash
+typedef struct _GooCanvasLineDash GooCanvasLineDash;
+
+/**
+ * GooCanvasLineDash
+ * @ref_count: the reference count of the struct.
+ * @num_dashes: the number of dashes and gaps between them.
+ * @dashes: the sizes of each dash and gap.
+ * @dash_offset: the start offset into the dash pattern.
+ *
+ * #GooCanvasLineDash specifies a dash pattern to be used when drawing items.
+ */
+struct _GooCanvasLineDash
 {
   int ref_count;
   int num_dashes;
@@ -93,33 +131,11 @@
   double dash_offset;
 };
 
+GooCanvasLineDash* goo_canvas_line_dash_new   (gint              num_dashes,
+					       ...);
+GooCanvasLineDash* goo_canvas_line_dash_ref   (GooCanvasLineDash *dash);
+void               goo_canvas_line_dash_unref (GooCanvasLineDash *dash);
 
-#define GOO_TYPE_CAIRO_PATTERN          (goo_cairo_pattern_get_type ())
-#define GOO_TYPE_CAIRO_FILL_RULE        (goo_cairo_fill_rule_get_type ())
-#define GOO_TYPE_CAIRO_OPERATOR		(goo_cairo_operator_get_type())
-#define GOO_TYPE_CAIRO_ANTIALIAS	(goo_cairo_antialias_get_type())
-#define GOO_TYPE_CAIRO_LINE_CAP         (goo_cairo_line_cap_get_type ())
-#define GOO_TYPE_CAIRO_LINE_JOIN        (goo_cairo_line_join_get_type ())
-#define GOO_TYPE_CAIRO_LINE_DASH        (goo_cairo_line_dash_get_type ())
-#define GOO_TYPE_CAIRO_MATRIX		(goo_cairo_matrix_get_type())
-
-GType goo_cairo_pattern_get_type   (void) G_GNUC_CONST;
-GType goo_cairo_fill_rule_get_type (void) G_GNUC_CONST;
-GType goo_cairo_operator_get_type  (void) G_GNUC_CONST;
-GType goo_cairo_antialias_get_type (void) G_GNUC_CONST;
-GType goo_cairo_line_cap_get_type  (void) G_GNUC_CONST;
-GType goo_cairo_line_join_get_type (void) G_GNUC_CONST;
-GType goo_cairo_line_dash_get_type (void) G_GNUC_CONST;
-GType goo_cairo_matrix_get_type    (void) G_GNUC_CONST;
-
-GooCairoLineDash* goo_cairo_line_dash_new   (gint              num_dashes,
-					     ...);
-GooCairoLineDash* goo_cairo_line_dash_ref   (GooCairoLineDash *dash);
-void              goo_cairo_line_dash_unref (GooCairoLineDash *dash);
-cairo_matrix_t*   goo_cairo_matrix_copy     (cairo_matrix_t   *matrix);
-
-cairo_pattern_t* goo_canvas_cairo_pattern_from_pixbuf (GdkPixbuf *pixbuf);
-cairo_surface_t* goo_canvas_cairo_surface_from_pixbuf (GdkPixbuf *pixbuf);
 
 G_END_DECLS
 



More information about the cairo-commit mailing list