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
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
{
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
40 * y - height in pixels
43 /* PRS_TRANSFER - Render page row
45 * ct - pointer to PrtInfo
47 * y - row # (0 to height-1)
49 #define PRS_TRANSFER 1
50 /* PRS_FLUSH - Send data to the printer
53 * y - # of rows to send (1 to NumRows)
56 /* PRS_CLEAR - Clear and Init buffer
62 /* PRS_CLOSE - Close down
64 * x - io_Special flag from IODRPReq
68 /* PRS_PREINIT - Pre-Master initialization
69 * ct - NULL or pointer to IODRPReq
70 * x - io_Special flag from IODRPReq
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
80 /* PRS_EJECT - Finish page, advance to next page
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
94 #endif /* PRINTERS_INTERN_H */