1997-11-24 22:05:25 +00:00
|
|
|
/* The GIMP -- an image manipulation program
|
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (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
|
|
|
|
* along with this program; if not, write to the Free Software
|
1998-04-13 05:44:11 +00:00
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
1997-11-24 22:05:25 +00:00
|
|
|
*/
|
2000-12-29 15:22:01 +00:00
|
|
|
|
2003-02-14 14:14:29 +00:00
|
|
|
#ifndef __GIMP_IMAGE_UNDO_PUSH_H__
|
|
|
|
#define __GIMP_IMAGE_UNDO_PUSH_H__
|
1997-11-24 22:05:25 +00:00
|
|
|
|
|
|
|
|
2002-02-23 17:29:19 +00:00
|
|
|
/* image undos */
|
|
|
|
|
2003-02-14 14:14:29 +00:00
|
|
|
gboolean gimp_image_undo_push_image (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc,
|
|
|
|
GimpDrawable *drawable,
|
|
|
|
gint x1,
|
|
|
|
gint y1,
|
|
|
|
gint x2,
|
|
|
|
gint y2);
|
|
|
|
gboolean gimp_image_undo_push_image_mod (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc,
|
|
|
|
GimpDrawable *drawable,
|
|
|
|
gint x1,
|
|
|
|
gint y1,
|
|
|
|
gint x2,
|
|
|
|
gint y2,
|
|
|
|
TileManager *tiles,
|
|
|
|
gboolean sparse);
|
|
|
|
gboolean gimp_image_undo_push_image_type (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc);
|
|
|
|
gboolean gimp_image_undo_push_image_size (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc);
|
|
|
|
gboolean gimp_image_undo_push_image_resolution (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc);
|
|
|
|
gboolean gimp_image_undo_push_image_qmask (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc);
|
|
|
|
gboolean gimp_image_undo_push_image_guide (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc,
|
|
|
|
GimpGuide *guide);
|
2003-03-18 13:49:02 +00:00
|
|
|
gboolean gimp_image_undo_push_image_colormap (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc);
|
2002-02-23 17:29:19 +00:00
|
|
|
|
|
|
|
|
2002-08-20 10:22:23 +00:00
|
|
|
/* mask undo */
|
|
|
|
|
2003-02-14 14:14:29 +00:00
|
|
|
gboolean gimp_image_undo_push_mask (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc,
|
|
|
|
GimpChannel *mask);
|
2002-08-20 10:22:23 +00:00
|
|
|
|
|
|
|
|
2002-02-26 00:04:55 +00:00
|
|
|
/* item undos */
|
|
|
|
|
2003-02-14 14:14:29 +00:00
|
|
|
gboolean gimp_image_undo_push_item_rename (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc,
|
|
|
|
GimpItem *item);
|
2003-05-08 19:11:17 +00:00
|
|
|
gboolean gimp_image_undo_push_item_displace (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc,
|
|
|
|
GimpItem *item);
|
2003-05-08 20:26:01 +00:00
|
|
|
gboolean gimp_image_undo_push_item_linked (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc,
|
|
|
|
GimpItem *item);
|
2002-02-26 00:04:55 +00:00
|
|
|
|
|
|
|
|
Made drawable/layer properties (visibility, opacity etc.) undoable (fixes
2003-03-17 Michael Natterer <mitch@gimp.org>
Made drawable/layer properties (visibility, opacity etc.)
undoable (fixes bug #73893).
* app/core/core-enums.[ch]: added undo types/groups for
visibility, mode, opacity, linked and preserve_trans.
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimpitemundo.[ch]: new GimpUndo subclass which holds a
ref'ed GimpItem pointer so (1) this doesn't need to be done by all
undo steps related to an item and (2) the item the undo step is
for can be determined from outside the undo system.
* app/core/gimpimage-undo.[ch]: added gimp_image_undo_push_item()
which returns a new GimpItemUndo.
* app/core/gimpimage-undo-push.[ch]: use it for all item related
undo steps. Removed lots of GimpItem, GimpLayer, GimpDrawable
and GimpVectors pointers from the private undo structs. Added
undo push functions for the new undo types added above.
* app/core/gimpdrawable.[ch] (gimp_drawable_set_visible): added
"gboolean push_undo" parameter.
* app/core/gimplayer.[ch] (gimp_layer_set_opacity, _mode,
_preserve_trans, _linked): added "gboolean push_undo" parameters.
* app/core/gimpimage-mask.c
* app/core/gimpimage-merge.c
* app/core/gimplayer-floating-sel.c
* app/tools/gimpmovetool.c
* app/xcf/xcf-load.c
* app/widgets/gimpdrawablelistitem.c
* app/widgets/gimplayerlistitem.c
* app/widgets/gimplayerlistview.c: changed accordingly.
* tools/pdbgen/pdb/channel.pdb
* tools/pdbgen/pdb/layer.pdb: ditto. Added '$undo' paramaters to
the foo_accessors() functions. Removed $func from foo_accesors()
because we don't manipulate items without using getters/setters
any longer.
* app/pdb/channel_cmds.c
* app/pdb/layer_cmds.c: regenerated.
* app/widgets/gimpcellrenderertoggle.[ch]: added "clicked" signal
which carries an additional "GdkModifierType state" parameter as
in GimpCellRendererViewable .
* app/widgets/gimpcontainertreeview.c: emit "clicked" from
the toggle renderer, not "toggled" so the callbacks get the
modifier state.
* app/widgets/gimpdrawabletreeview.c: resurrected the "exclusive
visible by <shift>+click" feature as in 1.2.
* app/widgets/gimplayertreeview.c: compress layer opacity undos by
looking at the top of the undo stack and not pushing an undo if
there already is a GIMP_UNDO_DRAWABLE_OPACITY for the active
layer.
2003-03-17 18:02:41 +00:00
|
|
|
/* drawable undos */
|
|
|
|
|
|
|
|
gboolean gimp_image_undo_push_drawable_visibility (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc,
|
|
|
|
GimpDrawable *drawable);
|
|
|
|
|
|
|
|
|
2002-02-23 17:29:19 +00:00
|
|
|
/* layer undos */
|
|
|
|
|
2003-02-14 14:14:29 +00:00
|
|
|
gboolean gimp_image_undo_push_layer_add (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc,
|
|
|
|
GimpLayer *layer,
|
|
|
|
gint prev_position,
|
|
|
|
GimpLayer *prev_layer);
|
|
|
|
gboolean gimp_image_undo_push_layer_remove (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc,
|
|
|
|
GimpLayer *layer,
|
|
|
|
gint prev_position,
|
|
|
|
GimpLayer *prev_layer);
|
|
|
|
gboolean gimp_image_undo_push_layer_mod (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc,
|
|
|
|
GimpLayer *layer);
|
|
|
|
gboolean gimp_image_undo_push_layer_mask_add (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc,
|
|
|
|
GimpLayer *layer,
|
|
|
|
GimpLayerMask *mask);
|
|
|
|
gboolean gimp_image_undo_push_layer_mask_remove (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc,
|
|
|
|
GimpLayer *layer,
|
|
|
|
GimpLayerMask *mask);
|
|
|
|
gboolean gimp_image_undo_push_layer_reposition (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc,
|
|
|
|
GimpLayer *layer);
|
Made drawable/layer properties (visibility, opacity etc.) undoable (fixes
2003-03-17 Michael Natterer <mitch@gimp.org>
Made drawable/layer properties (visibility, opacity etc.)
undoable (fixes bug #73893).
* app/core/core-enums.[ch]: added undo types/groups for
visibility, mode, opacity, linked and preserve_trans.
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimpitemundo.[ch]: new GimpUndo subclass which holds a
ref'ed GimpItem pointer so (1) this doesn't need to be done by all
undo steps related to an item and (2) the item the undo step is
for can be determined from outside the undo system.
* app/core/gimpimage-undo.[ch]: added gimp_image_undo_push_item()
which returns a new GimpItemUndo.
* app/core/gimpimage-undo-push.[ch]: use it for all item related
undo steps. Removed lots of GimpItem, GimpLayer, GimpDrawable
and GimpVectors pointers from the private undo structs. Added
undo push functions for the new undo types added above.
* app/core/gimpdrawable.[ch] (gimp_drawable_set_visible): added
"gboolean push_undo" parameter.
* app/core/gimplayer.[ch] (gimp_layer_set_opacity, _mode,
_preserve_trans, _linked): added "gboolean push_undo" parameters.
* app/core/gimpimage-mask.c
* app/core/gimpimage-merge.c
* app/core/gimplayer-floating-sel.c
* app/tools/gimpmovetool.c
* app/xcf/xcf-load.c
* app/widgets/gimpdrawablelistitem.c
* app/widgets/gimplayerlistitem.c
* app/widgets/gimplayerlistview.c: changed accordingly.
* tools/pdbgen/pdb/channel.pdb
* tools/pdbgen/pdb/layer.pdb: ditto. Added '$undo' paramaters to
the foo_accessors() functions. Removed $func from foo_accesors()
because we don't manipulate items without using getters/setters
any longer.
* app/pdb/channel_cmds.c
* app/pdb/layer_cmds.c: regenerated.
* app/widgets/gimpcellrenderertoggle.[ch]: added "clicked" signal
which carries an additional "GdkModifierType state" parameter as
in GimpCellRendererViewable .
* app/widgets/gimpcontainertreeview.c: emit "clicked" from
the toggle renderer, not "toggled" so the callbacks get the
modifier state.
* app/widgets/gimpdrawabletreeview.c: resurrected the "exclusive
visible by <shift>+click" feature as in 1.2.
* app/widgets/gimplayertreeview.c: compress layer opacity undos by
looking at the top of the undo stack and not pushing an undo if
there already is a GIMP_UNDO_DRAWABLE_OPACITY for the active
layer.
2003-03-17 18:02:41 +00:00
|
|
|
gboolean gimp_image_undo_push_layer_mode (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc,
|
|
|
|
GimpLayer *layer);
|
|
|
|
gboolean gimp_image_undo_push_layer_opacity (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc,
|
|
|
|
GimpLayer *layer);
|
|
|
|
gboolean gimp_image_undo_push_layer_preserve_trans (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc,
|
2003-02-14 14:14:29 +00:00
|
|
|
GimpLayer *layer);
|
2002-02-23 17:29:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* channel undos */
|
|
|
|
|
2003-02-14 14:14:29 +00:00
|
|
|
gboolean gimp_image_undo_push_channel_add (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc,
|
|
|
|
GimpChannel *channel,
|
|
|
|
gint prev_position,
|
|
|
|
GimpChannel *prev_channel);
|
|
|
|
gboolean gimp_image_undo_push_channel_remove (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc,
|
|
|
|
GimpChannel *channel,
|
|
|
|
gint prev_position,
|
|
|
|
GimpChannel *prev_channel);
|
|
|
|
gboolean gimp_image_undo_push_channel_mod (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc,
|
|
|
|
GimpChannel *channel);
|
|
|
|
gboolean gimp_image_undo_push_channel_reposition (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc,
|
|
|
|
GimpChannel *channel);
|
2003-03-17 02:25:39 +00:00
|
|
|
gboolean gimp_image_undo_push_channel_color (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc,
|
|
|
|
GimpChannel *channel);
|
2002-02-23 17:29:19 +00:00
|
|
|
|
|
|
|
|
2002-02-24 21:00:58 +00:00
|
|
|
/* vectors undos */
|
|
|
|
|
2003-02-14 14:14:29 +00:00
|
|
|
gboolean gimp_image_undo_push_vectors_add (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc,
|
|
|
|
GimpVectors *vectors,
|
|
|
|
gint prev_position,
|
|
|
|
GimpVectors *prev_vectors);
|
|
|
|
gboolean gimp_image_undo_push_vectors_remove (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc,
|
|
|
|
GimpVectors *channel,
|
|
|
|
gint prev_position,
|
|
|
|
GimpVectors *prev_vectors);
|
|
|
|
gboolean gimp_image_undo_push_vectors_mod (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc,
|
|
|
|
GimpVectors *vectors);
|
|
|
|
gboolean gimp_image_undo_push_vectors_reposition (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc,
|
|
|
|
GimpVectors *vectors);
|
2002-02-24 21:00:58 +00:00
|
|
|
|
|
|
|
|
2002-02-23 17:29:19 +00:00
|
|
|
/* floating selection undos */
|
|
|
|
|
2003-02-14 14:14:29 +00:00
|
|
|
gboolean gimp_image_undo_push_fs_to_layer (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc,
|
|
|
|
GimpLayer *floating_layer,
|
|
|
|
GimpDrawable *drawable);
|
|
|
|
gboolean gimp_image_undo_push_fs_rigor (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc,
|
|
|
|
GimpLayer *floating_layer);
|
|
|
|
gboolean gimp_image_undo_push_fs_relax (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc,
|
|
|
|
GimpLayer *floating_layer);
|
2002-02-23 17:29:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* parasite undos */
|
|
|
|
|
2003-02-14 14:14:29 +00:00
|
|
|
gboolean gimp_image_undo_push_image_parasite (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc,
|
|
|
|
gpointer parasite);
|
|
|
|
gboolean gimp_image_undo_push_image_parasite_remove (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc,
|
|
|
|
const gchar *name);
|
2002-02-23 17:29:19 +00:00
|
|
|
|
2003-02-14 14:14:29 +00:00
|
|
|
gboolean gimp_image_undo_push_item_parasite (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc,
|
|
|
|
GimpItem *item,
|
|
|
|
gpointer parasite);
|
|
|
|
gboolean gimp_image_undo_push_item_parasite_remove (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc,
|
|
|
|
GimpItem *item,
|
|
|
|
const gchar *name);
|
2002-02-23 17:29:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* EEK undo */
|
|
|
|
|
2003-02-14 14:14:29 +00:00
|
|
|
gboolean gimp_image_undo_push_cantundo (GimpImage *gimage,
|
|
|
|
const gchar *undo_desc);
|
2002-02-23 17:29:19 +00:00
|
|
|
|
|
|
|
|
2003-02-14 14:14:29 +00:00
|
|
|
#endif /* __GIMP_IMAGE_UNDO_PUSH_H__ */
|