blob: 8a01d6d23c71dcc0bd43da2672f89379f3b758c4 (
plain)
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
/***************************************************************************
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;
unsigned data_size;
BOOLEAN in_color;
enum
{ right_to_left, left_to_right, unknown}
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 */
int first_data_line;
int last_data_line;
int pre_blanklines;
int post_blanklines;
}
ppaSweepData_t;
typedef struct ppaSwathLimits_s
{
int left;
int right;
int numlines;
int non_blanklines;
int pre_blanklines;
int post_blanklines;
int first_line;
int last_line;
}
ppaSwathLimits_t;
typedef struct ppaPageLimits_s
{
int left;
int right;
int top;
int bottom;
}
ppaPageLimits_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
|