1
/* GIMP - The GNU Image Manipulation Program
2
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; either version 3 of the License, or
7
* (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
#ifndef __GIMP_IMAGE_PRIVATE_H__
19
#define __GIMP_IMAGE_PRIVATE_H__
22
typedef struct _GimpImageFlushAccumulator GimpImageFlushAccumulator;
24
struct _GimpImageFlushAccumulator
26
gboolean alpha_changed;
27
gboolean mask_changed;
28
gboolean floating_selection_changed;
29
gboolean preview_invalidated;
33
typedef struct _GimpImagePrivate GimpImagePrivate;
35
struct _GimpImagePrivate
37
gint ID; /* provides a unique ID */
39
GimpPlugInProcedure *load_proc; /* procedure used for loading */
40
GimpPlugInProcedure *save_proc; /* last save procedure used */
42
gchar *display_name; /* display basename */
43
gint width; /* width in pixels */
44
gint height; /* height in pixels */
45
gdouble xresolution; /* image x-res, in dpi */
46
gdouble yresolution; /* image y-res, in dpi */
47
GimpUnit resolution_unit; /* resolution unit */
48
GimpImageBaseType base_type; /* base gimp_image type */
50
guchar *colormap; /* colormap (for indexed) */
51
gint n_colors; /* # of colors (for indexed) */
52
GimpPalette *palette; /* palette of colormap */
54
gint dirty; /* dirty flag -- # of ops */
55
guint dirty_time; /* time when image became dirty */
56
gint export_dirty; /* 'dirty' but for export */
58
gint undo_freeze_count; /* counts the _freeze's */
60
gint instance_count; /* number of instances */
61
gint disp_count; /* number of displays */
63
GimpTattoo tattoo_state; /* the last used tattoo */
65
GimpProjection *projection; /* projection layers & channels */
66
GeglNode *graph; /* GEGL projection graph */
68
GList *guides; /* guides */
69
GimpGrid *grid; /* grid */
70
GList *sample_points; /* color sample points */
72
/* Layer/Channel attributes */
73
GimpItemTree *layers; /* the tree of layers */
74
GimpItemTree *channels; /* the tree of masks */
75
GimpItemTree *vectors; /* the tree of vectors */
76
GSList *layer_stack; /* the layers in MRU order */
78
GQuark layer_alpha_handler;
79
GQuark channel_name_changed_handler;
80
GQuark channel_color_changed_handler;
82
GimpLayer *floating_sel; /* the FS layer */
83
GimpChannel *selection_mask; /* the selection mask channel */
85
GimpParasiteList *parasites; /* Plug-in parasite data */
87
gboolean visible[MAX_CHANNELS]; /* visible channels */
88
gboolean active[MAX_CHANNELS]; /* active channels */
90
gboolean quick_mask_state; /* TRUE if quick mask is on */
91
gboolean quick_mask_inverted; /* TRUE if quick mask is inverted */
92
GimpRGB quick_mask_color; /* rgba triplet of the color */
95
GimpUndoStack *undo_stack; /* stack for undo operations */
96
GimpUndoStack *redo_stack; /* stack for redo operations */
97
gint group_count; /* nested undo groups */
98
GimpUndoType pushing_undo_group; /* undo group status flag */
101
TempBuf *preview; /* the projection preview */
103
/* Signal emmision accumulator */
104
GimpImageFlushAccumulator flush_accum;
107
#define GIMP_IMAGE_GET_PRIVATE(image) \
108
G_TYPE_INSTANCE_GET_PRIVATE (image, \
113
#endif /* __GIMP_IMAGE_PRIVATE_H__ */