~ubuntu-branches/ubuntu/vivid/gimp/vivid

« back to all changes in this revision

Viewing changes to app/core/gimpimage-private.h

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach
  • Date: 2012-05-08 18:50:03 UTC
  • mto: (1.1.26) (0.5.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 71.
  • Revision ID: package-import@ubuntu.com-20120508185003-tltkvbaysf8d2426
ImportĀ upstreamĀ versionĀ 2.8.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* GIMP - The GNU Image Manipulation Program
 
2
 * Copyright (C) 1995 Spencer Kimball and Peter Mattis
 
3
 *
 
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.
 
8
 *
 
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.
 
13
 *
 
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/>.
 
16
 */
 
17
 
 
18
#ifndef __GIMP_IMAGE_PRIVATE_H__
 
19
#define __GIMP_IMAGE_PRIVATE_H__
 
20
 
 
21
 
 
22
typedef struct _GimpImageFlushAccumulator GimpImageFlushAccumulator;
 
23
 
 
24
struct _GimpImageFlushAccumulator
 
25
{
 
26
  gboolean alpha_changed;
 
27
  gboolean mask_changed;
 
28
  gboolean floating_selection_changed;
 
29
  gboolean preview_invalidated;
 
30
};
 
31
 
 
32
 
 
33
typedef struct _GimpImagePrivate GimpImagePrivate;
 
34
 
 
35
struct _GimpImagePrivate
 
36
{
 
37
  gint               ID;                    /*  provides a unique ID         */
 
38
 
 
39
  GimpPlugInProcedure *load_proc;           /*  procedure used for loading   */
 
40
  GimpPlugInProcedure *save_proc;           /*  last save procedure used     */
 
41
 
 
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         */
 
49
 
 
50
  guchar            *colormap;              /*  colormap (for indexed)       */
 
51
  gint               n_colors;              /*  # of colors (for indexed)    */
 
52
  GimpPalette       *palette;               /*  palette of colormap          */
 
53
 
 
54
  gint               dirty;                 /*  dirty flag -- # of ops       */
 
55
  guint              dirty_time;            /*  time when image became dirty */
 
56
  gint               export_dirty;          /*  'dirty' but for export       */
 
57
 
 
58
  gint               undo_freeze_count;     /*  counts the _freeze's         */
 
59
 
 
60
  gint               instance_count;        /*  number of instances          */
 
61
  gint               disp_count;            /*  number of displays           */
 
62
 
 
63
  GimpTattoo         tattoo_state;          /*  the last used tattoo         */
 
64
 
 
65
  GimpProjection    *projection;            /*  projection layers & channels */
 
66
  GeglNode          *graph;                 /*  GEGL projection graph        */
 
67
 
 
68
  GList             *guides;                /*  guides                       */
 
69
  GimpGrid          *grid;                  /*  grid                         */
 
70
  GList             *sample_points;         /*  color sample points          */
 
71
 
 
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      */
 
77
 
 
78
  GQuark             layer_alpha_handler;
 
79
  GQuark             channel_name_changed_handler;
 
80
  GQuark             channel_color_changed_handler;
 
81
 
 
82
  GimpLayer         *floating_sel;          /*  the FS layer                 */
 
83
  GimpChannel       *selection_mask;        /*  the selection mask channel   */
 
84
 
 
85
  GimpParasiteList  *parasites;             /*  Plug-in parasite data        */
 
86
 
 
87
  gboolean           visible[MAX_CHANNELS]; /*  visible channels             */
 
88
  gboolean           active[MAX_CHANNELS];  /*  active channels              */
 
89
 
 
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      */
 
93
 
 
94
  /*  Undo apparatus  */
 
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       */
 
99
 
 
100
  /*  Preview  */
 
101
  TempBuf           *preview;               /*  the projection preview       */
 
102
 
 
103
  /*  Signal emmision accumulator  */
 
104
  GimpImageFlushAccumulator  flush_accum;
 
105
};
 
106
 
 
107
#define GIMP_IMAGE_GET_PRIVATE(image) \
 
108
        G_TYPE_INSTANCE_GET_PRIVATE (image, \
 
109
                                     GIMP_TYPE_IMAGE, \
 
110
                                     GimpImagePrivate)
 
111
 
 
112
 
 
113
#endif  /* __GIMP_IMAGE_PRIVATE_H__ */