1 #ifndef DEVICES_PRINTER_H
2 #define DEVICES_PRINTER_H
5 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
8 Desc: printer device commands and structures
12 #ifndef EXEC_DEVICES_H
13 # include <exec/devices.h>
16 #ifndef INTUITION_INTUITION_H
17 # include <intuition/intuition.h>
20 #ifndef UTILITY_TAGITEM_H
21 # include <utility/tagitem.h>
24 /* V30-V40 commands */
26 #define PRD_RAWWRITE (CMD_NONSTD)
27 #define PRD_PRTCOMMAND (CMD_NONSTD + 1)
28 #define PRD_DUMPRPORT (CMD_NONSTD + 2)
29 #define PRD_QUERY (CMD_NONSTD + 3)
33 #define PRD_RESETPREFS (CMD_NONSTD + 4)
34 #define PRD_LOADPREFS (CMD_NONSTD + 5)
35 #define PRD_USEPREFS (CMD_NONSTD + 6)
36 #define PRD_SAVEPREFS (CMD_NONSTD + 7)
37 #define PRD_READPREFS (CMD_NONSTD + 8)
38 #define PRD_WRITEPREFS (CMD_NONSTD + 9)
39 #define PRD_EDITPREFS (CMD_NONSTD + 10)
40 #define PRD_SETERRHOOK (CMD_NONSTD + 11)
41 #define PRD_DUMPRPORTTAGS (CMD_NONSTD + 12)
43 /* printer command definitions */
133 /* For PRD_PRTCOMMAND */
137 struct Message io_Message
;
138 struct Device
*io_Device
;
139 struct Unit
*io_Unit
;
150 /* For PRD_DUMPRPORT */
154 struct Message io_Message
;
155 struct Device
*io_Device
;
156 struct Unit
*io_Unit
;
160 struct RastPort
*io_RastPort
;
161 struct ColorMap
*io_ColorMap
;
162 IPTR io_Modes
; /* Holds a pointer for TurboPrint extensions */
172 /* For PRD_DUMPRPORTTAGS (V44) */
176 struct Message io_Message
;
177 struct Device
*io_Device
;
178 struct Unit
*io_Unit
;
182 struct RastPort
*io_RastPort
;
183 struct ColorMap
*io_ColorMap
;
192 struct TagItem
*io_TagList
;
195 #define SPECIAL_MILCOLS 0x0001 /* io_DestCols are in 1/1000" */
196 #define SPECIAL_MILROWS 0x0002 /* io_DestRows are in 1/1000" */
197 #define SPECIAL_FULLCOLS 0x0004 /* ignore io_DestCols */
198 #define SPECIAL_FULLROWS 0x0008 /* ignore io_DestRows */
199 #define SPECIAL_FRACCOLS 0x0010 /* io_DestCols is a 32-bit fraction of FULLCOLS */
200 #define SPECIAL_FRACROWS 0x0020 /* io_DestRows is a 32-bit fraction of FULLROWS */
201 #define SPECIAL_CENTER 0x0040 /* Center image on paper */
202 #define SPECIAL_ASPECT 0x0080 /* Correct aspect ratio */
203 #define SPECIAL_DENSITY1 0x0100 /* Lowest DPI */
204 #define SPECIAL_DENSITY2 0x0200
205 #define SPECIAL_DENSITY3 0x0300
206 #define SPECIAL_DENSITY4 0x0400
207 #define SPECIAL_DENSITY5 0x0500
208 #define SPECIAL_DENSITY6 0x0600
209 #define SPECIAL_DENSITY7 0x0700 /* Highest DPI */
210 #define SPECIAL_NOFORMFEED 0x0800 /* Don't eject paper after raster has rendered */
211 #define SPECIAL_TRUSTME 0x1000 /* Don't clear after raster has rendered */
212 #define SPECIAL_NOPRINT 0x2000 /* Don't actually print the raster */
214 #define PDERR_NOERR 0 /* No error */
215 #define PDERR_CANCEL 1 /* User cancelled the print */
216 #define PDERR_NOTGRAPHICS 2 /* Printer can't print graphics */
217 #define PDERR_INVERTHAM 3 /* obsolete */
218 #define PDERR_BADDIMENSION 4 /* Bad printing dimensions */
219 #define PDERR_DIMENSIONOVFLOW 5 /* obsolete */
220 #define PDERR_INTERNALMEMORY 6 /* No memory for internal variables */
221 #define PDERR_BUFFERMEMORY 7 /* No memory for the output buffer */
222 #define PDERR_TOOKCONTROL 8 /* (internal) Driver rendered everything in Render Phase 0 */
223 #define PDERR_BADPREFERENCES 9 /* Bad preferences */
225 #define PDERR_LASTSTANDARD 31
226 #define PDERR_FIRSTCUSTOM 32
227 #define PDERR_LASTCUSTOM 126
229 #define SPECIAL_DENSITYMASK 0x0700
231 #define SPECIAL_DIMENSIONSMASK (SPECIAL_MILCOLS | \
239 /* Tags for PRD_DUMPRPORTTAGS */
241 #define DRPA_Dummy (TAG_USER + 0x60000)
242 #define DRPA_ICCProfile (DRPA_Dummy + 1)
243 #define DRPA_ICCName (DRPA_Dummy + 2)
244 #define DRPA_NoColCorrect (DRPA_Dummy + 3)
245 #define DRPA_SourceHook (DRPA_Dummy + 4)
246 #define DRPA_AspectX (DRPA_Dummy + 5)
247 #define DRPA_AspectY (DRPA_Dummy +6)
258 /* Tags for PRD_EDITPREFS */
260 #define PPRA_Dummy (TAG_USER + 0x70000)
261 #define PPRA_Window (PPRA_Dummy + 1)
262 #define PPRA_Screen (PPRA_Dummy + 2)
263 #define PPRA_PubScreen (PPRA_Dummy + 3)
265 /* PRD_EDITPREFS Request (V44) */
269 struct Message io_Message
;
270 struct Device
*io_Device
;
271 struct Unit
*io_Unit
;
275 struct TagItem
*io_TagList
;
278 /* PRD_SETERRHOOK Request (V44) */
282 struct Message io_Message
;
283 struct Device
*io_Device
;
284 struct Unit
*io_Unit
;
288 struct Hook
*io_Hook
;
291 #define PDHOOK_NONE ((struct Hook *)NULL)
292 #define PDHOOK_STD ((struct Hook *)1)
294 #define PDHOOK_VERSION 1
300 struct Window
*pe_Window
;
301 struct EasyStruct
*pe_ES
;
306 /* PRIVATE: Request to change prefs temporary. DO NOT USE!!! */
310 struct Message io_Message
;
311 struct Device
*io_Device
;
312 struct Unit
*io_Unit
;
316 struct PrinterTxtPrefs
*io_TxtPrefs
;
317 struct PrinterUnitPrefs
*io_UnitPrefs
;
318 struct PrinterDeviceUnitPrefs
*io_DevUnitPrefs
;
319 struct PrinterGfxPrefs
*io_GfxPrefs
;
322 #endif /* DEVICES_PRINTER_H */