1998-06-28 18:39:58 +08:00
|
|
|
#ifndef __GIMPIMAGEP_H__
|
|
|
|
#define __GIMPIMAGEP_H__
|
|
|
|
|
|
|
|
#include "gimpobjectP.h"
|
1998-06-30 09:14:36 +08:00
|
|
|
#include "gimpimage.h"
|
1998-06-28 18:39:58 +08:00
|
|
|
|
|
|
|
#include "tile_manager.h"
|
|
|
|
#include "temp_buf.h"
|
|
|
|
#include "channel.h"
|
|
|
|
#include "layer.h"
|
1998-10-30 18:21:33 +08:00
|
|
|
#include "parasitelistF.h"
|
1999-03-06 07:50:24 +08:00
|
|
|
#include "pathsP.h"
|
1998-06-28 18:39:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
#define MAX_CHANNELS 4
|
|
|
|
|
|
|
|
struct _GimpImage
|
|
|
|
{
|
|
|
|
GimpObject gobject;
|
|
|
|
char *filename; /* original filename */
|
|
|
|
int has_filename; /* has a valid filename */
|
1998-10-27 17:26:38 +08:00
|
|
|
PlugInProcDef *save_proc; /* last PDB save proc used */
|
1998-06-28 18:39:58 +08:00
|
|
|
|
|
|
|
int width, height; /* width and height attributes */
|
1999-05-23 01:56:35 +08:00
|
|
|
double xresolution; /* image x-res, in dpi */
|
|
|
|
double yresolution; /* image y-res, in dpi */
|
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
|
|
|
GUnit unit; /* image unit */
|
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 base_type; /* base gimp_image type */
|
1998-06-28 18:39:58 +08:00
|
|
|
|
|
|
|
unsigned char * cmap; /* colormap--for indexed */
|
|
|
|
int num_cols; /* number of cols--for indexed */
|
|
|
|
|
|
|
|
int dirty; /* dirty flag -- # of ops */
|
|
|
|
int undo_on; /* Is undo enabled? */
|
|
|
|
|
|
|
|
int instance_count; /* number of instances */
|
|
|
|
int ref_count; /* number of references */
|
|
|
|
|
1998-10-30 18:21:33 +08:00
|
|
|
Tattoo tattoo_state; /* the next unique tattoo to use*/
|
1998-10-14 10:54:02 +08:00
|
|
|
|
1998-06-28 18:39:58 +08:00
|
|
|
TileManager *shadow; /* shadow buffer tiles */
|
|
|
|
|
|
|
|
/* Projection attributes */
|
|
|
|
int construct_flag; /* flag for construction */
|
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 proj_type; /* type of the projection image */
|
1998-06-28 18:39:58 +08:00
|
|
|
int proj_bytes; /* bpp in projection image */
|
|
|
|
int proj_level; /* projection level */
|
|
|
|
TileManager *projection; /* The projection--layers & */
|
|
|
|
/* channels */
|
|
|
|
|
|
|
|
GList *guides; /* guides */
|
|
|
|
|
|
|
|
/* Layer/Channel attributes */
|
|
|
|
GSList *layers; /* the list of layers */
|
|
|
|
GSList *channels; /* the list of masks */
|
|
|
|
GSList *layer_stack; /* the layers in MRU order */
|
|
|
|
|
|
|
|
Layer * active_layer; /* ID of active layer */
|
|
|
|
Channel * active_channel; /* ID of active channel */
|
|
|
|
Layer * floating_sel; /* ID of fs layer */
|
|
|
|
Channel * selection_mask; /* selection mask channel */
|
|
|
|
|
1998-10-30 18:21:33 +08:00
|
|
|
ParasiteList *parasites; /* Plug-in parasite data */
|
1998-10-08 16:15:21 +08:00
|
|
|
|
1999-03-06 07:50:24 +08:00
|
|
|
PathsList *paths; /* Paths data for this image */
|
|
|
|
|
1998-06-28 18:39:58 +08:00
|
|
|
int visible [MAX_CHANNELS]; /* visible channels */
|
|
|
|
int active [MAX_CHANNELS]; /* active channels */
|
|
|
|
|
|
|
|
int by_color_select; /* TRUE if there's an active */
|
|
|
|
/* "by color" selection dialog */
|
|
|
|
|
1999-08-08 04:55:26 +08:00
|
|
|
int qmask_state; /* TRUE if qmask is on */
|
|
|
|
double qmask_opacity; /* opacity of the qmask channel */
|
|
|
|
unsigned char qmask_color[3]; /* rgb triplet of the color */
|
1999-07-07 11:18:54 +08:00
|
|
|
|
1998-06-28 18:39:58 +08:00
|
|
|
/* Undo apparatus */
|
|
|
|
GSList *undo_stack; /* stack for undo operations */
|
|
|
|
GSList *redo_stack; /* stack for redo operations */
|
|
|
|
int undo_bytes; /* bytes in undo stack */
|
|
|
|
int undo_levels; /* levels in undo stack */
|
|
|
|
int pushing_undo_group; /* undo group status flag */
|
|
|
|
|
|
|
|
/* Composite preview */
|
|
|
|
TempBuf *comp_preview; /* the composite preview */
|
|
|
|
int comp_preview_valid[3]; /* preview valid-1/channel */
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GimpImageClass
|
|
|
|
{
|
|
|
|
GimpObjectClass parent_class;
|
|
|
|
void (*dirty) (GtkObject*);
|
|
|
|
void (*repaint) (GtkObject*);
|
|
|
|
void (*rename) (GtkObject*);
|
|
|
|
};
|
|
|
|
typedef struct _GimpImageClass GimpImageClass;
|
|
|
|
|
|
|
|
#define GIMP_IMAGE_CLASS(klass) \
|
1998-06-30 09:14:36 +08:00
|
|
|
GTK_CHECK_CLASS_CAST (klass, GIMP_TYPE_IMAGE, GimpImageClass)
|
1998-06-28 18:39:58 +08:00
|
|
|
|
|
|
|
#endif
|