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 PRINTER_INTERN_H
9 #define PRINTER_INTERN_H
11 #include <exec/devices.h>
12 #include <libraries/asl.h>
13 #include <devices/prtbase.h>
14 #include <devices/printer.h>
16 #include <prefs/printertxt.h>
17 #include <prefs/printergfx.h>
20 /*********************************************************************************************/
25 struct PrinterTxtPrefs pp_Txt
;
26 struct PrinterUnitPrefs pp_Unit
;
27 struct PrinterDeviceUnitPrefs pp_DeviceUnit
;
28 struct PrinterGfxPrefs pp_Gfx
;
32 struct PrinterData pu_PrinterData
;
33 struct PrinterBase
*pu_PrinterBase
;
34 struct PrinterPrefs pu_Prefs
;
35 struct Process
*pu_Process
;
36 struct Hook
*pu_ErrHook
;
38 struct PrinterUnitText
{
45 /*********************************************************************************************/
47 #define PRINTER_UNITS 10 /* Same as the max # of printers */
50 struct Device pb_Device
;
52 struct PrinterUnit
*pb_Unit
[PRINTER_UNITS
];
53 struct SignalSemaphore pb_UnitLock
[PRINTER_UNITS
];
55 struct Library
*pb_DOSBase
;
58 #define DOSBase PrinterBase->pb_DOSBase
60 /*********************************************************************************************/
62 BOOL
Printer_LoadPrefs(struct PrinterBase
*PrinterBase
, LONG unit
, struct PrinterPrefs
*prefs
);
64 struct PrinterUnit
*Printer_Unit(struct PrinterBase
*PrinterBase
, LONG unit
);
66 LONG
Printer_Gfx_DumpRPort(struct IODRPReq
*pio
, struct TagItem
*tags
);
68 LONG
Printer_Text_Write(struct PrinterData
*pd
, UBYTE
*text
, LONG length
);
69 LONG
Printer_Text_Command(struct PrinterData
*pd
, UWORD command
, UBYTE p0
, UBYTE p1
, UBYTE p2
, UBYTE p3
);
71 #endif /* PRINTER_INTERN_H */