gimp/libgimp/gimpguides_pdb.c
Manish Singh 50e478ef43 $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
2000-08-23 01:44:59 +00:00

156 lines
3.9 KiB
C

/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
*
* gimpguides_pdb.c
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/* NOTE: This file is autogenerated by pdbgen.pl */
#include "gimp.h"
gint32
gimp_image_add_hguide (gint32 image_ID,
gint yposition)
{
GimpParam *return_vals;
gint nreturn_vals;
gint32 guide_ID = -1;
return_vals = gimp_run_procedure ("gimp_image_add_hguide",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_INT32, yposition,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
guide_ID = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return guide_ID;
}
gint32
gimp_image_add_vguide (gint32 image_ID,
gint xposition)
{
GimpParam *return_vals;
gint nreturn_vals;
gint32 guide_ID = -1;
return_vals = gimp_run_procedure ("gimp_image_add_vguide",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_INT32, xposition,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
guide_ID = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return guide_ID;
}
gboolean
gimp_image_delete_guide (gint32 image_ID,
gint32 guide_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_image_delete_guide",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_INT32, guide_ID,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
gint32
gimp_image_find_next_guide (gint32 image_ID,
gint32 guide_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gint32 next_guide_ID = -1;
return_vals = gimp_run_procedure ("gimp_image_find_next_guide",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_INT32, guide_ID,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
next_guide_ID = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return next_guide_ID;
}
GimpOrientationType
gimp_image_get_guide_orientation (gint32 image_ID,
gint32 guide_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
GimpOrientationType orientation = GIMP_UNKNOWN;
return_vals = gimp_run_procedure ("gimp_image_get_guide_orientation",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_INT32, guide_ID,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
orientation = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return orientation;
}
gint
gimp_image_get_guide_position (gint32 image_ID,
gint32 guide_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gint position = -1;
return_vals = gimp_run_procedure ("gimp_image_get_guide_position",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_INT32, guide_ID,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
position = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return position;
}