2006-12-10 05:33:38 +08:00
/* GIMP - The GNU Image Manipulation Program
2003-07-03 08:47:26 +08:00
* Copyright ( C ) 1995 - 2003 Spencer Kimball and Peter Mattis
1997-11-25 06:05:25 +08:00
*
2009-01-18 06:28:01 +08:00
* This program is free software : you can redistribute it and / or modify
1997-11-25 06:05:25 +08:00
* it under the terms of the GNU General Public License as published by
2009-01-18 06:28:01 +08:00
* the Free Software Foundation ; either version 3 of the License , or
1997-11-25 06:05:25 +08:00
* ( at your option ) any later version .
*
* This program 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 General Public License for more details .
*
* You should have received a copy of the GNU General Public License
2009-01-18 06:28:01 +08:00
* along with this program . If not , see < http : //www.gnu.org/licenses/>.
1997-11-25 06:05:25 +08:00
*/
2007-01-09 18:52:47 +08:00
/* NOTE: This file is auto-generated by pdbgen.pl. */
1999-03-28 14:55:29 +08:00
2000-12-29 23:22:01 +08:00
# include "config.h"
2008-10-10 04:24:04 +08:00
# include <gegl.h>
2000-12-29 23:22:01 +08:00
2012-05-03 09:36:22 +08:00
# include <gdk-pixbuf/gdk-pixbuf.h>
2012-05-04 06:50:23 +08:00
# include "libgimpbase/gimpbase.h"
2001-08-17 22:27:31 +08:00
# include "pdb-types.h"
1999-03-28 14:55:29 +08:00
2003-02-18 22:08:14 +08:00
# include "core/gimp.h"
2003-02-13 19:23:50 +08:00
# include "core/gimpimage-undo.h"
2001-05-09 10:32:03 +08:00
# include "core/gimpimage.h"
2008-02-08 01:08:54 +08:00
# include "core/gimpparamspecs.h"
2006-10-25 17:41:05 +08:00
# include "plug-in/gimpplugin-cleanup.h"
2006-05-04 02:05:06 +08:00
# include "plug-in/gimpplugin.h"
2006-04-29 06:26:51 +08:00
# include "plug-in/gimppluginmanager.h"
Lots of ii8n stuff here and some additions to the de.po. Applied
Wed Oct 14 17:46:15 EDT 1998 Adrian Likins <adrian@gimp.org>
* app/*, po/de.po, de/POTFILES.in, libgimp/gimpintl.h:
Lots of ii8n stuff here and some additions to the de.po.
Applied gimp-egger-981005-1 ,gimp-egger-981006-1,
gimp-egger-981007-1, gimp-egger-981008-1,
gimp-egger-981009-1.patch, gimp-egger-981010-1.patch
* plug-in/guillotine/guillotine.c: added the coordinates
of the split images from the original image to the title.
ie foo.jpg (0,0) for the image in the topleft.
* plug-in/script-fu/scripts/neon-logo.scm,
perspective-shadow.scm, predator.scm,rendermap.scm,
ripply-anim.scm, select_to_image.scm,swirltile.scm,
xach-effect.scm: updated scripts to use new script-fu stuff
wooo boy! a big un!
in testing this, it looks like some of the po files are busted.
but the code stuff seems okay.
-adrian
1998-10-15 07:23:52 +08:00
2008-02-08 01:08:54 +08:00
# include "gimppdb.h"
# include "gimpprocedure.h"
2008-04-04 19:15:55 +08:00
# include "internal-procs.h"
2006-11-01 03:02:56 +08:00
1997-11-25 06:05:25 +08:00
2012-05-04 06:50:23 +08:00
static GimpValueArray *
2007-12-03 02:05:54 +08:00
image_undo_group_start_invoker ( GimpProcedure * procedure ,
2012-05-04 06:50:23 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GimpValueArray * args ,
GError * * error )
1997-11-25 06:05:25 +08:00
{
1999-03-28 14:55:29 +08:00
gboolean success = TRUE ;
2006-03-24 05:17:16 +08:00
GimpImage * image ;
1997-11-25 06:05:25 +08:00
2012-05-04 06:50:23 +08:00
image = gimp_value_get_image ( gimp_value_array_index ( args , 0 ) , gimp ) ;
1997-11-25 06:05:25 +08:00
if ( success )
2003-02-18 22:08:14 +08:00
{
2007-03-12 21:04:32 +08:00
GimpPlugIn * plug_in = gimp - > plug_in_manager - > current_plug_in ;
const gchar * undo_desc = NULL ;
2006-03-15 05:35:50 +08:00
2006-04-29 06:26:51 +08:00
if ( plug_in )
2006-10-25 17:41:05 +08:00
{
success = gimp_plug_in_cleanup_undo_group_start ( plug_in , image ) ;
2004-03-27 00:38:44 +08:00
2006-10-25 17:41:05 +08:00
if ( success )
undo_desc = gimp_plug_in_get_undo_desc ( plug_in ) ;
}
if ( success )
gimp_image_undo_group_start ( image , GIMP_UNDO_GROUP_MISC , undo_desc ) ;
2003-02-18 22:08:14 +08:00
}
1997-11-25 06:05:25 +08:00
2008-08-16 21:57:57 +08:00
return gimp_procedure_get_return_values ( procedure , success ,
error ? * error : NULL ) ;
1997-11-25 06:05:25 +08:00
}
2012-05-04 06:50:23 +08:00
static GimpValueArray *
2007-12-03 02:05:54 +08:00
image_undo_group_end_invoker ( GimpProcedure * procedure ,
2012-05-04 06:50:23 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GimpValueArray * args ,
GError * * error )
1997-11-25 06:05:25 +08:00
{
1999-03-28 14:55:29 +08:00
gboolean success = TRUE ;
2006-03-24 05:17:16 +08:00
GimpImage * image ;
1997-11-25 06:05:25 +08:00
2012-05-04 06:50:23 +08:00
image = gimp_value_get_image ( gimp_value_array_index ( args , 0 ) , gimp ) ;
1997-11-25 06:05:25 +08:00
if ( success )
2006-03-24 05:17:16 +08:00
{
2006-10-25 17:41:05 +08:00
GimpPlugIn * plug_in = gimp - > plug_in_manager - > current_plug_in ;
if ( plug_in )
success = gimp_plug_in_cleanup_undo_group_end ( plug_in , image ) ;
if ( success )
gimp_image_undo_group_end ( image ) ;
2006-03-24 05:17:16 +08:00
}
1997-11-25 06:05:25 +08:00
2008-08-16 21:57:57 +08:00
return gimp_procedure_get_return_values ( procedure , success ,
error ? * error : NULL ) ;
1997-11-25 06:05:25 +08:00
}
2012-05-04 06:50:23 +08:00
static GimpValueArray *
2007-12-03 02:05:54 +08:00
image_undo_is_enabled_invoker ( GimpProcedure * procedure ,
2012-05-04 06:50:23 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GimpValueArray * args ,
GError * * error )
2003-12-05 22:18:47 +08:00
{
gboolean success = TRUE ;
2012-05-04 06:50:23 +08:00
GimpValueArray * return_vals ;
2006-03-24 05:17:16 +08:00
GimpImage * image ;
2003-12-05 22:18:47 +08:00
gboolean enabled = FALSE ;
2012-05-04 06:50:23 +08:00
image = gimp_value_get_image ( gimp_value_array_index ( args , 0 ) , gimp ) ;
2003-12-05 22:18:47 +08:00
if ( success )
2006-03-24 05:17:16 +08:00
{
enabled = gimp_image_undo_is_enabled ( image ) ;
}
2003-12-05 22:18:47 +08:00
2008-08-16 21:57:57 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ,
error ? * error : NULL ) ;
2003-12-05 22:18:47 +08:00
if ( success )
2012-05-04 06:50:23 +08:00
g_value_set_boolean ( gimp_value_array_index ( return_vals , 1 ) , enabled ) ;
2003-12-05 22:18:47 +08:00
2006-03-28 05:09:32 +08:00
return return_vals ;
2003-12-05 22:18:47 +08:00
}
2012-05-04 06:50:23 +08:00
static GimpValueArray *
2007-12-03 02:05:54 +08:00
image_undo_disable_invoker ( GimpProcedure * procedure ,
2012-05-04 06:50:23 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GimpValueArray * args ,
GError * * error )
2003-12-05 22:18:47 +08:00
{
gboolean success = TRUE ;
2012-05-04 06:50:23 +08:00
GimpValueArray * return_vals ;
2006-03-24 05:17:16 +08:00
GimpImage * image ;
2006-03-15 23:00:01 +08:00
gboolean disabled = FALSE ;
2003-12-05 22:18:47 +08:00
2012-05-04 06:50:23 +08:00
image = gimp_value_get_image ( gimp_value_array_index ( args , 0 ) , gimp ) ;
2003-12-05 22:18:47 +08:00
if ( success )
2006-03-24 05:17:16 +08:00
{
2006-10-25 17:41:05 +08:00
#if 0
GimpPlugIn * plug_in = gimp - > plug_in_manager - > current_plug_in ;
if ( plug_in )
success = gimp_plug_in_cleanup_undo_disable ( plug_in , image ) ;
# endif
if ( success )
disabled = gimp_image_undo_disable ( image ) ;
2006-03-24 05:17:16 +08:00
}
2003-12-05 22:18:47 +08:00
2008-08-16 21:57:57 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ,
error ? * error : NULL ) ;
2003-12-05 22:18:47 +08:00
if ( success )
2012-05-04 06:50:23 +08:00
g_value_set_boolean ( gimp_value_array_index ( return_vals , 1 ) , disabled ) ;
2003-12-05 22:18:47 +08:00
2006-03-28 05:09:32 +08:00
return return_vals ;
2003-12-05 22:18:47 +08:00
}
2012-05-04 06:50:23 +08:00
static GimpValueArray *
2007-12-03 02:05:54 +08:00
image_undo_enable_invoker ( GimpProcedure * procedure ,
2012-05-04 06:50:23 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GimpValueArray * args ,
GError * * error )
2003-12-05 22:18:47 +08:00
{
gboolean success = TRUE ;
2012-05-04 06:50:23 +08:00
GimpValueArray * return_vals ;
2006-03-24 05:17:16 +08:00
GimpImage * image ;
2006-03-15 23:00:01 +08:00
gboolean enabled = FALSE ;
2003-12-05 22:18:47 +08:00
2012-05-04 06:50:23 +08:00
image = gimp_value_get_image ( gimp_value_array_index ( args , 0 ) , gimp ) ;
2003-12-05 22:18:47 +08:00
if ( success )
2006-03-24 05:17:16 +08:00
{
2006-10-25 17:41:05 +08:00
#if 0
GimpPlugIn * plug_in = gimp - > plug_in_manager - > current_plug_in ;
if ( plug_in )
success = gimp_plug_in_cleanup_undo_enable ( plug_in , image ) ;
# endif
if ( success )
enabled = gimp_image_undo_enable ( image ) ;
2006-03-24 05:17:16 +08:00
}
2003-12-05 22:18:47 +08:00
2008-08-16 21:57:57 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ,
error ? * error : NULL ) ;
2003-12-05 22:18:47 +08:00
if ( success )
2012-05-04 06:50:23 +08:00
g_value_set_boolean ( gimp_value_array_index ( return_vals , 1 ) , enabled ) ;
2003-12-05 22:18:47 +08:00
2006-03-28 05:09:32 +08:00
return return_vals ;
2003-12-05 22:18:47 +08:00
}
2012-05-04 06:50:23 +08:00
static GimpValueArray *
2007-12-03 02:05:54 +08:00
image_undo_freeze_invoker ( GimpProcedure * procedure ,
2012-05-04 06:50:23 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GimpValueArray * args ,
GError * * error )
2003-12-05 22:18:47 +08:00
{
gboolean success = TRUE ;
2012-05-04 06:50:23 +08:00
GimpValueArray * return_vals ;
2006-03-24 05:17:16 +08:00
GimpImage * image ;
2006-03-15 23:00:01 +08:00
gboolean frozen = FALSE ;
2003-12-05 22:18:47 +08:00
2012-05-04 06:50:23 +08:00
image = gimp_value_get_image ( gimp_value_array_index ( args , 0 ) , gimp ) ;
2003-12-05 22:18:47 +08:00
if ( success )
2006-03-24 05:17:16 +08:00
{
2006-10-25 17:41:05 +08:00
#if 0
GimpPlugIn * plug_in = gimp - > plug_in_manager - > current_plug_in ;
if ( plug_in )
success = gimp_plug_in_cleanup_undo_freeze ( plug_in , image ) ;
# endif
if ( success )
frozen = gimp_image_undo_freeze ( image ) ;
2006-03-24 05:17:16 +08:00
}
2003-12-05 22:18:47 +08:00
2008-08-16 21:57:57 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ,
error ? * error : NULL ) ;
2003-12-05 22:18:47 +08:00
if ( success )
2012-05-04 06:50:23 +08:00
g_value_set_boolean ( gimp_value_array_index ( return_vals , 1 ) , frozen ) ;
2003-12-05 22:18:47 +08:00
2006-03-28 05:09:32 +08:00
return return_vals ;
2003-12-05 22:18:47 +08:00
}
2012-05-04 06:50:23 +08:00
static GimpValueArray *
2007-12-03 02:05:54 +08:00
image_undo_thaw_invoker ( GimpProcedure * procedure ,
2012-05-04 06:50:23 +08:00
Gimp * gimp ,
GimpContext * context ,
GimpProgress * progress ,
const GimpValueArray * args ,
GError * * error )
2003-12-05 22:18:47 +08:00
{
gboolean success = TRUE ;
2012-05-04 06:50:23 +08:00
GimpValueArray * return_vals ;
2006-03-24 05:17:16 +08:00
GimpImage * image ;
2006-03-15 23:00:01 +08:00
gboolean thawed = FALSE ;
2003-12-05 22:18:47 +08:00
2012-05-04 06:50:23 +08:00
image = gimp_value_get_image ( gimp_value_array_index ( args , 0 ) , gimp ) ;
2003-12-05 22:18:47 +08:00
if ( success )
2006-03-24 05:17:16 +08:00
{
2006-10-25 17:41:05 +08:00
#if 0
GimpPlugIn * plug_in = gimp - > plug_in_manager - > current_plug_in ;
if ( plug_in )
success = gimp_plug_in_cleanup_undo_thaw ( plug_in , image ) ;
# endif
if ( success )
thawed = gimp_image_undo_thaw ( image ) ;
2006-03-24 05:17:16 +08:00
}
2003-12-05 22:18:47 +08:00
2008-08-16 21:57:57 +08:00
return_vals = gimp_procedure_get_return_values ( procedure , success ,
error ? * error : NULL ) ;
2003-12-05 22:18:47 +08:00
if ( success )
2012-05-04 06:50:23 +08:00
g_value_set_boolean ( gimp_value_array_index ( return_vals , 1 ) , thawed ) ;
2003-12-05 22:18:47 +08:00
2006-03-28 05:09:32 +08:00
return return_vals ;
2003-12-05 22:18:47 +08:00
}
2006-04-05 05:11:45 +08:00
void
2006-04-26 17:13:47 +08:00
register_undo_procs ( GimpPDB * pdb )
2003-12-05 22:18:47 +08:00
{
2006-04-05 05:11:45 +08:00
GimpProcedure * procedure ;
/*
* gimp - image - undo - group - start
*/
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new ( image_undo_group_start_invoker ) ;
2008-04-04 18:58:56 +08:00
gimp_object_set_static_name ( GIMP_OBJECT ( procedure ) ,
" gimp-image-undo-group-start " ) ;
2006-04-05 05:11:45 +08:00
gimp_procedure_set_static_strings ( procedure ,
" gimp-image-undo-group-start " ,
" Starts a group undo. " ,
" This function is used to start a group undo--necessary for logically combining two or more undo operations into a single operation. This call must be used in conjunction with a 'gimp-image-undo-group-end' call. " ,
" Spencer Kimball & Peter Mattis " ,
" Spencer Kimball & Peter Mattis " ,
" 1997 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_image_id ( " image " ,
" image " ,
" The ID of the image in which to open an undo group " ,
2006-05-07 02:57:51 +08:00
pdb - > gimp , FALSE ,
2006-04-05 05:11:45 +08:00
GIMP_PARAM_READWRITE ) ) ;
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure ( pdb , procedure ) ;
2006-04-07 16:16:26 +08:00
g_object_unref ( procedure ) ;
2006-04-05 05:11:45 +08:00
/*
* gimp - image - undo - group - end
*/
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new ( image_undo_group_end_invoker ) ;
2008-04-04 18:58:56 +08:00
gimp_object_set_static_name ( GIMP_OBJECT ( procedure ) ,
" gimp-image-undo-group-end " ) ;
2006-04-05 05:11:45 +08:00
gimp_procedure_set_static_strings ( procedure ,
" gimp-image-undo-group-end " ,
" Finish a group undo. " ,
" This function must be called once for each 'gimp-image-undo-group-start' call that is made. " ,
" Spencer Kimball & Peter Mattis " ,
" Spencer Kimball & Peter Mattis " ,
" 1997 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_image_id ( " image " ,
" image " ,
" The ID of the image in which to close an undo group " ,
2006-05-07 02:57:51 +08:00
pdb - > gimp , FALSE ,
2006-04-05 05:11:45 +08:00
GIMP_PARAM_READWRITE ) ) ;
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure ( pdb , procedure ) ;
2006-04-07 16:16:26 +08:00
g_object_unref ( procedure ) ;
2006-04-05 05:11:45 +08:00
/*
* gimp - image - undo - is - enabled
*/
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new ( image_undo_is_enabled_invoker ) ;
2008-04-04 18:58:56 +08:00
gimp_object_set_static_name ( GIMP_OBJECT ( procedure ) ,
" gimp-image-undo-is-enabled " ) ;
2006-04-05 05:11:45 +08:00
gimp_procedure_set_static_strings ( procedure ,
" gimp-image-undo-is-enabled " ,
" Check if the image's undo stack is enabled. " ,
2006-06-14 16:32:08 +08:00
" This procedure checks if the image's undo stack is currently enabled or disabled. This is useful when several plugins or scripts call each other and want to check if their caller has already used 'gimp-image-undo-disable' or 'gimp-image-undo-freeze'. " ,
2006-08-05 03:59:39 +08:00
" Rapha \xc3 \xab l Quinet <raphael@gimp.org> " ,
" Rapha \xc3 \xab l Quinet " ,
2006-04-05 05:11:45 +08:00
" 1999 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_image_id ( " image " ,
" image " ,
" The image " ,
2006-05-07 02:57:51 +08:00
pdb - > gimp , FALSE ,
2006-04-05 05:11:45 +08:00
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
g_param_spec_boolean ( " enabled " ,
" enabled " ,
" TRUE if undo is enabled for this image " ,
FALSE ,
GIMP_PARAM_READWRITE ) ) ;
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure ( pdb , procedure ) ;
2006-04-07 16:16:26 +08:00
g_object_unref ( procedure ) ;
2006-04-05 05:11:45 +08:00
/*
* gimp - image - undo - disable
*/
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new ( image_undo_disable_invoker ) ;
2008-04-04 18:58:56 +08:00
gimp_object_set_static_name ( GIMP_OBJECT ( procedure ) ,
" gimp-image-undo-disable " ) ;
2006-04-05 05:11:45 +08:00
gimp_procedure_set_static_strings ( procedure ,
" gimp-image-undo-disable " ,
" Disable the image's undo stack. " ,
2006-06-14 16:32:08 +08:00
" This procedure disables the image's undo stack, allowing subsequent operations to ignore their undo steps. This is generally called in conjunction with 'gimp-image-undo-enable' to temporarily disable an image undo stack. This is advantageous because saving undo steps can be time and memory intensive. " ,
2006-04-05 05:11:45 +08:00
" Spencer Kimball & Peter Mattis " ,
" Spencer Kimball & Peter Mattis " ,
" 1995-1996 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_image_id ( " image " ,
" image " ,
" The image " ,
2006-05-07 02:57:51 +08:00
pdb - > gimp , FALSE ,
2006-04-05 05:11:45 +08:00
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
g_param_spec_boolean ( " disabled " ,
" disabled " ,
" TRUE if the image undo has been disabled " ,
FALSE ,
GIMP_PARAM_READWRITE ) ) ;
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure ( pdb , procedure ) ;
2006-04-07 16:16:26 +08:00
g_object_unref ( procedure ) ;
2006-04-05 05:11:45 +08:00
/*
* gimp - image - undo - enable
*/
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new ( image_undo_enable_invoker ) ;
2008-04-04 18:58:56 +08:00
gimp_object_set_static_name ( GIMP_OBJECT ( procedure ) ,
" gimp-image-undo-enable " ) ;
2006-04-05 05:11:45 +08:00
gimp_procedure_set_static_strings ( procedure ,
" gimp-image-undo-enable " ,
" Enable the image's undo stack. " ,
2006-06-14 16:32:08 +08:00
" This procedure enables the image's undo stack, allowing subsequent operations to store their undo steps. This is generally called in conjunction with 'gimp-image-undo-disable' to temporarily disable an image undo stack. " ,
2006-04-05 05:11:45 +08:00
" Spencer Kimball & Peter Mattis " ,
" Spencer Kimball & Peter Mattis " ,
" 1995-1996 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_image_id ( " image " ,
" image " ,
" The image " ,
2006-05-07 02:57:51 +08:00
pdb - > gimp , FALSE ,
2006-04-05 05:11:45 +08:00
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
g_param_spec_boolean ( " enabled " ,
" enabled " ,
" TRUE if the image undo has been enabled " ,
FALSE ,
GIMP_PARAM_READWRITE ) ) ;
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure ( pdb , procedure ) ;
2006-04-07 16:16:26 +08:00
g_object_unref ( procedure ) ;
2006-04-05 05:11:45 +08:00
/*
* gimp - image - undo - freeze
*/
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new ( image_undo_freeze_invoker ) ;
2008-04-04 18:58:56 +08:00
gimp_object_set_static_name ( GIMP_OBJECT ( procedure ) ,
" gimp-image-undo-freeze " ) ;
2006-04-05 05:11:45 +08:00
gimp_procedure_set_static_strings ( procedure ,
" gimp-image-undo-freeze " ,
" Freeze the image's undo stack. " ,
2006-06-14 16:32:08 +08:00
" This procedure freezes the image's undo stack, allowing subsequent operations to ignore their undo steps. This is generally called in conjunction with 'gimp-image-undo-thaw' to temporarily disable an image undo stack. This is advantageous because saving undo steps can be time and memory intensive. 'gimp-image-undo-freeze' / 'gimp-image-undo-thaw' and 'gimp-image-undo-disable' / 'gimp-image-undo-enable' differ in that the former does not free up all undo steps when undo is thawed, so is more suited to interactive in-situ previews. It is important in this case that the image is back to the same state it was frozen in before thawing, else 'undo' behaviour is undefined. " ,
2006-04-05 05:11:45 +08:00
" Adam D. Moss " ,
" Adam D. Moss " ,
" 1999 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_image_id ( " image " ,
" image " ,
" The image " ,
2006-05-07 02:57:51 +08:00
pdb - > gimp , FALSE ,
2006-04-05 05:11:45 +08:00
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
g_param_spec_boolean ( " frozen " ,
" frozen " ,
" TRUE if the image undo has been frozen " ,
FALSE ,
GIMP_PARAM_READWRITE ) ) ;
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure ( pdb , procedure ) ;
2006-04-07 16:16:26 +08:00
g_object_unref ( procedure ) ;
2006-04-05 05:11:45 +08:00
/*
* gimp - image - undo - thaw
*/
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new ( image_undo_thaw_invoker ) ;
2008-04-04 18:58:56 +08:00
gimp_object_set_static_name ( GIMP_OBJECT ( procedure ) ,
" gimp-image-undo-thaw " ) ;
2006-04-05 05:11:45 +08:00
gimp_procedure_set_static_strings ( procedure ,
" gimp-image-undo-thaw " ,
" Thaw the image's undo stack. " ,
2006-06-14 16:32:08 +08:00
" This procedure thaws the image's undo stack, allowing subsequent operations to store their undo steps. This is generally called in conjunction with 'gimp-image-undo-freeze' to temporarily freeze an image undo stack. 'gimp-image-undo-thaw' does NOT free the undo stack as 'gimp-image-undo-enable' does, so is suited for situations where one wishes to leave the undo stack in the same state in which one found it despite non-destructively playing with the image in the meantime. An example would be in-situ plugin previews. Balancing freezes and thaws and ensuring image consistancy is the responsibility of the caller. " ,
2006-04-05 05:11:45 +08:00
" Adam D. Moss " ,
" Adam D. Moss " ,
" 1999 " ,
NULL ) ;
gimp_procedure_add_argument ( procedure ,
gimp_param_spec_image_id ( " image " ,
" image " ,
" The image " ,
2006-05-07 02:57:51 +08:00
pdb - > gimp , FALSE ,
2006-04-05 05:11:45 +08:00
GIMP_PARAM_READWRITE ) ) ;
gimp_procedure_add_return_value ( procedure ,
g_param_spec_boolean ( " thawed " ,
" thawed " ,
" TRUE if the image undo has been thawed " ,
FALSE ,
GIMP_PARAM_READWRITE ) ) ;
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure ( pdb , procedure ) ;
2006-04-07 16:16:26 +08:00
g_object_unref ( procedure ) ;
2006-04-05 05:11:45 +08:00
}