1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
|
/***************************************************************************
ppa.h - PPA protocol definitions and routines
-------------------
begin : Thu Jan 13 2000
copyright : (C) 1998-2000 by the pnm2ppa project
email :
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef _PPA_H
#define _PPA_H
#include "defaults.h"
typedef struct
{
FILE *fptr;
printerModel_t version; /* from defaults.h */
int ColBwOffsX;
int ColBwOffsY;
int x_offset;
int y_offset;
int r2l_bw_offset;
int r2l_col_offset;
int marg_diff;
int top_margin;
int left_margin;
int right_margin;
int bottom_margin;
int bufsize;
int min_pagewidth;
int max_pagewidth;
int min_pageheight;
int max_pageheight;
}
ppaPrinter_t;
typedef struct
{
unsigned short DPI;
unsigned short pins_used_d2;
unsigned short unused_pins_p1;
unsigned short first_pin;
unsigned short left_margin;
unsigned short right_margin;
unsigned char nozzle_delay;
}
ppaNozzleData_t;
typedef struct ppaSweepData_s
{
unsigned char *image_data[4];
unsigned data_size;
BOOLEAN in_color;
enum
{ right_to_left, left_to_right }
direction;
int vertical_pos;
unsigned short left_margin;
unsigned short right_margin;
unsigned char nozzle_data_size;
ppaNozzleData_t *nozzle_data;
struct ppaSweepData_s *next; /* NULL indicates last print sweep */
}
ppaSweepData_t;
void ppa_init_job (ppaPrinter_t *);
void ppa_init_page (ppaPrinter_t *);
void ppa_load_page (ppaPrinter_t *);
void ppa_eject_page (ppaPrinter_t *);
void ppa_end_print (ppaPrinter_t *);
void ppa_print_sweep (ppaPrinter_t *, ppaSweepData_t *); /* prints one sweep */
void ppa_print_sweeps (ppaPrinter_t *, ppaSweepData_t *); /* prints a linked-list of sweeps */
#endif
|