[goffice] GocCanvas documented.



commit 8f21f828b19385861f8f9b4919ba241fcb98aa08
Author: Jean Brefort <jean brefort normalesup org>
Date:   Sat Oct 3 20:46:35 2009 +0200

    GocCanvas documented.

 ChangeLog                               |    6 ++
 docs/reference/goffice-0.8-sections.txt |  105 ++++++++++++++++++++--
 goffice/canvas/goc-canvas.c             |  144 +++++++++++++++++++++++++++++++
 goffice/component/go-component.c        |    9 ++-
 4 files changed, 253 insertions(+), 11 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 44916b4..55e279d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-10-03  Jean Brefort  <jean brefort normalesup org>
+
+	* docs/reference/goffice-0.8-sections.txt: more documentation work.
+	* goffice/canvas/goc-canvas.c: ditto.
+	* goffice/component/go-component.c: ditto.
+
 2009-10-02  Jean Brefort  <jean brefort normalesup org>
 
 	* goffice/app/go-plugin.c (go_plugin_read_for_dir): fixed the two last
diff --git a/docs/reference/goffice-0.8-sections.txt b/docs/reference/goffice-0.8-sections.txt
index 55ac648..eb31976 100644
--- a/docs/reference/goffice-0.8-sections.txt
+++ b/docs/reference/goffice-0.8-sections.txt
@@ -445,6 +445,9 @@ gog_trend_line_new_by_type
 gog_trend_line_types
 <SUBSECTION Standard>
 GogTrendLineClass
+GOG_TREND_LINE
+GOG_IS_TREND_LINE
+GOG_TYPE_TREND_LINE
 <SUBSECTION Private>
 gog_trend_line_get_type
 </SECTION>
@@ -569,6 +572,11 @@ GOG_IS_RENDERER
 <SUBSECTION Private>
 gog_renderer_get_type
 gog_renderer_draw_equation
+GOG_RENDERER_CAIRO_WITH_PDF
+GOG_RENDERER_CAIRO_WITH_PS
+GOG_RENDERER_CAIRO_WITH_SVG
+GOG_RENDERER_GET_CLASS
+GOG_RENDERER_HAIRLINE_WIDTH_PTS
 </SECTION>
 
 <SECTION>
@@ -1321,6 +1329,17 @@ go_range_min
 go_range_max
 go_range_maxabs
 go_range_devsq
+go_range_fractile_inter
+go_range_fractile_inter_nonconst
+go_range_fractile_inter_sorted
+go_range_increasing
+go_range_median_inter
+go_range_median_inter_nonconst
+go_range_decreasing
+go_range_median_inter_sorted
+go_range_sort
+go_range_vary_uniformly
+<SUBSECTION Private>
 go_range_suml
 go_range_sumsql
 go_range_averagel
@@ -1328,18 +1347,15 @@ go_range_minl
 go_range_maxl
 go_range_maxabsl
 go_range_devsql
-go_range_fractile_inter
-go_range_fractile_inter_nonconst
+go_range_fractile_interl
 go_range_fractile_inter_nonconstl
-go_range_fractile_inter_sorted
 go_range_fractile_inter_sortedl
-go_range_fractile_interl
-go_range_increasing
 go_range_increasingl
-go_range_median_inter
-go_range_median_inter_nonconst
-go_range_median_inter_nonconstl
 go_range_median_interl
+go_range_median_inter_nonconstl
+go_range_decreasingl
+go_range_median_inter_sortedl
+go_range_vary_uniformlyl
 </SECTION>
 
 <SECTION>
@@ -1349,6 +1365,7 @@ GO_LOGFIT_C_ACCURACY
 GO_LOGFIT_C_STEP_FACTOR
 GO_LOGFIT_C_RANGE_FACTOR
 GORegressionResult
+GORegressionFunction
 go_linear_regression
 go_exponential_regression
 go_logarithmic_regression
@@ -1362,6 +1379,7 @@ go_regression_stat_t
 go_regression_stat_new
 go_regression_stat_destroy
 <SUBSECTION Private>
+GORegressionFunctionl
 go_linear_regressionl
 go_exponential_regressionl
 go_logarithmic_regressionl
@@ -1391,9 +1409,21 @@ go_qweibull
 go_dcauchy
 go_pcauchy
 go_qcauchy
+<SUBSECTION Private>
 go_pnorm_bothl
 </SECTION>
 
+<SECTION>
+<FILE>go-matrix3x3</FILE>
+<TITLE>GOMatrix3x3</TITLE>
+GOMatrix3x3
+go_matrix3x3_transform
+go_matrix3x3_from_euler
+go_matrix3x3_from_euler_transposed
+go_matrix3x3_to_euler
+go_matrix3x3_multiply
+</SECTION>
+
 ###############################################################################
 
 ### Utilities
@@ -1445,6 +1475,7 @@ go_bezier_spline_to_path
 
 <SECTION>
 <FILE>go-image</FILE>
+GOImage
 GOImageFormat
 GOImageFormatInfo
 go_mime_to_image_format
@@ -1464,6 +1495,14 @@ go_image_new_from_file
 go_image_get_pixels
 go_image_get_rowstride
 go_image_fill
+go_image_get_name
+go_image_get_thumbnail
+go_image_load_attrs
+go_image_load_data
+go_image_same_pixbuf
+go_image_save
+go_image_sel_new
+go_image_set_name
 </SECTION>
 
 <SECTION>
@@ -1683,6 +1722,7 @@ go_search_replace_get_type
 <SECTION>
 <FILE>go-format</FILE>
 <TITLE>GOFormat</TITLE>
+GOFormat
 GOFormatFamily
 GOFormatMagic
 GOFormatNumberError
@@ -2266,6 +2306,19 @@ GO_PLUGIN_SERVICE_GET_CLASS
 GO_PLUGIN_SERVICE_GOBJECT_LOADER_CLASS
 GO_PLUGIN_SERVICE_GOBJECT_LOADER_GET_CLASS
 </SECTION>
+
+<SECTION>
+<FILE>module-plugin-defs</FILE>
+<TITLE>Plugins related utilities</TITLE>
+GOPluginModuleDepend
+GOPluginModuleHeader
+GOFFICE_API_VERSION
+GOFFICE_MODULE_PLUGIN_MAGIC_NUMBER
+GOFFICE_PLUGIN_MODULE_HEADER
+go_plugin_init
+go_plugin_shutdown
+</SECTION>
+
 <SECTION>
 <FILE>go-conf</FILE>
 GOConfNode
@@ -2458,6 +2511,17 @@ go_undo_unary_get_type
 go_undo_unary_new
 go_undo_undo
 go_undo_undo_with_data
+<SUBSECTION Standard>
+GOUndo
+GOUndoBinary
+GOUndoBinaryClass
+GOUndoBinaryFunc
+GOUndoClass
+GOUndoGroup
+GOUndoGroupClass
+GOUndoUnary
+GOUndoUnaryClass
+GOUndoUnaryFunc
 </SECTION>
 
 <SECTION>
@@ -2499,6 +2563,10 @@ R_OK
 <FILE>go-file-opener</FILE>
 <TITLE>GOFileOpener</TITLE>
 GOFileOpener
+GOFileOpenerClass
+GOFileOpenerProbeFunc
+GOFileOpenerOpenFunc
+GOFileOpenerOpenFuncWithEnc
 go_file_opener_can_probe
 go_file_opener_for_id
 go_file_opener_get_description
@@ -2514,12 +2582,21 @@ go_file_opener_probe
 go_file_opener_register
 go_file_opener_setup
 go_file_opener_unregister
+go_get_file_openers
+<SUBSECTION Standard>
+GO_FILE_OPENER
+GO_IS_FILE_OPENER
+GO_TYPE_FILE_OPENER
 </SECTION>
 
 <SECTION>
 <FILE>go-file-saver</FILE>
 <TITLE>GOFileSaver</TITLE>
 GOFileSaver
+GOFileSaverClass
+GOFileSaverSaveFunc
+GOFileSaveScope
+GOFileFormatLevel
 go_file_saver_for_file_name
 go_file_saver_for_id
 go_file_saver_for_mime_type
@@ -2530,8 +2607,6 @@ go_file_saver_get_format_level
 go_file_saver_get_id
 go_file_saver_get_mime_type
 go_file_saver_get_save_scope
-go_file_saver_get_type
-go_file_saver_level_get_type
 go_file_saver_new
 go_file_saver_register
 go_file_saver_register_as_default
@@ -2539,7 +2614,17 @@ go_file_saver_save
 go_file_saver_scope_get_type
 go_file_saver_set_overwrite_files
 go_file_saver_set_save_scope
+go_file_saver_set_export_options
 go_file_saver_unregister
+go_get_file_savers
+<SUBSECTION Standard>
+GO_TYPE_FILE_SAVER_LEVEL
+GO_TYPE_FILE_SAVER_SCOPE
+GO_FILE_SAVER
+GO_IS_FILE_SAVER
+GO_TYPE_FILE_SAVER
+go_file_saver_get_type
+go_file_saver_level_get_type
 </SECTION>
 
 ###############################################################################
diff --git a/goffice/canvas/goc-canvas.c b/goffice/canvas/goc-canvas.c
index db8e21c..3270434 100644
--- a/goffice/canvas/goc-canvas.c
+++ b/goffice/canvas/goc-canvas.c
@@ -32,6 +32,14 @@
  * The canvas widget used in gnumeric.
  **/
 
+
+/**
+ * GocDirection :
+ * @GOC_DIRECTION_LTR : Left to rigth direction
+ * @GOC_DIRECTION_RTL : Right to left direction
+ * @GOC_DIRECTION_MAX : First invalid value
+ **/
+
 #ifndef HAVE_GTK_LAYOUT_GET_BIN_WINDOW
 #       define gtk_layout_get_bin_window(x) (x)->bin_window
 #endif
@@ -296,6 +304,12 @@ goc_canvas_get_root (GocCanvas *canvas)
 	return canvas->root;
 }
 
+/**
+ * goc_canvas_get_width :
+ * @canvas : #GocCanvas
+ *
+ * Returns: the width of the widget visible region.
+ **/
 int
 goc_canvas_get_width (GocCanvas *canvas)
 {
@@ -303,6 +317,12 @@ goc_canvas_get_width (GocCanvas *canvas)
 	return canvas->width;
 }
 
+/**
+ * goc_canvas_get_height :
+ * @canvas : #GocCanvas
+ *
+ * Returns: the height of the widget visible region.
+ **/
 int
 goc_canvas_get_height (GocCanvas *canvas)
 {
@@ -310,6 +330,15 @@ goc_canvas_get_height (GocCanvas *canvas)
 	return canvas->height;
 }
 
+/**
+ * goc_canvas_scroll_to :
+ * @canvas : #GocCanvas
+ * @x : the horizontal position
+ * @y : the vertical position
+ *
+ * Scrolls the canvas so that the origin of the visible region is at (@x,@y).
+ * The origin position depends on the canvas direction (see #GocDirection).
+ **/
 void
 goc_canvas_scroll_to (GocCanvas *canvas, double x, double y)
 {
@@ -325,6 +354,14 @@ goc_canvas_scroll_to (GocCanvas *canvas, double x, double y)
 					    0, 0, G_MAXINT, G_MAXINT);
 }
 
+/**
+ * goc_canvas_get_scroll_position :
+ * @canvas : #GocCanvas
+ * @x : where to store the horizontal position
+ * @y : where to store the vertical position
+ *
+ * Retrieves the origin of the visible region of the canvas.
+ **/
 void
 goc_canvas_get_scroll_position (GocCanvas *canvas, double *x, double *y)
 {
@@ -335,6 +372,14 @@ goc_canvas_get_scroll_position (GocCanvas *canvas, double *x, double *y)
 		*y = canvas->scroll_y1;
 }
 
+/**
+ * goc_canvas_set_pixels_per_unit :
+ * @canvas : #GocCanvas
+ * @pixels_per_unit: the new scale
+ *
+ * Sets the scale as the number of pixels used for each unit when
+ * displaying the canvas.
+ **/
 void
 goc_canvas_set_pixels_per_unit (GocCanvas *canvas, double pixels_per_unit)
 {
@@ -349,6 +394,12 @@ goc_canvas_set_pixels_per_unit (GocCanvas *canvas, double pixels_per_unit)
 					    0, 0, G_MAXINT, G_MAXINT);
 }
 
+/**
+ * goc_canvas_get_pixels_per_unit :
+ * @canvas : #GocCanvas
+ *
+ * Returns: how many pixels are used for each unit when displaying the canvas.
+ **/
 double
 goc_canvas_get_pixels_per_unit (GocCanvas *canvas)
 {
@@ -356,6 +407,17 @@ goc_canvas_get_pixels_per_unit (GocCanvas *canvas)
 	return canvas->pixels_per_unit;
 }
 
+/**
+ * goc_canvas_invalidate :
+ * @canvas : #GocCanvas
+ * @x0: minimum x coordinate of the invalidated region in canvas coordinates
+ * @y0: minimum y coordinate of the invalidated region in canvas coordinates
+ * @x1: maximum x coordinate of the invalidated region in canvas coordinates
+ * @y1: maximum y coordinate of the invalidated region in canvas coordinates
+ *
+ * Invalidates a region of the canvas. The canvas will be redrawn only if
+ * the invalidated region intersects the visible area.
+ **/
 void
 goc_canvas_invalidate (GocCanvas *canvas, double x0, double y0, double x1, double y1)
 {
@@ -384,6 +446,14 @@ goc_canvas_invalidate (GocCanvas *canvas, double x0, double y0, double x1, doubl
 					    (int) ceil (x1), (int) ceil (y1));
 }
 
+/**
+ * goc_canvas_get_item_at :
+ * @canvas : #GocCanvas
+ * @x: horizontal position
+ * @y: vertical position
+ *
+ * Returns: the #GocItem displayed at (@x,@y) if any.
+ **/
 GocItem*
 goc_canvas_get_item_at (GocCanvas *canvas, double x, double y)
 {
@@ -392,6 +462,14 @@ goc_canvas_get_item_at (GocCanvas *canvas, double x, double y)
 	return (d == 0.)? result: NULL;
 }
 
+/**
+ * goc_canvas_grab_item :
+ * @canvas : #GocCanvas
+ * @item: #GocItem
+ *
+ * Grabs #GocItem. All subsequent events will be passed to #GocItem. This
+ * function fails if an item is already grabbed.
+ **/
 void
 goc_canvas_grab_item (GocCanvas *canvas, GocItem *item)
 {
@@ -399,6 +477,13 @@ goc_canvas_grab_item (GocCanvas *canvas, GocItem *item)
 	canvas->grabbed_item = item;
 }
 
+/**
+ * goc_canvas_ungrab_item :
+ * @canvas : #GocCanvas
+ *
+ * Ungrabs the currently grabbed #GocItem. This function fails
+ * if no item is grabbed.
+ **/
 void
 goc_canvas_ungrab_item (GocCanvas *canvas)
 {
@@ -406,6 +491,12 @@ goc_canvas_ungrab_item (GocCanvas *canvas)
 	canvas->grabbed_item = NULL;
 }
 
+/**
+ * goc_canvas_get_grabbed_item :
+ * @canvas : #GocCanvas
+ *
+ * Returns: The currently grabbed #GocItem.
+ **/
 GocItem *
 goc_canvas_get_grabbed_item (GocCanvas *canvas)
 {
@@ -413,6 +504,14 @@ goc_canvas_get_grabbed_item (GocCanvas *canvas)
 	return canvas->grabbed_item;
 }
 
+/**
+ * goc_canvas_set_document :
+ * @canvas : #GocCanvas
+ * @document: #GODoc
+ *
+ * Associates the #GODoc with the #GocCanvas. This is needed to use images
+ * when filling styled items (see #GocStyledItem).
+ **/
 void
 goc_canvas_set_document (GocCanvas *canvas, GODoc *document)
 {
@@ -420,6 +519,12 @@ goc_canvas_set_document (GocCanvas *canvas, GODoc *document)
 	canvas->document = document;
 }
 
+/**
+ * goc_canvas_get_document :
+ * @canvas : #GocCanvas
+ *
+ * Returns: The #GODoc associated with the #GocCanvas.
+ **/
 GODoc*
 goc_canvas_get_document (GocCanvas *canvas)
 {
@@ -427,6 +532,12 @@ goc_canvas_get_document (GocCanvas *canvas)
 	return canvas->document;
 }
 
+/**
+ * goc_canvas_get_cur_event :
+ * @canvas : #GocCanvas
+ *
+ * Returns: The #GdkEvent being processed.
+ **/
 GdkEvent*
 goc_canvas_get_cur_event (GocCanvas *canvas)
 {
@@ -434,6 +545,13 @@ goc_canvas_get_cur_event (GocCanvas *canvas)
 	return canvas->cur_event;
 }
 
+/**
+ * goc_canvas_ :
+ * @canvas : #GocCanvas
+ * direction: #GocDirection
+ *
+ * Sets the direction used by the canvas.
+ **/
 void
 goc_canvas_set_direction (GocCanvas *canvas, GocDirection direction)
 {
@@ -442,6 +560,12 @@ goc_canvas_set_direction (GocCanvas *canvas, GocDirection direction)
 	goc_canvas_invalidate (canvas, -G_MAXDOUBLE, -G_MAXDOUBLE, G_MAXDOUBLE, G_MAXDOUBLE);
 }
 
+/**
+ * goc_canvas_get_direction :
+ * @canvas : #GocCanvas
+ *
+ * Returns: the current canvas direction.
+ **/
 GocDirection
 goc_canvas_get_direction (GocCanvas *canvas)
 {
@@ -449,6 +573,16 @@ goc_canvas_get_direction (GocCanvas *canvas)
 	return canvas->direction;
 }
 
+/**
+ * goc_canvas_w2c :
+ * @canvas : #GocCanvas
+ * @x: the horizontal position as a widget coordinate.
+ * @y: the vertical position as a widget coordinate.
+ * @x_: where to store the horizontal position as a canvas coordinate.
+ * @y_: where to store the vertical position as a canvas coordinate.
+ * 
+ * Retrieves the canvas coordinates given the position in the widget.
+ **/
 void
 goc_canvas_w2c (GocCanvas *canvas, int x, int y, double *x_, double *y_)
 {
@@ -462,6 +596,16 @@ goc_canvas_w2c (GocCanvas *canvas, int x, int y, double *x_, double *y_)
 		*y_ = (double) y / canvas->pixels_per_unit + canvas->scroll_y1;
 }
 
+/**
+ * goc_canvas_c2w :
+ * @canvas : #GocCanvas
+ * @x: the horizontal position as a canvas coordinate.
+ * @y: the vertical position as a canvas coordinate.
+ * @x_: where to store the horizontal position as a widget coordinate.
+ * @y_: where to store the vertical position as a widget coordinate.
+ *
+ * Retrieves the position in the widget given the canvas coordinates.
+ **/
 void
 goc_canvas_c2w (GocCanvas *canvas, double x, double y, int *x_, int *y_)
 {
diff --git a/goffice/component/go-component.c b/goffice/component/go-component.c
index a6a46b8..95a4904 100644
--- a/goffice/component/go-component.c
+++ b/goffice/component/go-component.c
@@ -30,7 +30,7 @@
  * @parent_class: the parent object class.
  * @edit: callback for component edition.
  * @get_data: returns the data embedded in the component.
- * @mime_type_set:sets the mime type.
+ * @mime_type_set: sets the mime type.
  * @set_data: sets the data embedded in the component.
  * @set_default_size: sets the default size for the component.
  * @set_size: sets the requested size.
@@ -208,6 +208,13 @@ go_component_set_default_size (GOComponent *component, double width, double asce
 		klass->set_default_size (component);
 }
 
+/**
+ * go_component_needs_window:
+ * @component: #GOComponent
+ *
+ * Returns: TRUE  if the component uses its own #GtkWindow.
+ **/
+
 gboolean
 go_component_needs_window (GOComponent *component)
 {



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