1 #ifndef DEVICES_PRINTER_H
    2 #define DEVICES_PRINTER_H
    3 
    4 /*
    5 	printer.device include (V45)
    6 
    7 	Copyright © 2002 The MorphOS Development Team, All Rights Reserved.
    8 */
    9 
   10 #ifndef EXEC_DEVICES_H
   11 # include <exec/devices.h>
   12 #endif
   13 
   14 #ifndef INTUITION_INTUITION_H
   15 # include <intuition/intuition.h>
   16 #endif
   17 
   18 #ifndef UTILITY_TAGITEM_H
   19 # include <utility/tagitem.h>
   20 #endif
   21 
   22 #pragma pack(2)
   23 
   24 
   25 #define PRD_RAWWRITE        (CMD_NONSTD + 0)
   26 #define PRD_PRTCOMMAND      (CMD_NONSTD + 1)
   27 #define PRD_DUMPRPORT       (CMD_NONSTD + 2)
   28 #define PRD_QUERY           (CMD_NONSTD + 3)
   29 
   30 /*** V44 ***/
   31 
   32 #define PRD_RESETPREFS      (CMD_NONSTD + 4)
   33 #define PRD_LOADPREFS       (CMD_NONSTD + 5)
   34 #define PRD_USEPREFS        (CMD_NONSTD + 6)
   35 #define PRD_SAVEPREFS       (CMD_NONSTD + 7)
   36 #define PRD_READPREFS       (CMD_NONSTD + 8)
   37 #define PRD_WRITEPREFS      (CMD_NONSTD + 9)
   38 #define PRD_EDITPREFS       (CMD_NONSTD + 10)
   39 #define PRD_SETERRHOOK      (CMD_NONSTD + 11)
   40 #define PRD_DUMPRPORTTAGS   (CMD_NONSTD + 12)
   41 
   42 
   43 #define aRIS     0
   44 #define aRIN     1
   45 #define aIND     2
   46 #define aNEL     3
   47 #define aRI      4
   48 
   49 #define aSGR0    5
   50 #define aSGR3    6
   51 #define aSGR23   7
   52 #define aSGR4    8
   53 #define aSGR24   9
   54 #define aSGR1    10
   55 #define aSGR22   11
   56 #define aSFC     12
   57 #define aSBC     13
   58 
   59 #define aSHORP0  14
   60 #define aSHORP2  15
   61 #define aSHORP1  16
   62 #define aSHORP4  17
   63 #define aSHORP3  18
   64 #define aSHORP6  19
   65 #define aSHORP5  20
   66 
   67 #define aDEN6    21
   68 #define aDEN5    22
   69 #define aDEN4    23
   70 #define aDEN3    24
   71 #define aDEN2    25
   72 #define aDEN1    26
   73 
   74 #define aSUS2    27
   75 #define aSUS1    28
   76 #define aSUS4    29
   77 #define aSUS3    30
   78 #define aSUS0    31
   79 #define aPLU     32
   80 #define aPLD     33
   81 
   82 #define aFNT0    34
   83 #define aFNT1    35
   84 #define aFNT2    36
   85 #define aFNT3    37
   86 #define aFNT4    38
   87 #define aFNT5    39
   88 #define aFNT6    40
   89 #define aFNT7    41
   90 #define aFNT8    42
   91 #define aFNT9    43
   92 #define aFNT10   44
   93 
   94 #define aPROP2   45
   95 #define aPROP1   46
   96 #define aPROP0   47
   97 #define aTSS     48
   98 #define aJFY5    49
   99 #define aJFY7    50
  100 #define aJFY6    51
  101 #define aJFY0    52
  102 #define aJFY3    53
  103 #define aJFY1    54
  104 
  105 #define aVERP0   55
  106 #define aVERP1   56
  107 #define aSLPP    57
  108 #define aPERF    58
  109 #define aPERF0   59
  110 
  111 #define aLMS     60
  112 #define aRMS     61
  113 #define aTMS     62
  114 #define aBMS     63
  115 #define aSTBM    64
  116 #define aSLRM    65
  117 #define aCAM     66
  118 
  119 #define aHTS     67
  120 #define aVTS     68
  121 #define aTBC0    69
  122 #define aTBC3    70
  123 #define aTBC1    71
  124 #define aTBC4    72
  125 #define aTBCALL  73
  126 #define aTBSALL  74
  127 #define aEXTEND  75
  128 
  129 #define aRAW     76
  130 
  131 
  132 struct IOPrtCmdReq
  133 {
  134 	struct Message  io_Message;
  135 	struct Device  *io_Device;
  136 	struct Unit    *io_Unit;
  137 	UWORD           io_Command;
  138 	UBYTE           io_Flags;
  139 	BYTE            io_Error;
  140 	UWORD           io_PrtCommand;
  141 	UBYTE           io_Parm0;
  142 	UBYTE           io_Parm1;
  143 	UBYTE           io_Parm2;
  144 	UBYTE           io_Parm3;
  145 };
  146 
  147 
  148 struct IODRPReq
  149 {
  150 	struct Message   io_Message;
  151 	struct Device   *io_Device;
  152 	struct Unit     *io_Unit;
  153 	UWORD            io_Command;
  154 	UBYTE            io_Flags;
  155 	BYTE             io_Error;
  156 	struct RastPort *io_RastPort;
  157 	struct ColorMap *io_ColorMap;
  158 	ULONG            io_Modes;
  159 	UWORD            io_SrcX;
  160 	UWORD            io_SrcY;
  161 	UWORD            io_SrcWidth;
  162 	UWORD            io_SrcHeight;
  163 	LONG             io_DestCols;
  164 	LONG             io_DestRows;
  165 	UWORD            io_Special;
  166 };
  167 
  168 
  169 /*** V44 ***/
  170 
  171 struct IODRPTagsReq
  172 {
  173 	struct Message   io_Message;
  174 	struct Device   *io_Device;
  175 	struct Unit     *io_Unit;
  176 	UWORD            io_Command;
  177 	UBYTE            io_Flags;
  178 	BYTE             io_Error;
  179 	struct RastPort *io_RastPort;
  180 	struct ColorMap *io_ColorMap;
  181 	ULONG            io_Modes;
  182 	UWORD            io_SrcX;
  183 	UWORD            io_SrcY;
  184 	UWORD            io_SrcWidth;
  185 	UWORD            io_SrcHeight;
  186 	LONG             io_DestCols;
  187 	LONG             io_DestRows;
  188 	UWORD            io_Special;
  189 	struct TagItem  *io_TagList;
  190 };
  191 
  192 
  193 #define SPECIAL_MILCOLS     0x0001
  194 #define SPECIAL_MILROWS     0x0002
  195 #define SPECIAL_FULLCOLS    0x0004
  196 #define SPECIAL_FULLROWS    0x0008
  197 #define SPECIAL_FRACCOLS    0x0010
  198 #define SPECIAL_FRACROWS    0x0020
  199 #define SPECIAL_CENTER      0x0040
  200 #define SPECIAL_ASPECT      0x0080
  201 #define SPECIAL_DENSITY1    0x0100
  202 #define SPECIAL_DENSITY2    0x0200
  203 #define SPECIAL_DENSITY3    0x0300
  204 #define SPECIAL_DENSITY4    0x0400
  205 #define SPECIAL_DENSITY5    0x0500
  206 #define SPECIAL_DENSITY6    0x0600
  207 #define SPECIAL_DENSITY7    0x0700
  208 #define SPECIAL_NOFORMFEED  0x0800
  209 #define SPECIAL_TRUSTME     0x1000
  210 
  211 #define SPECIAL_NOPRINT     0x2000
  212 
  213 
  214 #define PDERR_NOERR            0
  215 #define PDERR_CANCEL           1
  216 #define PDERR_NOTGRAPHICS      2
  217 #define PDERR_INVERTHAM        3
  218 #define PDERR_BADDIMENSION     4
  219 #define PDERR_DIMENSIONOVFLOW  5
  220 #define PDERR_INTERNALMEMORY   6
  221 #define PDERR_BUFFERMEMORY     7
  222 #define PDERR_TOOKCONTROL      8
  223 
  224 /*** V44 ***/
  225 
  226 #define PDERR_BADPREFERENCES   9
  227 #define PDERR_LASTSTANDARD     31
  228 #define PDERR_FIRSTCUSTOM      32
  229 #define PDERR_LASTCUSTOM       126
  230 
  231 
  232 #define SPECIAL_DENSITYMASK     0x0700
  233 #define SPECIAL_DIMENSIONSMASK (SPECIAL_MILCOLS|SPECIAL_MILROWS|SPECIAL_FULLCOLS|SPECIAL_FULLROWS|SPECIAL_FRACCOLS|SPECIAL_FRACROWS|SPECIAL_ASPECT)
  234 
  235 
  236 /*** V44 ***/
  237 
  238 
  239 #define DRPA_Dummy         (TAG_USER + 0x60000)
  240 #define DRPA_ICCProfile    (DRPA_Dummy + 1)
  241 #define DRPA_ICCName       (DRPA_Dummy + 2)
  242 #define DRPA_NoColCorrect  (DRPA_Dummy + 3)
  243 #define DRPA_SourceHook    (DRPA_Dummy + 4)
  244 #define DRPA_AspectX       (DRPA_Dummy + 5)
  245 #define DRPA_AspectY       (DRPA_Dummy + 6)
  246 
  247 struct DRPSourceMsg
  248 {
  249 	LONG   x;
  250 	LONG   y;
  251 	LONG   width;
  252 	LONG   height;
  253 	ULONG *buf;
  254 };
  255 
  256 #define PPRA_Dummy      (TAG_USER + 0x70000)
  257 #define PPRA_Window     (PPRA_Dummy + 1)
  258 #define PPRA_Screen     (PPRA_Dummy + 2)
  259 #define PPRA_PubScreen  (PPRA_Dummy + 3)
  260 
  261 struct IOPrtPrefsReq
  262 {
  263 	struct Message  io_Message;
  264 	struct Device  *io_Device;
  265 	struct Unit    *io_Unit;
  266 	UWORD           io_Command;
  267 	UBYTE           io_Flags;
  268 	BYTE            io_Error;
  269 	struct TagItem *io_TagList;
  270 };
  271 
  272 #define PDHOOK_NONE  ((struct Hook *) NULL)
  273 #define PDHOOK_STD   ((struct Hook *) 1)
  274 
  275 struct IOPrtErrReq
  276 {
  277 	struct Message  io_Message;
  278 	struct Device  *io_Device;
  279 	struct Unit    *io_Unit;
  280 	UWORD           io_Command;
  281 	UBYTE           io_Flags;
  282 	BYTE            io_Error;
  283 	struct Hook    *io_Hook;
  284 };
  285 
  286 struct PrtErrMsg
  287 {
  288 	ULONG              pe_Version;
  289 	ULONG              pe_ErrorLevel;
  290 	struct Window     *pe_Window;
  291 	struct EasyStruct *pe_ES;
  292 	ULONG             *pe_IDCMP;
  293 	APTR               pe_ArgList;
  294 };
  295 
  296 #define PDHOOK_VERSION  1
  297 
  298 struct IOPrefsReq
  299 {
  300 	struct Message                 io_Message;
  301 	struct Device                 *io_Device;
  302 	struct Unit                   *io_Unit;
  303 	UWORD                          io_Command;
  304 	UBYTE                          io_Flags;
  305 	BYTE                           io_Error;
  306 	struct PrinterTxtPrefs        *io_TxtPrefs;
  307 	struct PrinterUnitPrefs       *io_UnitPrefs;
  308 	struct PrinterDeviceUnitPrefs *io_DevUnitPrefs;
  309 	struct PrinterGfxPrefs        *io_GfxPrefs;
  310 };
  311 
  312 
  313 #pragma pack()
  314 
  315 #endif /* DEVICES_PRINTER_H */