home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / cbm / nduk-v37.lha / V37 / include / devices / printer.i < prev    next >
Text File  |  1991-11-27  |  8KB  |  218 lines

  1.    IFND  DEVICES_PRINTER_I
  2. DEVICES_PRINTER_I EQU    1
  3. **
  4. **    $Filename: devices/printer.i $
  5. **    $Release: 2.04 Includes, V37.4 $
  6. **    $Revision: 1.7 $
  7. **    $Date: 90/07/26 $
  8. **
  9. **    printer.device structure definitions
  10. **
  11. **    (C) Copyright 1987-1991 Commodore-Amiga, Inc.
  12. **        All Rights Reserved
  13. **
  14.  
  15.    IFND  EXEC_TYPES_I
  16.    INCLUDE  "exec/types.i"
  17.    ENDC
  18.  
  19.    IFND  EXEC_NODES_I
  20.    INCLUDE  "exec/nodes.i"
  21.    ENDC
  22.  
  23.    IFND  EXEC_LISTS_I
  24.    INCLUDE  "exec/lists.i"
  25.    ENDC
  26.  
  27.    IFND  EXEC_PORTS_I
  28.    INCLUDE  "exec/ports.i"
  29.    ENDC
  30.  
  31.    IFND  EXEC_IO_I
  32.    INCLUDE  "exec/io.i"
  33.    ENDC
  34.  
  35.    DEVINIT
  36.  
  37.    DEVCMD   PRD_RAWWRITE
  38.    DEVCMD   PRD_PRTCOMMAND
  39.    DEVCMD   PRD_DUMPRPORT
  40.    DEVCMD   PRD_QUERY
  41.  
  42. ;****** printer definitions
  43. aRIS     EQU    0 ; ESCc  reset              ISO
  44. aRIN     EQU    1 ; ESC#1 initialize              +++
  45. aIND     EQU    2 ; ESCD  lf                  ISO
  46. aNEL     EQU    3 ; ESCE  return,lf              ISO
  47. aRI     EQU    4 ; ESCM  reverse lf              ISO
  48.  
  49. aSGR0     EQU    5 ; ESC[0m normal char set          ISO
  50. aSGR3     EQU    6 ; ESC[3m italics on              ISO
  51. aSGR23     EQU    7 ; ESC[23m italics off          ISO
  52. aSGR4     EQU    8 ; ESC[4m underline on          ISO
  53. aSGR24     EQU    9 ; ESC[24m underline off          ISO
  54. aSGR1     EQU   10 ; ESC[1m boldface on              ISO
  55. aSGR22     EQU   11 ; ESC[22m boldface off          ISO
  56. aSFC     EQU   12 ; SGR30-39  set foreground color    ISO
  57. aSBC     EQU   13 ; SGR40-49  set background color    ISO
  58.  
  59. aSHORP0  EQU   14 ; ESC[0w normal pitch          DEC
  60. aSHORP2  EQU   15 ; ESC[2w elite on              DEC
  61. aSHORP1  EQU   16 ; ESC[1w elite off              DEC
  62. aSHORP4  EQU   17 ; ESC[4w condensed fine on          DEC
  63. aSHORP3  EQU   18 ; ESC[3w condensed off          DEC
  64. aSHORP6  EQU   19 ; ESC[6w enlarged on              DEC
  65. aSHORP5  EQU   20 ; ESC[5w enlarged off          DEC
  66.  
  67. aDEN6     EQU   21 ; ESC[6"z shadow print on           DEC (sort of)
  68. aDEN5    EQU   22 ; ESC[5"z shadow print off          DEC
  69. aDEN4     EQU   23 ; ESC[4"z doublestrike on           DEC
  70. aDEN3    EQU   24 ; ESC[3"z doublestrike off          DEC
  71. aDEN2     EQU   25 ; ESC[2"z  NLQ on                   DEC
  72. aDEN1    EQU   26 ; ESC[1"z  NLQ off              DEC
  73.  
  74. aSUS2     EQU   27 ; ESC[2v superscript on          +++
  75. aSUS1     EQU   28 ; ESC[1v superscript off          +++
  76. aSUS4     EQU   29 ; ESC[4v subscript on          +++
  77. aSUS3     EQU   30 ; ESC[3v subscript off          +++
  78. aSUS0     EQU   31 ; ESC[0v normalize the line          +++
  79. aPLU     EQU   32 ; ESCL  partial line up          ISO
  80. aPLD     EQU   33 ; ESCK  partial line down          ISO
  81.  
  82. aFNT0     EQU   34 ; ESC(B US char set         or Typeface  0 (default)
  83. aFNT1     EQU   35 ; ESC(R French char set    or Typeface  1
  84. aFNT2     EQU   36 ; ESC(K German char set    or Typeface  2
  85. aFNT3     EQU   37 ; ESC(A UK char set         or Typeface  3
  86. aFNT4     EQU   38 ; ESC(E Danish I char set  or Typeface  4
  87. aFNT5     EQU   39 ; ESC(H Sweden char set    or Typeface  5
  88. aFNT6     EQU   40 ; ESC(Y Italian char set   or Typeface  6
  89. aFNT7     EQU   41 ; ESC(Z Spanish char set   or Typeface  7
  90. aFNT8     EQU   42 ; ESC(J Japanese char set  or Typeface  8
  91. aFNT9     EQU   43 ; ESC(6 Norweign char set  or Typeface  9
  92. aFNT10     EQU   44 ; ESC(C Danish II char set or Typeface 10
  93.  
  94. ;    Suggested typefaces are:
  95. ;
  96. ;     0 - default typeface.
  97. ;     1 - Line Printer or equiv.
  98. ;     2 - Pica or equiv.
  99. ;     3 - Elite or equiv.
  100. ;     4 - Helvetica or equiv.
  101. ;     5 - Times Roman or equiv.
  102. ;     6 - Gothic or equiv.
  103. ;     7 - Script or equiv.
  104. ;     8 - Prestige or equiv.
  105. ;     9 - Caslon or equiv.
  106. ;    10 - Orator or equiv.
  107. ;
  108.  
  109. aPROP2     EQU   45 ; ESC[2p  proportional on          +++
  110. aPROP1     EQU   46 ; ESC[1p  proportional off          +++
  111. aPROP0     EQU   47 ; ESC[0p  proportional clear          +++
  112. aTSS     EQU   48 ; ESC[n E set proportional offset   ISO
  113. aJFY5     EQU   49 ; ESC[5 F auto left justify          ISO
  114. aJFY7     EQU   50 ; ESC[7 F auto right justiy          ISO
  115. aJFY6     EQU   51 ; ESC[6 F auto full justify          ISO
  116. aJFY0     EQU   52 ; ESC[0 F auto justify off          ISO
  117. aJFY2     EQU   53 ; ESC[2 F  word space(auto center)  ISO (special)
  118. aJFY3     EQU   54 ; ESC[3 F letter space (justify)    ISO (special)
  119.  
  120. aVERP0     EQU   55 ; ESC[0z  1/8" line spacing         +++
  121. aVERP1   EQU   56 ; ESC[1z  1/6" line spacing          +++
  122. aSLPP     EQU   57 ; ESC[nt  set form length n          DEC
  123. aPERF     EQU   58 ; ESC[nq  perf skip n (n>0)          +++
  124. aPERF0     EQU   59 ; ESC[0q  perf skip off          +++
  125.  
  126. aLMS     EQU   60 ; ESC#9  Left margin set          +++
  127. aRMS     EQU   61 ; ESC#0  Right margin set          +++
  128. aTMS     EQU   62 ; ESC#8  Top margin set          +++
  129. aBMS     EQU   63 ; ESC#2  Bottom marg set          +++
  130. aSTBM     EQU   64 ; ESC[Pn1;Pn2r  T&B margins          DEC
  131. aSLRM     EQU   65 ; ESC[Pn1;Pn2s  L&R margin          DEC
  132. aCAM     EQU   66 ; ESC#3  Clear margins          +++
  133.  
  134. aHTS     EQU   67 ; ESCH    Set horiz tab          ISO
  135. aVTS     EQU   68 ; ESCJ    Set vertical tabs          ISO
  136. aTBC0     EQU   69 ; ESC[0g  Clr horiz tab          ISO
  137. aTBC3     EQU   70 ; ESC[3g  Clear all h tab          ISO
  138. aTBC1     EQU   71 ; ESC[1g  Clr vertical tabs          ISO
  139. aTBC4     EQU   72 ; ESC[4g  Clr all v tabs          ISO
  140. aTBCALL  EQU   73 ; ESC#4   Clr all h & v tabs          +++
  141. aTBSALL  EQU   74 ; ESC#5   Set default tabs          +++
  142. aEXTEND  EQU   75 ; ESC[Pn"x extended commands        +++ 
  143.  
  144. aRAW     EQU   76 ; ESC[Pn"r Next 'Pn' chars are raw  +++
  145.  
  146.  
  147.  STRUCTURE IOPrtCmdReq,IO_SIZE
  148.     UWORD   io_PrtCommand  ; printer command
  149.     UBYTE   io_Parm0    ; first command parameter
  150.     UBYTE   io_Parm1    ; second command parameter
  151.     UBYTE   io_Parm2    ; third command parameter
  152.     UBYTE   io_Parm3    ; fourth command parameter
  153.     LABEL   iopcr_SIZEOF
  154.  
  155.  STRUCTURE  IODRPReq,IO_SIZE
  156.     APTR    io_RastPort    ; raster port
  157.     APTR    io_ColorMap    ; color map
  158.     ULONG   io_Modes       ; graphics viewport modes
  159.     UWORD   io_SrcX       ; source x origin
  160.     UWORD   io_SrcY       ; source y origin
  161.     UWORD   io_SrcWidth    ; source x width
  162.     UWORD   io_SrcHeight   ; source x height
  163.     LONG    io_DestCols    ; destination x width
  164.     LONG    io_DestRows    ; destination y height
  165.     UWORD   io_Special       ; option flags
  166.     LABEL   iodrpr_SIZEOF
  167.  
  168. SPECIAL_MILCOLS        EQU    $0001    ; DestCols specified in 1/1000"
  169. SPECIAL_MILROWS        EQU    $0002    ; DestRows specified in 1/1000"
  170. SPECIAL_FULLCOLS    EQU    $0004    ; make DestCols maximum possible
  171. SPECIAL_FULLROWS    EQU    $0008    ; make DestRows maximum possible
  172. SPECIAL_FRACCOLS    EQU    $0010    ; DestCols is fraction of FULLCOLS
  173. SPECIAL_FRACROWS    EQU    $0020    ; DestRows is fraction of FULLROWS
  174. SPECIAL_CENTER        EQU    $0040    ; center image on paper
  175. SPECIAL_ASPECT        EQU    $0080    ; ensure correct aspect ratio
  176. SPECIAL_DENSITY1    EQU    $0100    ; lowest resolution (dpi)
  177. SPECIAL_DENSITY2    EQU    $0200    ; next res
  178. SPECIAL_DENSITY3    EQU    $0300    ; next res
  179. SPECIAL_DENSITY4    EQU    $0400    ; next res
  180. SPECIAL_DENSITY5    EQU    $0500    ; next res
  181. SPECIAL_DENSITY6    EQU    $0600    ; next res
  182. SPECIAL_DENSITY7    EQU    $0700    ; highest res
  183. SPECIAL_NOFORMFEED    EQU    $0800    ; don't eject paper after gfx prints
  184. SPECIAL_TRUSTME        EQU    $1000    ; don't reset on gfx prints
  185. ;
  186. ;    Compute print size, set 'io_DestCols' and 'io_DestRows' in the calling
  187. ;    program's 'IODRPReq' structure and exit, don't print.  This allows the
  188. ;    calling program to see what the final print size would be in printer
  189. ;    pixels.  Note that it modifies the 'io_DestCols' and 'io_DestRows'
  190. ;    fields of your 'IODRPReq' structure.  Also, set the print density and
  191. ;    update the 'MaxXDots', 'MaxYDots', 'XDotsInch', and 'YDotsInch' fields
  192. ;    of the 'PrinterExtendedData' structure.
  193. ;
  194. SPECIAL_NOPRINT        EQU    $2000    ; see above
  195.  
  196. PDERR_NOERR        EQU    0    ; clean exit, no errors
  197. PDERR_CANCEL        EQU    1    ; user cancelled print
  198. PDERR_NOTGRAPHICS    EQU    2    ; printer cannot output graphics
  199. PDERR_INVERTHAM        EQU    3    ; OBSOLETE
  200. PDERR_BADDIMENSION    EQU    4    ; print dimensions illegal
  201. PDERR_DIMENSIONOVFLOW    EQU    5    ; OBSOLETE
  202. PDERR_INTERNALMEMORY    EQU    6    ; no memory for internal variables
  203. PDERR_BUFFERMEMORY    EQU    7    ; no memory for print buffer
  204. ;
  205. ;    Note : this is an internal error that can be returned from the render
  206. ;    function to the printer device.  It is NEVER returned to the user.
  207. ;    If the printer device sees this error it converts it 'PDERR_NOERR'
  208. ;    and exits gracefully.  Refer to the document on
  209. ;    'How to Write a Graphics Printer Driver' for more info.
  210. ;
  211. PDERR_TOOKCONTROL    EQU    8    ; I took control in case 0 of render
  212.  
  213. ; internal use
  214. SPECIAL_DENSITYMASK    EQU $0700    ;  masks out density values
  215. SPECIAL_DIMENSIONSMASK    EQU SPECIAL_MILCOLS!SPECIAL_MILROWS!SPECIAL_FULLCOLS!SPECIAL_FULLROWS!SPECIAL_FRACCOLS!SPECIAL_FRACROWS!SPECIAL_ASPECT
  216.  
  217.    ENDC
  218.