1999-08-22 19:45:31 +08: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
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
1998-06-28 18:39:58 +08:00
|
|
|
#ifndef __GIMPIMAGE_H__
|
|
|
|
#define __GIMPIMAGE_H__
|
|
|
|
|
Actually use the enum types GimpImageType, GimpImageBaseType,
* app/*.[ch]: Actually use the enum types GimpImageType,
GimpImageBaseType, LayerModeEffects, PaintApplicationMode,
BrushApplicationMode, GimpFillType and ConvertPaletteType, instead
of just int or gint. Hopefully I catched most of the places
where these should be used.
Add an enum ConvolutionType, suffix the too general constants
NORMAL, ABSOLUTE and NEGATIVE with _CONVOL. Use NORMAL_MODE
instead of NORMAL in some places (this was what was intended). Fix
some minor gccisms.
* app/apptypes.h: New file. This file contains the above
enumeration types, and some opaque struct typedefs. It was
necessary to collect these in one header that doesn't include
other headers, because when we started using the above mentioned
types in the headers, all hell broke loose because of the
spaghetti-like cross-inclusion mess between headers.
(An example: Header A includes header B, which includes header C
which includes A. B uses a type defined in A. This is not defined,
because A hasn't defined it yet at the point where it includes B,
and A included from B of course is skipped as we already are
reading A.)
1999-08-19 07:41:39 +08:00
|
|
|
#include "apptypes.h"
|
1998-09-01 01:31:19 +08:00
|
|
|
#include "procedural_db.h"
|
1998-06-28 18:39:58 +08:00
|
|
|
#include "gimpimageF.h"
|
|
|
|
#include "boundary.h"
|
|
|
|
#include "drawable.h"
|
|
|
|
#include "channel.h"
|
|
|
|
#include "layer.h"
|
1998-10-27 17:26:38 +08:00
|
|
|
#include "plug_in.h"
|
1998-06-28 18:39:58 +08:00
|
|
|
#include "temp_buf.h"
|
|
|
|
#include "tile_manager.h"
|
2000-02-16 21:52:33 +08:00
|
|
|
#include "path.h"
|
1998-06-28 18:39:58 +08:00
|
|
|
|
2000-05-27 09:30:21 +08:00
|
|
|
#include "libgimp/gimpparasite.h"
|
|
|
|
#include "libgimp/gimpunit.h"
|
|
|
|
|
1998-06-28 18:39:58 +08:00
|
|
|
|
1999-08-22 19:45:31 +08:00
|
|
|
#define GIMP_TYPE_IMAGE gimp_image_get_type()
|
|
|
|
#define GIMP_IMAGE(obj) GTK_CHECK_CAST (obj, GIMP_TYPE_IMAGE, GimpImage)
|
1999-01-08 03:53:05 +08:00
|
|
|
#define GIMP_IS_IMAGE(obj) GTK_CHECK_TYPE (obj, GIMP_TYPE_IMAGE)
|
1998-06-28 18:39:58 +08:00
|
|
|
|
|
|
|
#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
|
|
|
|
|
1999-09-24 07:42:38 +08:00
|
|
|
typedef enum /*< skip >*/
|
|
|
|
{
|
1999-07-29 07:00:08 +08:00
|
|
|
ORIENTATION_UNKNOWN,
|
|
|
|
ORIENTATION_HORIZONTAL,
|
|
|
|
ORIENTATION_VERTICAL
|
1999-07-30 13:26:36 +08:00
|
|
|
} InternalOrientationType;
|
|
|
|
|
1999-09-24 07:42:38 +08:00
|
|
|
typedef enum
|
|
|
|
{
|
1999-07-30 13:26:36 +08:00
|
|
|
HORIZONTAL,
|
|
|
|
VERTICAL,
|
|
|
|
UNKNOWN
|
1999-07-29 07:00:08 +08:00
|
|
|
} OrientationType;
|
1998-06-28 18:39:58 +08:00
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
1999-04-27 12:57:59 +08:00
|
|
|
RED_CHANNEL,
|
|
|
|
GREEN_CHANNEL,
|
|
|
|
BLUE_CHANNEL,
|
|
|
|
GRAY_CHANNEL,
|
|
|
|
INDEXED_CHANNEL,
|
|
|
|
AUXILLARY_CHANNEL
|
1998-06-28 18:39:58 +08:00
|
|
|
} ChannelType;
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
1999-04-27 12:57:59 +08:00
|
|
|
EXPAND_AS_NECESSARY,
|
|
|
|
CLIP_TO_IMAGE,
|
|
|
|
CLIP_TO_BOTTOM_LAYER,
|
|
|
|
FLATTEN_IMAGE
|
1998-06-28 18:39:58 +08:00
|
|
|
} MergeType;
|
|
|
|
|
|
|
|
|
1998-06-29 08:24:44 +08:00
|
|
|
/* Ugly! Move this someplace else! Prolly to gdisplay.. */
|
1998-06-28 18:39:58 +08:00
|
|
|
|
|
|
|
struct _Guide
|
|
|
|
{
|
|
|
|
int ref_count;
|
|
|
|
int position;
|
|
|
|
int orientation;
|
1998-09-01 01:31:19 +08:00
|
|
|
guint32 guide_ID;
|
1998-06-28 18:39:58 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
1999-08-22 19:45:31 +08:00
|
|
|
typedef struct _GimpImageRepaintArg
|
|
|
|
{
|
|
|
|
Layer *layer;
|
|
|
|
guint x;
|
|
|
|
guint y;
|
|
|
|
guint width;
|
|
|
|
guint height;
|
1998-06-28 18:39:58 +08:00
|
|
|
} GimpImageRepaintArg;
|
|
|
|
|
|
|
|
|
1999-08-22 19:45:31 +08:00
|
|
|
GtkType gimp_image_get_type (void);
|
1998-06-28 18:39:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
/* function declarations */
|
|
|
|
|
1999-08-22 19:45:31 +08:00
|
|
|
GimpImage * gimp_image_new (gint, gint,
|
Actually use the enum types GimpImageType, GimpImageBaseType,
* app/*.[ch]: Actually use the enum types GimpImageType,
GimpImageBaseType, LayerModeEffects, PaintApplicationMode,
BrushApplicationMode, GimpFillType and ConvertPaletteType, instead
of just int or gint. Hopefully I catched most of the places
where these should be used.
Add an enum ConvolutionType, suffix the too general constants
NORMAL, ABSOLUTE and NEGATIVE with _CONVOL. Use NORMAL_MODE
instead of NORMAL in some places (this was what was intended). Fix
some minor gccisms.
* app/apptypes.h: New file. This file contains the above
enumeration types, and some opaque struct typedefs. It was
necessary to collect these in one header that doesn't include
other headers, because when we started using the above mentioned
types in the headers, all hell broke loose because of the
spaghetti-like cross-inclusion mess between headers.
(An example: Header A includes header B, which includes header C
which includes A. B uses a type defined in A. This is not defined,
because A hasn't defined it yet at the point where it includes B,
and A included from B of course is skipped as we already are
reading A.)
1999-08-19 07:41:39 +08:00
|
|
|
GimpImageBaseType);
|
1999-08-22 19:45:31 +08:00
|
|
|
void gimp_image_set_filename (GimpImage *, gchar *);
|
1999-05-23 01:56:35 +08:00
|
|
|
void gimp_image_set_resolution (GimpImage *,
|
1999-08-22 19:45:31 +08:00
|
|
|
gdouble, gdouble);
|
1998-11-15 07:28:47 +08:00
|
|
|
void gimp_image_get_resolution (GimpImage *,
|
1999-08-22 19:45:31 +08:00
|
|
|
gdouble *, gdouble *);
|
2000-02-08 04:35:13 +08:00
|
|
|
void gimp_image_set_unit (GimpImage *, GimpUnit);
|
|
|
|
GimpUnit gimp_image_get_unit (GimpImage *);
|
Actually use the enum types GimpImageType, GimpImageBaseType,
* app/*.[ch]: Actually use the enum types GimpImageType,
GimpImageBaseType, LayerModeEffects, PaintApplicationMode,
BrushApplicationMode, GimpFillType and ConvertPaletteType, instead
of just int or gint. Hopefully I catched most of the places
where these should be used.
Add an enum ConvolutionType, suffix the too general constants
NORMAL, ABSOLUTE and NEGATIVE with _CONVOL. Use NORMAL_MODE
instead of NORMAL in some places (this was what was intended). Fix
some minor gccisms.
* app/apptypes.h: New file. This file contains the above
enumeration types, and some opaque struct typedefs. It was
necessary to collect these in one header that doesn't include
other headers, because when we started using the above mentioned
types in the headers, all hell broke loose because of the
spaghetti-like cross-inclusion mess between headers.
(An example: Header A includes header B, which includes header C
which includes A. B uses a type defined in A. This is not defined,
because A hasn't defined it yet at the point where it includes B,
and A included from B of course is skipped as we already are
reading A.)
1999-08-19 07:41:39 +08:00
|
|
|
void gimp_image_set_save_proc (GimpImage *,
|
|
|
|
PlugInProcDef *);
|
|
|
|
PlugInProcDef * gimp_image_get_save_proc (GimpImage *);
|
1999-08-26 12:39:21 +08:00
|
|
|
gint gimp_image_get_width (const GimpImage *);
|
|
|
|
gint gimp_image_get_height (const GimpImage *);
|
1999-08-22 19:45:31 +08:00
|
|
|
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);
|
1998-06-28 18:39:58 +08:00
|
|
|
void gimp_image_free_shadow (GimpImage *);
|
1998-10-30 18:21:33 +08:00
|
|
|
void gimp_image_apply_image (GimpImage *, GimpDrawable *,
|
1999-08-22 19:45:31 +08:00
|
|
|
PixelRegion *, gint,
|
|
|
|
gint,
|
Actually use the enum types GimpImageType, GimpImageBaseType,
* app/*.[ch]: Actually use the enum types GimpImageType,
GimpImageBaseType, LayerModeEffects, PaintApplicationMode,
BrushApplicationMode, GimpFillType and ConvertPaletteType, instead
of just int or gint. Hopefully I catched most of the places
where these should be used.
Add an enum ConvolutionType, suffix the too general constants
NORMAL, ABSOLUTE and NEGATIVE with _CONVOL. Use NORMAL_MODE
instead of NORMAL in some places (this was what was intended). Fix
some minor gccisms.
* app/apptypes.h: New file. This file contains the above
enumeration types, and some opaque struct typedefs. It was
necessary to collect these in one header that doesn't include
other headers, because when we started using the above mentioned
types in the headers, all hell broke loose because of the
spaghetti-like cross-inclusion mess between headers.
(An example: Header A includes header B, which includes header C
which includes A. B uses a type defined in A. This is not defined,
because A hasn't defined it yet at the point where it includes B,
and A included from B of course is skipped as we already are
reading A.)
1999-08-19 07:41:39 +08:00
|
|
|
LayerModeEffects,
|
1999-08-22 19:45:31 +08:00
|
|
|
TileManager *, gint, gint);
|
1998-10-30 18:21:33 +08:00
|
|
|
void gimp_image_replace_image (GimpImage *, GimpDrawable *,
|
1999-08-22 19:45:31 +08:00
|
|
|
PixelRegion *, gint, gint,
|
|
|
|
PixelRegion *, gint, gint);
|
1998-10-30 18:21:33 +08:00
|
|
|
void gimp_image_get_foreground (GimpImage *, GimpDrawable *,
|
1999-08-22 19:45:31 +08:00
|
|
|
guchar *);
|
1998-10-30 18:21:33 +08:00
|
|
|
void gimp_image_get_background (GimpImage *, GimpDrawable *,
|
1999-08-22 19:45:31 +08:00
|
|
|
guchar *);
|
|
|
|
guchar * gimp_image_get_color_at (GimpImage *, gint, gint);
|
1999-02-16 16:53:54 +08:00
|
|
|
|
Actually use the enum types GimpImageType, GimpImageBaseType,
* app/*.[ch]: Actually use the enum types GimpImageType,
GimpImageBaseType, LayerModeEffects, PaintApplicationMode,
BrushApplicationMode, GimpFillType and ConvertPaletteType, instead
of just int or gint. Hopefully I catched most of the places
where these should be used.
Add an enum ConvolutionType, suffix the too general constants
NORMAL, ABSOLUTE and NEGATIVE with _CONVOL. Use NORMAL_MODE
instead of NORMAL in some places (this was what was intended). Fix
some minor gccisms.
* app/apptypes.h: New file. This file contains the above
enumeration types, and some opaque struct typedefs. It was
necessary to collect these in one header that doesn't include
other headers, because when we started using the above mentioned
types in the headers, all hell broke loose because of the
spaghetti-like cross-inclusion mess between headers.
(An example: Header A includes header B, which includes header C
which includes A. B uses a type defined in A. This is not defined,
because A hasn't defined it yet at the point where it includes B,
and A included from B of course is skipped as we already are
reading A.)
1999-08-19 07:41:39 +08:00
|
|
|
void gimp_image_get_color (GimpImage *,
|
|
|
|
GimpImageType,
|
1999-08-22 19:45:31 +08:00
|
|
|
guchar *,
|
|
|
|
guchar *);
|
Actually use the enum types GimpImageType, GimpImageBaseType,
* app/*.[ch]: Actually use the enum types GimpImageType,
GimpImageBaseType, LayerModeEffects, PaintApplicationMode,
BrushApplicationMode, GimpFillType and ConvertPaletteType, instead
of just int or gint. Hopefully I catched most of the places
where these should be used.
Add an enum ConvolutionType, suffix the too general constants
NORMAL, ABSOLUTE and NEGATIVE with _CONVOL. Use NORMAL_MODE
instead of NORMAL in some places (this was what was intended). Fix
some minor gccisms.
* app/apptypes.h: New file. This file contains the above
enumeration types, and some opaque struct typedefs. It was
necessary to collect these in one header that doesn't include
other headers, because when we started using the above mentioned
types in the headers, all hell broke loose because of the
spaghetti-like cross-inclusion mess between headers.
(An example: Header A includes header B, which includes header C
which includes A. B uses a type defined in A. This is not defined,
because A hasn't defined it yet at the point where it includes B,
and A included from B of course is skipped as we already are
reading A.)
1999-08-19 07:41:39 +08:00
|
|
|
void gimp_image_transform_color (GimpImage *,
|
|
|
|
GimpDrawable *,
|
1999-08-22 19:45:31 +08:00
|
|
|
guchar *,
|
|
|
|
guchar *,
|
Actually use the enum types GimpImageType, GimpImageBaseType,
* app/*.[ch]: Actually use the enum types GimpImageType,
GimpImageBaseType, LayerModeEffects, PaintApplicationMode,
BrushApplicationMode, GimpFillType and ConvertPaletteType, instead
of just int or gint. Hopefully I catched most of the places
where these should be used.
Add an enum ConvolutionType, suffix the too general constants
NORMAL, ABSOLUTE and NEGATIVE with _CONVOL. Use NORMAL_MODE
instead of NORMAL in some places (this was what was intended). Fix
some minor gccisms.
* app/apptypes.h: New file. This file contains the above
enumeration types, and some opaque struct typedefs. It was
necessary to collect these in one header that doesn't include
other headers, because when we started using the above mentioned
types in the headers, all hell broke loose because of the
spaghetti-like cross-inclusion mess between headers.
(An example: Header A includes header B, which includes header C
which includes A. B uses a type defined in A. This is not defined,
because A hasn't defined it yet at the point where it includes B,
and A included from B of course is skipped as we already are
reading A.)
1999-08-19 07:41:39 +08:00
|
|
|
GimpImageBaseType);
|
1998-06-28 18:39:58 +08:00
|
|
|
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 *);
|
|
|
|
|
2000-05-27 06:28:40 +08:00
|
|
|
GimpParasite * gimp_image_parasite_find (const GimpImage *,
|
1999-08-22 19:45:31 +08:00
|
|
|
const gchar *name);
|
2000-03-09 19:58:03 +08:00
|
|
|
gchar ** gimp_image_parasite_list (GimpImage *gimage,
|
1999-02-14 02:19:44 +08:00
|
|
|
gint *count);
|
2000-05-27 06:28:40 +08:00
|
|
|
void gimp_image_parasite_attach (GimpImage *,
|
|
|
|
GimpParasite *);
|
1999-10-17 08:07:55 +08:00
|
|
|
void gimp_image_parasite_detach (GimpImage *, const gchar *);
|
1998-10-14 10:54:02 +08:00
|
|
|
|
1998-10-30 18:21:33 +08:00
|
|
|
Tattoo gimp_image_get_new_tattoo (GimpImage *);
|
2000-03-09 19:58:03 +08:00
|
|
|
gboolean gimp_image_set_tattoo_state (GimpImage *, Tattoo);
|
2000-02-16 07:49:03 +08:00
|
|
|
Tattoo gimp_image_get_tattoo_state (GimpImage *);
|
1998-10-14 10:54:02 +08:00
|
|
|
|
2000-02-16 09:47:22 +08:00
|
|
|
void gimp_image_set_paths (GimpImage *, PathList *);
|
|
|
|
PathList * gimp_image_get_paths (GimpImage *);
|
1999-03-06 07:50:24 +08:00
|
|
|
|
1999-01-08 03:53:05 +08:00
|
|
|
/* 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);
|
|
|
|
|
1998-06-28 18:39:58 +08:00
|
|
|
|
|
|
|
/* layer/channel functions */
|
|
|
|
|
1999-08-22 19:45:31 +08:00
|
|
|
gint gimp_image_get_layer_index (GimpImage *, Layer *);
|
|
|
|
gint gimp_image_get_channel_index (GimpImage *, Channel *);
|
1998-06-28 18:39:58 +08:00
|
|
|
Layer * gimp_image_get_active_layer (GimpImage *);
|
|
|
|
Channel * gimp_image_get_active_channel (GimpImage *);
|
1998-10-30 18:21:33 +08:00
|
|
|
Layer * gimp_image_get_layer_by_tattoo (GimpImage *, Tattoo);
|
|
|
|
Channel * gimp_image_get_channel_by_tattoo (GimpImage *, Tattoo);
|
1999-08-22 19:45:31 +08:00
|
|
|
Channel * gimp_image_get_channel_by_name (GimpImage *, gchar *);
|
1998-06-28 18:39:58 +08:00
|
|
|
Channel * gimp_image_get_mask (GimpImage *);
|
1999-08-22 19:45:31 +08:00
|
|
|
gint gimp_image_get_component_active (GimpImage *, ChannelType);
|
|
|
|
gint gimp_image_get_component_visible (GimpImage *, ChannelType);
|
|
|
|
gboolean gimp_image_layer_boundary (GimpImage *, BoundSeg **,
|
|
|
|
gint *);
|
1998-06-28 18:39:58 +08:00
|
|
|
Layer * gimp_image_set_active_layer (GimpImage *, Layer *);
|
|
|
|
Channel * gimp_image_set_active_channel (GimpImage *, Channel *);
|
|
|
|
Channel * gimp_image_unset_active_channel (GimpImage *);
|
1999-08-22 19:45:31 +08:00
|
|
|
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);
|
1998-06-28 18:39:58 +08:00
|
|
|
Layer * gimp_image_raise_layer (GimpImage *, Layer *);
|
|
|
|
Layer * gimp_image_lower_layer (GimpImage *, Layer *);
|
1998-11-16 01:02:59 +08:00
|
|
|
Layer * gimp_image_raise_layer_to_top (GimpImage *, Layer *);
|
|
|
|
Layer * gimp_image_lower_layer_to_bottom (GimpImage *, Layer *);
|
1999-10-02 07:13:13 +08:00
|
|
|
Layer * gimp_image_position_layer (GimpImage *, Layer *,
|
|
|
|
gint, gboolean);
|
1998-06-28 18:39:58 +08:00
|
|
|
Layer * gimp_image_merge_visible_layers (GimpImage *, MergeType);
|
1999-08-22 19:45:31 +08:00
|
|
|
Layer * gimp_image_merge_down (GimpImage *, Layer *,
|
|
|
|
MergeType);
|
1998-06-28 18:39:58 +08:00
|
|
|
Layer * gimp_image_flatten (GimpImage *);
|
1999-08-22 19:45:31 +08:00
|
|
|
Layer * gimp_image_merge_layers (GimpImage *, GSList *,
|
|
|
|
MergeType);
|
|
|
|
Layer * gimp_image_add_layer (GimpImage *, Layer *, gint);
|
1998-06-28 18:39:58 +08:00
|
|
|
Layer * gimp_image_remove_layer (GimpImage *, Layer *);
|
1999-08-22 19:45:31 +08:00
|
|
|
LayerMask * gimp_image_add_layer_mask (GimpImage *, Layer *,
|
|
|
|
LayerMask *);
|
|
|
|
Channel * gimp_image_remove_layer_mask (GimpImage *, Layer *,
|
|
|
|
MaskApplyMode);
|
1998-06-28 18:39:58 +08:00
|
|
|
Channel * gimp_image_raise_channel (GimpImage *, Channel *);
|
|
|
|
Channel * gimp_image_lower_channel (GimpImage *, Channel *);
|
1999-08-21 03:59:06 +08:00
|
|
|
Channel * gimp_image_position_channel (GimpImage *, Channel *, gint);
|
1999-08-22 19:45:31 +08:00
|
|
|
Channel * gimp_image_add_channel (GimpImage *, Channel *, gint);
|
1998-06-28 18:39:58 +08:00
|
|
|
Channel * gimp_image_remove_channel (GimpImage *, Channel *);
|
1999-08-22 19:45:31 +08:00
|
|
|
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);
|
1998-08-16 03:17:36 +08:00
|
|
|
void gimp_image_validate (TileManager *, Tile *);
|
1998-06-28 18:39:58 +08:00
|
|
|
|
|
|
|
/* Access functions */
|
|
|
|
|
1999-08-22 19:45:31 +08:00
|
|
|
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);
|
1999-08-22 19:45:31 +08:00
|
|
|
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 *);
|
1998-06-28 18:39:58 +08:00
|
|
|
|
|
|
|
/* projection access functions */
|
|
|
|
|
|
|
|
TileManager * gimp_image_projection (GimpImage *);
|
Actually use the enum types GimpImageType, GimpImageBaseType,
* app/*.[ch]: Actually use the enum types GimpImageType,
GimpImageBaseType, LayerModeEffects, PaintApplicationMode,
BrushApplicationMode, GimpFillType and ConvertPaletteType, instead
of just int or gint. Hopefully I catched most of the places
where these should be used.
Add an enum ConvolutionType, suffix the too general constants
NORMAL, ABSOLUTE and NEGATIVE with _CONVOL. Use NORMAL_MODE
instead of NORMAL in some places (this was what was intended). Fix
some minor gccisms.
* app/apptypes.h: New file. This file contains the above
enumeration types, and some opaque struct typedefs. It was
necessary to collect these in one header that doesn't include
other headers, because when we started using the above mentioned
types in the headers, all hell broke loose because of the
spaghetti-like cross-inclusion mess between headers.
(An example: Header A includes header B, which includes header C
which includes A. B uses a type defined in A. This is not defined,
because A hasn't defined it yet at the point where it includes B,
and A included from B of course is skipped as we already are
reading A.)
1999-08-19 07:41:39 +08:00
|
|
|
GimpImageType gimp_image_projection_type (GimpImage *);
|
1999-08-22 19:45:31 +08:00
|
|
|
gint gimp_image_projection_bytes (GimpImage *);
|
|
|
|
gint gimp_image_projection_opacity (GimpImage *);
|
1998-06-28 18:39:58 +08:00
|
|
|
void gimp_image_projection_realloc (GimpImage *);
|
|
|
|
|
|
|
|
|
|
|
|
/* composite access functions */
|
|
|
|
|
|
|
|
TileManager * gimp_image_composite (GimpImage *);
|
Actually use the enum types GimpImageType, GimpImageBaseType,
* app/*.[ch]: Actually use the enum types GimpImageType,
GimpImageBaseType, LayerModeEffects, PaintApplicationMode,
BrushApplicationMode, GimpFillType and ConvertPaletteType, instead
of just int or gint. Hopefully I catched most of the places
where these should be used.
Add an enum ConvolutionType, suffix the too general constants
NORMAL, ABSOLUTE and NEGATIVE with _CONVOL. Use NORMAL_MODE
instead of NORMAL in some places (this was what was intended). Fix
some minor gccisms.
* app/apptypes.h: New file. This file contains the above
enumeration types, and some opaque struct typedefs. It was
necessary to collect these in one header that doesn't include
other headers, because when we started using the above mentioned
types in the headers, all hell broke loose because of the
spaghetti-like cross-inclusion mess between headers.
(An example: Header A includes header B, which includes header C
which includes A. B uses a type defined in A. This is not defined,
because A hasn't defined it yet at the point where it includes B,
and A included from B of course is skipped as we already are
reading A.)
1999-08-19 07:41:39 +08:00
|
|
|
GimpImageType gimp_image_composite_type (GimpImage *);
|
1999-08-22 19:45:31 +08:00
|
|
|
gint gimp_image_composite_bytes (GimpImage *);
|
|
|
|
TempBuf * gimp_image_composite_preview (GimpImage *, ChannelType,
|
|
|
|
gint, gint);
|
|
|
|
gint gimp_image_preview_valid (GimpImage *, ChannelType);
|
1998-06-28 18:39:58 +08:00
|
|
|
void gimp_image_invalidate_preview (GimpImage *);
|
|
|
|
|
|
|
|
void gimp_image_invalidate_previews (void);
|
1999-08-22 19:45:31 +08:00
|
|
|
TempBuf * gimp_image_construct_composite_preview (GimpImage *,
|
|
|
|
gint , gint);
|
1998-06-28 18:39:58 +08:00
|
|
|
|
1999-08-22 19:45:31 +08:00
|
|
|
#endif /* __GIMPIMAGE_H__ */
|