home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2002 April / pcpro0402.iso / essentials / graphics / Gimp / gimp-src-20001226.exe / src / gimp / libgimp / gimpundo_pdb.c < prev    next >
Encoding:
C/C++ Source or Header  |  2000-08-25  |  2.4 KB  |  87 lines

  1. /* LIBGIMP - The GIMP Library
  2.  * Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
  3.  *
  4.  * gimpundo_pdb.c
  5.  *
  6.  * This library is free software; you can redistribute it and/or
  7.  * modify it under the terms of the GNU Lesser General Public
  8.  * License as published by the Free Software Foundation; either
  9.  * version 2 of the License, or (at your option) any later version.
  10.  *
  11.  * This library is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14.  * Lesser General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU Lesser General Public
  17.  * License along with this library; if not, write to the
  18.  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  19.  * Boston, MA 02111-1307, USA.
  20.  */
  21.  
  22. /* NOTE: This file is autogenerated by pdbgen.pl */
  23.  
  24. #include "gimp.h"
  25.  
  26. /**
  27.  * gimp_undo_push_group_start:
  28.  * @image_ID: The ID of the image in which to pop an undo group.
  29.  *
  30.  * Starts a group undo.
  31.  *
  32.  * This function is used to start a group undo--necessary for logically
  33.  * combining two or more undo operations into a single operation. This
  34.  * call must be used in conjunction with a 'gimp-undo-push-group-end'
  35.  * call.
  36.  *
  37.  * Returns: TRUE on success.
  38.  */
  39. gboolean
  40. gimp_undo_push_group_start (gint32 image_ID)
  41. {
  42.   GimpParam *return_vals;
  43.   gint nreturn_vals;
  44.   gboolean success = TRUE;
  45.  
  46.   return_vals = gimp_run_procedure ("gimp_undo_push_group_start",
  47.                     &nreturn_vals,
  48.                     GIMP_PDB_IMAGE, image_ID,
  49.                     GIMP_PDB_END);
  50.  
  51.   success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
  52.  
  53.   gimp_destroy_params (return_vals, nreturn_vals);
  54.  
  55.   return success;
  56. }
  57.  
  58. /**
  59.  * gimp_undo_push_group_end:
  60.  * @image_ID: The ID of the image in which to pop an undo group.
  61.  *
  62.  * Finish a group undo.
  63.  *
  64.  * This function must be called once for each gimp-undo-push-group call
  65.  * that is made.
  66.  *
  67.  * Returns: TRUE on success.
  68.  */
  69. gboolean
  70. gimp_undo_push_group_end (gint32 image_ID)
  71. {
  72.   GimpParam *return_vals;
  73.   gint nreturn_vals;
  74.   gboolean success = TRUE;
  75.  
  76.   return_vals = gimp_run_procedure ("gimp_undo_push_group_end",
  77.                     &nreturn_vals,
  78.                     GIMP_PDB_IMAGE, image_ID,
  79.                     GIMP_PDB_END);
  80.  
  81.   success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
  82.  
  83.   gimp_destroy_params (return_vals, nreturn_vals);
  84.  
  85.   return success;
  86. }
  87.