[goocanvas/introspection] Yet more annotations.
- From: John Stowers <jstowers src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goocanvas/introspection] Yet more annotations.
- Date: Tue, 24 May 2011 21:05:51 +0000 (UTC)
commit 875918f2f6b70d686ba4f251367a39cf2d1eee99
Author: Tristan Brindle <tristan fugro-fsi com au>
Date: Tue May 24 18:54:48 2011 +0800
Yet more annotations.
This commit adds (skip) annotations to the @parent field of all
the C constructors, so that they don't do the ownership trick
and can be annotated (transfer full) in every case. This is actually
a bit pointless since all the constructers use varargs so are
disabled in the introspection GIR anyway...
But hurrah! No more warnings from g-ir-scanner! (Apart from one that
can't be fixed)
src/goocanvasellipse.c | 8 ++++----
src/goocanvasgrid.c | 10 +++++-----
src/goocanvasgroup.c | 8 ++++----
src/goocanvasimage.c | 4 ++--
src/goocanvasitem.c | 6 +++---
src/goocanvasitemmodel.c | 20 +++++++++++---------
src/goocanvaspath.c | 4 ++--
src/goocanvaspolyline.c | 8 ++++----
src/goocanvasrect.c | 6 +++---
src/goocanvasstyle.c | 6 +++---
src/goocanvastable.c | 8 ++++----
src/goocanvastext.c | 8 ++++----
src/goocanvaswidget.c | 2 +-
13 files changed, 50 insertions(+), 48 deletions(-)
---
diff --git a/src/goocanvasellipse.c b/src/goocanvasellipse.c
index 6653f50..ac7ca5b 100644
--- a/src/goocanvasellipse.c
+++ b/src/goocanvasellipse.c
@@ -160,7 +160,7 @@ goo_canvas_ellipse_init (GooCanvasEllipse *ellipse)
/**
* goo_canvas_ellipse_new:
- * @parent: the parent item, or %NULL. If a parent is specified, it will assume
+ * @parent: (skip): the parent item, or %NULL. If a parent is specified, it will assume
* ownership of the item, and the item will automatically be freed when it is
* removed from the parent. Otherwise call g_object_unref() to free it.
* @center_x: the x coordinate of the center of the ellipse.
@@ -185,7 +185,7 @@ goo_canvas_ellipse_init (GooCanvasEllipse *ellipse)
* NULL);
* </programlisting></informalexample>
*
- * Returns: a new ellipse item.
+ * Returns: (transfer full): a new ellipse item.
**/
GooCanvasItem*
goo_canvas_ellipse_new (GooCanvasItem *parent,
@@ -492,7 +492,7 @@ goo_canvas_ellipse_model_init (GooCanvasEllipseModel *emodel)
/**
* goo_canvas_ellipse_model_new:
- * @parent: the parent model, or %NULL. If a parent is specified, it will
+ * @parent: (skip): the parent model, or %NULL. If a parent is specified, it will
* assume ownership of the item, and the item will automatically be freed when
* it is removed from the parent. Otherwise call g_object_unref() to free it.
* @center_x: the x coordinate of the center of the ellipse.
@@ -517,7 +517,7 @@ goo_canvas_ellipse_model_init (GooCanvasEllipseModel *emodel)
* NULL);
* </programlisting></informalexample>
*
- * Returns: a new ellipse model.
+ * Returns: (transfer full): a new ellipse model.
**/
GooCanvasItemModel*
goo_canvas_ellipse_model_new (GooCanvasItemModel *parent,
diff --git a/src/goocanvasgrid.c b/src/goocanvasgrid.c
index 80190dd..75168ea 100644
--- a/src/goocanvasgrid.c
+++ b/src/goocanvasgrid.c
@@ -336,7 +336,7 @@ goo_canvas_grid_init (GooCanvasGrid *grid)
/**
* goo_canvas_grid_new:
- * @parent: the parent item, or %NULL. If a parent is specified, it will assume
+ * @parent: (skip): the parent item, or %NULL. If a parent is specified, it will assume
* ownership of the item, and the item will automatically be freed when it is
* removed from the parent. Otherwise call g_object_unref() to free it.
* @x: the x coordinate of the left of the grid.
@@ -368,7 +368,7 @@ goo_canvas_grid_init (GooCanvasGrid *grid)
* NULL);
* </programlisting></informalexample>
*
- * Returns: a new grid item.
+ * Returns: (transfer full): a new grid item.
**/
GooCanvasItem*
goo_canvas_grid_new (GooCanvasItem *parent,
@@ -1013,7 +1013,7 @@ goo_canvas_grid_model_init (GooCanvasGridModel *gmodel)
/**
* goo_canvas_grid_model_new:
- * @parent: the parent model, or %NULL. If a parent is specified, it will assume
+ * @parent: (skip): the parent model, or %NULL. If a parent is specified, it will assume
* ownership of the item, and the item will automatically be freed when it is
* removed from the parent. Otherwise call g_object_unref() to free it.
* @x: the x coordinate of the left of the grid.
@@ -1024,7 +1024,7 @@ goo_canvas_grid_model_init (GooCanvasGridModel *gmodel)
* @y_step: the distance between the horizontal grid lines.
* @x_offset: the distance before the first vertical grid line.
* @y_offset: the distance before the first horizontal grid line.
- * @...: optional pairs of property names and values, and a terminating %NULL.
+ * @...: (skip): optional pairs of property names and values, and a terminating %NULL.
*
* Creates a new grid model.
*
@@ -1045,7 +1045,7 @@ goo_canvas_grid_model_init (GooCanvasGridModel *gmodel)
* NULL);
* </programlisting></informalexample>
*
- * Returns: a new grid model.
+ * Returns: (transfer full): a new grid model.
**/
GooCanvasItemModel*
goo_canvas_grid_model_new (GooCanvasItemModel *parent,
diff --git a/src/goocanvasgroup.c b/src/goocanvasgroup.c
index a41423a..8a6e082 100644
--- a/src/goocanvasgroup.c
+++ b/src/goocanvasgroup.c
@@ -158,14 +158,14 @@ goo_canvas_group_init (GooCanvasGroup *group)
/**
* goo_canvas_group_new:
- * @parent: the parent item, or %NULL. If a parent is specified, it will assume
+ * @parent: (skip): the parent item, or %NULL. If a parent is specified, it will assume
* ownership of the item, and the item will automatically be freed when it is
* removed from the parent. Otherwise call g_object_unref() to free it.
* @...: optional pairs of property names and values, and a terminating %NULL.
*
* Creates a new group item.
*
- * Return value: a new group item.
+ * Return value: (transfer full): a new group item.
**/
GooCanvasItem*
goo_canvas_group_new (GooCanvasItem *parent,
@@ -880,14 +880,14 @@ goo_canvas_group_model_init (GooCanvasGroupModel *gmodel)
/**
* goo_canvas_group_model_new:
- * @parent: the parent model, or %NULL. If a parent is specified, it will
+ * @parent: (skip): the parent model, or %NULL. If a parent is specified, it will
* assume ownership of the item, and the item will automatically be freed when
* it is removed from the parent. Otherwise call g_object_unref() to free it.
* @...: optional pairs of property names and values, and a terminating %NULL.
*
* Creates a new group item.
*
- * Return value: a new group model.
+ * Return value: (transfer full): a new group model.
**/
GooCanvasItemModel*
goo_canvas_group_model_new (GooCanvasItemModel *parent,
diff --git a/src/goocanvasimage.c b/src/goocanvasimage.c
index 6cde02c..910825c 100644
--- a/src/goocanvasimage.c
+++ b/src/goocanvasimage.c
@@ -175,7 +175,7 @@ goo_canvas_image_init (GooCanvasImage *image)
/**
* goo_canvas_image_new:
- * @parent: (allow-none): the parent item, or %NULL. If a parent is specified, it will assume
+ * @parent: (skip): the parent item, or %NULL. If a parent is specified, it will assume
* ownership of the item, and the item will automatically be freed when it is
* removed from the parent. Otherwise call g_object_unref() to free it.
* @pixbuf: (allow-none): the #GdkPixbuf containing the image data, or %NULL.
@@ -610,7 +610,7 @@ goo_canvas_image_model_init (GooCanvasImageModel *emodel)
/**
* goo_canvas_image_model_new:
- * @parent: (allow-none): the parent model, or %NULL. If a parent is specified, it will
+ * @parent: (skip): the parent model, or %NULL. If a parent is specified, it will
* assume ownership of the item, and the item will automatically be freed when
* it is removed from the parent. Otherwise call g_object_unref() to free it.
* @pixbuf: (allow-none): the #GdkPixbuf containing the image data, or %NULL.
diff --git a/src/goocanvasitem.c b/src/goocanvasitem.c
index 6daf065..044e41a 100644
--- a/src/goocanvasitem.c
+++ b/src/goocanvasitem.c
@@ -397,7 +397,7 @@ goo_canvas_item_base_init (gpointer g_iface)
/**
* GooCanvasItem::child-notify
* @item: the item that received the signal.
- * @pspec: the #GParamSpec of the changed child property.
+ * @pspec: (type GLib.ParamSpec): the #GParamSpec of the changed child property.
*
* Emitted for each child property that has changed.
* The signal's detail holds the property name.
@@ -2318,14 +2318,14 @@ goo_canvas_item_class_find_child_property (GObjectClass *iclass,
/**
* goo_canvas_item_class_list_child_properties:
* @iclass: a #GObjectClass
- * @n_properties: location to return the number of child properties found
+ * @n_properties: (out): location to return the number of child properties found
*
* This function is only intended to be used when implementing new canvas
* items, specifically layout container items such as #GooCanvasTable.
*
* It returns all child properties of a canvas item class.
*
- * @returns: (array length=n_properties) (transfer full): a newly allocated
+ * Returns: (array length=n_properties) (transfer full): a newly allocated
* array of #GParamSpec*. The array must be freed with g_free().
*/
GParamSpec**
diff --git a/src/goocanvasitemmodel.c b/src/goocanvasitemmodel.c
index b70405a..ac9b330 100644
--- a/src/goocanvasitemmodel.c
+++ b/src/goocanvasitemmodel.c
@@ -186,7 +186,7 @@ goo_canvas_item_model_base_init (gpointer g_iface)
/**
* GooCanvasItemModel::child-notify
* @item: the item model that received the signal.
- * @pspec: the #GParamSpec of the changed child property.
+ * @pspec: (type GLib.ParamSpec): the #GParamSpec of the changed child property.
*
* Emitted for each child property that has changed.
* The signal's detail holds the property name.
@@ -425,8 +425,8 @@ goo_canvas_item_model_get_n_children (GooCanvasItemModel *model)
*
* Gets the child at the given stack position.
*
- * Returns: the child at the given stack position, or %NULL if @child_num
- * is out of range.
+ * Returns: (transfer none): the child at the given stack position, or %NULL
+ * if @child_num is out of range.
**/
GooCanvasItemModel*
goo_canvas_item_model_get_child (GooCanvasItemModel *model,
@@ -444,7 +444,7 @@ goo_canvas_item_model_get_child (GooCanvasItemModel *model,
*
* Gets the parent of the given model.
*
- * Returns: the parent model, or %NULL if the model has no parent.
+ * Returns: (transfer none): the parent model, or %NULL if the model has no parent.
**/
GooCanvasItemModel*
goo_canvas_item_model_get_parent (GooCanvasItemModel *model)
@@ -843,7 +843,7 @@ goo_canvas_item_model_skew_y (GooCanvasItemModel *model,
* Gets the model's style. If the model doesn't have its own style it will
* return its parent's style.
*
- * Returns: the model's style.
+ * Returns: (transfer none): the model's style.
**/
GooCanvasStyle*
goo_canvas_item_model_get_style (GooCanvasItemModel *model)
@@ -1119,14 +1119,15 @@ goo_canvas_item_model_class_install_child_property (GObjectClass *mclass,
* goo_canvas_item_model_class_find_child_property:
* @mclass: a #GObjectClass
* @property_name: the name of the child property to find
- * @returns: the #GParamSpec of the child property or %NULL if @class has no
- * child property with that name.
*
* This function is only intended to be used when implementing new canvas
* item models, specifically layout container item models such as
* #GooCanvasTableModel.
*
* It finds a child property of a canvas item class by name.
+ *
+ * Returns: (type GLib.ParamSpec) (transfer none): The #GParamSpec of the child
+ * property or %NULL if @class has no child property with that name.
*/
GParamSpec*
goo_canvas_item_model_class_find_child_property (GObjectClass *mclass,
@@ -1144,14 +1145,15 @@ goo_canvas_item_model_class_find_child_property (GObjectClass *mclass,
* goo_canvas_item_model_class_list_child_properties:
* @mclass: a #GObjectClass
* @n_properties: location to return the number of child properties found
- * @returns: a newly allocated array of #GParamSpec*. The array must be
- * freed with g_free().
*
* This function is only intended to be used when implementing new canvas
* item models, specifically layout container item models such as
* #GooCanvasTableModel.
*
* It returns all child properties of a canvas item class.
+ *
+ * Returns: (array length=n_properties) (element-type GLib.ParamSpec) (transfer container):
+ * a newly allocated array of #GParamSpec*. The array must be freed with g_free().
*/
GParamSpec**
goo_canvas_item_model_class_list_child_properties (GObjectClass *mclass,
diff --git a/src/goocanvaspath.c b/src/goocanvaspath.c
index 65f5ab0..53486dd 100644
--- a/src/goocanvaspath.c
+++ b/src/goocanvaspath.c
@@ -113,7 +113,7 @@ goo_canvas_path_init (GooCanvasPath *path)
/**
* goo_canvas_path_new:
- * @parent: (allow-none): the parent item, or %NULL. If a parent is specified, it will assume
+ * @parent: (skip): the parent item, or %NULL. If a parent is specified, it will assume
* ownership of the item, and the item will automatically be freed when it is
* removed from the parent. Otherwise call g_object_unref() to free it.
* @path_data: the sequence of path commands, specified as a string using the
@@ -671,7 +671,7 @@ goo_canvas_path_model_init (GooCanvasPathModel *pmodel)
/**
* goo_canvas_path_model_new:
- * @parent: (allow-none): the parent model, or %NULL. If a parent is specified, it will
+ * @parent: (skip): the parent model, or %NULL. If a parent is specified, it will
* assume ownership of the item, and the item will automatically be freed when
* it is removed from the parent. Otherwise call g_object_unref() to free it.
* @path_data: the sequence of path commands, specified as a string using the
diff --git a/src/goocanvaspolyline.c b/src/goocanvaspolyline.c
index a8bac7b..88a9418 100644
--- a/src/goocanvaspolyline.c
+++ b/src/goocanvaspolyline.c
@@ -680,7 +680,7 @@ goo_canvas_polyline_set_property (GObject *object,
/**
* goo_canvas_polyline_new:
- * @parent: (allow-none): the parent item, or %NULL. If a parent is specified, it will assume
+ * @parent: (skip): the parent item, or %NULL. If a parent is specified, it will assume
* ownership of the item, and the item will automatically be freed when it is
* removed from the parent. Otherwise call g_object_unref() to free it.
* @close_path: if the last point should be connected to the first.
@@ -751,7 +751,7 @@ goo_canvas_polyline_new (GooCanvasItem *parent,
/**
* goo_canvas_polyline_new_line:
- * @parent: (allow-none): the parent item, or %NULL.
+ * @parent: (skip): the parent item, or %NULL.
* @x1: the x coordinate of the start of the line.
* @y1: the y coordinate of the start of the line.
* @x2: the x coordinate of the end of the line.
@@ -1188,7 +1188,7 @@ goo_canvas_polyline_model_init (GooCanvasPolylineModel *pmodel)
/**
* goo_canvas_polyline_model_new:
- * @parent: (allow-none): the parent model, or %NULL. If a parent is specified, it will
+ * @parent: (skip): the parent model, or %NULL. If a parent is specified, it will
* assume ownership of the item, and the item will automatically be freed when
* it is removed from the parent. Otherwise call g_object_unref() to free it.
* @close_path: if the last point should be connected to the first.
@@ -1259,7 +1259,7 @@ goo_canvas_polyline_model_new (GooCanvasItemModel *parent,
/**
* goo_canvas_polyline_model_new_line:
- * @parent: (allow-none): the parent model, or %NULL.
+ * @parent: (skip): the parent model, or %NULL.
* @x1: the x coordinate of the start of the line.
* @y1: the y coordinate of the start of the line.
* @x2: the x coordinate of the end of the line.
diff --git a/src/goocanvasrect.c b/src/goocanvasrect.c
index f8851ab..bd4ec7f 100644
--- a/src/goocanvasrect.c
+++ b/src/goocanvasrect.c
@@ -110,7 +110,7 @@ goo_canvas_rect_init (GooCanvasRect *rect)
/**
* goo_canvas_rect_new:
- * @parent: (allow-none): the parent item, or %NULL. If a parent is specified, it will assume
+ * @parent: (skip): the parent item, or %NULL. If a parent is specified, it will assume
* ownership of the item, and the item will automatically be freed when it is
* removed from the parent. Otherwise call g_object_unref() to free it.
* @x: the x coordinate of the left of the rectangle.
@@ -489,7 +489,7 @@ goo_canvas_rect_model_init (GooCanvasRectModel *rmodel)
/**
* goo_canvas_rect_model_new:
- * @parent: the parent model, or %NULL. If a parent is specified, it will
+ * @parent: (skip): the parent model, or %NULL. If a parent is specified, it will
* assume ownership of the item, and the item will automatically be freed when
* it is removed from the parent. Otherwise call g_object_unref() to free it.
* @x: the x coordinate of the left of the rectangle.
@@ -513,7 +513,7 @@ goo_canvas_rect_model_init (GooCanvasRectModel *rmodel)
* NULL);
* </programlisting></informalexample>
*
- * Returns: a new rectangle model.
+ * Returns: (transfer full): a new rectangle model.
**/
GooCanvasItemModel*
goo_canvas_rect_model_new (GooCanvasItemModel *parent,
diff --git a/src/goocanvasstyle.c b/src/goocanvasstyle.c
index 378fba6..6b5fa65 100644
--- a/src/goocanvasstyle.c
+++ b/src/goocanvasstyle.c
@@ -176,7 +176,7 @@ goo_canvas_style_init (GooCanvasStyle *style)
*
* Creates a new #GooCanvasStyle.
*
- * Returns: a new #GooCanvasStyle.
+ * Returns: (transfer full): a new #GooCanvasStyle.
**/
GooCanvasStyle*
goo_canvas_style_new (void)
@@ -228,7 +228,7 @@ goo_canvas_style_finalize (GObject *object)
* Copies the given #GooCanvasStyle, by copying all of its properties.
* Though the parent of the new style is left unset.
*
- * Returns: a copy of the given #GooCanvasStyle.
+ * Returns: (transfer full): a copy of the given #GooCanvasStyle.
**/
GooCanvasStyle*
goo_canvas_style_copy (GooCanvasStyle *style)
@@ -255,7 +255,7 @@ goo_canvas_style_copy (GooCanvasStyle *style)
*
* Gets the parent of the style.
*
- * Returns: the parent of the given style, or %NULL.
+ * Returns: (transfer none): the parent of the given style, or %NULL.
**/
GooCanvasStyle*
goo_canvas_style_get_parent (GooCanvasStyle *style)
diff --git a/src/goocanvastable.c b/src/goocanvastable.c
index 911869e..39a4e08 100644
--- a/src/goocanvastable.c
+++ b/src/goocanvastable.c
@@ -469,7 +469,7 @@ goo_canvas_table_init (GooCanvasTable *table)
/**
* goo_canvas_table_new:
- * @parent: the parent item, or %NULL. If a parent is specified, it will assume
+ * @parent: (skip): the parent item, or %NULL. If a parent is specified, it will assume
* ownership of the item, and the item will automatically be freed when it is
* removed from the parent. Otherwise call g_object_unref() to free it.
* @...: optional pairs of property names and values, and a terminating %NULL.
@@ -516,7 +516,7 @@ goo_canvas_table_init (GooCanvasTable *table)
* NULL);
* </programlisting></informalexample>
*
- * Returns: a new table item.
+ * Returns: (transfer full): a new table item.
**/
GooCanvasItem*
goo_canvas_table_new (GooCanvasItem *parent,
@@ -2776,7 +2776,7 @@ goo_canvas_table_model_init (GooCanvasTableModel *tmodel)
/**
* goo_canvas_table_model_new:
- * @parent: the parent model, or %NULL. If a parent is specified, it will
+ * @parent: (skip): the parent model, or %NULL. If a parent is specified, it will
* assume ownership of the item, and the item will automatically be freed when
* it is removed from the parent. Otherwise call g_object_unref() to free it.
* @...: optional pairs of property names and values, and a terminating %NULL.
@@ -2823,7 +2823,7 @@ goo_canvas_table_model_init (GooCanvasTableModel *tmodel)
* NULL);
* </programlisting></informalexample>
*
- * Returns: a new table model.
+ * Returns: (transfer full): a new table model.
**/
GooCanvasItemModel*
goo_canvas_table_model_new (GooCanvasItemModel *parent,
diff --git a/src/goocanvastext.c b/src/goocanvastext.c
index 7cb3c3b..c7cadab 100644
--- a/src/goocanvastext.c
+++ b/src/goocanvastext.c
@@ -190,7 +190,7 @@ goo_canvas_text_init (GooCanvasText *text)
/**
* goo_canvas_text_new:
- * @parent: the parent item, or %NULL. If a parent is specified, it will assume
+ * @parent: (skip): the parent item, or %NULL. If a parent is specified, it will assume
* ownership of the item, and the item will automatically be freed when it is
* removed from the parent. Otherwise call g_object_unref() to free it.
* @string: the text to display.
@@ -217,7 +217,7 @@ goo_canvas_text_init (GooCanvasText *text)
* NULL);
* </programlisting></informalexample>
*
- * Returns: a new text item.
+ * Returns: (transfer full): a new text item.
**/
GooCanvasItem*
goo_canvas_text_new (GooCanvasItem *parent,
@@ -960,7 +960,7 @@ goo_canvas_text_model_init (GooCanvasTextModel *tmodel)
/**
* goo_canvas_text_model_new:
- * @parent: the parent model, or %NULL. If a parent is specified, it will
+ * @parent: (skip): the parent model, or %NULL. If a parent is specified, it will
* assume ownership of the item, and the item will automatically be freed when
* it is removed from the parent. Otherwise call g_object_unref() to free it.
* @string: the text to display.
@@ -987,7 +987,7 @@ goo_canvas_text_model_init (GooCanvasTextModel *tmodel)
* NULL);
* </programlisting></informalexample>
*
- * Returns: a new text model.
+ * Returns: (transfer full): a new text model.
**/
GooCanvasItemModel*
goo_canvas_text_model_new (GooCanvasItemModel *parent,
diff --git a/src/goocanvaswidget.c b/src/goocanvaswidget.c
index f8b1263..eab6d63 100644
--- a/src/goocanvaswidget.c
+++ b/src/goocanvaswidget.c
@@ -85,7 +85,7 @@ goo_canvas_widget_init (GooCanvasWidget *witem)
/**
* goo_canvas_widget_new:
- * @parent: (allow-none): the parent item, or %NULL. If a parent is specified, it will assume
+ * @parent: (skip): the parent item, or %NULL. If a parent is specified, it will assume
* ownership of the item, and the item will automatically be freed when it is
* removed from the parent. Otherwise call g_object_unref() to free it.
* @widget: the widget.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]