home *** CD-ROM | disk | FTP | other *** search
/ Global Amiga Experience / globalamigaexperience.iso / compressed / development / clusterdemo.dms / clusterdemo.adf / Modules.lha / modules / txt / PrtBase.def < prev    next >
Text File  |  1994-05-25  |  6KB  |  149 lines

  1. |##########|
  2. |#MAGIC   #|CLABLLGF
  3. |#PROJECT #|""
  4. |#PATHS   #|"StdProject"
  5. |#FLAGS   #|xx-x-x--x---x-x-----------------
  6. |#USERSW  #|--------------------------------
  7. |#USERMASK#|--------------------------------
  8. |#SWITCHES#|x-xx-x----------
  9. |##########|
  10. DEFINITION MODULE PrtBase;
  11. (* $A- *)
  12. FROM Exec      IMPORT Library,MsgPort,Task,Device,ExecBasePtr;
  13. FROM Intuition IMPORT Preferences;
  14. FROM Parallel  IMPORT IOParallel;
  15. FROM Serial    IMPORT IOSerial;
  16. FROM Timer     IMPORT IOTimer;
  17. FROM System    IMPORT SysStringPtr,PROC,BPTR;
  18.  
  19. TYPE
  20.   DeviceData    = RECORD OF Library;
  21.                     segment     : ANYPTR;
  22.                     execBase    : ExecBasePtr;
  23.                     cmdVectors  : ANYPTR;
  24.                     cmdBytes    : ANYPTR;
  25.                     numCommands : CARDINAL;
  26.                   END;
  27.   DeviceDataPtr = POINTER TO DeviceData;
  28.  
  29. CONST
  30.   oldStkSize = $800;
  31.   stkSize    = $1000;
  32.   bufSize    = 256;
  33.   safeSize   = 128;
  34.  
  35.  
  36. TYPE
  37.   NormTask             = RECORD OF Task END;
  38.   PrinterSegmentPtr    = POINTER TO PrinterSegment;
  39.  
  40.   PrinterData          = RECORD OF DeviceData;
  41.                            unit            : MsgPort;
  42.                            printerSegment  : BPTR;
  43.                            printerType     : CARDINAL;
  44.                            segmentData     : PrinterSegmentPtr;
  45.                            printBuf        : ANYPTR;
  46.                            pWrite          : PROCEDURE():INTEGER;
  47.                            pBothReady      : PROCEDURE():INTEGER;
  48.                            IF KEY : INTEGER
  49.                              OF 1 THEN p0  : IOParallel;
  50.                                        p1  : IOParallel
  51.                              OF 2 THEN s0  : IOSerial;
  52.                                        s1  : IOSerial
  53.                            END;
  54.                            tior            : IOTimer;
  55.                            ioRPort         : MsgPort;
  56.                            tc              : NormTask;
  57.                            oldStk          : ARRAY [oldStkSize] OF SHORTCARD;
  58.                            flags           : SHORTCARD;
  59.                            pad             : SHORTCARD;
  60.                            preferences     : Preferences;
  61.                            pWaitEnabled    : SHORTCARD;
  62.                            flags1          : SHORTCARD;
  63.                            stk             : ARRAY [stkSize] OF SHORTCARD;
  64.                          END;
  65.   PrinterDataPtr       = POINTER TO PrinterData;
  66.   PrinterClass         = (gfx,color);
  67.   PrinterClassSet      = SET OF PrinterClass;
  68.  
  69. CONST
  70.   bwAlpha    = PrinterClassSet:{};
  71.   bwGfx      = PrinterClassSet:{gfx};
  72.   colorAlpha = PrinterClassSet:{color};
  73.   colorGfx   = PrinterClassSet:{gfx,color};
  74.  
  75. TYPE
  76.   ColorClass    = (blackAndWhite,colors,fourColor,additive,multipass);
  77.   ColorClassSet = SET OF ColorClass;
  78.  
  79. CONST
  80.   bw         = ColorClassSet:{blackAndWhite};
  81.   ymc        = ColorClassSet:{colors};
  82.   ymcBw      = ColorClassSet:{blackAndWhite,colors};
  83.   ymbc       = ColorClassSet:{fourColor};
  84.   wb         = ColorClassSet:{blackAndWhite,additive};
  85.   bgr        = ColorClassSet:{colors,additive};
  86.   bgrWb      = ColorClassSet:{blackAndWhite,colors,additive};
  87.   bgrw       = ColorClassSet:{fourColor,additive};
  88.  
  89. TYPE
  90.   DoSpecial              = PROCEDURE(Command      : CARDINAL;
  91.                                      OutPutBuffer : SysStringPtr;
  92.                                      Line,
  93.                                      LineSpace,
  94.                                      CRLF,
  95.                                      Params        : SHORTINT):INTEGER;
  96.  
  97.   Render                 = PROCEDURE(ct     : SHORTCARD;
  98.                                      x,
  99.                                      y      : CARDINAL;
  100.                                      status : SHORTCARD):INTEGER;
  101.  
  102.   ConvFunc               = PROCEDURE():LONGINT;
  103.  
  104.  
  105.   PrinterExtendedData    = RECORD
  106.                              printerName  : SysStringPtr;
  107.                              init         : PROC;
  108.                              expunge      : PROC;
  109.                              open         : PROCEDURE():INTEGER;
  110.                              close        : PROC;
  111.                              printerClass : PrinterClassSet;
  112.                              colorClass   : ColorClassSet;
  113.                              maxColumns   : SHORTCARD;
  114.                              numCharSets  : SHORTCARD;
  115.                              numRows      : CARDINAL;
  116.                              maxXDots     : LONGCARD;
  117.                              maxYDots     : LONGCARD;
  118.                              xDotsInch    : CARDINAL;
  119.                              yDotsInch    : CARDINAL;
  120.                              commands     : ANYPTR;
  121.                              doSpecial    : DoSpecial;
  122.                              render       : Render;
  123.                              timeOutSecs  : LONGINT;
  124.                              eightBitChars: ANYPTR;
  125.                              printMode    : LONGINT;
  126.                              convFunc     : ConvFunc;
  127.                            END;
  128.   PrinterExtendetDataPtr = POINTER TO PrinterExtendedData;
  129.  
  130.   PrinterSegment         = RECORD
  131.                              nextSegment  : BPTR;
  132.                              runAlert     : LONGCARD;
  133.                              version      : CARDINAL;
  134.                              revision     : CARDINAL;
  135.                              ped          : PrinterExtendedData
  136.                            END
  137.  
  138. GROUP
  139.   All   = DeviceData,DeviceDataPtr,bufSize,safeSize,stkSize,oldStkSize,
  140.           NormTask,PrinterSegmentPtr,PrinterData,PrinterDataPtr,
  141.           PrinterClass,PrinterClassSet,bwAlpha,bwGfx,colorAlpha,
  142.           colorGfx,ColorClass,ColorClassSet,bw,ymc,ymcBw,ymbc,wb,bgr,
  143.           bgrWb,bgrw,DoSpecial,Render,ConvFunc,PrinterExtendedData,
  144.           PrinterExtendetDataPtr,PrinterSegment;
  145.  
  146.  
  147.  
  148. END PrtBase.
  149.