1/*
2 * "$Id: print-escp2.h,v 1.139 2010/12/19 02:51:37 rlk Exp $"
3 *
4 *   Print plug-in EPSON ESC/P2 driver for the GIMP.
5 *
6 *   Copyright 1997-2000 Michael Sweet (mike@easysw.com) and
7 *	Robert Krawitz (rlk@alum.mit.edu)
8 *
9 *   This program is free software; you can redistribute it and/or modify it
10 *   under the terms of the GNU General Public License as published by the Free
11 *   Software Foundation; either version 2 of the License, or (at your option)
12 *   any later version.
13 *
14 *   This program is distributed in the hope that it will be useful, but
15 *   WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 *   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
17 *   for more details.
18 *
19 *   You should have received a copy of the GNU General Public License
20 *   along with this program; if not, write to the Free Software
21 *   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 */
23
24#ifndef GUTENPRINT_INTERNAL_ESCP2_H
25#define GUTENPRINT_INTERNAL_ESCP2_H
26
27/*
28 * Maximum number of channels in a printer.  If Epson comes out with an
29 * 8-head printer, this needs to be increased.
30 */
31#define PHYSICAL_CHANNEL_LIMIT 8
32#define MAX_DROP_SIZES 3
33
34#define XCOLOR_R     (STP_NCOLORS + 0)
35#define XCOLOR_B     (STP_NCOLORS + 1)
36#define XCOLOR_GLOSS (STP_NCOLORS + 2)
37
38/*
39 * Printer capabilities.
40 *
41 * Various classes of printer capabilities are represented by bitmasks.
42 */
43
44typedef unsigned long model_cap_t;
45typedef unsigned long model_featureset_t;
46
47/*
48 ****************************************************************
49 *                                                              *
50 * PAPERS                                                       *
51 *                                                              *
52 ****************************************************************
53 */
54
55typedef enum
56{
57  PAPER_PLAIN         = 0x01,
58  PAPER_GOOD          = 0x02,
59  PAPER_PHOTO         = 0x04,
60  PAPER_PREMIUM_PHOTO = 0x08,
61  PAPER_TRANSPARENCY  = 0x10
62} paper_class_t;
63
64typedef struct
65{
66  const char *cname;
67  const char *name;
68  const char *text;
69  paper_class_t paper_class;
70  const char *preferred_ink_type;
71  const char *preferred_ink_set;
72  stp_vars_t *v;
73} paper_t;
74
75
76/*
77 ****************************************************************
78 *                                                              *
79 * RESOLUTIONS                                                  *
80 *                                                              *
81 ****************************************************************
82 */
83
84/* Drop sizes are grouped under resolution because each resolution
85   has different drop sizes. */
86typedef struct
87{
88  short numdropsizes;
89  double dropsizes[MAX_DROP_SIZES];
90} escp2_dropsize_t;
91
92typedef struct
93{
94  const char *name;
95  const char *text;
96  short hres;
97  short vres;
98  short printed_hres;
99  short printed_vres;
100  short vertical_passes;
101  stp_raw_t *command;
102  stp_vars_t *v;
103} res_t;
104
105typedef struct
106{
107  char *name;
108  res_t *resolutions;
109  size_t n_resolutions;
110} resolution_list_t;
111
112typedef struct
113{
114  char *name;
115  char *text;
116  short min_hres;
117  short min_vres;
118  short max_hres;
119  short max_vres;
120  short desired_hres;
121  short desired_vres;
122} quality_t;
123
124typedef struct
125{
126  char *name;
127  quality_t *qualities;
128  size_t n_quals;
129} quality_list_t;
130
131typedef struct
132{
133  char *name;
134  char *text;
135  stp_raw_t *command;
136} printer_weave_t;
137
138typedef struct
139{
140  char *name;
141  size_t n_printer_weaves;
142  printer_weave_t *printer_weaves;
143} printer_weave_list_t;
144
145
146/*
147 ****************************************************************
148 *                                                              *
149 * INKS                                                         *
150 *                                                              *
151 ****************************************************************
152 */
153
154typedef struct
155{
156  short color;
157  short subchannel;
158  short head_offset;
159  short split_channel_count;
160  const char *channel_density;
161  const char *subchannel_transition;
162  const char *subchannel_value;
163  const char *subchannel_scale;
164  const char *name;
165  const char *text;
166  short *split_channels;
167} physical_subchannel_t;
168
169typedef struct
170{
171  const char *name;
172  short n_subchannels;
173  physical_subchannel_t *subchannels;
174  const char *hue_curve_name;
175  stp_curve_t *hue_curve;
176} ink_channel_t;
177
178typedef enum
179{
180  INKSET_CMYK             = 0,
181  INKSET_CcMmYK           = 1,
182  INKSET_CcMmYyK          = 2,
183  INKSET_CcMmYKk          = 3,
184  INKSET_QUADTONE         = 4,
185  INKSET_HEXTONE          = 5,
186  INKSET_OTHER		  = 6,
187  INKSET_EXTENDED	  = 7
188} inkset_id_t;
189
190typedef struct
191{
192  const char *name;
193  const char *text;
194  short channel_count;
195  short aux_channel_count;
196  inkset_id_t inkset;
197  const stp_raw_t *init_sequence;
198  const stp_raw_t *deinit_sequence;
199  ink_channel_t *channels;
200  ink_channel_t *aux_channels;
201} inkname_t;
202
203typedef struct
204{
205  int n_shades;
206  double *shades;
207} shade_t;
208
209typedef struct
210{
211  const char *name;
212  const char *text;
213  short n_shades;
214  short n_inks;
215  const stp_raw_t *init_sequence;
216  const stp_raw_t *deinit_sequence;
217  shade_t *shades;
218  inkname_t *inknames;
219} inklist_t;
220
221typedef struct
222{
223  const char *name;
224  short n_inklists;
225  inklist_t *inklists;
226} inkgroup_t;
227
228
229/*
230 ****************************************************************
231 *                                                              *
232 * INPUT SLOTS                                                  *
233 *                                                              *
234 ****************************************************************
235 */
236
237#define ROLL_FEED_CUT_ALL (1)
238#define ROLL_FEED_CUT_LAST (2)
239#define ROLL_FEED_DONT_EJECT (4)
240
241#define DUPLEX_NO_TUMBLE (1)
242#define DUPLEX_TUMBLE (2)
243
244typedef struct
245{
246  const char *name;
247  const char *text;
248  short is_cd;
249  short is_roll_feed;
250  short duplex;
251  short extra_height;
252  unsigned roll_feed_cut_flags;
253  const stp_raw_t *init_sequence;
254  const stp_raw_t *deinit_sequence;
255} input_slot_t;
256
257/*
258 ****************************************************************
259 *                                                              *
260 * FLAGS                                                        *
261 *                                                              *
262 ****************************************************************
263 */
264
265#define MODEL_COMMAND_MASK	0xful /* What general command set does */
266#define MODEL_COMMAND_1998	0x0ul /* Old (ESC .) printers */
267#define MODEL_COMMAND_1999	0x1ul /* ESC i printers w/o extended ESC(c */
268#define MODEL_COMMAND_2000	0x2ul /* ESC i printers with extended ESC(c */
269#define MODEL_COMMAND_PRO	0x3ul /* Stylus Pro printers */
270
271#define MODEL_ZEROMARGIN_MASK	0x70ul /* Does this printer support */
272#define MODEL_ZEROMARGIN_NO	0x00ul /* zero margin mode? */
273#define MODEL_ZEROMARGIN_YES	0x10ul /* (print beyond bottom of page) */
274#define MODEL_ZEROMARGIN_FULL	0x20ul /* (do not print beyond bottom) */
275#define MODEL_ZEROMARGIN_RESTR	0x30ul /* (no special treatment for vertical) */
276#define MODEL_ZEROMARGIN_H_ONLY	0x40ul /* (borderless only horizontal) */
277
278#define MODEL_VARIABLE_DOT_MASK	0x80ul /* Does this printer support var */
279#define MODEL_VARIABLE_NO	0x00ul /* dot size printing? The newest */
280#define MODEL_VARIABLE_YES	0x80ul /* printers support multiple modes */
281
282#define MODEL_GRAYMODE_MASK	0x100ul /* Does this printer support special */
283#define MODEL_GRAYMODE_NO	0x000ul /* fast black printing? */
284#define MODEL_GRAYMODE_YES	0x100ul
285
286#define MODEL_FAST_360_MASK	0x200ul
287#define MODEL_FAST_360_NO	0x000ul
288#define MODEL_FAST_360_YES	0x200ul
289
290#define MODEL_SEND_ZERO_ADVANCE_MASK	0x400ul
291#define MODEL_SEND_ZERO_ADVANCE_NO	0x000ul
292#define MODEL_SEND_ZERO_ADVANCE_YES	0x400ul
293
294#define MODEL_SUPPORTS_INK_CHANGE_MASK	0x800ul
295#define MODEL_SUPPORTS_INK_CHANGE_NO	0x000ul
296#define MODEL_SUPPORTS_INK_CHANGE_YES	0x800ul
297
298#define MODEL_PACKET_MODE_MASK	0x1000ul
299#define MODEL_PACKET_MODE_NO	0x0000ul
300#define MODEL_PACKET_MODE_YES	0x1000ul
301
302#define MODEL_INTERCHANGEABLE_INK_MASK	0x2000ul
303#define MODEL_INTERCHANGEABLE_INK_NO	0x0000ul
304#define MODEL_INTERCHANGEABLE_INK_YES	0x2000ul
305
306#define MODEL_ENVELOPE_LANDSCAPE_MASK	0x4000ul
307#define MODEL_ENVELOPE_LANDSCAPE_NO	0x0000ul
308#define MODEL_ENVELOPE_LANDSCAPE_YES	0x4000ul
309
310typedef enum
311{
312  MODEL_COMMAND,
313  MODEL_ZEROMARGIN,
314  MODEL_VARIABLE_DOT,
315  MODEL_GRAYMODE,
316  MODEL_FAST_360,
317  MODEL_SEND_ZERO_ADVANCE,
318  MODEL_SUPPORTS_INK_CHANGE,
319  MODEL_PACKET_MODE,
320  MODEL_INTERCHANGEABLE_INK,
321  MODEL_ENVELOPE_LANDSCAPE,
322  MODEL_LIMIT
323} escp2_model_option_t;
324
325typedef struct escp2_printer
326{
327  int		active;
328/*****************************************************************************/
329  model_cap_t	flags;		/* Bitmask of flags, see above */
330/*****************************************************************************/
331  /* Basic head configuration */
332  short		nozzles;	/* Number of nozzles per color */
333  short		min_nozzles;	/* Minimum number of nozzles per color */
334  short		nozzle_start;	/* Starting usable nozzle */
335  short		nozzle_separation; /* Separation between rows, in 1/360" */
336  short		black_nozzles;	/* Number of black nozzles (may be extra) */
337  short		min_black_nozzles;	/* # of black nozzles (may be extra) */
338  short		black_nozzle_start;	/* Starting usable nozzle */
339  short		black_nozzle_separation; /* Separation between rows */
340  short		fast_nozzles;	/* Number of fast nozzles */
341  short		min_fast_nozzles;	/* # of fast nozzles (may be extra) */
342  short		fast_nozzle_start;	/* Starting usable nozzle */
343  short		fast_nozzle_separation; /* Separation between rows */
344  short		physical_channels; /* Number of ink channels */
345/*****************************************************************************/
346  /* Print head resolution */
347  short		base_separation; /* Basic unit of row separation */
348  short		resolution_scale;   /* Scaling factor for ESC(D command */
349  short		max_black_resolution; /* Above this resolution, we */
350				      /* must use color parameters */
351				      /* rather than (faster) black */
352				      /* only parameters*/
353  short		max_hres;
354  short		max_vres;
355  short		min_hres;
356  short		min_vres;
357/*****************************************************************************/
358  /* Miscellaneous printer-specific data */
359  short		extra_feed;	/* Extra distance the paper can be spaced */
360				/* beyond the bottom margin, in 1/360". */
361				/* (maximum useful value is */
362				/* nozzles * nozzle_separation) */
363  short		separation_rows; /* Some printers require funky spacing */
364				/* arguments in softweave mode. */
365  short		pseudo_separation_rows;/* Some printers require funky */
366				/* spacing arguments in printer_weave mode */
367
368  short         zero_margin_offset;   /* Offset to use to achieve */
369				      /* zero-margin printing */
370  short		micro_left_margin; /* Precise left margin (base separation) */
371  short		initial_vertical_offset;
372  short		black_initial_vertical_offset;
373  short		extra_720dpi_separation;
374  short		min_horizontal_position_alignment; /* Horizontal alignment */
375					       /* for good performance */
376  short		base_horizontal_position_alignment; /* Horizontal alignment */
377					       /* for good performance */
378  int		bidirectional_upper_limit;     /* Highest total resolution */
379					       /* for bidirectional printing */
380					       /* in auto mode */
381/*****************************************************************************/
382  /* Paper size limits */
383  int		max_paper_width; /* Maximum paper width, in points */
384  int		max_paper_height; /* Maximum paper height, in points */
385  int		min_paper_width; /* Maximum paper width, in points */
386  int		min_paper_height; /* Maximum paper height, in points */
387  int		max_imageable_width; /* Maximum imageable area, in points */
388  int		max_imageable_height; /* Maximum imageable area, in points */
389/*****************************************************************************/
390  /* Borders */
391				/* SHEET FED: */
392				/* Softweave: */
393  short		left_margin;	/* Left margin, points */
394  short		right_margin;	/* Right margin, points */
395  short		top_margin;	/* Absolute top margin, points */
396  short		bottom_margin;	/* Absolute bottom margin, points */
397				/* Printer weave: */
398  short		m_left_margin;	/* Left margin, points */
399  short		m_right_margin;	/* Right margin, points */
400  short		m_top_margin;	/* Absolute top margin, points */
401  short		m_bottom_margin;	/* Absolute bottom margin, points */
402				/* ROLL FEED: */
403				/* Softweave: */
404  short		roll_left_margin;	/* Left margin, points */
405  short		roll_right_margin;	/* Right margin, points */
406  short		roll_top_margin;	/* Absolute top margin, points */
407  short		roll_bottom_margin;	/* Absolute bottom margin, points */
408				/* Printer weave: */
409  short		m_roll_left_margin;	/* Left margin, points */
410  short		m_roll_right_margin;	/* Right margin, points */
411  short		m_roll_top_margin;	/* Absolute top margin, points */
412  short		m_roll_bottom_margin;	/* Absolute bottom margin, points */
413				/* Duplex margin limit (SHRT_MIN = no limit): */
414  short		duplex_left_margin;	/* Left margin, points */
415  short		duplex_right_margin;	/* Right margin, points */
416  short		duplex_top_margin;	/* Absolute top margin, points */
417  short		duplex_bottom_margin;	/* Absolute bottom margin, points */
418				/* Print directly to CD */
419  short		cd_x_offset;	/* Center of CD (horizontal offset) */
420  short		cd_y_offset;	/* Center of CD (vertical offset) */
421  short		cd_page_width;	/* Width of "page" when printing to CD */
422  short		cd_page_height;	/* Height of "page" when printing to CD */
423				/* Extra height for form factor command */
424  short		paper_extra_bottom; /* Extra space on the bottom of the page */
425/*****************************************************************************/
426  /* Parameters for escputil */
427  short		alignment_passes;
428  short		alignment_choices;
429  short		alternate_alignment_passes;
430  short		alternate_alignment_choices;
431/*****************************************************************************/
432  stp_raw_t *preinit_sequence;
433  stp_raw_t *preinit_remote_sequence;
434  stp_raw_t *postinit_sequence;
435  stp_raw_t *postinit_remote_sequence;
436  stp_raw_t *vertical_borderless_sequence;
437/*****************/
438  stp_mxml_node_t *media;
439  stp_list_t *media_cache;
440  stp_string_list_t *papers;
441/*****************/
442  stp_mxml_node_t *slots;
443  stp_list_t *slots_cache;
444  stp_string_list_t *input_slots;
445/*****************/
446  stp_mxml_node_t *media_sizes;
447/*****************/
448  stp_string_list_t *channel_names;
449/*****************/
450  resolution_list_t *resolutions;
451/*****************/
452  printer_weave_list_t *printer_weaves;
453/*****************/
454  quality_list_t *quality_list;
455/*****************/
456  inkgroup_t *inkgroup;
457} stpi_escp2_printer_t;
458
459/* From escp2-channels.c: */
460
461extern const inkname_t *stpi_escp2_get_default_black_inkset(void);
462extern int stp_escp2_load_inkgroup(const stp_vars_t *v, const char *name);
463
464/* From escp2-papers.c: */
465extern int stp_escp2_load_media(const stp_vars_t *v, const char *name);
466extern int stp_escp2_has_media_feature(const stp_vars_t *v, const char *name);
467extern const paper_t *stp_escp2_get_default_media_type(const stp_vars_t *v);
468extern const paper_t *stp_escp2_get_media_type(const stp_vars_t *v, int ignore_res);
469extern int stp_escp2_printer_supports_rollfeed(const stp_vars_t *v);
470extern int stp_escp2_printer_supports_print_to_cd(const stp_vars_t *v);
471extern int stp_escp2_printer_supports_duplex(const stp_vars_t *v);
472
473extern int stp_escp2_load_input_slots(const stp_vars_t *v, const char *name);
474extern const input_slot_t *stp_escp2_get_input_slot(const stp_vars_t *v);
475
476extern int stp_escp2_load_media_sizes(const stp_vars_t *v, const char *name);
477extern void stp_escp2_set_media_size(stp_vars_t *v, const stp_vars_t *src);
478
479/* From escp2-resolutions.c: */
480extern int stp_escp2_load_resolutions(const stp_vars_t *v, const char *name);
481extern int stp_escp2_load_resolutions_from_xml(const stp_vars_t *v, stp_mxml_node_t *node);
482extern int stp_escp2_load_printer_weaves(const stp_vars_t *v, const char *name);
483extern int stp_escp2_load_printer_weaves_from_xml(const stp_vars_t *v, stp_mxml_node_t *node);
484extern int stp_escp2_load_quality_presets(const stp_vars_t *v, const char *name);
485extern int stp_escp2_load_quality_presets_from_xml(const stp_vars_t *v, stp_mxml_node_t *node);
486
487/* From print-escp2.c: */
488extern const res_t *stp_escp2_find_resolution(const stp_vars_t *v);
489extern const inklist_t *stp_escp2_inklist(const stp_vars_t *v);
490
491/* From print-escp2-data.c: */
492extern void stp_escp2_load_model(const stp_vars_t *v, int model);
493extern stpi_escp2_printer_t *stp_escp2_get_printer(const stp_vars_t *v);
494extern model_featureset_t stp_escp2_get_cap(const stp_vars_t *v,
495					    escp2_model_option_t feature);
496extern int stp_escp2_has_cap(const stp_vars_t *v, escp2_model_option_t feature,
497			     model_featureset_t class);
498
499
500typedef struct
501{
502  /* Basic print head parameters */
503  int nozzles;			/* Number of nozzles */
504  int min_nozzles;		/* Fewest nozzles we're allowed to use */
505  int nozzle_separation;	/* Nozzle separation, in dots */
506  int nozzle_start;		/* First usable nozzle */
507  int *head_offset;		/* Head offset (for C80-type printers) */
508  int max_head_offset;		/* Largest head offset */
509  int page_management_units;	/* Page management units (dpi) */
510  int vertical_units;		/* Vertical units (dpi) */
511  int horizontal_units;		/* Horizontal units (dpi) */
512  int micro_units;		/* Micro-units for horizontal positioning */
513  int unit_scale;		/* Scale factor for units */
514  int send_zero_pass_advance;	/* Send explicit command for zero advance */
515  int zero_margin_offset;	/* Zero margin offset */
516  int split_channel_count;	/* For split channels, like C120 */
517  int split_channel_width;	/* Linewidth for split channels */
518  short *split_channels;
519
520  /* Ink parameters */
521  int bitwidth;			/* Number of bits per ink drop */
522  int drop_size;		/* ID of the drop size we're using */
523  const inkname_t *inkname;	/* Description of the ink set */
524  int use_aux_channels;		/* Use gloss channel */
525
526  /* Ink channels */
527  int logical_channels;		/* Number of logical ink channels (e.g.CMYK) */
528  int physical_channels;	/* Number of physical channels (e.g. CcMmYK) */
529  int channels_in_use;		/* Number of channels we're using
530				   FIXME merge with physical_channels! */
531  unsigned char **cols;		/* Output dithered data */
532  const physical_subchannel_t **channels; /* Description of each channel */
533
534  /* Miscellaneous printer control */
535  int use_black_parameters;	/* Can we use (faster) black head parameters */
536  int use_fast_360;		/* Can we use fast 360 DPI 4 color mode */
537  int advanced_command_set;	/* Uses one of the advanced command sets */
538  int use_extended_commands;	/* Do we use the extended commands? */
539  const input_slot_t *input_slot; /* Input slot description */
540  const paper_t *paper_type;	/* Paper type */
541  stp_vars_t *media_settings;	/* Hardware media settings */
542  const inkgroup_t *ink_group;	/* Which set of inks */
543  const stp_raw_t *preinit_sequence; /* Initialization sequence */
544  const stp_raw_t *preinit_remote_sequence; /* Initialization sequence */
545  const stp_raw_t *deinit_sequence; /* De-initialization sequence */
546  const stp_raw_t *deinit_remote_sequence; /* De-initialization sequence */
547  const stp_raw_t *borderless_sequence; /* Vertical borderless sequence */
548  model_featureset_t command_set; /* Which command set this printer supports */
549  int variable_dots;		/* Print supports variable dot sizes */
550  int has_graymode;		/* Printer supports fast grayscale mode */
551  int base_separation;		/* Basic unit of separation */
552  int resolution_scale;		/* Scale factor for ESC(D command */
553  int separation_rows;		/* Row separation scaling */
554  int pseudo_separation_rows;	/* Special row separation for some printers */
555  int extra_720dpi_separation;	/* Special separation needed at 720 DPI */
556  int bidirectional_upper_limit; /* Max total resolution for auto-bidi */
557  int duplex;
558  int extra_vertical_feed;	/* Extra vertical feed */
559
560  /* weave parameters */
561  int horizontal_passes;	/* Number of horizontal passes required
562				   to print a complete row */
563  int physical_xdpi;		/* Horizontal distance between dots in pass */
564  const res_t *res;		/* Description of the printing resolution */
565  const stp_raw_t *printer_weave; /* Printer weave parameters */
566  int use_printer_weave;	/* Use the printer weaving mechanism */
567  int extra_vertical_passes;	/* Quality enhancement */
568
569  /* page parameters */		/* Indexed from top left */
570  int page_left;		/* Left edge of page (points) */
571  int page_right;		/* Right edge of page (points) */
572  int page_top;			/* Top edge of page (points) */
573  int page_bottom;		/* Bottom edge of page (points) */
574  int page_width;		/* Page width (points) */
575  int page_height;		/* Page height (points) */
576  int page_true_height;		/* Physical page height (points) */
577  int page_extra_height;	/* Extra height for set_form_factor (rows) */
578  int paper_extra_bottom;	/* Extra bottom for set_page_size (rows) */
579  int page_true_width;		/* Physical page height (points) */
580  int cd_x_offset;		/* CD X offset (micro units) */
581  int cd_y_offset;		/* CD Y offset (micro units) */
582  int cd_outer_radius;		/* CD radius (micro units) */
583  int cd_inner_radius;		/* CD radius (micro units) */
584
585  /* Image parameters */	/* Indexed from top left */
586  int image_height;		/* Height of printed region (points) */
587  int image_width;		/* Width of printed region (points) */
588  int image_top;		/* First printed row (points) */
589  int image_left;		/* Left edge of image (points) */
590  int image_scaled_width;	/* Width of physical printed region (dots) */
591  int image_printed_width;	/* Width of printed region (dots) */
592  int image_scaled_height;	/* Height of physical printed region (dots) */
593  int image_printed_height;	/* Height of printed region (dots) */
594  int image_left_position;	/* Left dot position of image */
595
596  /* Transitory state */
597  int printed_something;	/* Have we actually printed anything? */
598  int initial_vertical_offset;	/* Vertical offset for C80-type printers */
599  int printing_initial_vertical_offset;	/* Vertical offset, for print cmd */
600  int last_color;		/* Last color we printed */
601  int last_pass_offset;		/* Starting row of last pass we printed */
602  int last_pass;		/* Last pass printed */
603  unsigned char *comp_buf;	/* Compression buffer for C120-type printers */
604
605} escp2_privdata_t;
606
607extern void stpi_escp2_init_printer(stp_vars_t *v);
608extern void stpi_escp2_deinit_printer(stp_vars_t *v);
609extern void stpi_escp2_flush_pass(stp_vars_t *v, int passno,
610				  int vertical_subpass);
611extern void stpi_escp2_terminate_page(stp_vars_t *v);
612
613#ifdef TEST_UNCOMPRESSED
614#define COMPRESSION (0)
615#define FILLFUNC stp_fill_uncompressed
616#define COMPUTEFUNC stp_compute_uncompressed_linewidth
617#define PACKFUNC stp_pack_uncompressed
618#else
619#define COMPRESSION (1)
620#define FILLFUNC pd->split_channel_count > 0 ? stp_fill_uncompressed : stp_fill_tiff
621#define COMPUTEFUNC pd->split_channel_count > 0 ? stp_compute_uncompressed_linewidth : stp_compute_tiff_linewidth
622#define PACKFUNC pd->split_channel_count > 0 ? stp_pack_uncompressed : stp_pack_tiff
623#endif
624
625#endif /* GUTENPRINT_INTERNAL_ESCP2_H */
626/*
627 * End of "$Id: print-escp2.h,v 1.139 2010/12/19 02:51:37 rlk Exp $".
628 */
629