[goffice] start canvas documentation



commit c10400b80ec9dbe98fa8216954d9193ec4e601bf
Author: Jean Brefort <jean brefort normalesup org>
Date:   Sat Sep 12 17:50:58 2009 +0200

    start canvas documentation

 ChangeLog                            |   14 +
 docs/reference/Makefile.am           |   16 +-
 docs/reference/goffice-docs.sgml     |   29 +-
 docs/reference/goffice-overrides.txt |    2 -
 docs/reference/goffice-sections.txt  | 2133 ----------------------------------
 docs/reference/goffice.types         |   65 -
 docs/reference/tmpl/.gitignore       |    2 -
 goffice/canvas/goc-canvas.c          |    6 +
 goffice/canvas/goc-group.h           |    6 +-
 goffice/canvas/goc-item.h            |   34 +-
 goffice/canvas/goc-pixbuf.c          |    8 -
 goffice/canvas/goc-pixbuf.h          |    8 +
 goffice/canvas/goc-styled-item.h     |    5 +-
 goffice/canvas/goffice-canvas.h      |   24 +-
 14 files changed, 92 insertions(+), 2260 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d136a8e..05aa09f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,19 @@
 2009-09-12  Jean Brefort  <jean brefort normalesup org>
 
+	* docs/reference/Makefile.am: removed obsolete entries.
+	* docs/reference/goffice-docs.sgml: add canvas.
+	* docs/reference/goffice-overrides.txt: removed obsolete file.
+	* docs/reference/goffice-sections.txt: ditto.
+	* docs/reference/goffice.types: ditto.
+	* goffice/canvas/goc-canvas.c: some documentation related work.
+	* goffice/canvas/goc-group.h: ditto
+	* goffice/canvas/goc-item.h: ditto
+	* goffice/canvas/goc-pixbuf.c: ditto
+	* goffice/canvas/goc-pixbuf.h: ditto
+	* goffice/canvas/goc-styled-item.h: ditto
+
+2009-09-12  Jean Brefort  <jean brefort normalesup org>
+
 	* goffice/canvas/goc-widget.c (goc_widget_set_property): don't destroy
 	the old widget, just remove it from the canvas.
 
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
index f77a5e3..f676835 100644
--- a/docs/reference/Makefile.am
+++ b/docs/reference/Makefile.am
@@ -8,7 +8,7 @@ DOC_SOURCE_DIR=../../goffice
 
 SCANGOBJ_OPTIONS= --nogtkinit --type-init-func="g_type_init ()"
 
-SCAN_OPTIONS= 
+SCAN_OPTIONS=
 
 MKDB_OPTIONS=--sgml-mode --output-format=xml
 
@@ -44,19 +44,7 @@ IGNORE_HFILES=	\
 		god-text-model.h			\
 		god-image-ms.h				\
 		god-drawing-ms.h			\
-		god-drawing-ms-client-handler.h 	\
-		foo-canvas-line.h			\
-		foo-canvas-pixbuf.h			\
-		foo-canvas-polygon.h			\
-		foo-canvas-rect-ellipse.h		\
-		foo-canvas-text.h			\
-		foo-canvas-util.h			\
-		foo-canvas-widget.h			\
-		foo-canvas.h				\
-		libfoocanvas.h				\
-		foo-canvas-i18n.h			\
-		foo-canvas-marshal.h			\
-		ucp.h
+		god-drawing-ms-client-handler.h
 
 if GOFFICE_WITH_LASEM
 else
diff --git a/docs/reference/goffice-docs.sgml b/docs/reference/goffice-docs.sgml
index 2f10281..5b862a7 100644
--- a/docs/reference/goffice-docs.sgml
+++ b/docs/reference/goffice-docs.sgml
@@ -43,7 +43,6 @@
 		<chapter>
 			<title>Utilities</title>
 			<xi:include href="xml/gog-renderer.xml"/>
-			<xi:include href="xml/gog-control-foocanvas.xml"/>
 			<xi:include href="xml/gog-guru.xml"/>
 			<xi:include href="xml/gog-tool.xml"/>
 			<xi:include href="xml/gog-plot-engine.xml"/>
@@ -53,6 +52,34 @@
 		</chapter>
 	</part>
 	<part>
+		<title>Canvas</title>
+		<chapter>
+			<title>Base objects</title>
+			<xi:include href="xml/goc-canvas.xml"/>
+			<xi:include href="xml/goc-item.xml"/>
+			<xi:include href="xml/goc-group.xml"/>
+			<xi:include href="xml/goc-styled-item.xml"/>
+		</chapter>
+		<chapter>
+			<title>Items</title>
+			<xi:include href="xml/goc-circle.xml"/>
+			<xi:include href="xml/goc-ellipse.xml"/>
+			<xi:include href="xml/goc-graph.xml"/>
+			<xi:include href="xml/goc-line.xml"/>
+			<xi:include href="xml/goc-pixbuf.xml"/>
+			<xi:include href="xml/goc-polygon.xml"/>
+			<xi:include href="xml/goc-polyline.xml"/>
+			<xi:include href="xml/goc-rectangle.xml"/>
+			<xi:include href="xml/goc-text.xml"/>
+			<xi:include href="xml/goc-widget.xml"/>
+		</chapter>
+		<chapter>
+			<title>Utilities</title>
+			<xi:include href="xml/goc-structs.xml"/>
+			<xi:include href="xml/goc-utils.xml"/>
+		</chapter>
+	</part>
+	<part>
 		<title>Widgets</title>
 		<chapter>
 			<title>Base widgets</title>
diff --git a/goffice/canvas/goc-canvas.c b/goffice/canvas/goc-canvas.c
index 72c0ce7..7865f8d 100644
--- a/goffice/canvas/goc-canvas.c
+++ b/goffice/canvas/goc-canvas.c
@@ -267,6 +267,12 @@ GSF_CLASS (GocCanvas, goc_canvas,
 	   goc_canvas_class_init, goc_canvas_init,
 	   GTK_TYPE_LAYOUT)
 
+/**
+ * goc_canvas_get_root :
+ * @canvas : #GocCanvas
+ *
+ * Returns: the top level item of @canvas, always a #GocGroup.
+ **/
 GocGroup*
 goc_canvas_get_root (GocCanvas *canvas)
 {
diff --git a/goffice/canvas/goc-group.h b/goffice/canvas/goc-group.h
index b854040..b3c8833 100644
--- a/goffice/canvas/goc-group.h
+++ b/goffice/canvas/goc-group.h
@@ -34,7 +34,11 @@ struct _GocGroup {
 	GList			*children;
 };
 
-typedef GocItemClass GocGroupClass;
+typedef struct _GocGroupClass GocGroupClass;
+struct _GocGroupClass
+{
+	GocItemClass base;
+};
 
 #define GOC_TYPE_GROUP	(goc_group_get_type ())
 #define GOC_GROUP(o)	(G_TYPE_CHECK_INSTANCE_CAST ((o), GOC_TYPE_GROUP, GocGroup))
diff --git a/goffice/canvas/goc-item.h b/goffice/canvas/goc-item.h
index 6a25af7..b11607f 100644
--- a/goffice/canvas/goc-item.h
+++ b/goffice/canvas/goc-item.h
@@ -38,20 +38,20 @@ struct _GocItem {
 	double			 x0, y0, x1, y1; /* the bounds */
 };
 
-typedef struct {
+typedef struct _GocItemClass GocItemClass;
+struct _GocItemClass {
 	GObjectClass	 base;
 
 	double			(*distance) (GocItem *item,
-								 double x, double y, GocItem **near_item);
+					     double x, double y, GocItem **near_item);
 	void			(*draw) (GocItem const *item, cairo_t *cr);
 	gboolean		(*draw_region) (GocItem const *item, cairo_t *cr,
-									double x0, double y0, double x1, double y1);
+						double x0, double y0, double x1, double y1);
 	void			(*move) (GocItem *item, double x, double y);
 	void			(*update_bounds) (GocItem *item);
 	void			(*parent_changed) (GocItem *item);
-	cairo_operator_t
-					(*get_operator) (GocItem *item);
-	// events related functions
+	cairo_operator_t	(*get_operator) (GocItem *item);
+	/* events related functions */
 	gboolean		(*button_pressed) (GocItem *item, int button, double x, double y);
 	gboolean		(*button2_pressed) (GocItem *item, int button, double x, double y);
 	gboolean		(*button_released) (GocItem *item, int button, double x, double y);
@@ -63,7 +63,7 @@ typedef struct {
 	gboolean		(*key_pressed) (GocItem *item, GdkEventKey* ev);
 	gboolean		(*key_released) (GocItem *item, GdkEventKey* ev);
 	void			(*notify_scrolled) (GocItem *item);
-} GocItemClass ;
+};
 
 #define GOC_TYPE_ITEM	(goc_item_get_type ())
 #define GOC_ITEM(o)	(G_TYPE_CHECK_INSTANCE_CAST ((o), GOC_TYPE_ITEM, GocItem))
@@ -73,28 +73,22 @@ typedef struct {
 
 GType goc_item_get_type (void);
 
-typedef struct {
-	GTypeInterface		   base;
-
-} GocItemClientClass;
-
 GocItem		*goc_item_new		(GocGroup *parent, GType type, const gchar *first_arg_name, ...);
 void		 goc_item_set		(GocItem *item, const gchar *first_arg_name, ...);
 double		 goc_item_distance	(GocItem *item, double x, double y, GocItem **near_item);
 void		 goc_item_draw		(GocItem const *item, cairo_t *cr);
 gboolean	 goc_item_draw_region	(GocItem const *item, cairo_t *cr,
-									 double x0, double y0, double x1, double y1);
-cairo_operator_t
-			 goc_item_get_operator  (GocItem *item);
-void		 goc_item_move			(GocItem *item, double x, double y);
+					 double x0, double y0, double x1, double y1);
+cairo_operator_t goc_item_get_operator  (GocItem *item);
+void		 goc_item_move		(GocItem *item, double x, double y);
 
 void		 goc_item_invalidate	(GocItem *item);
-void		 goc_item_show			(GocItem *item);
-void		 goc_item_hide			(GocItem *item);
+void		 goc_item_show		(GocItem *item);
+void		 goc_item_hide		(GocItem *item);
 gboolean	 goc_item_is_visible	(GocItem *item);
 void		 goc_item_get_bounds	(GocItem const *item,
-									 double *x0, double *y0,
-									 double *x1, double *y1);
+					 double *x0, double *y0,
+					 double *x1, double *y1);
 void		 goc_item_update_bounds	(GocItem *item);
 void		 goc_item_bounds_changed (GocItem *item);
 void		 goc_item_parent_changed (GocItem *item);
diff --git a/goffice/canvas/goc-pixbuf.c b/goffice/canvas/goc-pixbuf.c
index a13db8a..b8d1b4c 100644
--- a/goffice/canvas/goc-pixbuf.c
+++ b/goffice/canvas/goc-pixbuf.c
@@ -35,14 +35,6 @@ enum {
 	PIXBUF_PROP_PIXBUF
 };
 
-struct _GocPixbuf {
-	GocItem base;
-
-	double x, y, width, height, rotation;
-	GdkPixbuf *pixbuf;
-};
-
-typedef GocItemClass GocPixbufClass;
 static GocItemClass *parent_class;
 
 static void
diff --git a/goffice/canvas/goc-pixbuf.h b/goffice/canvas/goc-pixbuf.h
index b6d4def..83ab00c 100644
--- a/goffice/canvas/goc-pixbuf.h
+++ b/goffice/canvas/goc-pixbuf.h
@@ -27,6 +27,14 @@
 
 G_BEGIN_DECLS
 
+struct _GocPixbuf {
+	GocItem base;
+
+	double x, y, width, height, rotation;
+	GdkPixbuf *pixbuf;
+};
+typedef GocItemClass GocPixbufClass;
+
 #define GOC_TYPE_PIXBUF	(goc_pixbuf_get_type ())
 #define GOC_PIXBUF(o)	(G_TYPE_CHECK_INSTANCE_CAST ((o), GOC_TYPE_PIXBUF, GocPixbuf))
 #define GOC_IS_PIXBUF(o)	(G_TYPE_CHECK_INSTANCE_TYPE ((o), GOC_TYPE_PIXBUF))
diff --git a/goffice/canvas/goc-styled-item.h b/goffice/canvas/goc-styled-item.h
index 3f8e52a..b085056 100644
--- a/goffice/canvas/goc-styled-item.h
+++ b/goffice/canvas/goc-styled-item.h
@@ -34,7 +34,8 @@ struct _GocStyledItem {
 	gboolean scale_line_width;
 };
 
-typedef struct {
+typedef struct _GocStyledItemClass GocStyledItemClass;
+struct _GocStyledItemClass {
 	GocItemClass base;
 
 	/* virtual */
@@ -42,7 +43,7 @@ typedef struct {
 
 	/* signal */
 	void (*style_changed) (GocStyledItem *item, GOStyle const *new_style);
-} GocStyledItemClass;
+};
 
 #define GOC_TYPE_STYLED_ITEM	(goc_styled_item_get_type ())
 #define GOC_STYLED_ITEM(o)	(G_TYPE_CHECK_INSTANCE_CAST ((o), GOC_TYPE_STYLED_ITEM, GocStyledItem))
diff --git a/goffice/canvas/goffice-canvas.h b/goffice/canvas/goffice-canvas.h
index d664085..14b8411 100644
--- a/goffice/canvas/goffice-canvas.h
+++ b/goffice/canvas/goffice-canvas.h
@@ -28,20 +28,20 @@
 
 G_BEGIN_DECLS
 
-typedef struct _GocCanvas		GocCanvas;
-typedef struct _GocItem			GocItem;
-typedef struct _GocGroup		GocGroup;
-typedef struct _GocLine			GocLine;
-typedef struct _GocPixbuf		GocPixbuf;
-typedef struct _GocPolyline		GocPolyline;
-typedef struct _GocPolygon		GocPolygon;
+typedef struct _GocCanvas	GocCanvas;
+typedef struct _GocItem		GocItem;
+typedef struct _GocGroup	GocGroup;
+typedef struct _GocLine		GocLine;
+typedef struct _GocPixbuf	GocPixbuf;
+typedef struct _GocPolyline	GocPolyline;
+typedef struct _GocPolygon	GocPolygon;
 typedef struct _GocRectangle	GocRectangle;
-typedef struct _GocCircle		GocCircle;
-typedef struct _GocEllipse		GocEllipse;
+typedef struct _GocCircle	GocCircle;
+typedef struct _GocEllipse	GocEllipse;
 typedef struct _GocStyledItem	GocStyledItem;
-typedef struct _GocText			GocText;
-typedef struct _GocWidget		GocWidget;
-typedef struct _GocGraph		GocGraph;
+typedef struct _GocText		GocText;
+typedef struct _GocWidget	GocWidget;
+typedef struct _GocGraph	GocGraph;
 
 G_END_DECLS
 



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