From 5c4d5416cc809d100ee06b68c69e69d364623f7b Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Mon, 5 Nov 2007 18:19:02 +0000 Subject: [PATCH] create a libgimp C wrapper for gimp-image-get-vectors-by-tattoo; this 2007-11-05 Sven Neumann * tools/pdbgen/pdb/image.pdb: create a libgimp C wrapper for gimp-image-get-vectors-by-tattoo; this function was accidentally forgotten in the 2.4 libgimp API. * app/pdb/image_cmds.c * libgimp/gimpimage_pdb.[ch]: regenerated. svn path=/trunk/; revision=24066 --- ChangeLog | 9 +++++++++ app/pdb/image_cmds.c | 6 +++--- libgimp/gimpimage_pdb.c | 36 ++++++++++++++++++++++++++++++++++++ libgimp/gimpimage_pdb.h | 2 ++ tools/pdbgen/pdb/image.pdb | 4 ++-- 5 files changed, 52 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 28b9f5306f..6fff68311a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2007-11-05 Sven Neumann + + * tools/pdbgen/pdb/image.pdb: create a libgimp C wrapper for + gimp-image-get-vectors-by-tattoo; this function was accidentally + forgotten in the 2.4 libgimp API. + + * app/pdb/image_cmds.c + * libgimp/gimpimage_pdb.[ch]: regenerated. + 2007-11-05 Sven Neumann * app/widgets/gimpcairo-utils.h: introduced macros to set a single diff --git a/app/pdb/image_cmds.c b/app/pdb/image_cmds.c index db8a827368..fbc5dbe6d0 100644 --- a/app/pdb/image_cmds.c +++ b/app/pdb/image_cmds.c @@ -4640,9 +4640,9 @@ register_image_procs (GimpPDB *pdb) "gimp-image-get-vectors-by-tattoo", "Find a vectors with a given tattoo in an image.", "This procedure returns the vectors with the given tattoo in the specified image.", - "Jay Cox", - "Jay Cox", - "1998", + "Simon Budig", + "Simon Budig", + "2005", NULL); gimp_procedure_add_argument (procedure, gimp_param_spec_image_id ("image", diff --git a/libgimp/gimpimage_pdb.c b/libgimp/gimpimage_pdb.c index c50f31b361..d8162b572e 100644 --- a/libgimp/gimpimage_pdb.c +++ b/libgimp/gimpimage_pdb.c @@ -2688,3 +2688,39 @@ gimp_image_get_channel_by_tattoo (gint32 image_ID, return channel_ID; } + +/** + * gimp_image_get_vectors_by_tattoo: + * @image_ID: The image. + * @tattoo: The tattoo of the vectors to find. + * + * Find a vectors with a given tattoo in an image. + * + * This procedure returns the vectors with the given tattoo in the + * specified image. + * + * Returns: The vectors with the specified tattoo. + * + * Since: GIMP 2.6 + */ +gint32 +gimp_image_get_vectors_by_tattoo (gint32 image_ID, + gint tattoo) +{ + GimpParam *return_vals; + gint nreturn_vals; + gint32 vectors_ID = -1; + + return_vals = gimp_run_procedure ("gimp-image-get-vectors-by-tattoo", + &nreturn_vals, + GIMP_PDB_IMAGE, image_ID, + GIMP_PDB_INT32, tattoo, + GIMP_PDB_END); + + if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS) + vectors_ID = return_vals[1].data.d_vectors; + + gimp_destroy_params (return_vals, nreturn_vals); + + return vectors_ID; +} diff --git a/libgimp/gimpimage_pdb.h b/libgimp/gimpimage_pdb.h index 6b42c8ab7f..801a578fe4 100644 --- a/libgimp/gimpimage_pdb.h +++ b/libgimp/gimpimage_pdb.h @@ -181,6 +181,8 @@ gint32 gimp_image_get_layer_by_tattoo (gint32 gint tattoo); gint32 gimp_image_get_channel_by_tattoo (gint32 image_ID, gint tattoo); +gint32 gimp_image_get_vectors_by_tattoo (gint32 image_ID, + gint tattoo); G_END_DECLS diff --git a/tools/pdbgen/pdb/image.pdb b/tools/pdbgen/pdb/image.pdb index c8db425f0d..1249db9f8e 100644 --- a/tools/pdbgen/pdb/image.pdb +++ b/tools/pdbgen/pdb/image.pdb @@ -2434,7 +2434,7 @@ sub image_get_vectors_by_tattoo { This procedure returns the vectors with the given tattoo in the specified image. HELP - &jay_pdb_misc('1998'); + &simon_pdb_misc('2005', '2.6'); @inargs = ( { name => 'image', type => 'image', @@ -2597,7 +2597,7 @@ CODE image_get_channel_by_tattoo image_get_vectors_by_tattoo); -%exports = (app => [@procs], lib => [@procs[0..45,48..74]]); +%exports = (app => [@procs], lib => [@procs[0..45,48..75]]); $desc = 'Image';