[goffice] Fixed API docs in canvas.



commit 9ad22e3a01ddd4358e0efb672b126e917d4ca2b4
Author: Jean Brefort <jean brefort normalesup org>
Date:   Fri Apr 20 13:41:38 2012 +0200

    Fixed API docs in canvas.

 ChangeLog                   |    5 ++
 goffice/canvas/goc-canvas.c |  104 +++++++++++++++++++++---------------------
 goffice/canvas/goc-group.c  |   16 +++---
 goffice/canvas/goc-item.c   |   57 ++++++++++++++---------
 4 files changed, 100 insertions(+), 82 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d71d01b..7267130 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-04-20  Jean Brefort  <jean brefort normalesup org>
+	* goffice/canvas/goc-canvas.c: fixed documentation.
+	* goffice/canvas/goc-group.c: ditto.
+	* goffice/canvas/goc-item.c: ditto.
+
 2012-03-31  Jean Brefort  <jean brefort normalesup org>
 
 	* goffice/utils/go-image.c (go_image_new_from_file),
diff --git a/goffice/canvas/goc-canvas.c b/goffice/canvas/goc-canvas.c
index b09de76..32698ee 100644
--- a/goffice/canvas/goc-canvas.c
+++ b/goffice/canvas/goc-canvas.c
@@ -25,7 +25,7 @@
 #include <math.h>
 
 /**
- * SECTION:goc-canvas
+ * SECTION: goc-canvas
  * @short_description: The canvas widget
  *
  * The canvas widget used in gnumeric.
@@ -33,10 +33,10 @@
 
 
 /**
- * GocDirection :
- * @GOC_DIRECTION_LTR : Left to right direction
- * @GOC_DIRECTION_RTL : Right to left direction
- * @GOC_DIRECTION_MAX : First invalid value
+ * GocDirection:
+ * @GOC_DIRECTION_LTR: Left to right direction
+ * @GOC_DIRECTION_RTL: Right to left direction
+ * @GOC_DIRECTION_MAX: First invalid value
  **/
 
 static GObjectClass *parent_klass;
@@ -327,10 +327,10 @@ GSF_CLASS (GocCanvas, goc_canvas,
 #endif
 
 /**
- * goc_canvas_get_root :
- * @canvas : #GocCanvas
+ * goc_canvas_get_root:
+ * @canvas: #GocCanvas
  *
- * Returns: the top level item of @canvas, always a #GocGroup.
+ * Returns: (transfer none): the top level item of @canvas, always a #GocGroup.
  **/
 GocGroup*
 goc_canvas_get_root (GocCanvas *canvas)
@@ -340,10 +340,10 @@ goc_canvas_get_root (GocCanvas *canvas)
 }
 
 /**
- * goc_canvas_get_width :
- * @canvas : #GocCanvas
+ * goc_canvas_get_width:
+ * @canvas: #GocCanvas
  *
- * Returns: the width of the widget visible region.
+ * Returns: (transfer none): the width of the widget visible region.
  **/
 int
 goc_canvas_get_width (GocCanvas *canvas)
@@ -353,8 +353,8 @@ goc_canvas_get_width (GocCanvas *canvas)
 }
 
 /**
- * goc_canvas_get_height :
- * @canvas : #GocCanvas
+ * goc_canvas_get_height:
+ * @canvas: #GocCanvas
  *
  * Returns: the height of the widget visible region.
  **/
@@ -366,10 +366,10 @@ goc_canvas_get_height (GocCanvas *canvas)
 }
 
 /**
- * goc_canvas_scroll_to :
- * @canvas : #GocCanvas
- * @x : the horizontal position
- * @y : the vertical position
+ * 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).
@@ -392,10 +392,10 @@ goc_canvas_scroll_to (GocCanvas *canvas, double x, double y)
 }
 
 /**
- * goc_canvas_get_scroll_position :
- * @canvas : #GocCanvas
- * @x : where to store the horizontal position
- * @y : where to store the vertical position
+ * 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.
  **/
@@ -410,8 +410,8 @@ goc_canvas_get_scroll_position (GocCanvas *canvas, double *x, double *y)
 }
 
 /**
- * goc_canvas_set_pixels_per_unit :
- * @canvas : #GocCanvas
+ * 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
@@ -434,8 +434,8 @@ goc_canvas_set_pixels_per_unit (GocCanvas *canvas, double pixels_per_unit)
 }
 
 /**
- * goc_canvas_get_pixels_per_unit :
- * @canvas : #GocCanvas
+ * goc_canvas_get_pixels_per_unit:
+ * @canvas: #GocCanvas
  *
  * Returns: how many pixels are used for each unit when displaying the canvas.
  **/
@@ -448,7 +448,7 @@ goc_canvas_get_pixels_per_unit (GocCanvas *canvas)
 
 /**
  * goc_canvas_invalidate :
- * @canvas : #GocCanvas
+ * @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
@@ -489,12 +489,12 @@ goc_canvas_invalidate (GocCanvas *canvas, double x0, double y0, double x1, doubl
 }
 
 /**
- * goc_canvas_get_item_at :
- * @canvas : #GocCanvas
+ * goc_canvas_get_item_at:
+ * @canvas: #GocCanvas
  * @x: horizontal position
  * @y: vertical position
  *
- * Returns: the #GocItem displayed at (@x,@y) if any.
+ * Returns: (transfer none): the #GocItem displayed at (@x,@y) if any.
  **/
 GocItem*
 goc_canvas_get_item_at (GocCanvas *canvas, double x, double y)
@@ -505,8 +505,8 @@ goc_canvas_get_item_at (GocCanvas *canvas, double x, double y)
 }
 
 /**
- * goc_canvas_grab_item :
- * @canvas : #GocCanvas
+ * goc_canvas_grab_item:
+ * @canvas: #GocCanvas
  * @item: #GocItem
  *
  * Grabs #GocItem. All subsequent events will be passed to #GocItem. This
@@ -520,8 +520,8 @@ goc_canvas_grab_item (GocCanvas *canvas, GocItem *item)
 }
 
 /**
- * goc_canvas_ungrab_item :
- * @canvas : #GocCanvas
+ * goc_canvas_ungrab_item:
+ * @canvas: #GocCanvas
  *
  * Ungrabs the currently grabbed #GocItem. This function fails
  * if no item is grabbed.
@@ -534,10 +534,10 @@ goc_canvas_ungrab_item (GocCanvas *canvas)
 }
 
 /**
- * goc_canvas_get_grabbed_item :
- * @canvas : #GocCanvas
+ * goc_canvas_get_grabbed_item:
+ * @canvas: #GocCanvas
  *
- * Returns: The currently grabbed #GocItem.
+ * Returns: (transfer none): The currently grabbed #GocItem.
  **/
 GocItem *
 goc_canvas_get_grabbed_item (GocCanvas *canvas)
@@ -547,8 +547,8 @@ goc_canvas_get_grabbed_item (GocCanvas *canvas)
 }
 
 /**
- * goc_canvas_set_document :
- * @canvas : #GocCanvas
+ * goc_canvas_set_document:
+ * @canvas: #GocCanvas
  * @document: #GODoc
  *
  * Associates the #GODoc with the #GocCanvas. This is needed to use images
@@ -562,10 +562,10 @@ goc_canvas_set_document (GocCanvas *canvas, GODoc *document)
 }
 
 /**
- * goc_canvas_get_document :
- * @canvas : #GocCanvas
+ * goc_canvas_get_document:
+ * @canvas: #GocCanvas
  *
- * Returns: The #GODoc associated with the #GocCanvas.
+ * Returns: (transfer none): The #GODoc associated with the #GocCanvas.
  **/
 GODoc*
 goc_canvas_get_document (GocCanvas *canvas)
@@ -576,10 +576,10 @@ goc_canvas_get_document (GocCanvas *canvas)
 
 #ifdef GOFFICE_WITH_GTK
 /**
- * goc_canvas_get_cur_event :
- * @canvas : #GocCanvas
+ * goc_canvas_get_cur_event:
+ * @canvas: #GocCanvas
  *
- * Returns: The #GdkEvent being processed.
+ * Returns: (transfer none): The #GdkEvent being processed.
  **/
 GdkEvent*
 goc_canvas_get_cur_event (GocCanvas *canvas)
@@ -590,8 +590,8 @@ goc_canvas_get_cur_event (GocCanvas *canvas)
 #endif
 
 /**
- * goc_canvas_ :
- * @canvas : #GocCanvas
+ * goc_canvas_set_direction:
+ * @canvas: #GocCanvas
  * direction: #GocDirection
  *
  * Sets the direction used by the canvas.
@@ -605,8 +605,8 @@ goc_canvas_set_direction (GocCanvas *canvas, GocDirection direction)
 }
 
 /**
- * goc_canvas_get_direction :
- * @canvas : #GocCanvas
+ * goc_canvas_get_direction:
+ * @canvas: #GocCanvas
  *
  * Returns: the current canvas direction.
  **/
@@ -618,8 +618,8 @@ goc_canvas_get_direction (GocCanvas *canvas)
 }
 
 /**
- * goc_canvas_w2c :
- * @canvas : #GocCanvas
+ * 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.
@@ -641,8 +641,8 @@ goc_canvas_w2c (GocCanvas *canvas, int x, int y, double *x_, double *y_)
 }
 
 /**
- * goc_canvas_c2w :
- * @canvas : #GocCanvas
+ * 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.
diff --git a/goffice/canvas/goc-group.c b/goffice/canvas/goc-group.c
index 1043d84..1d189ac 100644
--- a/goffice/canvas/goc-group.c
+++ b/goffice/canvas/goc-group.c
@@ -276,11 +276,11 @@ GSF_CLASS (GocGroup, goc_group,
 	   GOC_TYPE_ITEM)
 
 /**
- * goc_group_new :
+ * goc_group_new:
  * @parent: #GocGroup
  *
  * Creates a new #GocGroup as a child of @parent.
- * Returns: the newly created #GocGroup.
+ * Returns: (transfer none): the newly created #GocGroup.
  **/
 GocGroup*
 goc_group_new (GocGroup *parent)
@@ -298,7 +298,7 @@ goc_group_new (GocGroup *parent)
 }
 
 /**
- * goc_group_clear
+ * goc_group_clear:
  * @group: #GocGroup
  *
  * Destroys all @group children.
@@ -326,7 +326,7 @@ goc_group_clear (GocGroup *group)
 }
 
 /**
- * goc_group_add_child :
+ * goc_group_add_child:
  * @parent: #GocGroup
  * @item: #GocItem
  *
@@ -352,7 +352,7 @@ goc_group_add_child (GocGroup *parent, GocItem *item)
 }
 
 /**
- * goc_group_remove_child :
+ * goc_group_remove_child:
  * @parent: #GocGroup
  * @item: #GocItem
  *
@@ -378,7 +378,7 @@ goc_group_remove_child (GocGroup *parent, GocItem *item)
 }
 
 /**
- * goc_group_adjust_bounds
+ * goc_group_adjust_bounds:
  * @group: #GocGroup
  * @x0: first horizontal coordinate
  * @y0: first vertical coordinate
@@ -404,7 +404,7 @@ goc_group_adjust_bounds (GocGroup const *group, double *x0, double *y0, double *
 }
 
 /**
- * goc_group_adjust_coords
+ * goc_group_adjust_coords:
  * @group: #GocGroup
  * @x: horizontal coordinate
  * @y: vertical coordinate
@@ -426,7 +426,7 @@ goc_group_adjust_coords (GocGroup const *group, double *x, double *y)
 }
 
 /**
- * goc_group_cairo_transform :
+ * goc_group_cairo_transform:
  * @group: #GocGroup
  * @cr: #cairo_t
  * @x: horizontal coordinate
diff --git a/goffice/canvas/goc-item.c b/goffice/canvas/goc-item.c
index c454be7..a5cd572 100644
--- a/goffice/canvas/goc-item.c
+++ b/goffice/canvas/goc-item.c
@@ -35,7 +35,7 @@
 **/
 
 /**
- * GocItem :
+ * GocItem:
  * @base: the parent object.
  * @canvas: the canvas in which the item is displayed.
  * @parent: the parent item.
@@ -84,7 +84,7 @@ enum {
 };
 
 /**
- * GocItemClass :
+ * GocItemClass:
  * @base: the parent class
  * @distance: returns the distance between the item and the point defined by
  * @x and @y. When the distance is larger than a few pixels, the result is not
@@ -304,7 +304,7 @@ _goc_item_update_bounds (GocItem *item)
 }
 
 /**
- * goc_item_new :
+ * goc_item_new:
  * @parent: parent #GocGroup for the new item
  * @type: #GType of the new item
  * @first_arg_name: property name or %NULL
@@ -313,7 +313,7 @@ _goc_item_update_bounds (GocItem *item)
  *
  * Creates a new item of type @type in group @group. Properties can be
  * set just the same way they are in #g_object_new.
- * Returns: the newly created #GocItem.
+ * Returns: (transfer none): the newly created #GocItem.
  **/
 GocItem*
 goc_item_new (GocGroup *parent, GType type, const gchar *first_arg_name, ...)
@@ -335,7 +335,7 @@ goc_item_new (GocGroup *parent, GType type, const gchar *first_arg_name, ...)
 }
 
 /**
- * goc_item_destroy :
+ * goc_item_destroy:
  * @item: #GocItem
  *
  * Destroys @item, removes it from its parent group and updates the canvas
@@ -349,7 +349,7 @@ goc_item_destroy (GocItem *item)
 }
 
 /**
- * goc_item_set :
+ * goc_item_set:
  * @item: #GocItem
  * @first_arg_name: property name or %NULL
  * @...: value for the first property, followed optionally by more
@@ -373,7 +373,7 @@ goc_item_set (GocItem *item, const gchar *first_arg_name, ...)
 }
 
 /**
- * goc_item_distance :
+ * goc_item_distance:
  * @item: #GocItem
  * @x: horizontal position
  * @y: vertical position
@@ -395,7 +395,7 @@ goc_item_distance (GocItem *item, double x, double y, GocItem **near_item)
 }
 
 /**
- * goc_item_draw :
+ * goc_item_draw:
  * @item: #GocItem
  * @cr: #cairo_t
  *
@@ -413,7 +413,7 @@ goc_item_draw (GocItem const *item, cairo_t *cr)
 }
 
 /**
- * goc_item_draw_region :
+ * goc_item_draw_region:
  * @item: #GocItem
  * @cr: #cairo_t
  * @x0: the lowest horizontal bound of the region to draw
@@ -467,7 +467,7 @@ goc_item_maybe_invalidate (GocItem *item, gboolean ignore_visibility)
 }
 
 /**
- * goc_item_invalidate :
+ * goc_item_invalidate:
  * @item: #GocItem
  *
  * Force a redraw of @item bounding region.
@@ -481,7 +481,7 @@ goc_item_invalidate (GocItem *item)
 }
 
 /**
- * goc_item_set_visible :
+ * goc_item_set_visible:
  * @item: #GocItem
  * @visible: whether the item should be visible
  *
@@ -500,7 +500,7 @@ goc_item_set_visible (GocItem *item, gboolean visible)
 }
 
 /**
- * goc_item_show :
+ * goc_item_show:
  * @item: #GocItem
  *
  * Makes @item visible.
@@ -512,7 +512,7 @@ goc_item_show (GocItem *item)
 }
 
 /**
- * goc_item_hide :
+ * goc_item_hide:
  * @item: #GocItem
  *
  * Hides @item.
@@ -524,7 +524,7 @@ goc_item_hide (GocItem *item)
 }
 
 /**
- * goc_item_is_visible :
+ * goc_item_is_visible:
  * @item: #GocItem
  *
  * Returns: %TRUE if @item is visible.
@@ -537,7 +537,7 @@ goc_item_is_visible (GocItem *item)
 }
 
 /**
- * goc_item_get_bounds :
+ * goc_item_get_bounds:
  * @item: #GocItem
  * @x0: where to store the lowest horizontal bound
  * @y0: where to store the lowest vertical bound
@@ -560,7 +560,7 @@ goc_item_get_bounds (GocItem const *item, double *x0, double *y0, double *x1, do
 }
 
 /**
- * goc_item_bounds_changed :
+ * goc_item_bounds_changed:
  * @item: #GocItem
  *
  * This function needs to be called each time the bounds of @item change. It
@@ -582,7 +582,7 @@ goc_item_bounds_changed (GocItem *item)
 }
 
 /**
- * goc_item_grab :
+ * goc_item_grab:
  * @item: #GocItem
  *
  * Grabs the item. This function will fail if another item is grabbed.
@@ -597,7 +597,7 @@ goc_item_grab (GocItem *item)
 }
 
 /**
- * goc_item_ungrab :
+ * goc_item_ungrab:
  * @item: #GocItem
  *
  * Ungrabs the item. This function will fail if @item is not grabbed.
@@ -635,7 +635,7 @@ goc_item_reordered (GocItem *item, int n)
 }
 
 /**
- * goc_item_raise :
+ * goc_item_raise:
  * @item: #GocItem
  * @n: the rank change
  *
@@ -658,7 +658,7 @@ goc_item_raise (GocItem *item, int n)
 }
 
 /**
- * goc_item_lower :
+ * goc_item_lower:
  * @item: #GocItem
  * @n: the rank change
  *
@@ -681,7 +681,7 @@ goc_item_lower (GocItem *item, int n)
 }
 
 /**
- * goc_item_lower_to_bottom :
+ * goc_item_lower_to_bottom:
  * @item: #GocItem
  *
  * Lowers @item to bottom inside its parent #GocGroup so that it will be at
@@ -698,7 +698,7 @@ goc_item_lower_to_bottom (GocItem *item)
 }
 
 /**
- * goc_item_raise_to_top :
+ * goc_item_raise_to_top:
  * @item: #GocItem
  *
  * Raises @item to front so that it becomes the toplevel item inside
@@ -732,6 +732,12 @@ _goc_item_unrealize (GocItem *item)
 	}
 }
 
+/**
+ * goc_item_get_parent:
+ * @item: #GocItem
+ *
+ * Returns: (transfer none): The item parent #GocGroup.
+ **/
 GocGroup *
 goc_item_get_parent (GocItem *item)
 {
@@ -739,6 +745,13 @@ goc_item_get_parent (GocItem *item)
 }
 
 #ifdef GOFFICE_WITH_GTK
+/**
+ * goc_item_get_window:
+ * @item: #GocItem
+ *
+ * Returns: (transfer none): The #GdkWindow associated with the item if any or
+ * NULL. Only #GocWidget owns a #GdkWindow.
+ **/
 GdkWindow *
 goc_item_get_window (GocItem *item)
 {



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