[gimp] pdb, libgimp: more docs and annotations
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] pdb, libgimp: more docs and annotations
- Date: Mon, 5 Aug 2019 13:32:09 +0000 (UTC)
commit c6236ac1405adb5f0b0a42627bdf980be62e38e3
Author: Michael Natterer <mitch gimp org>
Date: Mon Aug 5 15:31:12 2019 +0200
pdb, libgimp: more docs and annotations
libgimp/gimp.c | 2 +-
libgimp/gimpcontext_pdb.c | 2 +-
libgimp/gimpgimprc_pdb.c | 2 +-
libgimp/gimpimage_pdb.c | 2 +-
libgimp/gimpparamspecs.c | 153 ++++++++++++++++++++++++++++++++++++++++++++
libgimp/gimptextlayer_pdb.c | 2 +-
libgimp/gimpunit_pdb.c | 2 +-
pdb/pdb.pl | 1 +
8 files changed, 160 insertions(+), 6 deletions(-)
---
diff --git a/libgimp/gimp.c b/libgimp/gimp.c
index bfb71b9db3..e208763f98 100644
--- a/libgimp/gimp.c
+++ b/libgimp/gimp.c
@@ -693,7 +693,7 @@ gimp_main_internal (GType plug_in_type,
* This function returns the plug-in's #GimpPlugIn instance, which can
* exist exactly once per running plug-in program.
*
- * Returns: The plug-in's #GimpPlugIn singleton, or %NULL.
+ * Returns: (transfer none): The plug-in's #GimpPlugIn singleton, or %NULL.
*
* Since: 3.0
**/
diff --git a/libgimp/gimpcontext_pdb.c b/libgimp/gimpcontext_pdb.c
index 8e1afcf28a..0c39b156aa 100644
--- a/libgimp/gimpcontext_pdb.c
+++ b/libgimp/gimpcontext_pdb.c
@@ -747,7 +747,7 @@ gimp_context_set_line_width (gdouble line_width)
*
* This procedure returns the line width unit setting.
*
- * Returns: The line width unit setting.
+ * Returns: (transfer none): The line width unit setting.
*
* Since: 2.10
**/
diff --git a/libgimp/gimpgimprc_pdb.c b/libgimp/gimpgimprc_pdb.c
index 86825e85f2..de5d27540c 100644
--- a/libgimp/gimpgimprc_pdb.c
+++ b/libgimp/gimpgimprc_pdb.c
@@ -154,7 +154,7 @@ gimp_get_default_comment (void)
*
* Returns the default unit's integer ID.
*
- * Returns: Default unit.
+ * Returns: (transfer none): Default unit.
*
* Since: 2.4
**/
diff --git a/libgimp/gimpimage_pdb.c b/libgimp/gimpimage_pdb.c
index 755b027c18..35c32d5b7e 100644
--- a/libgimp/gimpimage_pdb.c
+++ b/libgimp/gimpimage_pdb.c
@@ -2807,7 +2807,7 @@ gimp_image_set_resolution (gint32 image_ID,
* gimp_unit_*() procedure definitions for the valid range of unit IDs
* and a description of the unit system.
*
- * Returns: The unit.
+ * Returns: (transfer none): The unit.
**/
GimpUnit
gimp_image_get_unit (gint32 image_ID)
diff --git a/libgimp/gimpparamspecs.c b/libgimp/gimpparamspecs.c
index a1088f55d8..cb43edbf96 100644
--- a/libgimp/gimpparamspecs.c
+++ b/libgimp/gimpparamspecs.c
@@ -148,6 +148,23 @@ gimp_param_image_id_values_cmp (GParamSpec *pspec,
return 0;
}
+/**
+ * gimp_param_spec_image_id:
+ * @name: Canonical name of the property specified.
+ * @nick: Nick name of the property specified.
+ * @blurb: Description of the property specified.
+ * @none_ok: Whether no ID is a valid value.
+ * @flags: Flags for the property specified.
+ *
+ * Creates a new #GimpParamSpecImageID specifying a
+ * #GIMP_TYPE_IMAGE_ID property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Returns: (transfer full): The newly created #GimpParamSpecImageID.
+ *
+ * Since: 3.0
+ **/
GParamSpec *
gimp_param_spec_image_id (const gchar *name,
const gchar *nick,
@@ -303,6 +320,23 @@ gimp_param_item_id_values_cmp (GParamSpec *pspec,
return 0;
}
+/**
+ * gimp_param_spec_item_id:
+ * @name: Canonical name of the property specified.
+ * @nick: Nick name of the property specified.
+ * @blurb: Description of the property specified.
+ * @none_ok: Whether no ID is a valid value.
+ * @flags: Flags for the property specified.
+ *
+ * Creates a new #GimpParamSpecItemID specifying a
+ * #GIMP_TYPE_ITEM_ID property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Returns: (transfer full): The newly created #GimpParamSpecItemID.
+ *
+ * Since: 3.0
+ **/
GParamSpec *
gimp_param_spec_item_id (const gchar *name,
const gchar *nick,
@@ -423,6 +457,23 @@ gimp_param_drawable_id_validate (GParamSpec *pspec,
return FALSE;
}
+/**
+ * gimp_param_spec_drawable_id:
+ * @name: Canonical name of the property specified.
+ * @nick: Nick name of the property specified.
+ * @blurb: Description of the property specified.
+ * @none_ok: Whether no ID is a valid value.
+ * @flags: Flags for the property specified.
+ *
+ * Creates a new #GimpParamSpecDrawableID specifying a
+ * #GIMP_TYPE_DRAWABLE_ID property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Returns: (transfer full): The newly created #GimpParamSpecDrawableID.
+ *
+ * Since: 3.0
+ **/
GParamSpec *
gimp_param_spec_drawable_id (const gchar *name,
const gchar *nick,
@@ -543,6 +594,23 @@ gimp_param_layer_id_validate (GParamSpec *pspec,
return FALSE;
}
+/**
+ * gimp_param_spec_layer_id:
+ * @name: Canonical name of the property specified.
+ * @nick: Nick name of the property specified.
+ * @blurb: Description of the property specified.
+ * @none_ok: Whether no ID is a valid value.
+ * @flags: Flags for the property specified.
+ *
+ * Creates a new #GimpParamSpecLayerID specifying a
+ * #GIMP_TYPE_LAYER_ID property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Returns: (transfer full): The newly created #GimpParamSpecLayerID.
+ *
+ * Since: 3.0
+ **/
GParamSpec *
gimp_param_spec_layer_id (const gchar *name,
const gchar *nick,
@@ -663,6 +731,23 @@ gimp_param_channel_id_validate (GParamSpec *pspec,
return FALSE;
}
+/**
+ * gimp_param_spec_channel_id:
+ * @name: Canonical name of the property specified.
+ * @nick: Nick name of the property specified.
+ * @blurb: Description of the property specified.
+ * @none_ok: Whether no ID is a valid value.
+ * @flags: Flags for the property specified.
+ *
+ * Creates a new #GimpParamSpecChannelID specifying a
+ * #GIMP_TYPE_CHANNEL_ID property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Returns: (transfer full): The newly created #GimpParamSpecChannelID.
+ *
+ * Since: 3.0
+ **/
GParamSpec *
gimp_param_spec_channel_id (const gchar *name,
const gchar *nick,
@@ -783,6 +868,23 @@ gimp_param_layer_mask_id_validate (GParamSpec *pspec,
return FALSE;
}
+/**
+ * gimp_param_spec_layer_mask_id:
+ * @name: Canonical name of the property specified.
+ * @nick: Nick name of the property specified.
+ * @blurb: Description of the property specified.
+ * @none_ok: Whether no ID is a valid value.
+ * @flags: Flags for the property specified.
+ *
+ * Creates a new #GimpParamSpecLayerMaskID specifying a
+ * #GIMP_TYPE_LAYER_MASK_ID property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Returns: (transfer full): The newly created #GimpParamSpecLayerMaskID.
+ *
+ * Since: 3.0
+ **/
GParamSpec *
gimp_param_spec_layer_mask_id (const gchar *name,
const gchar *nick,
@@ -903,6 +1005,23 @@ gimp_param_selection_id_validate (GParamSpec *pspec,
return FALSE;
}
+/**
+ * gimp_param_spec_selection_id:
+ * @name: Canonical name of the property specified.
+ * @nick: Nick name of the property specified.
+ * @blurb: Description of the property specified.
+ * @none_ok: Whether no ID is a valid value.
+ * @flags: Flags for the property specified.
+ *
+ * Creates a new #GimpParamSpecSelectionID specifying a
+ * #GIMP_TYPE_SELECTION_ID property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Returns: (transfer full): The newly created #GimpParamSpecSelectionID.
+ *
+ * Since: 3.0
+ **/
GParamSpec *
gimp_param_spec_selection_id (const gchar *name,
const gchar *nick,
@@ -1023,6 +1142,23 @@ gimp_param_vectors_id_validate (GParamSpec *pspec,
return FALSE;
}
+/**
+ * gimp_param_spec_vectors_id:
+ * @name: Canonical name of the property specified.
+ * @nick: Nick name of the property specified.
+ * @blurb: Description of the property specified.
+ * @none_ok: Whether no ID is a valid value.
+ * @flags: Flags for the property specified.
+ *
+ * Creates a new #GimpParamSpecVectorsID specifying a
+ * #GIMP_TYPE_VECTORS_ID property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Returns: (transfer full): The newly created #GimpParamSpecVectorsID.
+ *
+ * Since: 3.0
+ **/
GParamSpec *
gimp_param_spec_vectors_id (const gchar *name,
const gchar *nick,
@@ -1178,6 +1314,23 @@ gimp_param_display_id_values_cmp (GParamSpec *pspec,
return 0;
}
+/**
+ * gimp_param_spec_vectors_id:
+ * @name: Canonical name of the property specified.
+ * @nick: Nick name of the property specified.
+ * @blurb: Description of the property specified.
+ * @none_ok: Whether no ID is a valid value.
+ * @flags: Flags for the property specified.
+ *
+ * Creates a new #GimpParamSpecVectorsID specifying a
+ * #GIMP_TYPE_VECTORS_ID property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Returns: (transfer full): The newly created #GimpParamSpecVectorsID.
+ *
+ * Since: 3.0
+ **/
GParamSpec *
gimp_param_spec_display_id (const gchar *name,
const gchar *nick,
diff --git a/libgimp/gimptextlayer_pdb.c b/libgimp/gimptextlayer_pdb.c
index a04927cdf8..badbc33362 100644
--- a/libgimp/gimptextlayer_pdb.c
+++ b/libgimp/gimptextlayer_pdb.c
@@ -283,7 +283,7 @@ gimp_text_layer_set_font (gint32 layer_ID,
/**
* gimp_text_layer_get_font_size:
* @layer_ID: The text layer.
- * @unit: (out): The unit used for the font size.
+ * @unit: (out) (transfer none): The unit used for the font size.
*
* Get the font size from a text layer.
*
diff --git a/libgimp/gimpunit_pdb.c b/libgimp/gimpunit_pdb.c
index 9a03395fa7..49957aaec6 100644
--- a/libgimp/gimpunit_pdb.c
+++ b/libgimp/gimpunit_pdb.c
@@ -112,7 +112,7 @@ _gimp_unit_get_number_of_built_in_units (void)
* will have to set it to FALSE with gimp_unit_set_deletion_flag() to
* make it persistent.
*
- * Returns: The new unit's ID.
+ * Returns: (transfer none): The new unit's ID.
**/
GimpUnit
_gimp_unit_new (const gchar *identifier,
diff --git a/pdb/pdb.pl b/pdb/pdb.pl
index 20e8c9b96d..e1a7ff20a7 100644
--- a/pdb/pdb.pl
+++ b/pdb/pdb.pl
@@ -346,6 +346,7 @@ package Gimp::CodeGen::pdb;
type => 'GimpUnit ',
const_type => 'GimpUnit ',
init_value => '0',
+ out_annotate => '(transfer none)',
get_value_func => '$var = g_value_get_int ($value)',
dup_value_func => '$var = g_value_get_int ($value)',
set_value_func => 'g_value_set_int ($value, $var)',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]