GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

Commit 50e478ef authored by Manish Singh's avatar Manish Singh

$srcdir != $builddir fix for GIMP_CONTRIBUTORS

* configure.in: $srcdir != $builddir fix for GIMP_CONTRIBUTORS

* plug-ins/common/plugin-defs.pl: More tidying up after Daniel Egger

* tools/pdbgen/Makefile.am: parse pdb defs only once for app and lib

* tools/pdbgen/lib.pl
* tools/pdbgen/pdb/procedural_db.pdb: all void rets now return a
boolean for success/failure

-Yosh
parent 85503c5f
Tue Aug 22 18:42:04 PDT 2000 Manish Singh <yosh@gimp.org>
* configure.in: $srcdir != $builddir fix for GIMP_CONTRIBUTORS
* plug-ins/common/plugin-defs.pl: More tidying up after Daniel Egger
* tools/pdbgen/Makefile.am: parse pdb defs only once for app and lib
* tools/pdbgen/lib.pl
* tools/pdbgen/pdb/procedural_db.pdb: all void rets now return a
boolean for success/failure
2000-08-23 Nick Lamb <njl195@zepler.org.uk>
* plug-ins/Makefile.am:
......
......@@ -677,7 +677,7 @@ rm -f confauthorsgen
IFS="${IFS= }"; gimp_save_IFS="$IFS"; IFS='
'
for i in `sed -e '/^#/d' -e 's/\.*\[.*\]//' -e 's/^ *//' -e 's/ *$//' -e '/^$/d' < tools/authorsgen/contributors`; do
for i in `sed -e '/^#/d' -e 's/\.*\[.*\]//' -e 's/^ *//' -e 's/ *$//' -e '/^$/d' < $srcdir/tools/authorsgen/contributors`; do
echo $ac_n "$i, $ac_c" >> confauthorsgen
done
......
......@@ -23,7 +23,7 @@
#include "gimp.h"
void
gboolean
gimp_brushes_popup (gchar *brush_callback,
gchar *popup_title,
gchar *initial_brush,
......@@ -33,6 +33,7 @@ gimp_brushes_popup (gchar *brush_callback,
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_brushes_popup",
&nreturn_vals,
......@@ -44,24 +45,33 @@ gimp_brushes_popup (gchar *brush_callback,
GIMP_PDB_INT32, paint_mode,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
void
gboolean
gimp_brushes_close_popup (gchar *brush_callback)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_brushes_close_popup",
&nreturn_vals,
GIMP_PDB_STRING, brush_callback,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
void
gboolean
gimp_brushes_set_popup (gchar *brush_callback,
gchar *brush_name,
gdouble opacity,
......@@ -70,6 +80,7 @@ gimp_brushes_set_popup (gchar *brush_callback,
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_brushes_set_popup",
&nreturn_vals,
......@@ -80,5 +91,9 @@ gimp_brushes_set_popup (gchar *brush_callback,
GIMP_PDB_INT32, paint_mode,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
......@@ -31,18 +31,18 @@ extern "C" {
/* For information look into the C source or the html documentation */
void gimp_brushes_popup (gchar *brush_callback,
gchar *popup_title,
gchar *initial_brush,
gdouble opacity,
gint spacing,
GimpLayerModeEffects paint_mode);
void gimp_brushes_close_popup (gchar *brush_callback);
void gimp_brushes_set_popup (gchar *brush_callback,
gchar *brush_name,
gdouble opacity,
gint spacing,
GimpLayerModeEffects paint_mode);
gboolean gimp_brushes_popup (gchar *brush_callback,
gchar *popup_title,
gchar *initial_brush,
gdouble opacity,
gint spacing,
GimpLayerModeEffects paint_mode);
gboolean gimp_brushes_close_popup (gchar *brush_callback);
gboolean gimp_brushes_set_popup (gchar *brush_callback,
gchar *brush_name,
gdouble opacity,
gint spacing,
GimpLayerModeEffects paint_mode);
#ifdef __cplusplus
......
......@@ -80,18 +80,23 @@ gimp_channel_copy (gint32 channel_ID)
return channel_copy_ID;
}
void
gboolean
gimp_channel_delete (gint32 channel_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_channel_delete",
&nreturn_vals,
GIMP_PDB_CHANNEL, channel_ID,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
gchar *
......@@ -114,12 +119,13 @@ gimp_channel_get_name (gint32 channel_ID)
return name;
}
void
gboolean
gimp_channel_set_name (gint32 channel_ID,
gchar *name)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_channel_set_name",
&nreturn_vals,
......@@ -127,7 +133,11 @@ gimp_channel_set_name (gint32 channel_ID,
GIMP_PDB_STRING, name,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
gboolean
......@@ -150,12 +160,13 @@ gimp_channel_get_visible (gint32 channel_ID)
return visible;
}
void
gboolean
gimp_channel_set_visible (gint32 channel_ID,
gboolean visible)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_channel_set_visible",
&nreturn_vals,
......@@ -163,7 +174,11 @@ gimp_channel_set_visible (gint32 channel_ID,
GIMP_PDB_INT32, visible,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
gboolean
......@@ -186,12 +201,13 @@ gimp_channel_get_show_masked (gint32 channel_ID)
return show_masked;
}
void
gboolean
gimp_channel_set_show_masked (gint32 channel_ID,
gboolean show_masked)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_channel_set_show_masked",
&nreturn_vals,
......@@ -199,7 +215,11 @@ gimp_channel_set_show_masked (gint32 channel_ID,
GIMP_PDB_INT32, show_masked,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
gdouble
......@@ -222,12 +242,13 @@ gimp_channel_get_opacity (gint32 channel_ID)
return opacity;
}
void
gboolean
gimp_channel_set_opacity (gint32 channel_ID,
gdouble opacity)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_channel_set_opacity",
&nreturn_vals,
......@@ -235,10 +256,14 @@ gimp_channel_set_opacity (gint32 channel_ID,
GIMP_PDB_FLOAT, opacity,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
void
gboolean
gimp_channel_get_color (gint32 channel_ID,
guchar *red,
guchar *green,
......@@ -246,13 +271,16 @@ gimp_channel_get_color (gint32 channel_ID,
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_channel_get_color",
&nreturn_vals,
GIMP_PDB_CHANNEL, channel_ID,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
if (success)
{
*red = return_vals[1].data.d_color.red;
*green = return_vals[1].data.d_color.green;
......@@ -260,9 +288,11 @@ gimp_channel_get_color (gint32 channel_ID,
}
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
void
gboolean
gimp_channel_set_color (gint32 channel_ID,
guchar red,
guchar green,
......@@ -270,6 +300,7 @@ gimp_channel_set_color (gint32 channel_ID,
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
guchar color[3];
color[0] = red;
......@@ -282,7 +313,11 @@ gimp_channel_set_color (gint32 channel_ID,
GIMP_PDB_COLOR, color,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
gint
......@@ -305,12 +340,13 @@ gimp_channel_get_tattoo (gint32 channel_ID)
return tattoo;
}
void
gboolean
gimp_channel_set_tattoo (gint32 channel_ID,
gint tattoo)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_channel_set_tattoo",
&nreturn_vals,
......@@ -318,5 +354,9 @@ gimp_channel_set_tattoo (gint32 channel_ID,
GIMP_PDB_INT32, tattoo,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
......@@ -40,29 +40,29 @@ gint32 _gimp_channel_new (gint32 image_ID,
guchar green,
guchar blue);
gint32 gimp_channel_copy (gint32 channel_ID);
void gimp_channel_delete (gint32 channel_ID);
gboolean gimp_channel_delete (gint32 channel_ID);
gchar* gimp_channel_get_name (gint32 channel_ID);
void gimp_channel_set_name (gint32 channel_ID,
gboolean gimp_channel_set_name (gint32 channel_ID,
gchar *name);
gboolean gimp_channel_get_visible (gint32 channel_ID);
void gimp_channel_set_visible (gint32 channel_ID,
gboolean gimp_channel_set_visible (gint32 channel_ID,
gboolean visible);
gboolean gimp_channel_get_show_masked (gint32 channel_ID);
void gimp_channel_set_show_masked (gint32 channel_ID,
gboolean gimp_channel_set_show_masked (gint32 channel_ID,
gboolean show_masked);
gdouble gimp_channel_get_opacity (gint32 channel_ID);
void gimp_channel_set_opacity (gint32 channel_ID,
gboolean gimp_channel_set_opacity (gint32 channel_ID,
gdouble opacity);
void gimp_channel_get_color (gint32 channel_ID,
gboolean gimp_channel_get_color (gint32 channel_ID,
guchar *red,
guchar *green,
guchar *blue);
void gimp_channel_set_color (gint32 channel_ID,
gboolean gimp_channel_set_color (gint32 channel_ID,
guchar red,
guchar green,
guchar blue);
gint gimp_channel_get_tattoo (gint32 channel_ID);
void gimp_channel_set_tattoo (gint32 channel_ID,
gboolean gimp_channel_set_tattoo (gint32 channel_ID,
gint tattoo);
......
......@@ -23,7 +23,7 @@
#include "gimp.h"
void
gboolean
gimp_channel_ops_offset (gint32 drawable_ID,
gboolean wrap_around,
GimpChannelOffsetType fill_type,
......@@ -32,6 +32,7 @@ gimp_channel_ops_offset (gint32 drawable_ID,
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_channel_ops_offset",
&nreturn_vals,
......@@ -42,7 +43,11 @@ gimp_channel_ops_offset (gint32 drawable_ID,
GIMP_PDB_INT32, offset_y,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
gint32
......
......@@ -31,12 +31,12 @@ extern "C" {
/* For information look into the C source or the html documentation */
void gimp_channel_ops_offset (gint32 drawable_ID,
gboolean wrap_around,
GimpChannelOffsetType fill_type,
gint offset_x,
gint offset_y);
gint32 gimp_channel_ops_duplicate (gint32 image_ID);
gboolean gimp_channel_ops_offset (gint32 drawable_ID,
gboolean wrap_around,
GimpChannelOffsetType fill_type,
gint offset_x,
gint offset_y);
gint32 gimp_channel_ops_duplicate (gint32 image_ID);
#ifdef __cplusplus
......
......@@ -23,13 +23,14 @@
#include "gimp.h"
void
gboolean
gimp_brightness_contrast (gint32 drawable_ID,
gint brightness,
gint contrast)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_brightness_contrast",
&nreturn_vals,
......@@ -38,10 +39,14 @@ gimp_brightness_contrast (gint32 drawable_ID,
GIMP_PDB_INT32, contrast,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
void
gboolean
gimp_levels (gint32 drawable_ID,
GimpChannelLutType channel,
gint low_input,
......@@ -52,6 +57,7 @@ gimp_levels (gint32 drawable_ID,
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_levels",
&nreturn_vals,
......@@ -64,15 +70,20 @@ gimp_levels (gint32 drawable_ID,
GIMP_PDB_INT32, high_output,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
void
gboolean
gimp_posterize (gint32 drawable_ID,
gint levels)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_posterize",
&nreturn_vals,
......@@ -80,29 +91,39 @@ gimp_posterize (gint32 drawable_ID,
GIMP_PDB_INT32, levels,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
void
gboolean
gimp_desaturate (gint32 drawable_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_desaturate",
&nreturn_vals,
GIMP_PDB_DRAWABLE, drawable_ID,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
void
gboolean
gimp_equalize (gint32 drawable_ID,
gboolean mask_only)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_equalize",
&nreturn_vals,
......@@ -110,24 +131,33 @@ gimp_equalize (gint32 drawable_ID,
GIMP_PDB_INT32, mask_only,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
void
gboolean
gimp_invert (gint32 drawable_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_invert",
&nreturn_vals,
GIMP_PDB_DRAWABLE, drawable_ID,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
void
gboolean
gimp_curves_spline (gint32 drawable_ID,
GimpChannelLutType channel,
gint num_points,
......@@ -135,6 +165,7 @@ gimp_curves_spline (gint32 drawable_ID,
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_curves_spline",
&nreturn_vals,
......@@ -144,10 +175,14 @@ gimp_curves_spline (gint32 drawable_ID,
GIMP_PDB_INT8ARRAY, control_pts,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
void
gboolean
gimp_curves_explicit (gint32 drawable_ID,
GimpChannelLutType channel,
gint num_bytes,
......@@ -155,6 +190,7 @@ gimp_curves_explicit (gint32 drawable_ID,
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_curves_explicit",
&nreturn_vals,
......@@ -164,10 +200,14 @@ gimp_curves_explicit (gint32 drawable_ID,
GIMP_PDB_INT8ARRAY, curve,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
void
gboolean
gimp_color_balance (gint32 drawable_ID,
GimpTransferMode transfer_mode,
gboolean preserve_lum,
......@@ -177,6 +217,7 @@ gimp_color_balance (gint32 drawable_ID,
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_color_balance",
&nreturn_vals,
......@@ -188,10 +229,14 @@ gimp_color_balance (gint32 drawable_ID,
GIMP_PDB_FLOAT, yellow_blue,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
void
gboolean
gimp_histogram (gint32 drawable_ID,
GimpChannelLutType channel,
gint start_range,
......@@ -205,6 +250,7 @@ gimp_histogram (gint32 drawable_ID,
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_histogram",
&nreturn_vals,
......@@ -221,7 +267,9 @@ gimp_histogram (gint32 drawable_ID,
*count = 0.0;
*percentile = 0.0;
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
if (success)
{
*mean = return_vals[1].data.d_float;
*std_dev = return_vals[2].data.d_float;
......@@ -232,9 +280,11 @@ gimp_histogram (gint32 drawable_ID,
}
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
void
gboolean
gimp_hue_saturation (gint32 drawable_ID,
GimpHueRange hue_range,
gdouble hue_offset,
......@@ -243,6 +293,7 @@ gimp_hue_saturation (gint32 drawable_ID,
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_hue_saturation",
&nreturn_vals,
......@@ -253,16 +304,21 @@ gimp_hue_saturation (gint32 drawable_ID,
GIMP_PDB_FLOAT, saturation,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
void
gboolean
gimp_threshold (gint32 drawable_ID,
gint low_threshold,
gint high_threshold)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_threshold",
&nreturn_vals,
......@@ -271,5 +327,9 @@ gimp_threshold (gint32 drawable_ID,
GIMP_PDB_INT32, high_threshold,
GIMP_PDB_END);