gimp/app/gimpimage.h

287 lines
11 KiB
C
Raw Normal View History

/* 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 __GIMPIMAGE_H__
#define __GIMPIMAGE_H__
#include "apptypes.h"
#include "procedural_db.h"
#include "gimpimageF.h"
#include "boundary.h"
#include "drawable.h"
#include "channel.h"
#include "layer.h"
Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h app/channel_cmds.c app/channel_cmds.h app/drawable_cmds.c app/gimage_cmds.c app/gimpdrawable.c app/gimpdrawable.h app/gimpdrawableP.h app/gimpimage.c app/gimpimage.h app/gimpimageP.h app/internal_procs.c app/layer.c app/layer.h app/layer_cmds.c app/layer_cmds.h app/parasite_cmds.c app/perspective_tool.c app/plug_in.c app/procedural_db.c app/rotate_tool.c app/scale_tool.c app/shear_tool.c app/transform_core.c app/transform_core.h docs/parasites.txt libgimp/Makefile.am libgimp/gimp.c libgimp/gimp.h libgimp/gimpdrawable.c libgimp/gimpimage.c libgimp/gimpprotocol.c libgimp/gimpprotocol.h plug-ins/gif/gif.c plug-ins/script-fu/script-fu.c plug-ins/tiff/tiff.c Added Files: libgimp/gimpmatrix.c libgimp/gimpmatrix.h libgimp/parasite.c libgimp/parasite.h libgimp/parasiteF.h libgimp/parasiteP.h Removed Files: app/parasite.c app/parasite.h app/parasiteF.h app/parasiteP.h libgimp/gimpparasite.c libgimp/gimpparasite.h Tue Oct 13 19:24:03 1998 Jay Cox (jaycox@earthlink.net) * app/parasite.c * app/parasite.h * app/parasiteF.h * app/parasiteP.h : use a single name field instead of seperate creator/type fields. moved to libgimp/parasite* * libgimp/Makefile.am * libgimp/gimp.c * libgimp/gimp.h * libgimp/gimpdrawable.c * libgimp/gimpimage.c * libgimp/gimpprotocol.c * libgimp/gimpprotocol.h * app/Makefile.am * app/channel.c * app/channel.h * app/channel_cmds.c * app/channel_cmds.h * app/drawable_cmds.c * app/gimage_cmds.c * app/gimpdrawable.c * app/gimpdrawable.h * app/gimpdrawableP.h * app/gimpimage.c * app/gimpimage.h * app/gimpimageP.h * app/internal_procs.c * app/layer.c * app/layer.h * app/layer_cmds.c * app/layer_cmds.h * app/parasite_cmds.c * app/plug_in.c * app/procedural_db.c: Add tattoos to layers and drawables. Use new style parasites. * libgimp/gimpmatrix.c * libgimp/gimpmatrix.h: new files for matrix math. * app/perspective_tool.c * app/rotate_tool.c * app/scale_tool.c * app/shear_tool.c * app/transform_core.c * app/transform_core.h: use GimpMatrix instead of the old matrix code from transform_core. * ligimp/gimpparasite*: removed. now useing the same source for plug-ins and the core. * plug-ins/script-fu/script-fu.c * plug-ins/tiff/tiff.c * plug-ins/gif/gif.c: updated to use new style parasites.
1998-10-14 10:54:02 +08:00
#include <libgimp/parasiteF.h>
Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from Sat Feb 20 16:12:33 CST 1999 Shawn T. Amundson <amundson@gimp.org> * app/tips_dialog.c: Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from prev/next buttons (they are like toolbar buttons), changed abreviated prev to previous, prev/next button are now same size, cancel button is in a button box. Added vboxes where necessary to prevent prev/next and check button from filling vertically. * app/app_procs.c: when splashscreen dialog is larger than the logo, (due to huge font), center logo. * app/file_new_dialog.c: patch from Marco Lamb <lm@geocities.com> disallows resizing, changes vertical expanding of widgets to not occur * app/palette.c: patch from Marco Lamb <lm@geocities.com>. Makes +/- buttons for zoom pixmaps (eventually, these can be replaced with a magnifying glass with a little +/- I think), so that they no longer expand as they did before. I modified his patch so it did not create a misused toolbar. I did some other stuff here too, moved Close button to the left, made it the window's default, and unset GTK_RECEIVES_DEFAULT off of the non-bottom buttons. * app/actionarea.c: another patch from Marco Lamb <lm@geocities.com>. This one changes buttons to be put in a button box which is right justified. If we decide later that spread is better, we can change this easy enough. * app/tools/zoom_in.xpm, app/tools/zoom_out.xpm: + and - graphics. * libgimp/gimpunit.h libgimp/gimpunit.c: New files from Michael Natterer <mitschel@cs.tu-berlin.de>, gimp_unit_* routines. * app/gimage.h app/gimpimage.h app/gimpimage.c app/gimpimageP.h app/xcf.c: Patches from Michael Natterer <mitschel@cs.tu-berlin.de>, which keep a unit assocated with an image.
1999-02-21 10:08:15 +08:00
#include <libgimp/gimpunit.h>
#include "plug_in.h"
#include "temp_buf.h"
#include "tile_manager.h"
#include "pathsP.h"
#define GIMP_TYPE_IMAGE gimp_image_get_type()
#define GIMP_IMAGE(obj) GTK_CHECK_CAST (obj, GIMP_TYPE_IMAGE, GimpImage)
#define GIMP_IS_IMAGE(obj) GTK_CHECK_TYPE (obj, GIMP_TYPE_IMAGE)
#define TYPE_HAS_ALPHA(t) ((t)==RGBA_GIMAGE || (t)==GRAYA_GIMAGE || (t)==INDEXEDA_GIMAGE)
#define GRAY_PIX 0
#define ALPHA_G_PIX 1
#define RED_PIX 0
#define GREEN_PIX 1
#define BLUE_PIX 2
#define ALPHA_PIX 3
#define INDEXED_PIX 0
#define ALPHA_I_PIX 1
#define COLORMAP_SIZE 768
typedef enum /*< skip >*/
{
add sample_colorize and curve_bend defs * plug-ins/common/plugin-defs.pl: add sample_colorize and curve_bend defs * libgimp/color_selector.h: minor consistency cleanup * libgimp/gimpchainbutton.[ch]: use new style gtk object helper macros * libgimp/gimpfileselection.c * libgimp/gimpmatrix.h: minor cleanup * libgimp/gimpintl.h: resync with gnome-i18n.h * libgimp/color_display.h * app/gimp.sym * app/gdisplay_color.[ch] * app/app_procs.c * app/gdisplay.h * app/image_render.c: color display transformation code. Still unfinished, so it's not activated yet. * app/buildmenu.h: remove unused defines (PULLDOWN, POPUP, OPTION) * app/colormaps.[ch] * app/image_render.c: remove vestigal dithering stuff * app/convolve.h * app/gimpdrawable.h * app/gimpimage.h * app/lut_funcs.h * app/paint_funcs.h * app/plug_in.h: enum nick changes from Marc * app/channel_ops.c * app/crop.c * app/gdisplay.c * app/gimpimage.[ch] * app/move.c: s/([A-Z]+)_GUIDE/ORIENTATION_$1/ * app/flip_tool.[ch] * app/shear_tool.[ch]: use ORIENTATION_* constants instead of our own * app/disp_callbacks.c: remove HORIZONTAL and VERTICAL #defines * app/general.h: enumified TOKEN_* symbols * app/lc_dialog.c * app/paint_funcs.c: remove unused variables * tools/pdbgen/lib.pl: autogen gimpenums.h (unfinished) * tools/pdbgen/stddefs.pdb: new std_orientation_enum, remove layer_mode shortcut since we've skipped it in app/ * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/gimage.pdb * tools/pdbgen/pdb/guides.pdb * tools/pdbgen/pdb/layer.pdb * tools/pdbgen/pdb/tools.pdb: reflect above enum changes, whitespace cleanups * tools/pdbgen/enums.pl * app/brush_select_cmds.c * app/brushes_cmds.c * app/color_cmds.c * app/drawable_cmds.c * app/gimage_cmds.c * app/layer_cmds.c * app/procedural_db_cmds.c * app/tools_cmds.c: reflect pdb and enum nick changes above -Yosh
1999-07-29 07:00:08 +08:00
ORIENTATION_UNKNOWN,
ORIENTATION_HORIZONTAL,
ORIENTATION_VERTICAL
} InternalOrientationType;
typedef enum
{
HORIZONTAL,
VERTICAL,
UNKNOWN
add sample_colorize and curve_bend defs * plug-ins/common/plugin-defs.pl: add sample_colorize and curve_bend defs * libgimp/color_selector.h: minor consistency cleanup * libgimp/gimpchainbutton.[ch]: use new style gtk object helper macros * libgimp/gimpfileselection.c * libgimp/gimpmatrix.h: minor cleanup * libgimp/gimpintl.h: resync with gnome-i18n.h * libgimp/color_display.h * app/gimp.sym * app/gdisplay_color.[ch] * app/app_procs.c * app/gdisplay.h * app/image_render.c: color display transformation code. Still unfinished, so it's not activated yet. * app/buildmenu.h: remove unused defines (PULLDOWN, POPUP, OPTION) * app/colormaps.[ch] * app/image_render.c: remove vestigal dithering stuff * app/convolve.h * app/gimpdrawable.h * app/gimpimage.h * app/lut_funcs.h * app/paint_funcs.h * app/plug_in.h: enum nick changes from Marc * app/channel_ops.c * app/crop.c * app/gdisplay.c * app/gimpimage.[ch] * app/move.c: s/([A-Z]+)_GUIDE/ORIENTATION_$1/ * app/flip_tool.[ch] * app/shear_tool.[ch]: use ORIENTATION_* constants instead of our own * app/disp_callbacks.c: remove HORIZONTAL and VERTICAL #defines * app/general.h: enumified TOKEN_* symbols * app/lc_dialog.c * app/paint_funcs.c: remove unused variables * tools/pdbgen/lib.pl: autogen gimpenums.h (unfinished) * tools/pdbgen/stddefs.pdb: new std_orientation_enum, remove layer_mode shortcut since we've skipped it in app/ * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/gimage.pdb * tools/pdbgen/pdb/guides.pdb * tools/pdbgen/pdb/layer.pdb * tools/pdbgen/pdb/tools.pdb: reflect above enum changes, whitespace cleanups * tools/pdbgen/enums.pl * app/brush_select_cmds.c * app/brushes_cmds.c * app/color_cmds.c * app/drawable_cmds.c * app/gimage_cmds.c * app/layer_cmds.c * app/procedural_db_cmds.c * app/tools_cmds.c: reflect pdb and enum nick changes above -Yosh
1999-07-29 07:00:08 +08:00
} OrientationType;
typedef enum
{
RED_CHANNEL,
GREEN_CHANNEL,
BLUE_CHANNEL,
GRAY_CHANNEL,
INDEXED_CHANNEL,
AUXILLARY_CHANNEL
} ChannelType;
typedef enum
{
EXPAND_AS_NECESSARY,
CLIP_TO_IMAGE,
CLIP_TO_BOTTOM_LAYER,
FLATTEN_IMAGE
} MergeType;
/* Ugly! Move this someplace else! Prolly to gdisplay.. */
struct _Guide
{
int ref_count;
int position;
int orientation;
guint32 guide_ID;
};
typedef struct _GimpImageRepaintArg
{
Layer *layer;
guint x;
guint y;
guint width;
guint height;
} GimpImageRepaintArg;
GtkType gimp_image_get_type (void);
/* function declarations */
GimpImage * gimp_image_new (gint, gint,
GimpImageBaseType);
void gimp_image_set_filename (GimpImage *, gchar *);
void gimp_image_set_resolution (GimpImage *,
gdouble, gdouble);
void gimp_image_get_resolution (GimpImage *,
gdouble *, gdouble *);
Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from Sat Feb 20 16:12:33 CST 1999 Shawn T. Amundson <amundson@gimp.org> * app/tips_dialog.c: Add default to Cancel button, remove unset GTK_RECEIVES_DEFAULT from prev/next buttons (they are like toolbar buttons), changed abreviated prev to previous, prev/next button are now same size, cancel button is in a button box. Added vboxes where necessary to prevent prev/next and check button from filling vertically. * app/app_procs.c: when splashscreen dialog is larger than the logo, (due to huge font), center logo. * app/file_new_dialog.c: patch from Marco Lamb <lm@geocities.com> disallows resizing, changes vertical expanding of widgets to not occur * app/palette.c: patch from Marco Lamb <lm@geocities.com>. Makes +/- buttons for zoom pixmaps (eventually, these can be replaced with a magnifying glass with a little +/- I think), so that they no longer expand as they did before. I modified his patch so it did not create a misused toolbar. I did some other stuff here too, moved Close button to the left, made it the window's default, and unset GTK_RECEIVES_DEFAULT off of the non-bottom buttons. * app/actionarea.c: another patch from Marco Lamb <lm@geocities.com>. This one changes buttons to be put in a button box which is right justified. If we decide later that spread is better, we can change this easy enough. * app/tools/zoom_in.xpm, app/tools/zoom_out.xpm: + and - graphics. * libgimp/gimpunit.h libgimp/gimpunit.c: New files from Michael Natterer <mitschel@cs.tu-berlin.de>, gimp_unit_* routines. * app/gimage.h app/gimpimage.h app/gimpimage.c app/gimpimageP.h app/xcf.c: Patches from Michael Natterer <mitschel@cs.tu-berlin.de>, which keep a unit assocated with an image.
1999-02-21 10:08:15 +08:00
void gimp_image_set_unit (GimpImage *, GUnit);
GUnit gimp_image_get_unit (GimpImage *);
void gimp_image_set_save_proc (GimpImage *,
PlugInProcDef *);
PlugInProcDef * gimp_image_get_save_proc (GimpImage *);
gint gimp_image_get_width (const GimpImage *);
gint gimp_image_get_height (const GimpImage *);
void gimp_image_resize (GimpImage *,
gint, gint, gint, gint);
void gimp_image_scale (GimpImage *, gint, gint);
GimpImage * gimp_image_get_named (gchar *);
GimpImage * gimp_image_get_ID (gint);
TileManager * gimp_image_shadow (GimpImage *,
gint, gint, gint);
void gimp_image_free_shadow (GimpImage *);
void gimp_image_apply_image (GimpImage *, GimpDrawable *,
PixelRegion *, gint,
gint,
LayerModeEffects,
TileManager *, gint, gint);
void gimp_image_replace_image (GimpImage *, GimpDrawable *,
PixelRegion *, gint, gint,
PixelRegion *, gint, gint);
void gimp_image_get_foreground (GimpImage *, GimpDrawable *,
guchar *);
void gimp_image_get_background (GimpImage *, GimpDrawable *,
guchar *);
guchar * gimp_image_get_color_at (GimpImage *, gint, gint);
void gimp_image_get_color (GimpImage *,
GimpImageType,
guchar *,
guchar *);
void gimp_image_transform_color (GimpImage *,
GimpDrawable *,
guchar *,
guchar *,
GimpImageBaseType);
Guide* gimp_image_add_hguide (GimpImage *);
Guide* gimp_image_add_vguide (GimpImage *);
void gimp_image_add_guide (GimpImage *, Guide *);
void gimp_image_remove_guide (GimpImage *, Guide *);
void gimp_image_delete_guide (GimpImage *, Guide *);
1999-10-17 08:07:55 +08:00
Parasite * gimp_image_parasite_find (const GimpImage *,
const gchar *name);
gchar ** gimp_image_parasite_list (GimpImage *image,
1999-02-14 02:19:44 +08:00
gint *count);
1999-10-17 08:07:55 +08:00
void gimp_image_parasite_attach (GimpImage *, Parasite *);
void gimp_image_parasite_detach (GimpImage *, const gchar *);
Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h app/channel_cmds.c app/channel_cmds.h app/drawable_cmds.c app/gimage_cmds.c app/gimpdrawable.c app/gimpdrawable.h app/gimpdrawableP.h app/gimpimage.c app/gimpimage.h app/gimpimageP.h app/internal_procs.c app/layer.c app/layer.h app/layer_cmds.c app/layer_cmds.h app/parasite_cmds.c app/perspective_tool.c app/plug_in.c app/procedural_db.c app/rotate_tool.c app/scale_tool.c app/shear_tool.c app/transform_core.c app/transform_core.h docs/parasites.txt libgimp/Makefile.am libgimp/gimp.c libgimp/gimp.h libgimp/gimpdrawable.c libgimp/gimpimage.c libgimp/gimpprotocol.c libgimp/gimpprotocol.h plug-ins/gif/gif.c plug-ins/script-fu/script-fu.c plug-ins/tiff/tiff.c Added Files: libgimp/gimpmatrix.c libgimp/gimpmatrix.h libgimp/parasite.c libgimp/parasite.h libgimp/parasiteF.h libgimp/parasiteP.h Removed Files: app/parasite.c app/parasite.h app/parasiteF.h app/parasiteP.h libgimp/gimpparasite.c libgimp/gimpparasite.h Tue Oct 13 19:24:03 1998 Jay Cox (jaycox@earthlink.net) * app/parasite.c * app/parasite.h * app/parasiteF.h * app/parasiteP.h : use a single name field instead of seperate creator/type fields. moved to libgimp/parasite* * libgimp/Makefile.am * libgimp/gimp.c * libgimp/gimp.h * libgimp/gimpdrawable.c * libgimp/gimpimage.c * libgimp/gimpprotocol.c * libgimp/gimpprotocol.h * app/Makefile.am * app/channel.c * app/channel.h * app/channel_cmds.c * app/channel_cmds.h * app/drawable_cmds.c * app/gimage_cmds.c * app/gimpdrawable.c * app/gimpdrawable.h * app/gimpdrawableP.h * app/gimpimage.c * app/gimpimage.h * app/gimpimageP.h * app/internal_procs.c * app/layer.c * app/layer.h * app/layer_cmds.c * app/layer_cmds.h * app/parasite_cmds.c * app/plug_in.c * app/procedural_db.c: Add tattoos to layers and drawables. Use new style parasites. * libgimp/gimpmatrix.c * libgimp/gimpmatrix.h: new files for matrix math. * app/perspective_tool.c * app/rotate_tool.c * app/scale_tool.c * app/shear_tool.c * app/transform_core.c * app/transform_core.h: use GimpMatrix instead of the old matrix code from transform_core. * ligimp/gimpparasite*: removed. now useing the same source for plug-ins and the core. * plug-ins/script-fu/script-fu.c * plug-ins/tiff/tiff.c * plug-ins/gif/gif.c: updated to use new style parasites.
1998-10-14 10:54:02 +08:00
Tattoo gimp_image_get_new_tattoo (GimpImage *);
Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h app/channel_cmds.c app/channel_cmds.h app/drawable_cmds.c app/gimage_cmds.c app/gimpdrawable.c app/gimpdrawable.h app/gimpdrawableP.h app/gimpimage.c app/gimpimage.h app/gimpimageP.h app/internal_procs.c app/layer.c app/layer.h app/layer_cmds.c app/layer_cmds.h app/parasite_cmds.c app/perspective_tool.c app/plug_in.c app/procedural_db.c app/rotate_tool.c app/scale_tool.c app/shear_tool.c app/transform_core.c app/transform_core.h docs/parasites.txt libgimp/Makefile.am libgimp/gimp.c libgimp/gimp.h libgimp/gimpdrawable.c libgimp/gimpimage.c libgimp/gimpprotocol.c libgimp/gimpprotocol.h plug-ins/gif/gif.c plug-ins/script-fu/script-fu.c plug-ins/tiff/tiff.c Added Files: libgimp/gimpmatrix.c libgimp/gimpmatrix.h libgimp/parasite.c libgimp/parasite.h libgimp/parasiteF.h libgimp/parasiteP.h Removed Files: app/parasite.c app/parasite.h app/parasiteF.h app/parasiteP.h libgimp/gimpparasite.c libgimp/gimpparasite.h Tue Oct 13 19:24:03 1998 Jay Cox (jaycox@earthlink.net) * app/parasite.c * app/parasite.h * app/parasiteF.h * app/parasiteP.h : use a single name field instead of seperate creator/type fields. moved to libgimp/parasite* * libgimp/Makefile.am * libgimp/gimp.c * libgimp/gimp.h * libgimp/gimpdrawable.c * libgimp/gimpimage.c * libgimp/gimpprotocol.c * libgimp/gimpprotocol.h * app/Makefile.am * app/channel.c * app/channel.h * app/channel_cmds.c * app/channel_cmds.h * app/drawable_cmds.c * app/gimage_cmds.c * app/gimpdrawable.c * app/gimpdrawable.h * app/gimpdrawableP.h * app/gimpimage.c * app/gimpimage.h * app/gimpimageP.h * app/internal_procs.c * app/layer.c * app/layer.h * app/layer_cmds.c * app/layer_cmds.h * app/parasite_cmds.c * app/plug_in.c * app/procedural_db.c: Add tattoos to layers and drawables. Use new style parasites. * libgimp/gimpmatrix.c * libgimp/gimpmatrix.h: new files for matrix math. * app/perspective_tool.c * app/rotate_tool.c * app/scale_tool.c * app/shear_tool.c * app/transform_core.c * app/transform_core.h: use GimpMatrix instead of the old matrix code from transform_core. * ligimp/gimpparasite*: removed. now useing the same source for plug-ins and the core. * plug-ins/script-fu/script-fu.c * plug-ins/tiff/tiff.c * plug-ins/gif/gif.c: updated to use new style parasites.
1998-10-14 10:54:02 +08:00
void gimp_image_set_paths (GimpImage *, PathsList *);
PathsList * gimp_image_get_paths (GimpImage *);
/* Temporary hack till colormap manipulation is encapsulated in functions.
Call this whenever you modify an image's colormap. The ncol argument
specifies which color has changed, or negative if there's a bigger change.
Currently, use this also when the image's base type is changed to/from
indexed. */
void gimp_image_colormap_changed (GimpImage * image,
gint ncol);
/* layer/channel functions */
gint gimp_image_get_layer_index (GimpImage *, Layer *);
gint gimp_image_get_channel_index (GimpImage *, Channel *);
Layer * gimp_image_get_active_layer (GimpImage *);
Channel * gimp_image_get_active_channel (GimpImage *);
Layer * gimp_image_get_layer_by_tattoo (GimpImage *, Tattoo);
Channel * gimp_image_get_channel_by_tattoo (GimpImage *, Tattoo);
Channel * gimp_image_get_channel_by_name (GimpImage *, gchar *);
Channel * gimp_image_get_mask (GimpImage *);
gint gimp_image_get_component_active (GimpImage *, ChannelType);
gint gimp_image_get_component_visible (GimpImage *, ChannelType);
gboolean gimp_image_layer_boundary (GimpImage *, BoundSeg **,
gint *);
Layer * gimp_image_set_active_layer (GimpImage *, Layer *);
Channel * gimp_image_set_active_channel (GimpImage *, Channel *);
Channel * gimp_image_unset_active_channel (GimpImage *);
void gimp_image_set_component_active (GimpImage *, ChannelType,
gint);
void gimp_image_set_component_visible (GimpImage *, ChannelType,
gint);
Layer * gimp_image_pick_correlate_layer (GimpImage *, gint, gint);
void gimp_image_set_layer_mask_apply (GimpImage *, gint);
void gimp_image_set_layer_mask_edit (GimpImage *, Layer *, gint);
void gimp_image_set_layer_mask_show (GimpImage *, gint);
Layer * gimp_image_raise_layer (GimpImage *, Layer *);
Layer * gimp_image_lower_layer (GimpImage *, Layer *);
Layer * gimp_image_raise_layer_to_top (GimpImage *, Layer *);
Layer * gimp_image_lower_layer_to_bottom (GimpImage *, Layer *);
Layer * gimp_image_position_layer (GimpImage *, Layer *,
gint, gboolean);
Layer * gimp_image_merge_visible_layers (GimpImage *, MergeType);
Layer * gimp_image_merge_down (GimpImage *, Layer *,
MergeType);
Layer * gimp_image_flatten (GimpImage *);
Layer * gimp_image_merge_layers (GimpImage *, GSList *,
MergeType);
Layer * gimp_image_add_layer (GimpImage *, Layer *, gint);
Layer * gimp_image_remove_layer (GimpImage *, Layer *);
LayerMask * gimp_image_add_layer_mask (GimpImage *, Layer *,
LayerMask *);
Channel * gimp_image_remove_layer_mask (GimpImage *, Layer *,
MaskApplyMode);
Channel * gimp_image_raise_channel (GimpImage *, Channel *);
Channel * gimp_image_lower_channel (GimpImage *, Channel *);
Channel * gimp_image_position_channel (GimpImage *, Channel *, gint);
Channel * gimp_image_add_channel (GimpImage *, Channel *, gint);
Channel * gimp_image_remove_channel (GimpImage *, Channel *);
void gimp_image_construct (GimpImage *,
gint, gint, gint, gint,
gboolean);
void gimp_image_invalidate_without_render (GimpImage *, gint, gint,
gint, gint, gint,
gint, gint, gint);
void gimp_image_invalidate (GimpImage *, gint, gint,
gint, gint, gint,
gint, gint, gint);
void gimp_image_validate (TileManager *, Tile *);
/* Access functions */
gboolean gimp_image_is_empty (GimpImage *);
GimpDrawable * gimp_image_active_drawable (GimpImage *);
GimpImageBaseType gimp_image_base_type (GimpImage *);
GimpImageType gimp_image_base_type_with_alpha (GimpImage *);
gchar * gimp_image_filename (GimpImage *);
1999-11-25 04:11:03 +08:00
gboolean gimp_image_undo_is_enabled (GimpImage *);
1999-10-17 08:07:55 +08:00
gboolean gimp_image_undo_enable (GimpImage *);
gboolean gimp_image_undo_disable (GimpImage *);
gboolean gimp_image_undo_freeze (GimpImage *);
gboolean gimp_image_undo_thaw (GimpImage *);
Honest, guv, it's not a feature - it's a tightly integrated package of Mon Sep 20 12:51:30 EDT 1999 Austin Donnelly <austin@gimp.org> Honest, guv, it's not a feature - it's a tightly integrated package of undo system cleanups and fixes. NEW FILES: * app/undo_history.c: window showing recent undo (and redo) steps available. * app/undo_types.h: broken out of undo.h to fix circular includes. MODIFIED FILES: * app/Makefile.am: compile undo_history.c * app/channel.h: use enum for channel undo type, not just magic numbers. * app/layer.h: same for layer undos. * app/commands.c: edit_show_undo_history_cmd_callback() function to pull up undo history window. * app/commands.h: prototype for above. * app/gdisplay.c: make undo / redo menu items sensitive according to whether they would do anything. Would be easy to change the text to say what would be undone/redone, but I don't know the GTK. * app/gimpimage.c: new signal emitted by gimage: UNDO_EVENT. gimp_image_undo_event() function to emit it. * app/gimpimage.h: prototype for above. * app/gimpimageP.h: pushing_undo_group member is now an undo_type, not an int. Keep undo history widget here too (if created). * app/menus.c: add "Edit/Undo history..." to image menu. * app/undo.c: new types: enums undo_type and undo_state rather than ints and magic numbers. All undo_pop_* and undo_free_* functions made static. New static function undo_type_to_name(). Issue undo event signals on various important events (eg undo pushed, undo popped etc). undo_push() now takes a "dirties_image" arg to say whether image should be dirtied. Layer moves now dirty the image. A couple of g_return_if_fails () on undo_pop and undo_redo to assert we're not in the middle of an undo group. undo_get_{undo,redo}_name() to peek at names of top items on undo and redo stacks resp. undo_map_over_{undo,redo}_stack() to run a function for each item or group on stack. Layer and channel undos use symbolic names rather than 0 or 1. Array mapping undo types to names. * app/undo.h: split out undo types to undo_types.h. Prototypes for functions described above. undo_event_t enum. undo_history_new() prototype lives here too. Random other fixes: * app/gimpdrawable.c * app/image_render.c: default labels in switches to keep egcs happy. * app/nav_window.c: some fixes to (sort of) cope with image res != screen res. Still needs work to handle non-square pixels properly. * app/paths_dialog.c: bad idea to call gimp_image_dirty() directly. Even though it's currently commented out.
1999-09-21 01:15:20 +08:00
void gimp_image_undo_event (GimpImage *, int);
gint gimp_image_dirty (GimpImage *);
gint gimp_image_clean (GimpImage *);
void gimp_image_clean_all (GimpImage *);
Layer * gimp_image_floating_sel (GimpImage *);
guchar * gimp_image_cmap (GimpImage *);
/* projection access functions */
TileManager * gimp_image_projection (GimpImage *);
GimpImageType gimp_image_projection_type (GimpImage *);
gint gimp_image_projection_bytes (GimpImage *);
gint gimp_image_projection_opacity (GimpImage *);
void gimp_image_projection_realloc (GimpImage *);
/* composite access functions */
TileManager * gimp_image_composite (GimpImage *);
GimpImageType gimp_image_composite_type (GimpImage *);
gint gimp_image_composite_bytes (GimpImage *);
TempBuf * gimp_image_composite_preview (GimpImage *, ChannelType,
gint, gint);
gint gimp_image_preview_valid (GimpImage *, ChannelType);
void gimp_image_invalidate_preview (GimpImage *);
void gimp_image_invalidate_previews (void);
TempBuf * gimp_image_construct_composite_preview (GimpImage *,
gint , gint);
#endif /* __GIMPIMAGE_H__ */