muimaster.library: introduce a hack to make sure up/down arrows always work
[AROS.git] / compiler / include / devices / printer.h
blobddc0c1438f3ce2079751f4f3966a7cce64ba30a3
1 #ifndef DEVICES_PRINTER_H
2 #define DEVICES_PRINTER_H
4 /*
5 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: printer device commands and structures
9 Lang: english
12 #ifndef EXEC_DEVICES_H
13 # include <exec/devices.h>
14 #endif
16 #ifndef INTUITION_INTUITION_H
17 # include <intuition/intuition.h>
18 #endif
20 #ifndef UTILITY_TAGITEM_H
21 # include <utility/tagitem.h>
22 #endif
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)
31 /* V44 commands */
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 */
45 #define aRIS 0
46 #define aRIN 1
47 #define aIND 2
48 #define aNEL 3
49 #define aRI 4
51 #define aSGR0 5
52 #define aSGR3 6
53 #define aSGR23 7
54 #define aSGR4 8
55 #define aSGR24 9
56 #define aSGR1 10
57 #define aSGR22 11
58 #define aSFC 12
59 #define aSBC 13
61 #define aSHORP0 14
62 #define aSHORP2 15
63 #define aSHORP1 16
64 #define aSHORP4 17
65 #define aSHORP3 18
66 #define aSHORP6 19
67 #define aSHORP5 20
69 #define aDEN6 21
70 #define aDEN5 22
71 #define aDEN4 23
72 #define aDEN3 24
73 #define aDEN2 25
74 #define aDEN1 26
76 #define aSUS2 27
77 #define aSUS1 28
78 #define aSUS4 29
79 #define aSUS3 30
80 #define aSUS0 31
81 #define aPLU 32
82 #define aPLD 33
84 #define aFNT0 34
85 #define aFNT1 35
86 #define aFNT2 36
87 #define aFNT3 37
88 #define aFNT4 38
89 #define aFNT5 39
90 #define aFNT6 40
91 #define aFNT7 41
92 #define aFNT8 42
93 #define aFNT9 43
94 #define aFNT10 44
96 #define aPROP2 45
97 #define aPROP1 46
98 #define aPROP0 47
99 #define aTSS 48
100 #define aJFY5 49
101 #define aJFY7 50
102 #define aJFY6 51
103 #define aJFY0 52
104 #define aJFY3 53
105 #define aJFY1 54
107 #define aVERP0 55
108 #define aVERP1 56
109 #define aSLPP 57
110 #define aPERF 58
111 #define aPERF0 59
113 #define aLMS 60
114 #define aRMS 61
115 #define aTMS 62
116 #define aBMS 63
117 #define aSTBM 64
118 #define aSLRM 65
119 #define aCAM 66
121 #define aHTS 67
122 #define aVTS 68
123 #define aTBC0 69
124 #define aTBC3 70
125 #define aTBC1 71
126 #define aTBC4 72
127 #define aTBCALL 73
128 #define aTBSALL 74
129 #define aEXTEND 75
131 #define aRAW 76
133 /* For PRD_PRTCOMMAND */
135 struct IOPrtCmdReq
137 struct Message io_Message;
138 struct Device *io_Device;
139 struct Unit *io_Unit;
140 UWORD io_Command;
141 UBYTE io_Flags;
142 BYTE io_Error;
143 UWORD io_PrtCommand;
144 UBYTE io_Parm0;
145 UBYTE io_Parm1;
146 UBYTE io_Parm2;
147 UBYTE io_Parm3;
150 /* For PRD_DUMPRPORT */
152 struct IODRPReq
154 struct Message io_Message;
155 struct Device *io_Device;
156 struct Unit *io_Unit;
157 UWORD io_Command;
158 UBYTE io_Flags;
159 BYTE io_Error;
160 struct RastPort *io_RastPort;
161 struct ColorMap *io_ColorMap;
162 IPTR io_Modes; /* Holds a pointer for TurboPrint extensions */
163 UWORD io_SrcX;
164 UWORD io_SrcY;
165 UWORD io_SrcWidth;
166 UWORD io_SrcHeight;
167 LONG io_DestCols;
168 LONG io_DestRows;
169 UWORD io_Special;
172 /* For PRD_DUMPRPORTTAGS (V44) */
174 struct IODRPTagsReq
176 struct Message io_Message;
177 struct Device *io_Device;
178 struct Unit *io_Unit;
179 UWORD io_Command;
180 UBYTE io_Flags;
181 BYTE io_Error;
182 struct RastPort *io_RastPort;
183 struct ColorMap *io_ColorMap;
184 ULONG io_Modes;
185 UWORD io_SrcX;
186 UWORD io_SrcY;
187 UWORD io_SrcWidth;
188 UWORD io_SrcHeight;
189 LONG io_DestCols;
190 LONG io_DestRows;
191 UWORD io_Special;
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 | \
232 SPECIAL_MILROWS | \
233 SPECIAL_FULLCOLS | \
234 SPECIAL_FULLROWS | \
235 SPECIAL_FRACCOLS | \
236 SPECIAL_FRACROWS | \
237 SPECIAL_ASPECT)
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)
249 struct DRPSourceMsg
251 LONG x;
252 LONG y;
253 LONG width;
254 LONG height;
255 ULONG *buf;
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) */
267 struct IOPrtPrefsReq
269 struct Message io_Message;
270 struct Device *io_Device;
271 struct Unit *io_Unit;
272 UWORD io_Command;
273 UBYTE io_Flags;
274 BYTE io_Error;
275 struct TagItem *io_TagList;
278 /* PRD_SETERRHOOK Request (V44) */
280 struct IOPrtErrReq
282 struct Message io_Message;
283 struct Device *io_Device;
284 struct Unit *io_Unit;
285 UWORD io_Command;
286 UBYTE io_Flags;
287 BYTE io_Error;
288 struct Hook *io_Hook;
291 #define PDHOOK_NONE ((struct Hook *)NULL)
292 #define PDHOOK_STD ((struct Hook *)1)
294 #define PDHOOK_VERSION 1
296 struct PrtErrMsg
298 ULONG pe_Version;
299 ULONG pe_ErrorLevel;
300 struct Window *pe_Window;
301 struct EasyStruct *pe_ES;
302 ULONG *pe_IDCMP;
303 APTR pe_ArgList;
306 /* PRIVATE: Request to change prefs temporary. DO NOT USE!!! */
308 struct IOPrefsReq
310 struct Message io_Message;
311 struct Device *io_Device;
312 struct Unit *io_Unit;
313 UWORD io_Command;
314 UBYTE io_Flags;
315 BYTE io_Error;
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 */