pdb: fix generation of "Returns:" to not line-wrap annotations

Also generate comments like "Must be freed with g_free()" for all
return values instead of manually and inconsistently having them on
some return values only.
This commit is contained in:
Michael Natterer 2019-08-04 22:09:04 +02:00
parent 3f5595aadc
commit 360314eda7
30 changed files with 205 additions and 152 deletions

View file

@ -938,7 +938,7 @@ register_brush_procs (GimpPDB *pdb)
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("actual-name",
"actual name",
"The actual new brush name. The returned value must be freed with g_free()",
"The actual new brush name.",
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
@ -969,7 +969,7 @@ register_brush_procs (GimpPDB *pdb)
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("copy-name",
"copy name",
"The name of the brush's copy. The returned value must be freed with g_free()",
"The name of the brush's copy.",
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
@ -1037,7 +1037,7 @@ register_brush_procs (GimpPDB *pdb)
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("actual-name",
"actual name",
"The actual new name of the brush. The returned value must be freed with g_free()",
"The actual new name of the brush.",
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));

View file

@ -2815,7 +2815,7 @@ register_image_procs (GimpPDB *pdb)
gimp_procedure_add_return_value (procedure,
gimp_param_spec_int32_array ("image-ids",
"image ids",
"The list of images currently open. The returned value must be freed with g_free()",
"The list of images currently open.",
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@ -3142,7 +3142,7 @@ register_image_procs (GimpPDB *pdb)
gimp_procedure_add_return_value (procedure,
gimp_param_spec_int32_array ("layer-ids",
"layer ids",
"The list of layers contained in the image. The returned value must be freed with g_free()",
"The list of layers contained in the image.",
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@ -3176,7 +3176,7 @@ register_image_procs (GimpPDB *pdb)
gimp_procedure_add_return_value (procedure,
gimp_param_spec_int32_array ("channel-ids",
"channel ids",
"The list of channels contained in the image. The returned value must be freed with g_free()",
"The list of channels contained in the image.",
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@ -3210,7 +3210,7 @@ register_image_procs (GimpPDB *pdb)
gimp_procedure_add_return_value (procedure,
gimp_param_spec_int32_array ("vector-ids",
"vector ids",
"The list of vectors contained in the image. The returned value must be freed with g_free()",
"The list of vectors contained in the image.",
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@ -4124,7 +4124,7 @@ register_image_procs (GimpPDB *pdb)
gimp_procedure_add_return_value (procedure,
gimp_param_spec_int8_array ("colormap",
"colormap",
"The image's colormap. The returned value must be freed with g_free()",
"The image's colormap.",
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@ -4709,7 +4709,7 @@ register_image_procs (GimpPDB *pdb)
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("filename",
"filename",
"The filename. The returned value must be freed with g_free()",
"The filename.",
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
@ -4769,7 +4769,7 @@ register_image_procs (GimpPDB *pdb)
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("uri",
"uri",
"The URI. The returned value must be freed with g_free()",
"The URI.",
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
@ -4799,7 +4799,7 @@ register_image_procs (GimpPDB *pdb)
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("uri",
"uri",
"The imported URI. The returned value must be freed with g_free()",
"The imported URI.",
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
@ -4829,7 +4829,7 @@ register_image_procs (GimpPDB *pdb)
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("uri",
"uri",
"The imported URI. The returned value must be freed with g_free()",
"The imported URI.",
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
@ -4859,7 +4859,7 @@ register_image_procs (GimpPDB *pdb)
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("uri",
"uri",
"The exported URI. The returned value must be freed with g_free()",
"The exported URI.",
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
@ -4889,7 +4889,7 @@ register_image_procs (GimpPDB *pdb)
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("name",
"name",
"The name. The returned value must be freed with g_free()",
"The name.",
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));

View file

@ -358,7 +358,7 @@ register_image_color_profile_procs (GimpPDB *pdb)
gimp_procedure_add_return_value (procedure,
gimp_param_spec_int8_array ("profile-data",
"profile data",
"The image's serialized color profile. The returned value must be freed with g_free()",
"The image's serialized color profile.",
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@ -392,7 +392,7 @@ register_image_color_profile_procs (GimpPDB *pdb)
gimp_procedure_add_return_value (procedure,
gimp_param_spec_int8_array ("profile-data",
"profile data",
"The image's serialized color profile. The returned value must be freed with g_free()",
"The image's serialized color profile.",
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);

View file

@ -47,6 +47,7 @@
* GIMP.
*
* Returns: (transfer full): GIMP version number.
* The returned value must be freed with g_free().
**/
gchar *
gimp_version (void)
@ -213,9 +214,9 @@ gimp_get_parasite (const gchar *name)
*
* Returns a list of all currently attached global parasites.
*
* Returns: (array length=num_parasites) (element-type gchar*)
* (transfer full): The names of currently attached parasites. The
* returned value must be freed with g_strfreev().
* Returns: (array length=num_parasites) (element-type gchar*) (transfer full):
* The names of currently attached parasites.
* The returned value must be freed with g_strfreev().
*
* Since: 2.8
**/
@ -255,6 +256,7 @@ gimp_get_parasite_list (gint *num_parasites)
* user's gimprc.
*
* Returns: (transfer full): The new temp filename.
* The returned value must be freed with g_free().
**/
gchar *
gimp_temp_name (const gchar *extension)

View file

@ -42,8 +42,8 @@
*
* This procedure creates a new, uninitialized brush.
*
* Returns: (transfer full): The actual new brush name. The returned
* value must be freed with g_free().
* Returns: (transfer full): The actual new brush name.
* The returned value must be freed with g_free().
*
* Since: 2.2
**/
@ -78,8 +78,8 @@ gimp_brush_new (const gchar *name)
*
* This procedure creates an identical brush by a different name.
*
* Returns: (transfer full): The name of the brush's copy. The returned
* value must be freed with g_free().
* Returns: (transfer full): The name of the brush's copy.
* The returned value must be freed with g_free().
*
* Since: 2.2
**/
@ -150,8 +150,8 @@ gimp_brush_is_generated (const gchar *name)
*
* This procedure renames a brush.
*
* Returns: (transfer full): The actual new name of the brush. The
* returned value must be freed with g_free().
* Returns: (transfer full): The actual new name of the brush.
* The returned value must be freed with g_free().
*
* Since: 2.2
**/

View file

@ -75,9 +75,9 @@ gimp_brushes_refresh (void)
* Each name returned can be used as input to the
* gimp_context_set_brush() procedure.
*
* Returns: (array length=num_brushes) (element-type gchar*) (transfer
* full): The list of brush names. The returned value must be freed
* with g_strfreev().
* Returns: (array length=num_brushes) (element-type gchar*) (transfer full):
* The list of brush names.
* The returned value must be freed with g_strfreev().
**/
gchar **
gimp_brushes_get_list (const gchar *filter,

View file

@ -44,9 +44,9 @@
* This procedure returns a complete listing of available named
* buffers.
*
* Returns: (array length=num_buffers) (element-type gchar*) (transfer
* full): The list of buffer names. The returned value must be freed
* with g_strfreev().
* Returns: (array length=num_buffers) (element-type gchar*) (transfer full):
* The list of buffer names.
* The returned value must be freed with g_strfreev().
*
* Since: 2.4
**/
@ -89,6 +89,7 @@ gimp_buffers_get_list (const gchar *filter,
* This procedure renames a named buffer.
*
* Returns: (transfer full): The real name given to the buffer.
* The returned value must be freed with g_free().
*
* Since: 2.4
**/

View file

@ -189,6 +189,7 @@ gimp_context_list_paint_methods (gint *num_paint_methods,
* method.
*
* Returns: (transfer full): The name of the active paint method.
* The returned value must be freed with g_free().
*
* Since: 2.4
**/
@ -1197,6 +1198,7 @@ gimp_context_set_line_dash_pattern (gint num_dashes,
* application of paint to the image.
*
* Returns: (transfer full): The name of the active brush.
* The returned value must be freed with g_free().
*
* Since: 2.2
**/
@ -1763,6 +1765,7 @@ gimp_context_set_brush_force (gdouble force)
* dynamics to control the application of paint to the image.
*
* Returns: (transfer full): The name of the active paint dynamics.
* The returned value must be freed with g_free().
*
* Since: 2.8
**/
@ -1835,6 +1838,7 @@ gimp_context_set_dynamics (const gchar *name)
* brush.
*
* Returns: (transfer full): The name of the active MyPaint brush.
* The returned value must be freed with g_free().
*
* Since: 2.10
**/
@ -1908,6 +1912,7 @@ gimp_context_set_mypaint_brush (const gchar *name)
* to control the application of paint to the image.
*
* Returns: (transfer full): The name of the active pattern.
* The returned value must be freed with g_free().
*
* Since: 2.2
**/
@ -1979,6 +1984,7 @@ gimp_context_set_pattern (const gchar *name)
* This procedure returns the name of the currently active gradient.
*
* Returns: (transfer full): The name of the active gradient.
* The returned value must be freed with g_free().
*
* Since: 2.2
**/
@ -2384,6 +2390,7 @@ gimp_context_set_gradient_reverse (gboolean reverse)
* This procedure returns the name of the the currently active palette.
*
* Returns: (transfer full): The name of the active palette.
* The returned value must be freed with g_free().
*
* Since: 2.2
**/
@ -2455,6 +2462,7 @@ gimp_context_set_palette (const gchar *name)
* This procedure returns the name of the currently active font.
*
* Returns: (transfer full): The name of the active font.
* The returned value must be freed with g_free().
*
* Since: 2.2
**/

View file

@ -46,6 +46,7 @@
* must be used.
*
* Returns: (transfer full): The drawable's Babl format.
* The returned value must be freed with g_free().
*
* Since: 2.10
**/
@ -83,6 +84,7 @@ _gimp_drawable_get_format (gint32 drawable_ID)
* and gimp_drawable_sub_thmbnail().
*
* Returns: (transfer full): The drawable's thumbnail Babl format.
* The returned value must be freed with g_free().
*
* Since: 2.10.14
**/
@ -714,8 +716,9 @@ gimp_drawable_update (gint32 drawable_ID,
* The 'num_channels' argument must always be equal to the
* bytes-per-pixel value for the specified drawable.
*
* Returns: (array length=num_channels) (element-type guint8) (transfer
* full): The pixel value.
* Returns: (array length=num_channels) (element-type guint8) (transfer full):
* The pixel value.
* The returned value must be freed with g_free().
**/
guint8 *
gimp_drawable_get_pixel (gint32 drawable_ID,

View file

@ -77,9 +77,9 @@ gimp_dynamics_refresh (void)
* This procedure returns a list of the paint dynamics that are
* currently available.
*
* Returns: (array length=num_dynamics) (element-type gchar*) (transfer
* full): The list of paint dynamics names. The returned value must be
* freed with g_strfreev().
* Returns: (array length=num_dynamics) (element-type gchar*) (transfer full):
* The list of paint dynamics names.
* The returned value must be freed with g_strfreev().
*
* Since: 2.8
**/

View file

@ -49,8 +49,7 @@
* area lies completely outside the bounds of the current drawable and
* there is nothing to copy from.
*
* Returns: TRUE if the cut was successful, FALSE if there was nothing
* to copy from.
* Returns: TRUE if the cut was successful, FALSE if there was nothing to copy from.
**/
gboolean
gimp_edit_cut (gint32 drawable_ID)
@ -90,8 +89,7 @@ gimp_edit_cut (gint32 drawable_ID)
* completely outside the bounds of the current drawable and there is
* nothing to copy from.
*
* Returns: TRUE if the cut was successful, FALSE if there was nothing
* to copy from.
* Returns: TRUE if the cut was successful, FALSE if there was nothing to copy from.
**/
gboolean
gimp_edit_copy (gint32 drawable_ID)
@ -254,8 +252,9 @@ gimp_edit_paste_as_new_image (void)
* later pasting, regardless of any intermediate copy or cut
* operations.
*
* Returns: (transfer full): The real name given to the buffer, or NULL
* if the cut failed.
* Returns: (transfer full):
* The real name given to the buffer, or NULL if the cut failed.
* The returned value must be freed with g_free().
*
* Since: 2.4
**/
@ -297,8 +296,9 @@ gimp_edit_named_cut (gint32 drawable_ID,
* later pasting, regardless of any intermediate copy or cut
* operations.
*
* Returns: (transfer full): The real name given to the buffer, or NULL
* if the copy failed.
* Returns: (transfer full):
* The real name given to the buffer, or NULL if the copy failed.
* The returned value must be freed with g_free().
*
* Since: 2.4
**/
@ -340,8 +340,9 @@ gimp_edit_named_copy (gint32 drawable_ID,
* available for later pasting, regardless of any intermediate copy or
* cut operations.
*
* Returns: (transfer full): The real name given to the buffer, or NULL
* if the copy failed.
* Returns: (transfer full):
* The real name given to the buffer, or NULL if the copy failed.
* The returned value must be freed with g_free().
*
* Since: 2.4
**/

View file

@ -141,8 +141,9 @@ gimp_file_load_layer (GimpRunMode run_mode,
* needs to be added to the existing image with
* gimp_image_insert_layer().
*
* Returns: (array length=num_layers) (element-type gint32) (transfer
* full): The list of loaded layers.
* Returns: (array length=num_layers) (element-type gint32) (transfer full):
* The list of loaded layers.
* The returned value must be freed with g_free().
*
* Since: 2.4
**/

View file

@ -75,9 +75,9 @@ gimp_fonts_refresh (void)
* This procedure returns a list of the fonts that are currently
* available.
*
* Returns: (array length=num_fonts) (element-type gchar*) (transfer
* full): The list of font names. The returned value must be freed with
* g_strfreev().
* Returns: (array length=num_fonts) (element-type gchar*) (transfer full):
* The list of font names.
* The returned value must be freed with g_strfreev().
**/
gchar **
gimp_fonts_get_list (const gchar *filter,

View file

@ -50,8 +50,8 @@
* string. Entries not corresponding to this format will cause warnings
* to be issued on gimprc parsing and will not be queryable.
*
* Returns: (transfer full): The value associated with the queried
* token.
* Returns: (transfer full): The value associated with the queried token.
* The returned value must be freed with g_free().
**/
gchar *
gimp_gimprc_query (const gchar *token)
@ -124,6 +124,7 @@ gimp_gimprc_set (const gchar *token,
* Returns a copy of the default image comment.
*
* Returns: (transfer full): Default image comment.
* The returned value must be freed with g_free().
**/
gchar *
gimp_get_default_comment (void)
@ -231,6 +232,7 @@ gimp_get_monitor_resolution (gdouble *xres,
* object representing the current color management configuration.
*
* Returns: (transfer full): Serialized color management configuration.
* The returned value must be freed with g_free().
*
* Since: 2.4
**/
@ -263,6 +265,7 @@ _gimp_get_color_configuration (void)
* Returns a copy of the list of modules which should not be loaded.
*
* Returns: (transfer full): The list of modules.
* The returned value must be freed with g_free().
**/
gchar *
gimp_get_module_load_inhibit (void)

View file

@ -43,6 +43,7 @@
* This procedure creates a new, uninitialized gradient
*
* Returns: (transfer full): The actual new gradient name.
* The returned value must be freed with g_free().
*
* Since: 2.2
**/
@ -78,6 +79,7 @@ gimp_gradient_new (const gchar *name)
* This procedure creates an identical gradient by a different name
*
* Returns: (transfer full): The name of the gradient's copy.
* The returned value must be freed with g_free().
*
* Since: 2.2
**/
@ -149,6 +151,7 @@ gimp_gradient_is_editable (const gchar *name)
* This procedure renames a gradient
*
* Returns: (transfer full): The actual new name of the gradient.
* The returned value must be freed with g_free().
*
* Since: 2.2
**/

View file

@ -75,9 +75,9 @@ gimp_gradients_refresh (void)
* loaded. You can later use the gimp_context_set_gradient() function
* to set the active gradient.
*
* Returns: (array length=num_gradients) (element-type gchar*)
* (transfer full): The list of gradient names. The returned value must
* be freed with g_strfreev().
* Returns: (array length=num_gradients) (element-type gchar*) (transfer full):
* The list of gradient names.
* The returned value must be freed with g_strfreev().
**/
gchar **
gimp_gradients_get_list (const gchar *filter,

View file

@ -79,9 +79,9 @@ gimp_image_is_valid (gint32 image_ID)
*
* This procedure returns the list of images currently open in GIMP.
*
* Returns: (array length=num_images) (element-type gint32) (transfer
* full): The list of images currently open. The returned value must be
* freed with g_free().
* Returns: (array length=num_images) (element-type gint32) (transfer full):
* The list of images currently open.
* The returned value must be freed with g_free().
**/
gint *
gimp_image_list (gint *num_images)
@ -463,9 +463,9 @@ gimp_image_height (gint32 image_ID)
* This procedure returns the list of layers contained in the specified
* image. The order of layers is from topmost to bottommost.
*
* Returns: (array length=num_layers) (element-type gint32) (transfer
* full): The list of layers contained in the image. The returned value
* must be freed with g_free().
* Returns: (array length=num_layers) (element-type gint32) (transfer full):
* The list of layers contained in the image.
* The returned value must be freed with g_free().
**/
gint *
gimp_image_get_layers (gint32 image_ID,
@ -509,9 +509,9 @@ gimp_image_get_layers (gint32 image_ID,
* \"channels\" are custom channels and do not include the image's
* color components.
*
* Returns: (array length=num_channels) (element-type gint32) (transfer
* full): The list of channels contained in the image. The returned
* value must be freed with g_free().
* Returns: (array length=num_channels) (element-type gint32) (transfer full):
* The list of channels contained in the image.
* The returned value must be freed with g_free().
**/
gint *
gimp_image_get_channels (gint32 image_ID,
@ -552,9 +552,9 @@ gimp_image_get_channels (gint32 image_ID,
* This procedure returns the list of vectors contained in the
* specified image.
*
* Returns: (array length=num_vectors) (element-type gint32) (transfer
* full): The list of vectors contained in the image. The returned
* value must be freed with g_free().
* Returns: (array length=num_vectors) (element-type gint32) (transfer full):
* The list of vectors contained in the image.
* The returned value must be freed with g_free().
*
* Since: 2.4
**/
@ -1732,9 +1732,9 @@ gimp_image_merge_down (gint32 image_ID,
* 3. If the image is not in Indexed color mode, no colormap is
* returned.
*
* Returns: (array length=num_bytes) (element-type guint8) (transfer
* full): The image's colormap. The returned value must be freed with
* g_free().
* Returns: (array length=num_bytes) (element-type guint8) (transfer full):
* The image's colormap.
* The returned value must be freed with g_free().
**/
guint8 *
_gimp_image_get_colormap (gint32 image_ID,
@ -1818,6 +1818,7 @@ _gimp_image_set_colormap (gint32 image_ID,
* Returns exif/iptc/xmp metadata from the image.
*
* Returns: (transfer full): The exif/ptc/xmp metadata as a string.
* The returned value must be freed with g_free().
**/
gchar *
_gimp_image_get_metadata (gint32 image_ID)
@ -2448,8 +2449,8 @@ gimp_image_set_component_visible (gint32 image_ID,
* Otherwise, this function returns %NULL. See also
* gimp_image_get_uri().
*
* Returns: (transfer full): The filename. The returned value must be
* freed with g_free().
* Returns: (transfer full): The filename.
* The returned value must be freed with g_free().
**/
gchar *
gimp_image_get_filename (gint32 image_ID)
@ -2525,8 +2526,8 @@ gimp_image_set_filename (gint32 image_ID,
* and not yet saved, or gimp-image-get-exported-uri if the image has
* been exported to a non-GIMP file format.
*
* Returns: (transfer full): The URI. The returned value must be freed
* with g_free().
* Returns: (transfer full): The URI.
* The returned value must be freed with g_free().
*
* Since: 2.8
**/
@ -2562,8 +2563,8 @@ gimp_image_get_uri (gint32 image_ID)
* This procedure returns the XCF URI associated with the image. If
* there is no such URI, this procedure returns %NULL.
*
* Returns: (transfer full): The imported URI. The returned value must
* be freed with g_free().
* Returns: (transfer full): The imported URI.
* The returned value must be freed with g_free().
*
* Since: 2.8
**/
@ -2601,8 +2602,8 @@ gimp_image_get_xcf_uri (gint32 image_ID)
* image was not imported, or has since been saved in the native Gimp
* format, this procedure returns %NULL.
*
* Returns: (transfer full): The imported URI. The returned value must
* be freed with g_free().
* Returns: (transfer full): The imported URI.
* The returned value must be freed with g_free().
*
* Since: 2.8
**/
@ -2639,8 +2640,8 @@ gimp_image_get_imported_uri (gint32 image_ID)
* if the image was exported a non-native GIMP format. If the image was
* not exported, this procedure returns %NULL.
*
* Returns: (transfer full): The exported URI. The returned value must
* be freed with g_free().
* Returns: (transfer full): The exported URI.
* The returned value must be freed with g_free().
*
* Since: 2.8
**/
@ -2681,8 +2682,8 @@ gimp_image_get_exported_uri (gint32 image_ID)
* '(imported)' etc. and should only be used to label user interface
* elements. Never use it to construct filenames.
*
* Returns: (transfer full): The name. The returned value must be freed
* with g_free().
* Returns: (transfer full): The name.
* The returned value must be freed with g_free().
**/
gchar *
gimp_image_get_name (gint32 image_ID)
@ -3316,9 +3317,9 @@ gimp_image_get_parasite (gint32 image_ID,
*
* Returns a list of all currently attached parasites.
*
* Returns: (array length=num_parasites) (element-type gchar*)
* (transfer full): The names of currently attached parasites. The
* returned value must be freed with g_strfreev().
* Returns: (array length=num_parasites) (element-type gchar*) (transfer full):
* The names of currently attached parasites.
* The returned value must be freed with g_strfreev().
*
* Since: 2.8
**/

View file

@ -44,9 +44,9 @@
* This procedure returns the image's color profile, or NULL if the
* image has no color profile assigned.
*
* Returns: (array length=num_bytes) (element-type guint8) (transfer
* full): The image's serialized color profile. The returned value must
* be freed with g_free().
* Returns: (array length=num_bytes) (element-type guint8) (transfer full):
* The image's serialized color profile.
* The returned value must be freed with g_free().
*
* Since: 2.10
**/
@ -92,9 +92,9 @@ _gimp_image_get_color_profile (gint32 image_ID,
* or a generated default RGB or grayscale profile, according to the
* image's type.
*
* Returns: (array length=num_bytes) (element-type guint8) (transfer
* full): The image's serialized color profile. The returned value must
* be freed with g_free().
* Returns: (array length=num_bytes) (element-type guint8) (transfer full):
* The image's serialized color profile.
* The returned value must be freed with g_free().
*
* Since: 2.10
**/

View file

@ -469,8 +469,9 @@ gimp_item_get_parent (gint32 item_ID)
* This procedure returns the list of items which are children of the
* specified item. The order is topmost to bottommost.
*
* Returns: (array length=num_children) (element-type gint32) (transfer
* full): The item's list of children.
* Returns: (array length=num_children) (element-type gint32) (transfer full):
* The item's list of children.
* The returned value must be freed with g_free().
*
* Since: 2.8
**/
@ -585,6 +586,7 @@ gimp_item_set_expanded (gint32 item_ID,
* This procedure returns the specified item's name.
*
* Returns: (transfer full): The item name.
* The returned value must be freed with g_free().
*
* Since: 2.8
**/
@ -1217,9 +1219,9 @@ gimp_item_get_parasite (gint32 item_ID,
*
* Returns a list of all parasites currently attached the an item.
*
* Returns: (array length=num_parasites) (element-type gchar*)
* (transfer full): The names of currently attached parasites. The
* returned value must be freed with g_strfreev().
* Returns: (array length=num_parasites) (element-type gchar*) (transfer full):
* The names of currently attached parasites.
* The returned value must be freed with g_strfreev().
*
* Since: 2.8
**/

View file

@ -43,6 +43,7 @@
* This procedure creates a new, uninitialized palette
*
* Returns: (transfer full): The actual new palette name.
* The returned value must be freed with g_free().
*
* Since: 2.2
**/
@ -78,6 +79,7 @@ gimp_palette_new (const gchar *name)
* This procedure creates an identical palette by a different name
*
* Returns: (transfer full): The name of the palette's copy.
* The returned value must be freed with g_free().
*
* Since: 2.2
**/
@ -114,6 +116,7 @@ gimp_palette_duplicate (const gchar *name)
* This procedure renames a palette
*
* Returns: (transfer full): The actual new name of the palette.
* The returned value must be freed with g_free().
*
* Since: 2.2
**/
@ -263,8 +266,9 @@ gimp_palette_get_info (const gchar *name,
*
* This procedure retrieves all color entries of the specified palette.
*
* Returns: (array length=num_colors) (element-type GimpRGB) (transfer
* full): The colors in the palette.
* Returns: (array length=num_colors) (element-type GimpRGB) (transfer full):
* The colors in the palette.
* The returned value must be freed with g_free().
*
* Since: 2.6
**/

View file

@ -75,9 +75,9 @@ gimp_palettes_refresh (void)
* Each name returned can be used as input to the command
* gimp_context_set_palette().
*
* Returns: (array length=num_palettes) (element-type gchar*) (transfer
* full): The list of palette names. The returned value must be freed
* with g_strfreev().
* Returns: (array length=num_palettes) (element-type gchar*) (transfer full):
* The list of palette names.
* The returned value must be freed with g_strfreev().
**/
gchar **
gimp_palettes_get_list (const gchar *filter,

View file

@ -75,9 +75,9 @@ gimp_patterns_refresh (void)
* patterns. Each name returned can be used as input to the
* gimp_context_set_pattern().
*
* Returns: (array length=num_patterns) (element-type gchar*) (transfer
* full): The list of pattern names. The returned value must be freed
* with g_strfreev().
* Returns: (array length=num_patterns) (element-type gchar*) (transfer full):
* The list of pattern names.
* The returned value must be freed with g_strfreev().
**/
gchar **
gimp_patterns_get_list (const gchar *filter,

View file

@ -43,8 +43,8 @@
* This procedure generates a temporary PDB entry name that is
* guaranteed to be unique.
*
* Returns: (transfer full): A unique temporary name for a temporary
* PDB entry.
* Returns: (transfer full): A unique temporary name for a temporary PDB entry.
* The returned value must be freed with g_free().
**/
gchar *
gimp_procedural_db_temp_name (void)

View file

@ -99,6 +99,7 @@ gimp_text_layer_new (gint32 image_ID,
* This procedure returns the text from a text layer as a string.
*
* Returns: (transfer full): The text from the specified text layer.
* The returned value must be freed with g_free().
*
* Since: 2.6
**/
@ -175,8 +176,9 @@ gimp_text_layer_set_text (gint32 layer_ID,
* markup. Note: Setting the markup of a text layer using Pango's
* markup is not supported for now.
*
* Returns: (transfer full): The markup which represents the style of
* the specified text layer.
* Returns: (transfer full):
* The markup which represents the style of the specified text layer.
* The returned value must be freed with g_free().
*
* Since: 2.8
**/
@ -211,8 +213,9 @@ gimp_text_layer_get_markup (gint32 layer_ID)
*
* This procedure returns the name of the font from a text layer.
*
* Returns: (transfer full): The font which is used in the specified
* text layer.
* Returns: (transfer full):
* The font which is used in the specified text layer.
* The returned value must be freed with g_free().
*
* Since: 2.6
**/
@ -371,8 +374,7 @@ gimp_text_layer_set_font_size (gint32 layer_ID,
* This procedure checks if antialiasing is enabled in the specified
* text layer.
*
* Returns: A flag which is true if antialiasing is used for rendering
* the font in the text layer.
* Returns: A flag which is true if antialiasing is used for rendering the font in the text layer.
*
* Since: 2.6
**/
@ -599,6 +601,7 @@ gimp_text_layer_set_kerning (gint32 layer_ID,
* in the text layer.
*
* Returns: (transfer full): The language used in the text layer.
* The returned value must be freed with g_free().
*
* Since: 2.6
**/

View file

@ -239,6 +239,7 @@ _gimp_unit_set_deletion_flag (GimpUnit unit_id,
* name. For user-defined units this should equal to the singular form.
*
* Returns: (transfer full): The unit's textual identifier.
* The returned value must be freed with g_free().
**/
gchar *
_gimp_unit_get_identifier (GimpUnit unit_id)
@ -343,6 +344,7 @@ _gimp_unit_get_digits (GimpUnit unit_id)
* This procedure returns the symbol of the unit (\"''\" for inches).
*
* Returns: (transfer full): The unit's symbol.
* The returned value must be freed with g_free().
**/
gchar *
_gimp_unit_get_symbol (GimpUnit unit_id)
@ -377,6 +379,7 @@ _gimp_unit_get_symbol (GimpUnit unit_id)
* inches).
*
* Returns: (transfer full): The unit's abbreviation.
* The returned value must be freed with g_free().
**/
gchar *
_gimp_unit_get_abbreviation (GimpUnit unit_id)
@ -410,6 +413,7 @@ _gimp_unit_get_abbreviation (GimpUnit unit_id)
* This procedure returns the singular form of the unit.
*
* Returns: (transfer full): The unit's singular form.
* The returned value must be freed with g_free().
**/
gchar *
_gimp_unit_get_singular (GimpUnit unit_id)
@ -443,6 +447,7 @@ _gimp_unit_get_singular (GimpUnit unit_id)
* This procedure returns the plural form of the unit.
*
* Returns: (transfer full): The unit's plural form.
* The returned value must be freed with g_free().
**/
gchar *
_gimp_unit_get_plural (GimpUnit unit_id)

View file

@ -44,8 +44,7 @@
* Creates a new empty vectors object. The vectors object needs to be
* added to the image using gimp_image_insert_vectors().
*
* Returns: the current vector object, 0 if no vector exists in the
* image.
* Returns: the current vector object, 0 if no vector exists in the image.
*
* Since: 2.4
**/
@ -161,8 +160,9 @@ gimp_vectors_copy (gint32 vectors_ID)
* Returns an Array with the stroke-IDs associated with the passed
* path.
*
* Returns: (array length=num_strokes) (element-type gint32) (transfer
* full): List of the strokes belonging to the path.
* Returns: (array length=num_strokes) (element-type gint32) (transfer full):
* List of the strokes belonging to the path.
* The returned value must be freed with g_free().
*
* Since: 2.4
**/
@ -645,8 +645,7 @@ gimp_vectors_stroke_flip_free (gint32 vectors_ID,
* this is always a bezier stroke, where the coordinates are the
* control points.
*
* Returns: type of the stroke (always GIMP_VECTORS_STROKE_TYPE_BEZIER
* for now).
* Returns: type of the stroke (always GIMP_VECTORS_STROKE_TYPE_BEZIER for now).
*
* Since: 2.4
**/
@ -756,8 +755,9 @@ gimp_vectors_stroke_new_from_points (gint32 vectors_ID,
*
* returns polygonal approximation of the stroke.
*
* Returns: (array length=coords) (element-type gdouble) (transfer
* full): List of the coords along the path (x0, y0, x1, y1, ...).
* Returns: (array length=coords) (element-type gdouble) (transfer full):
* List of the coords along the path (x0, y0, x1, y1, ...).
* The returned value must be freed with g_free().
*
* Since: 2.4
**/
@ -1242,8 +1242,9 @@ gimp_vectors_export_to_file (gint32 image_ID,
* string that holds a complete XML document. If you pass 0 as the
* 'vectors' argument, then all paths in the image will be exported.
*
* Returns: (transfer full): A string whose contents are a complete SVG
* document.
* Returns: (transfer full):
* A string whose contents are a complete SVG document.
* The returned value must be freed with g_free().
*
* Since: 2.6
**/

View file

@ -29,7 +29,7 @@ sub brush_new {
@outargs = (
{ name => 'actual_name', type => 'string',
desc => 'The actual new brush name. The returned value must be freed with g_free()' }
desc => 'The actual new brush name.' }
);
%invoke = (
@ -60,7 +60,7 @@ sub brush_duplicate {
@outargs = (
{ name => 'copy_name', type => 'string',
desc => "The name of the brush's copy. The returned value must be freed with g_free()" }
desc => "The name of the brush's copy." }
);
%invoke = (
@ -161,7 +161,7 @@ sub brush_rename {
@outargs = (
{ name => 'actual_name', type => 'string',
desc => 'The actual new name of the brush. The returned value must be freed with g_free()' }
desc => 'The actual new name of the brush.' }
);
%invoke = (

View file

@ -56,7 +56,7 @@ HELP
@outargs = (
{ name => 'image_ids', type => 'int32array',
desc => 'The list of images currently open. The returned value must be freed with g_free()',
desc => 'The list of images currently open.',
array => { name => 'num_images',
desc => 'The number of images currently open' } }
);
@ -254,7 +254,7 @@ HELP
@outargs = (
{ name => 'layer_ids', type => 'int32array',
desc => 'The list of layers contained in the image. The returned value must be freed with g_free()',
desc => 'The list of layers contained in the image.',
array => { name => 'num_layers',
desc => 'The number of layers contained in the image' } }
);
@ -299,7 +299,7 @@ HELP
@outargs = (
{ name => 'channel_ids', type => 'int32array',
desc => 'The list of channels contained in the image. The returned value must be freed with g_free()',
desc => 'The list of channels contained in the image.',
array => { name => 'num_channels',
desc => 'The number of channels contained in the image' } }
);
@ -341,7 +341,7 @@ HELP
@outargs = (
{ name => 'vector_ids', type => 'int32array',
desc => 'The list of vectors contained in the image. The returned value must be freed with g_free()',
desc => 'The list of vectors contained in the image.',
array => { name => 'num_vectors',
desc => 'The number of vectors contained in the image' } }
);
@ -1434,7 +1434,7 @@ HELP
@outargs = (
{ name => 'colormap', type => 'int8array', wrap => 1,
desc => "The image's colormap. The returned value must be freed with g_free()",
desc => "The image's colormap.",
array => { name => 'num_bytes',
desc => 'Number of bytes in the colormap array' } }
);
@ -2095,7 +2095,7 @@ HELP
@outargs = (
{ name => 'filename', type => 'string',
desc => 'The filename. The returned value must be freed with g_free()' }
desc => 'The filename.' }
);
%invoke = (
@ -2185,7 +2185,7 @@ HELP
@outargs = (
{ name => 'uri', type => 'string',
desc => 'The URI. The returned value must be freed with g_free()' }
desc => 'The URI.' }
);
%invoke = (
@ -2219,7 +2219,7 @@ HELP
@outargs = (
{ name => 'uri', type => 'string',
desc => 'The imported URI. The returned value must be freed with g_free()' }
desc => 'The imported URI.' }
);
%invoke = (
@ -2255,7 +2255,7 @@ HELP
@outargs = (
{ name => 'uri', type => 'string',
desc => 'The imported URI. The returned value must be freed with g_free()' }
desc => 'The imported URI.' }
);
%invoke = (
@ -2290,7 +2290,7 @@ HELP
@outargs = (
{ name => 'uri', type => 'string',
desc => 'The exported URI. The returned value must be freed with g_free()' }
desc => 'The exported URI.' }
);
%invoke = (
@ -2325,7 +2325,7 @@ HELP
@outargs = (
{ name => 'name', type => 'string',
desc => 'The name. The returned value must be freed with g_free()' }
desc => 'The name.' }
);
%invoke = (

View file

@ -33,7 +33,7 @@ HELP
@outargs = (
{ name => 'profile_data', type => 'int8array', wrap => 1,
desc => "The image's serialized color profile. The returned value must be freed with g_free()",
desc => "The image's serialized color profile.",
array => { name => 'num_bytes',
desc => 'Number of bytes in the color_profile array' } }
);
@ -79,7 +79,7 @@ HELP
@outargs = (
{ name => 'profile_data', type => 'int8array', wrap => 1,
desc => "The image's serialized color profile. The returned value must be freed with g_free()",
desc => "The image's serialized color profile.",
array => { name => 'num_bytes',
desc => 'Number of bytes in the color_profile array' } }
);

View file

@ -88,7 +88,7 @@ sub generate {
my $funcname = "gimp_$name"; my $wrapped = "";
my %usednames;
my $retdesc = "Returns:";
my $retdesc = " * Returns:";
if ($proc->{deprecated}) {
if ($proc->{deprecated} eq 'NONE') {
@ -128,26 +128,45 @@ sub generate {
if ($retarg) {
my ($type) = &arg_parse($retarg->{type});
my $argtype = $arg_types{$type};
my $annotate = "";
$rettype = &libtype($retarg, 1);
chop $rettype unless $rettype =~ /\*$/;
$retarg->{retval} = 1;
if (exists $argtype->{array}) {
$retdesc .= " (array length=@outargs[$retindex - 2]->{name})";
$annotate = " (array length=@outargs[$retindex - 2]->{name})";
}
if (exists $argtype->{out_annotate}) {
$retdesc .= " $argtype->{out_annotate}";
$annotate .= " $argtype->{out_annotate}";
}
if (exists $argtype->{array} || exists $argtype->{out_annotate}) {
$retdesc .= ":";
}
$retdesc .= exists $retarg->{desc} ? " $retarg->{desc}" : "";
if ($annotate eq "") {
$retdesc .= " $retarg->{desc}";
}
else {
if (exists $retarg->{desc}) {
if ((length ($annotate) +
length ($retarg->{desc})) > 65) {
$retdesc .= $annotate . ":\n * " . $retarg->{desc};
}
else {
$retdesc .= $annotate . ": " . $retarg->{desc};
}
}
}
if ($retarg->{type} eq 'stringarray') {
$retdesc .= ". The returned value must be freed with g_strfreev().";
unless ($retdesc =~ /[\.\!\?]$/) { $retdesc .= '.' }
if ($retarg->{type} eq 'string') {
$retdesc .= "\n * The returned value must be freed with g_free().";
}
elsif ($retarg->{type} eq 'stringarray') {
$retdesc .= "\n * The returned value must be freed with g_strfreev().";
}
elsif (exists $argtype->{array}) {
$retdesc .= "\n * The returned value must be freed with g_free().";
}
}
else {
@ -460,8 +479,6 @@ CODE
my $padding = ' ' x $padlen;
$clist =~ s/\t/$padding/eg;
unless ($retdesc =~ /[\.\!\?]$/) { $retdesc .= '.' }
if ($proc->{since}) {
$sincedesc = "\n *\n * Since: $proc->{since}";
}
@ -498,8 +515,6 @@ CODE
&desc_wrap($proc->{help});
}
$retdesc = &desc_wrap($retdesc);
$out->{code} .= <<CODE;
/**