summaryrefslogtreecommitdiff
path: root/src/main/print-escp2.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/print-escp2.h')
-rw-r--r--src/main/print-escp2.h815
1 files changed, 572 insertions, 243 deletions
diff --git a/src/main/print-escp2.h b/src/main/print-escp2.h
index f289f95..2e0df38 100644
--- a/src/main/print-escp2.h
+++ b/src/main/print-escp2.h
@@ -1,5 +1,5 @@
/*
- * "$Id: print-escp2.h,v 1.7.4.9 2003/12/02 01:51:00 rlk Exp $"
+ * "$Id: print-escp2.h,v 1.94 2005/06/14 02:49:10 rlk Exp $"
*
* Print plug-in EPSON ESC/P2 driver for the GIMP.
*
@@ -21,6 +21,20 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+#ifndef GUTENPRINT_INTERNAL_ESCP2_H
+#define GUTENPRINT_INTERNAL_ESCP2_H
+
+/*
+ * Maximum number of channels in a printer. If Epson comes out with an
+ * 8-head printer, this needs to be increased.
+ */
+#define PHYSICAL_CHANNEL_LIMIT 8
+#define MAX_DROP_SIZES 3
+
+#define XCOLOR_R (STP_NCOLORS + 0)
+#define XCOLOR_B (STP_NCOLORS + 1)
+#define XCOLOR_GLOSS (STP_NCOLORS + 2)
+
/*
* Printer capabilities.
*
@@ -31,6 +45,222 @@ typedef unsigned long model_cap_t;
typedef unsigned long model_featureset_t;
+#define RES_LOW 0
+#define RES_360 1
+#define RES_720_360 2
+#define RES_720 3
+#define RES_1440_720 4
+#define RES_2880_720 5
+#define RES_2880_1440 6
+#define RES_2880_2880 7
+#define RES_N 8
+
+/*
+ ****************************************************************
+ * *
+ * DROP SIZES *
+ * *
+ ****************************************************************
+ */
+
+typedef struct
+{
+ const char *listname;
+ short numdropsizes;
+ const double dropsizes[MAX_DROP_SIZES];
+} escp2_dropsize_t;
+
+typedef const escp2_dropsize_t *const escp2_drop_list_t[RES_N];
+
+/*
+ ****************************************************************
+ * *
+ * PAPERS *
+ * *
+ ****************************************************************
+ */
+
+typedef struct
+{
+ const char *name;
+ float base_density;
+ float subchannel_cutoff;
+ float k_transition;
+ float k_lower;
+ float k_upper;
+ float cyan;
+ float magenta;
+ float yellow;
+ float black;
+ float saturation;
+ float gamma;
+ const char *hue_adjustment;
+ const char *lum_adjustment;
+ const char *sat_adjustment;
+} paper_adjustment_t;
+
+typedef struct
+{
+ const char *listname;
+ short paper_count;
+ const paper_adjustment_t *papers;
+} paper_adjustment_list_t;
+
+typedef enum
+{
+ PAPER_PLAIN = 0x01,
+ PAPER_GOOD = 0x02,
+ PAPER_PHOTO = 0x04,
+ PAPER_PREMIUM_PHOTO = 0x08,
+ PAPER_TRANSPARENCY = 0x10
+} paper_class_t;
+
+typedef struct
+{
+ const char *name;
+ const char *text;
+ paper_class_t paper_class;
+ short paper_feed_sequence;
+ short platen_gap;
+ short feed_adjustment;
+ short vacuum_intensity;
+ short paper_thickness;
+ const char *preferred_ink_type;
+ const char *preferred_ink_set;
+} paper_t;
+
+typedef struct
+{
+ const char *listname;
+ short paper_count;
+ const paper_t *papers;
+} paperlist_t;
+
+
+/*
+ ****************************************************************
+ * *
+ * RESOLUTIONS *
+ * *
+ ****************************************************************
+ */
+
+typedef struct
+{
+ const char *name;
+ const char *text;
+ short hres;
+ short vres;
+ short printed_hres;
+ short printed_vres;
+ short softweave;
+ short printer_weave;
+ short vertical_passes;
+} res_t;
+
+
+/*
+ ****************************************************************
+ * *
+ * INKS *
+ * *
+ ****************************************************************
+ */
+
+typedef struct
+{
+ short color;
+ short subchannel;
+ short head_offset;
+ const char *channel_density;
+ const char *subchannel_scale;
+} physical_subchannel_t;
+
+typedef struct
+{
+ const char *curve_name;
+ const char *curve;
+ stp_curve_t *curve_impl;
+} hue_curve_t;
+
+typedef struct
+{
+ const char *listname;
+ const physical_subchannel_t *subchannels;
+ short n_subchannels;
+ hue_curve_t *hue_curve;
+} ink_channel_t;
+
+typedef enum
+{
+ INKSET_CMYK = 0,
+ INKSET_CcMmYK = 1,
+ INKSET_CcMmYyK = 2,
+ INKSET_CcMmYKk = 3,
+ INKSET_QUADTONE = 4,
+ INKSET_CMYKRB = 5,
+ INKSET_EXTENDED = 6
+} inkset_id_t;
+
+typedef struct
+{
+ const char *name;
+ const ink_channel_t *const *channels;
+ const ink_channel_t *const *aux_channels;
+ short channel_count;
+ short aux_channel_count;
+} channel_set_t;
+
+typedef struct
+{
+ const char *name;
+ const char *text;
+ inkset_id_t inkset;
+ const channel_set_t *channel_set;
+} escp2_inkname_t;
+
+typedef struct
+{
+ int n_shades;
+ const double shades[PHYSICAL_CHANNEL_LIMIT];
+} shade_t;
+
+typedef shade_t shade_set_t[PHYSICAL_CHANNEL_LIMIT];
+
+typedef struct
+{
+ const char *name;
+ const char *text;
+ const escp2_inkname_t *const *inknames;
+ const paperlist_t *papers;
+ const paper_adjustment_list_t *paper_adjustments;
+ const shade_set_t *shades;
+ short n_inks;
+} inklist_t;
+
+typedef struct
+{
+ const char *listname;
+ const inklist_t *const *inklists;
+ short n_inklists;
+} inkgroup_t;
+
+typedef struct
+{
+ const char *listname;
+ int count;
+ const char *const *names;
+} channel_name_t;
+
+
+/*
+ ****************************************************************
+ * *
+ * MISCELLANEOUS *
+ * *
+ ****************************************************************
+ */
+
/*
* For each printer, we can select from a variety of dot sizes.
* For single dot size printers, the available sizes are usually 0,
@@ -48,105 +278,85 @@ typedef unsigned long model_featureset_t;
* An entry of -1 in a slot means that this resolution is not available.
*/
-typedef int escp2_dot_size_t[13];
+typedef short escp2_dot_size_t[RES_N];
/*
* Choose the number of bits to use at each resolution.
*/
-typedef int escp2_bits_t[13];
+typedef short escp2_bits_t[RES_N];
/*
* Choose the base resolution to use at each resolution.
*/
-typedef int escp2_base_resolutions_t[13];
+typedef short escp2_base_resolutions_t[RES_N];
/*
* Specify the base density for each available resolution.
* This obviously depends upon the dot size.
*/
-typedef double escp2_densities_t[13];
+typedef float escp2_densities_t[RES_N];
-/*
- * Definition of the multi-level inks available to a given printer.
- * Each printer may use a different kind of ink droplet for variable
- * and single drop size for each supported horizontal resolution and
- * type of ink (4 or 6 color).
- *
- * Recall that 6 color ink is treated as simply another kind of
- * multi-level ink, but the driver offers the user a choice of 4 and
- * 6 color ink, so we need to define appropriate inksets for both
- * kinds of ink.
- *
- * Stuff like the MIS 4 and 6 "color" monochrome inks doesn't fit into
- * this model very nicely, so we'll either have to special case it
- * or find some way of handling it in here.
- */
+#define ROLL_FEED_CUT_ALL (1)
+#define ROLL_FEED_CUT_LAST (2)
+#define ROLL_FEED_DONT_EJECT (4)
-#define RES_120_M 0
-#define RES_120 1
-#define RES_180_M 2
-#define RES_180 3
-#define RES_360_M 4
-#define RES_360 5
-#define RES_720_360_M 6
-#define RES_720_360 7
-#define RES_720_M 8
-#define RES_720 9
-#define RES_1440_720_M 10
-#define RES_1440_720 11
-#define RES_1440_1440_M 12
-#define RES_1440_1440 13
-#define RES_2880_720_M 14
-#define RES_2880_720 15
-#define RES_2880_1440_M 16
-#define RES_2880_1440 17
-#define RES_N 18
-
-typedef struct escp2_variable_ink
+typedef struct
{
- const stp_simple_dither_range_t *range;
- int count;
- double density;
-} escp2_variable_ink_t;
-
-typedef const escp2_variable_ink_t *escp2_variable_inkset_t[NCOLORS];
+ const char *name;
+ const char *text;
+ short is_cd;
+ short is_roll_feed;
+ unsigned roll_feed_cut_flags;
+ const stp_raw_t init_sequence;
+ const stp_raw_t deinit_sequence;
+} input_slot_t;
-typedef const escp2_variable_inkset_t *escp2_variable_inklist_t[][RES_N / 2];
+typedef struct
+{
+ const input_slot_t *slots;
+ size_t n_input_slots;
+} input_slot_list_t;
typedef struct
{
const char *name;
const char *text;
- int paper_feed_sequence;
- int platen_gap;
- double base_density;
- double k_lower_scale;
- double k_upper;
- double cyan;
- double magenta;
- double yellow;
- double p_cyan;
- double p_magenta;
- double p_yellow;
- double saturation;
- double gamma;
- int feed_adjustment;
- int vacuum_intensity;
- int paper_thickness;
- const double *hue_adjustment;
- const double *lum_adjustment;
- const double *sat_adjustment;
-} paper_t;
+ short min_hres;
+ short min_vres;
+ short max_hres;
+ short max_vres;
+ short desired_hres;
+ short desired_vres;
+} quality_t;
typedef struct
{
- int paper_count;
- const paper_t *papers;
-} paperlist_t;
+ const quality_t *qualities;
+ size_t n_quals;
+} quality_list_t;
+typedef enum
+{
+ AUTO_MODE_QUALITY,
+ AUTO_MODE_MANUAL
+} auto_mode_t;
+
+typedef struct
+{
+ const char *name;
+ const char *text;
+ short value;
+} printer_weave_t;
+
+typedef struct
+{
+ const char *name;
+ size_t n_printer_weaves;
+ const printer_weave_t *printer_weaves;
+} printer_weave_list_t;
#define MODEL_COMMAND_MASK 0xful /* What general command set does */
#define MODEL_COMMAND_1998 0x0ul
@@ -158,160 +368,90 @@ typedef struct
#define MODEL_XZEROMARGIN_NO 0x00ul /* zero margin mode? */
#define MODEL_XZEROMARGIN_YES 0x10ul /* (print to edge of the paper) */
-#define MODEL_ROLLFEED_MASK 0x20ul /* Does this printer support */
-#define MODEL_ROLLFEED_NO 0x00ul /* a roll feed? */
-#define MODEL_ROLLFEED_YES 0x20ul
-
-#define MODEL_VARIABLE_DOT_MASK 0x40ul /* Does this printer support var */
+#define MODEL_VARIABLE_DOT_MASK 0x20ul /* Does this printer support var */
#define MODEL_VARIABLE_NO 0x00ul /* dot size printing? The newest */
-#define MODEL_VARIABLE_YES 0x40ul /* printers support multiple modes */
+#define MODEL_VARIABLE_YES 0x20ul /* printers support multiple modes */
-#define MODEL_GRAYMODE_MASK 0x80ul /* Does this printer support special */
+#define MODEL_GRAYMODE_MASK 0x40ul /* Does this printer support special */
#define MODEL_GRAYMODE_NO 0x00ul /* fast black printing? */
-#define MODEL_GRAYMODE_YES 0x80ul
+#define MODEL_GRAYMODE_YES 0x40ul
-#define MODEL_VACUUM_MASK 0x100ul
-#define MODEL_VACUUM_NO 0x000ul
-#define MODEL_VACUUM_YES 0x100ul
+#define MODEL_VACUUM_MASK 0x80ul
+#define MODEL_VACUUM_NO 0x00ul
+#define MODEL_VACUUM_YES 0x80ul
-#define MODEL_FAST_360_MASK 0x200ul
+#define MODEL_FAST_360_MASK 0x100ul
#define MODEL_FAST_360_NO 0x000ul
-#define MODEL_FAST_360_YES 0x200ul
+#define MODEL_FAST_360_YES 0x100ul
+
+#define MODEL_SEND_ZERO_ADVANCE_MASK 0x200ul
+#define MODEL_SEND_ZERO_ADVANCE_NO 0x000ul
+#define MODEL_SEND_ZERO_ADVANCE_YES 0x200ul
+
+#define MODEL_SUPPORTS_INK_CHANGE_MASK 0x400ul
+#define MODEL_SUPPORTS_INK_CHANGE_NO 0x000ul
+#define MODEL_SUPPORTS_INK_CHANGE_YES 0x400ul
+
+#define MODEL_PACKET_MODE_MASK 0x800ul
+#define MODEL_PACKET_MODE_NO 0x000ul
+#define MODEL_PACKET_MODE_YES 0x800ul
typedef enum
{
MODEL_COMMAND,
MODEL_XZEROMARGIN,
- MODEL_ROLLFEED,
MODEL_VARIABLE_DOT,
MODEL_GRAYMODE,
MODEL_VACUUM,
MODEL_FAST_360,
+ MODEL_SEND_ZERO_ADVANCE,
+ MODEL_SUPPORTS_INK_CHANGE,
+ MODEL_PACKET_MODE,
MODEL_LIMIT
} escp2_model_option_t;
-typedef struct
-{
- const char *attr_name;
- int shift;
- int bits;
-} escp2_printer_attr_t;
-
-typedef struct
-{
- const char *name;
- const char *text;
- int hres;
- int vres;
- int external_hres;
- int external_vres;
- int softweave;
- int interleave;
- int vertical_passes;
- int vertical_oversample;
- int unidirectional;
- int vertical_undersample;
- int vertical_denominator;
- int resid;
-} res_t;
-
-typedef struct
-{
- int color;
- int density;
- int head_offset;
-} physical_subchannel_t;
-
-typedef struct
-{
- const physical_subchannel_t *channels;
- int n_subchannels;
-} ink_channel_t;
-
-typedef enum
-{
- INKSET_CMYK = 0,
- INKSET_CcMmYK = 1,
- INKSET_CcMmYyK = 2,
- INKSET_CcMmYKk = 3,
- INKSET_PIEZO_QUADTONE = 4
-} inkset_id_t;
-
-typedef struct
-{
- const char *name;
- const char *text;
- int is_color;
- inkset_id_t inkset;
- double k_lower;
- double k_upper;
- const double *lum_adjustment;
- const double *hue_adjustment;
- const double *sat_adjustment;
- const ink_channel_t *channels[NCOLORS];
-} escp2_inkname_t;
-
-typedef struct
-{
- const escp2_inkname_t *const *inknames;
- size_t n_inks;
-} inklist_t;
-
-#define ROLL_FEED_CUT_ALL (1)
-#define ROLL_FEED_CUT_LAST (2)
-
-typedef struct
-{
- const char *data;
- size_t length;
-} init_sequence_t;
-
-typedef struct
-{
- const char *name;
- const char *text;
- int is_roll_feed;
- unsigned roll_feed_cut_flags;
- init_sequence_t init_sequence;
- init_sequence_t deinit_sequence;
-} input_slot_t;
-
-typedef struct
-{
- const input_slot_t *slots;
- size_t n_input_slots;
-} input_slot_list_t;
-
typedef struct escp2_printer
{
model_cap_t flags; /* Bitmask of flags, see above */
/*****************************************************************************/
/* Basic head configuration */
- int nozzles; /* Number of nozzles per color */
- int min_nozzles; /* Minimum number of nozzles per color */
- int nozzle_separation; /* Separation between rows, in 1/360" */
- int black_nozzles; /* Number of black nozzles (may be extra) */
- int min_black_nozzles; /* # of black nozzles (may be extra) */
- int black_nozzle_separation; /* Separation between rows */
- int fast_nozzles; /* Number of fast nozzles */
- int min_fast_nozzles; /* # of fast nozzles (may be extra) */
- int fast_nozzle_separation; /* Separation between rows */
+ short nozzles; /* Number of nozzles per color */
+ short min_nozzles; /* Minimum number of nozzles per color */
+ short nozzle_separation; /* Separation between rows, in 1/360" */
+ short black_nozzles; /* Number of black nozzles (may be extra) */
+ short min_black_nozzles; /* # of black nozzles (may be extra) */
+ short black_nozzle_separation; /* Separation between rows */
+ short fast_nozzles; /* Number of fast nozzles */
+ short min_fast_nozzles; /* # of fast nozzles (may be extra) */
+ short fast_nozzle_separation; /* Separation between rows */
+ short physical_channels; /* Number of ink channels */
/*****************************************************************************/
/* Print head resolution */
- int base_separation; /* Basic unit of row separation */
- int base_resolution; /* Base hardware line spacing (above this */
- /* always requires multiple passes) */
- int enhanced_resolution;/* Above this we use the */
- /* enhanced_xres rather than xres */
- int resolution_scale; /* Scaling factor for ESC(D command */
- int max_black_resolution; /* Above this resolution, we */
+ short base_separation; /* Basic unit of row separation */
+ short resolution_scale; /* Scaling factor for ESC(D command */
+ short max_black_resolution; /* Above this resolution, we */
/* must use color parameters */
/* rather than (faster) black */
/* only parameters*/
- int max_hres;
- int max_vres;
- int min_hres;
- int min_vres;
+ short max_hres;
+ short max_vres;
+ short min_hres;
+ short min_vres;
+ /* Miscellaneous printer-specific data */
+ short extra_feed; /* Extra distance the paper can be spaced */
+ /* beyond the bottom margin, in 1/360". */
+ /* (maximum useful value is */
+ /* nozzles * nozzle_separation) */
+ short separation_rows; /* Some printers require funky spacing */
+ /* arguments in softweave mode. */
+ short pseudo_separation_rows;/* Some printers require funky */
+ /* spacing arguments in printer_weave mode */
+
+ short zero_margin_offset; /* Offset to use to achieve */
+ /* zero-margin printing */
+ short initial_vertical_offset;
+ short black_initial_vertical_offset;
+ short extra_720dpi_separation;
/*****************************************************************************/
/* Paper size limits */
int max_paper_width; /* Maximum paper width, in points */
@@ -322,58 +462,247 @@ typedef struct escp2_printer
/* Borders */
/* SHEET FED: */
/* Softweave: */
- int left_margin; /* Left margin, points */
- int right_margin; /* Right margin, points */
- int top_margin; /* Absolute top margin, points */
- int bottom_margin; /* Absolute bottom margin, points */
- /* Printer interleave: */
- int m_left_margin; /* Left margin, points */
- int m_right_margin; /* Right margin, points */
- int m_top_margin; /* Absolute top margin, points */
- int m_bottom_margin; /* Absolute bottom margin, points */
+ short left_margin; /* Left margin, points */
+ short right_margin; /* Right margin, points */
+ short top_margin; /* Absolute top margin, points */
+ short bottom_margin; /* Absolute bottom margin, points */
+ /* Printer weave: */
+ short m_left_margin; /* Left margin, points */
+ short m_right_margin; /* Right margin, points */
+ short m_top_margin; /* Absolute top margin, points */
+ short m_bottom_margin; /* Absolute bottom margin, points */
/* ROLL FEED: */
/* Softweave: */
- int roll_left_margin; /* Left margin, points */
- int roll_right_margin; /* Right margin, points */
- int roll_top_margin; /* Absolute top margin, points */
- int roll_bottom_margin; /* Absolute bottom margin, points */
- /* Printer interleave: */
- int m_roll_left_margin; /* Left margin, points */
- int m_roll_right_margin; /* Right margin, points */
- int m_roll_top_margin; /* Absolute top margin, points */
- int m_roll_bottom_margin; /* Absolute bottom margin, points */
+ short roll_left_margin; /* Left margin, points */
+ short roll_right_margin; /* Right margin, points */
+ short roll_top_margin; /* Absolute top margin, points */
+ short roll_bottom_margin; /* Absolute bottom margin, points */
+ /* Printer weave: */
+ short m_roll_left_margin; /* Left margin, points */
+ short m_roll_right_margin; /* Right margin, points */
+ short m_roll_top_margin; /* Absolute top margin, points */
+ short m_roll_bottom_margin; /* Absolute bottom margin, points */
+ /* Print directly to CD */
+ short cd_x_offset; /* Center of CD (horizontal offset) */
+ short cd_y_offset; /* Center of CD (vertical offset) */
+ short cd_page_width; /* Width of "page" when printing to CD */
+ short cd_page_height; /* Height of "page" when printing to CD */
/*****************************************************************************/
- /* Miscellaneous printer-specific data */
- int extra_feed; /* Extra distance the paper can be spaced */
- /* beyond the bottom margin, in 1/360". */
- /* (maximum useful value is */
- /* nozzles * nozzle_separation) */
- int separation_rows; /* Some printers require funky spacing */
- /* arguments in interleave mode. */
- int pseudo_separation_rows;/* Some printers require funky */
- /* spacing arguments in softweave mode */
-
- int zero_margin_offset; /* Offset to use to achieve */
- /* zero-margin printing */
- int initial_vertical_offset;
- int black_initial_vertical_offset;
- int extra_720dpi_separation;
-
+ /* Parameters for escputil */
+ short alignment_passes;
+ short alignment_choices;
+ short alternate_alignment_passes;
+ short alternate_alignment_choices;
/*****************************************************************************/
- const int *dot_sizes; /* Vector of dot sizes for resolutions */
- const double *densities; /* List of densities for each printer */
- const escp2_variable_inklist_t *inks; /* Choices of inks for this printer */
+ const short *dot_sizes; /* Vector of dot sizes for resolutions */
+ const float *densities; /* List of densities for each printer */
+ const escp2_drop_list_t *drops; /* Drop sizes */
/*****************************************************************************/
- const paperlist_t *paperlist;
- const res_t *reslist;
- const inklist_t *inklist;
+ const res_t *const *reslist;
+ const inkgroup_t *inkgroup;
/*****************************************************************************/
- const int *bits;
- const int *base_resolutions;
+ const short *bits;
+ const short *base_resolutions;
const input_slot_list_t *input_slots;
/*****************************************************************************/
- const init_sequence_t *preinit_sequence;
- const init_sequence_t *postinit_remote_sequence;
-} escp2_stp_printer_t;
+ const quality_list_t *quality_list;
+ const stp_raw_t *preinit_sequence;
+ const stp_raw_t *postinit_remote_sequence;
+/*****************************************************************************/
+ const printer_weave_list_t *const printer_weaves;
+ const channel_name_t *channel_names;
+} stpi_escp2_printer_t;
+
+extern const stpi_escp2_printer_t stpi_escp2_model_capabilities[];
+extern const int stpi_escp2_model_limit;
+
+extern const escp2_drop_list_t stpi_escp2_simple_drops;
+extern const escp2_drop_list_t stpi_escp2_spro10000_drops;
+extern const escp2_drop_list_t stpi_escp2_variable_1_5pl_drops;
+extern const escp2_drop_list_t stpi_escp2_variable_2pl_drops;
+extern const escp2_drop_list_t stpi_escp2_variable_3pl_drops;
+extern const escp2_drop_list_t stpi_escp2_variable_3pl_pigment_drops;
+extern const escp2_drop_list_t stpi_escp2_variable_3pl_pigment_c66_drops;
+extern const escp2_drop_list_t stpi_escp2_variable_3pl_pmg_drops;
+extern const escp2_drop_list_t stpi_escp2_variable_1440_4pl_drops;
+extern const escp2_drop_list_t stpi_escp2_variable_ultrachrome_drops;
+extern const escp2_drop_list_t stpi_escp2_variable_2880_4pl_drops;
+extern const escp2_drop_list_t stpi_escp2_variable_6pl_drops;
+extern const escp2_drop_list_t stpi_escp2_variable_2000p_drops;
+extern const escp2_drop_list_t stpi_escp2_variable_x80_6pl_drops;
+
+extern const paperlist_t stpi_escp2_standard_paper_list;
+extern const paperlist_t stpi_escp2_durabrite_paper_list;
+extern const paperlist_t stpi_escp2_durabrite2_paper_list;
+extern const paperlist_t stpi_escp2_ultrachrome_paper_list;
+extern const paperlist_t stpi_escp2_r800_paper_list;
+
+extern const paper_adjustment_list_t stpi_escp2_standard_paper_adjustment_list;
+extern const paper_adjustment_list_t stpi_escp2_durabrite_paper_adjustment_list;
+extern const paper_adjustment_list_t stpi_escp2_durabrite2_paper_adjustment_list;
+extern const paper_adjustment_list_t stpi_escp2_photo_paper_adjustment_list;
+extern const paper_adjustment_list_t stpi_escp2_photo2_paper_adjustment_list;
+extern const paper_adjustment_list_t stpi_escp2_photo3_paper_adjustment_list;
+extern const paper_adjustment_list_t stpi_escp2_sp960_paper_adjustment_list;
+extern const paper_adjustment_list_t stpi_escp2_ultrachrome_photo_paper_adjustment_list;
+extern const paper_adjustment_list_t stpi_escp2_ultrachrome_matte_paper_adjustment_list;
+extern const paper_adjustment_list_t stpi_escp2_r800_photo_paper_adjustment_list;
+extern const paper_adjustment_list_t stpi_escp2_r800_matte_paper_adjustment_list;
+
+extern const res_t *const stpi_escp2_superfine_reslist[];
+extern const res_t *const stpi_escp2_no_printer_weave_reslist[];
+extern const res_t *const stpi_escp2_pro_reslist[];
+extern const res_t *const stpi_escp2_sp5000_reslist[];
+extern const res_t *const stpi_escp2_720dpi_reslist[];
+extern const res_t *const stpi_escp2_720dpi_soft_reslist[];
+extern const res_t *const stpi_escp2_g3_720dpi_reslist[];
+extern const res_t *const stpi_escp2_1440dpi_reslist[];
+extern const res_t *const stpi_escp2_2880dpi_reslist[];
+extern const res_t *const stpi_escp2_2880_1440dpi_reslist[];
+extern const res_t *const stpi_escp2_g3_reslist[];
+extern const res_t *const stpi_escp2_sc500_reslist[];
+extern const res_t *const stpi_escp2_sc640_reslist[];
+
+extern const inkgroup_t stpi_escp2_cmy_inkgroup;
+extern const inkgroup_t stpi_escp2_standard_inkgroup;
+extern const inkgroup_t stpi_escp2_c80_inkgroup;
+extern const inkgroup_t stpi_escp2_c82_inkgroup;
+extern const inkgroup_t stpi_escp2_c64_inkgroup;
+extern const inkgroup_t stpi_escp2_f360_inkgroup;
+extern const inkgroup_t stpi_escp2_cx3650_inkgroup;
+extern const inkgroup_t stpi_escp2_x80_inkgroup;
+extern const inkgroup_t stpi_escp2_photo_gen1_inkgroup;
+extern const inkgroup_t stpi_escp2_photo_gen2_inkgroup;
+extern const inkgroup_t stpi_escp2_photo_gen3_inkgroup;
+extern const inkgroup_t stpi_escp2_photo_pigment_inkgroup;
+extern const inkgroup_t stpi_escp2_photo7_japan_inkgroup;
+extern const inkgroup_t stpi_escp2_ultrachrome_inkgroup;
+extern const inkgroup_t stpi_escp2_f360_photo_inkgroup;
+extern const inkgroup_t stpi_escp2_f360_photo7_japan_inkgroup;
+extern const inkgroup_t stpi_escp2_f360_ultrachrome_inkgroup;
+extern const inkgroup_t stpi_escp2_cmykrb_inkgroup;
+
+extern const escp2_inkname_t stpi_escp2_default_black_inkset;
+
+extern const printer_weave_list_t stpi_escp2_standard_printer_weave_list;
+extern const printer_weave_list_t stpi_escp2_sp2200_printer_weave_list;
+extern const printer_weave_list_t stpi_escp2_pro7000_printer_weave_list;
+extern const printer_weave_list_t stpi_escp2_pro7500_printer_weave_list;
+extern const printer_weave_list_t stpi_escp2_pro7600_printer_weave_list;
-extern const escp2_stp_printer_t stp_escp2_model_capabilities[];
+typedef struct
+{
+ /* Basic print head parameters */
+ int nozzles; /* Number of nozzles */
+ int min_nozzles; /* Fewest nozzles we're allowed to use */
+ int nozzle_separation; /* Nozzle separation, in dots */
+ int *head_offset; /* Head offset (for C80-type printers) */
+ int max_head_offset; /* Largest head offset */
+ int page_management_units; /* Page management units (dpi) */
+ int vertical_units; /* Vertical units (dpi) */
+ int horizontal_units; /* Horizontal units (dpi) */
+ int micro_units; /* Micro-units for horizontal positioning */
+ int unit_scale; /* Scale factor for units */
+ int send_zero_pass_advance; /* Send explicit command for zero advance */
+
+ /* Ink parameters */
+ int bitwidth; /* Number of bits per ink drop */
+ int drop_size; /* ID of the drop size we're using */
+ int ink_resid; /* Array index for the drop set we're using */
+ const escp2_inkname_t *inkname; /* Description of the ink set */
+ int use_aux_channels; /* Use gloss channel */
+
+ /* Ink channels */
+ int logical_channels; /* Number of logical ink channels (e.g.CMYK) */
+ int physical_channels; /* Number of physical channels (e.g. CcMmYK) */
+ int channels_in_use; /* Number of channels we're using
+ FIXME merge with physical_channels! */
+ unsigned char **cols; /* Output dithered data */
+ const physical_subchannel_t **channels; /* Description of each channel */
+
+ /* Miscellaneous printer control */
+ int use_black_parameters; /* Can we use (faster) black head parameters */
+ int use_fast_360; /* Can we use fast 360 DPI 4 color mode */
+ int advanced_command_set; /* Uses one of the advanced command sets */
+ int use_extended_commands; /* Do we use the extended commands? */
+ const input_slot_t *input_slot; /* Input slot description */
+ const paper_t *paper_type; /* Paper type */
+ const paper_adjustment_t *paper_adjustment; /* Paper adjustments */
+ const inkgroup_t *ink_group; /* Which set of inks */
+ const stp_raw_t *init_sequence; /* Initialization sequence */
+ const stp_raw_t *deinit_sequence; /* De-initialization sequence */
+ model_featureset_t command_set; /* Which command set this printer supports */
+ int variable_dots; /* Print supports variable dot sizes */
+ int has_vacuum; /* Printer supports vacuum command */
+ int has_graymode; /* Printer supports fast grayscale mode */
+ int base_separation; /* Basic unit of separation */
+ int resolution_scale; /* Scale factor for ESC(D command */
+ int printing_resolution; /* Printing resolution for this resolution */
+ int separation_rows; /* Row separation scaling */
+ int pseudo_separation_rows; /* Special row separation for some printers */
+ int extra_720dpi_separation; /* Special separation needed at 720 DPI */
+
+ /* weave parameters */
+ int horizontal_passes; /* Number of horizontal passes required
+ to print a complete row */
+ int physical_xdpi; /* Horizontal distance between dots in pass */
+ const res_t *res; /* Description of the printing resolution */
+ const printer_weave_t *printer_weave; /* Printer weave parameters */
+ int use_printer_weave; /* Use the printer weaving mechanism */
+
+ /* page parameters */ /* Indexed from top left */
+ int page_left; /* Left edge of page (points) */
+ int page_right; /* Right edge of page (points) */
+ int page_top; /* Top edge of page (points) */
+ int page_bottom; /* Bottom edge of page (points) */
+ int page_width; /* Page width (points) */
+ int page_height; /* Page height (points) */
+ int page_true_height; /* Physical page height (points) */
+ int cd_x_offset; /* CD X offset (micro units) */
+ int cd_y_offset; /* CD Y offset (micro units) */
+ int cd_outer_radius; /* CD radius (micro units) */
+ int cd_inner_radius; /* CD radius (micro units) */
+
+ /* Image parameters */ /* Indexed from top left */
+ int image_height; /* Height of printed region (points) */
+ int image_width; /* Width of printed region (points) */
+ int image_top; /* First printed row (points) */
+ int image_left; /* Left edge of image (points) */
+ int image_scaled_width; /* Width of physical printed region (dots) */
+ int image_printed_width; /* Width of printed region (dots) */
+ int image_scaled_height; /* Height of physical printed region (dots) */
+ int image_printed_height; /* Height of printed region (dots) */
+ int image_left_position; /* Left dot position of image */
+
+ /* Transitory state */
+ int printed_something; /* Have we actually printed anything? */
+ int initial_vertical_offset; /* Vertical offset for C80-type printers */
+ int printing_initial_vertical_offset; /* Vertical offset, for print cmd */
+ int last_color; /* Last color we printed */
+ int last_pass_offset; /* Starting row of last pass we printed */
+ int last_pass; /* Last pass printed */
+
+} escp2_privdata_t;
+
+extern void stpi_escp2_init_printer(stp_vars_t *v);
+extern void stpi_escp2_deinit_printer(stp_vars_t *v);
+extern void stpi_escp2_flush_pass(stp_vars_t *v, int passno,
+ int vertical_subpass);
+extern void stpi_escp2_terminate_page(stp_vars_t *v);
+
+#ifdef TEST_UNCOMPRESSED
+#define COMPRESSION (0)
+#define FILLFUNC stp_fill_uncompressed
+#define COMPUTEFUNC stp_compute_uncompressed_linewidth
+#define PACKFUNC stp_pack_uncompressed
+#else
+#define COMPRESSION (1)
+#define FILLFUNC stp_fill_tiff
+#define COMPUTEFUNC stp_compute_tiff_linewidth
+#define PACKFUNC stp_pack_tiff
+#endif
+
+#endif /* GUTENPRINT_INTERNAL_ESCP2_H */
+/*
+ * End of "$Id: print-escp2.h,v 1.94 2005/06/14 02:49:10 rlk Exp $".
+ */