MUI/BetterString: Move SDI*.h headers to include/SDI/SDI_*.h
[AROS.git] / workbench / printers / printers_intern.h
blob245880d06a1cb9eb9afedf2ec9bd13cb09b535fc
1 /*
2 * Copyright (C) 2012, The AROS Development Team. All rights reserved.
3 * Author: Jason S. McMullan <jason.mcmullan@gmail.com>
5 * Licensed under the AROS PUBLIC LICENSE (APL) Version 1.1
6 */
8 #ifndef PRINTERS_INTERN_H
9 #define PRINTERS_INTERN_H
11 #include <devices/prtbase.h>
13 /* .text tag that helps identify this as a printer drivers.
14 * The ELF header already told us the architecture
16 #define PRINTER_MAGIC 0x70004e75 /* m68k's moveq #0,%d0, rts */
18 struct PrinterMagicHeader {
19 ULONG pmh_Magic;
20 UWORD pmh_Version;
21 UWORD pmh_Revision;
22 struct PrinterExtendedData pmh_PED;
25 #define PRINTER_TAG(PED, version, revision, ped...) \
26 __section(".tag.printer") __used static struct PrinterMagicHeader pmh = { \
27 .pmh_Magic = PRINTER_MAGIC, \
28 .pmh_Version = (version), \
29 .pmh_Revision = (revision), \
30 .pmh_PED = { ped } }; \
31 struct PrinterExtendedData *PED = &pmh.pmh_PED;
33 /* 'status' codes sent to the ped_Render() routine
36 /* PRS_INIT - Initialize page for printing
38 * ct - pointer to IODRPReq
39 * x - width in pixels
40 * y - height in pixels
42 #define PRS_INIT 0
43 /* PRS_TRANSFER - Render page row
45 * ct - pointer to PrtInfo
46 * x - 0
47 * y - row # (0 to height-1)
49 #define PRS_TRANSFER 1
50 /* PRS_FLUSH - Send data to the printer
51 * ct - 0
52 * x - 0
53 * y - # of rows to send (1 to NumRows)
55 #define PRS_FLUSH 2
56 /* PRS_CLEAR - Clear and Init buffer
57 * ct - 0
58 * x - 0
59 * y - 0
61 #define PRS_CLEAR 3
62 /* PRS_CLOSE - Close down
63 * ct - Error code
64 * x - io_Special flag from IODRPReq
65 * y - 0
67 #define PRS_CLOSE 4
68 /* PRS_PREINIT - Pre-Master initialization
69 * ct - NULL or pointer to IODRPReq
70 * x - io_Special flag from IODRPReq
71 * y - 0
73 #define PRS_PREINIT 5
74 /* PRS_CONVERT - Transfer colormap/BGR line to printer
75 * ct - UBYTE * to an array of entries
76 * x - # of entries in the array
77 * y - 0 if ct is a union colorEntry *, 1 if ct is a BGR pixel line
79 #define PRS_EJECT 7
80 /* PRS_EJECT - Finish page, advance to next page
81 * ct - 0
82 * x - 0
83 * y - 0
85 #define PRS_CONVERT 8
86 /* PRS_CORRECT - Color correct a colormap/BGR line
87 * ct - UBYTE * to an array of entries
88 * x - # of entries in the array
89 * y - 0 if ct is a union colorEntry *, 1 if ct is a BGR pixel line
91 #define PRS_CORRECT 9
94 #endif /* PRINTERS_INTERN_H */