Debian Codegraph @

converter/pbm/pbmtoppa/ppa.h

raw
1 /* ppa.h
2 * Copyright (c) 1998 Tim Norman. See LICENSE for details.
3 * 2-25-98
4 *
5 * Mar 3, 1998 Jim Peterson <[email protected]>
6 *
7 * Restructured to accommodate both the HP820/1000, and HP720 series.
8 */
9 #ifndef _PPA_H
10 #define _PPA_H
11 #include <stdio.h>
12
13 typedef struct
14 {
15 FILE* fptr;
16 enum { HP820, HP1000, HP720, HP710 } version;
17 /* 300 , 600 dpi */
18 int DPI;
19 /* nozzle delay */
20 int right_to_left_delay[2];
21 int left_to_right_delay[2];
22 /* direction of printing */
23 enum { RIGHT_ONLY, LEFT_ONLY, BOTH_DIR } direction;
24 int x_offset;
25 int y_offset;
26 int marg_diff;
27 int top_margin;
28 int left_margin;
29 int right_margin;
30 int bottom_margin;
31 int bufsize;
32 } ppa_stat;
33
34 typedef struct
35 {
36 int DPI;
37 int right;
38 int left;
39 } printer_delay;
40
41 typedef struct
42 {
43 unsigned short DPI;
44 unsigned short pins_used_d2;
45 unsigned short unused_pins_p1;
46 unsigned short first_pin;
47 unsigned short left_margin;
48 unsigned short right_margin;
49 unsigned char nozzle_delay;
50 } ppa_nozzle_data;
51
52 typedef struct ppa_sweep_data_s
53 {
54 unsigned char* image_data;
55 unsigned data_size;
56 enum { False=0, True=1 } in_color;
57 enum { right_to_left, left_to_right } direction;
58 int vertical_pos;
59 unsigned short left_margin;
60 unsigned short right_margin;
61 unsigned char nozzle_data_size;
62 ppa_nozzle_data* nozzle_data;
63 struct ppa_sweep_data_s* next; /* NULL indicates last print sweep */
64 } ppa_sweep_data;
65
66 void ppa_init_job(ppa_stat*);
67 void ppa_init_page(ppa_stat*);
68 void ppa_load_page(ppa_stat*);
69 void ppa_eject_page(ppa_stat*);
70 void ppa_end_print(ppa_stat*);
71 void ppa_print_sweep(ppa_stat*,ppa_sweep_data*); /* prints one sweep */
72 void ppa_print_sweeps(ppa_stat*,ppa_sweep_data*); /* prints a linked-list of sweeps */
73
74 #endif