2003-02-20 Michael Natterer <mitch@gimp.org> Reimplemented the undo history: * app/Makefile.am * app/undo_history.[ch]: removed. Changes/cleanups to the undo system to enable/simplify the new undo history implementation: * app/core/core-types.h: removed enum undo_event_t. Removed the GimpImage parameter from GimpUndoPopFunc and GimpUndoFreeFunc because GimpUndo has a GimpImage pointer now (see below). * app/core/core-enums.[ch]: added enum GimpUndoEvent. Added an enum value for REDO_EXPIRED. * app/core/gimpimage.[ch]: added a GimpUndo pointer to the "undo_event" signal which needs to be passed for all events except UNDO_FREE. * app/display/gimpdisplayshell-handlers.c: changed accordingly. * app/core/gimpundo.[ch]: added a GimpImage pointer to the GimpUndo struct. Removed GimpImage parameters all over the place. Added preview stuff. The preview creation needs to be triggered explicitly using gimp_undo_create_preview() because the GimpUndo can't know when it's possible to create the preview. * app/core/gimpimage-undo-push.c * app/paint/gimppaintcore-undo.c * app/tools/gimptransformtool-undo.c: changed accordingly, cleanup. * app/core/gimpundostack.[ch]: ditto. Return the freed undo from gimp_undo_stack_free_bottom(). Removed unused container signal handlers. * app/core/gimpimage-undo.c: free the redo stack the same way old undos are freed (from bottom up). Emit "undo_event" with event == REDO_EXPIRED for each removed redo. * app/core/gimpmarshal.list: added new marshallers. New undo history implementation: * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpundoeditor.[ch] * app/widgets/gimpundopreview.[ch]: new widgets for the undo step previews and the history itself. * app/widgets/gimppreview-utils.c: added GimpUndoPreview to the list of possible preview types. * app/gui/dialogs-constructors.[ch] * app/gui/dialogs-menu.c * app/gui/dialogs.c * app/gui/image-menu.c * app/gui/toolbox-menu.c: removed the old and added the new undo history to the dialog factory and the various dialog menus. * app/widgets/gimpdnd.[ch]: don't warn if a GType has no corresponding DND type. Instead, return FALSE from the function that failed. * app/widgets/gimppreview.c: check the return value of gimpdnd functions. Not only add drag sources but also remove them when no longer needed. * app/widgets/gimpselectioneditor.h: removed unneeded inclusion of "gui/gui-types.h".
122 lines
4.9 KiB
C
122 lines
4.9 KiB
C
/* 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
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*/
|
|
|
|
#ifndef __WIDGETS_TYPES_H__
|
|
#define __WIDGETS_TYPES_H__
|
|
|
|
|
|
#include "libgimpwidgets/gimpwidgetstypes.h"
|
|
|
|
#include "core/core-types.h"
|
|
|
|
#include "widgets/widgets-enums.h"
|
|
|
|
|
|
/* non-widget objects */
|
|
|
|
typedef struct _GimpDeviceInfo GimpDeviceInfo;
|
|
typedef struct _GimpDialogFactory GimpDialogFactory;
|
|
typedef struct _GimpItemFactory GimpItemFactory;
|
|
typedef struct _GimpMenuFactory GimpMenuFactory;
|
|
|
|
|
|
/* widgets */
|
|
|
|
typedef struct _GimpPreview GimpPreview;
|
|
typedef struct _GimpBrushPreview GimpBrushPreview;
|
|
typedef struct _GimpBufferPreview GimpBufferPreview;
|
|
typedef struct _GimpDrawablePreview GimpDrawablePreview;
|
|
typedef struct _GimpGradientPreview GimpGradientPreview;
|
|
typedef struct _GimpImagePreview GimpImagePreview;
|
|
typedef struct _GimpImagefilePreview GimpImagefilePreview;
|
|
typedef struct _GimpNavigationPreview GimpNavigationPreview;
|
|
typedef struct _GimpPalettePreview GimpPalettePreview;
|
|
typedef struct _GimpPatternPreview GimpPatternPreview;
|
|
typedef struct _GimpToolInfoPreview GimpToolInfoPreview;
|
|
typedef struct _GimpUndoPreview GimpUndoPreview;
|
|
|
|
typedef struct _GimpContainerMenu GimpContainerMenu;
|
|
typedef struct _GimpContainerMenuImpl GimpContainerMenuImpl;
|
|
|
|
typedef struct _GimpMenuItem GimpMenuItem;
|
|
typedef struct _GimpEnumMenu GimpEnumMenu;
|
|
|
|
typedef struct _GimpEditor GimpEditor;
|
|
typedef struct _GimpColorEditor GimpColorEditor;
|
|
typedef struct _GimpColormapEditor GimpColormapEditor;
|
|
typedef struct _GimpDataEditor GimpDataEditor;
|
|
typedef struct _GimpBrushEditor GimpBrushEditor;
|
|
typedef struct _GimpGradientEditor GimpGradientEditor;
|
|
typedef struct _GimpPaletteEditor GimpPaletteEditor;
|
|
typedef struct _GimpSelectionEditor GimpSelectionEditor;
|
|
typedef struct _GimpUndoEditor GimpUndoEditor;
|
|
|
|
typedef struct _GimpContainerView GimpContainerView;
|
|
typedef struct _GimpContainerListView GimpContainerListView;
|
|
typedef struct _GimpContainerGridView GimpContainerGridView;
|
|
|
|
typedef struct _GimpItemListView GimpItemListView;
|
|
typedef struct _GimpDrawableListView GimpDrawableListView;
|
|
typedef struct _GimpLayerListView GimpLayerListView;
|
|
typedef struct _GimpChannelListView GimpChannelListView;
|
|
typedef struct _GimpVectorsListView GimpVectorsListView;
|
|
|
|
typedef struct _GimpContainerEditor GimpContainerEditor;
|
|
typedef struct _GimpBufferView GimpBufferView;
|
|
typedef struct _GimpDocumentView GimpDocumentView;
|
|
typedef struct _GimpImageView GimpImageView;
|
|
typedef struct _GimpDataFactoryView GimpDataFactoryView;
|
|
typedef struct _GimpBrushFactoryView GimpBrushFactoryView;
|
|
|
|
typedef struct _GimpListItem GimpListItem;
|
|
typedef struct _GimpItemListItem GimpItemListItem;
|
|
typedef struct _GimpChannelListItem GimpChannelListItem;
|
|
typedef struct _GimpDrawableListItem GimpDrawableListItem;
|
|
typedef struct _GimpLayerListItem GimpLayerListItem;
|
|
typedef struct _GimpComponentListItem GimpComponentListItem;
|
|
|
|
typedef struct _GimpDock GimpDock;
|
|
typedef struct _GimpToolbox GimpToolbox;
|
|
typedef struct _GimpImageDock GimpImageDock;
|
|
typedef struct _GimpDockable GimpDockable;
|
|
typedef struct _GimpDockbook GimpDockbook;
|
|
|
|
typedef struct _GimpViewableDialog GimpViewableDialog;
|
|
|
|
typedef struct _GimpFontSelection GimpFontSelection;
|
|
typedef struct _GimpFontSelectionDialog GimpFontSelectionDialog;
|
|
|
|
typedef struct _GimpHistogramView GimpHistogramView;
|
|
typedef struct _GimpHistogramBox GimpHistogramBox;
|
|
|
|
|
|
/* structs */
|
|
|
|
typedef struct _GimpItemFactoryEntry GimpItemFactoryEntry;
|
|
|
|
|
|
/* function types */
|
|
|
|
typedef void (* GimpItemFactorySetupFunc) (GimpItemFactory *factory);
|
|
typedef void (* GimpItemFactoryUpdateFunc) (GtkItemFactory *factory,
|
|
gpointer data);
|
|
typedef gchar * (* GimpItemGetNameFunc) (GtkWidget *widget,
|
|
gchar **tooltip);
|
|
|
|
|
|
#endif /* __WIDGETS_TYPES_H__ */
|