1 /* separate+ 0.5 - image processing plug-in for the Gimp
2  *
3  * Copyright (C) 2002-2004 Alastair Robinson (blackfive@fakenhamweb.co.uk),
4  * Based on code by Andrew Kieschnick and Peter Kirchgessner
5  * 2007-2010 Modified by Yoshinori Yamakawa (yamma-ma@users.sourceforge.jp)
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20  */
21 
22 #ifndef SEPARATE_H
23 #define SEPARATE_H
24 
25 #include <gtk/gtk.h>
26 #include "lcms_wrapper.h"
27 
28 #define CMYKPROFILE "plug_in_separate_save/cmyk-profile"
29 
30 #ifdef ENABLE_COLOR_MANAGEMENT
31 typedef GimpColorRenderingIntent SeparateRenderingIntent;
32 #else
33 typedef gint SeparateRenderingIntent;
34 #endif
35 
36 enum separate_function { SEP_NONE, SEP_DUOTONE, SEP_SEPARATE, SEP_FULL, SEP_LIGHT, SEP_PROOF, SEP_SAVE, SEP_EXPORT, SEP_LOAD };
37 
38 typedef struct _SeparateSettings
39 {
40   gboolean preserveblack;
41   gboolean overprintblack;
42   gboolean profile;
43   SeparateRenderingIntent intent;
44   gboolean bpc;
45   gboolean dither;
46   gboolean composite;
47 } SeparateSettings;
48 
49 typedef struct _ProofSettings
50 {
51   SeparateRenderingIntent mode;
52   gboolean profile;
53 } ProofSettings;
54 
55 typedef struct _SaveSettings
56 {
57   gint32 embedprofile;
58   gint32 filetype;
59   gint32 clipping_path_id;
60   gboolean compression;
61 } SaveSettings;
62 
63 typedef struct _SeparateContext
64 {
65   /* Settings */
66   gchar *displayfilename;
67   gchar *rgbfilename;
68   gchar *cmykfilename;
69   gchar *prooffilename;
70   gchar *alt_displayfilename;
71   gchar *alt_rgbfilename;
72   gchar *alt_cmykfilename;
73   gchar *alt_prooffilename;
74   gchar *filename;
75   SeparateSettings ss;
76   ProofSettings ps;
77   SaveSettings sas;
78 
79   /* Dialog private */
80   GtkWidget *dialog;
81   GtkWidget *srclabel;
82   GtkWidget *rgbfileselector;
83   GtkWidget *cmykfileselector;
84   GtkWidget *filenamefileselector;
85   GtkWidget *profileselector;
86   GtkWidget *profilelabel;
87   GtkWidget *intentselector;
88   GtkWidget *intentlabel;
89   GtkWidget *bpcselector;
90   gboolean dialogresult;
91   gboolean integrated;
92   gboolean has_embedded_profile;
93 
94   /* Core related */
95   gint32 imageID;
96   GimpDrawable *drawable;
97   gboolean drawable_has_alpha;
98   cmsHTRANSFORM hTransform;
99   guchar *cmyktemp;
100   guchar *destptr[5];
101   int bpp[5];
102 } SeparateContext;
103 
104 #endif
105