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

  1. |##########|
  2. |#MAGIC   #|CLABLLHL
  3. |#PROJECT #|"IMPORTALL"
  4. |#PATHS   #|"StdProject"
  5. |#FLAGS   #|xx-x-x--x---x-x-----------------
  6. |#USERSW  #|--------------------------------
  7. |#USERMASK#|--------------------------------
  8. |#SWITCHES#|xx---xxxxx------
  9. |##########|
  10. DEFINITION MODULE Printer;
  11. (* $A- *)
  12.  
  13. |
  14. | WB  4 Jun 1992 IOCommand
  15. |
  16.  
  17. FROM T_Exec    IMPORT IOCommand, nonstdVAL, DevicePtr, IOFlagSet, Message,
  18.                       UnitPtr, IORequest;
  19. FROM Graphics  IMPORT ColorMapPtr,RastPortPtr,ViewModeSet;
  20. FROM Resources IMPORT ContextPtr;
  21.  
  22. CONST
  23.   rawWrite        = IOCommand( nonstdVAL + 0 );
  24.   prtCommand      = IOCommand( nonstdVAL + 1 );
  25.   dumpRPort       = IOCommand( nonstdVAL + 2 );
  26.   query           = IOCommand( nonstdVAL + 3 );
  27.  
  28. TYPE
  29.   PrtCommands = (ris,rin,ind,nel,ri,
  30.                  sgr0,sgr3,sgr23,sgr4,sgr24,sgr1,sgr22,sfc,sbc,
  31.                  shorp0,shorp2,shorp1,shorp4,shorp3,shorp6,shorp5,
  32.                  den6,den5,den4,den3,den2,den1,
  33.                  sus2,sus1,sus4,sus3,sus0,plu,pld,
  34.                  fnt0,fnt1,fnt2,fnt3,fnt4,fnt5,fnt6,fnt7,fnt8,fnt9,fnt10,
  35.                  prop2,prop1,prop0,tss,jfy5,jfy7,jfy6,jfy0,jfy3,jfy1,
  36.                  verp0,verp1,slpp,perf,perf0,
  37.                  lms,rms,tms,bms,stbm,slrm,cam,
  38.                  hts,vts,tbc0,tbc3,tbc1,tbc4,tbcall,tbsall,extend,raw,
  39.                  makeMeWord = $1000);
  40.  
  41. TYPE
  42.   Error          = (nonErr,cancel,notGraphics,invertHam,badDimension,
  43.                     dimensionOvflow,internalMemory,buffMemory,tookControl);
  44.  
  45.   Special        = (milCols,milRows,fullCols,fullRows,fracCols,fracRows,
  46.                     center,aspect,densBit0,densBit1,densBit2,noFormFeeds,
  47.                     trustMe,noPrint);
  48.  
  49.   SpecialSet     = SET OF Special;
  50.  
  51.  
  52. CONST
  53.   density1  = SpecialSet:{densBit0};
  54.   density2  = SpecialSet:{densBit1};
  55.   density3  = SpecialSet:{densBit0,densBit1};
  56.   density4  = SpecialSet:{densBit2};
  57.   density5  = SpecialSet:{densBit0,densBit2};
  58.   density6  = SpecialSet:{densBit1,densBit2};
  59.   density7  = SpecialSet:{densBit0,densBit1,densBit2};
  60.  
  61. TYPE
  62.   IOPrinter    = RECORD OF IORequest
  63.                    IF KEY : INTEGER
  64.                      OF 0 THEN
  65.                        actual,
  66.                        length  : LONGINT;
  67.                        data    : ANYPTR;
  68.                        offset  : LONGINT;
  69.                      OF 1 THEN
  70.                        prtCommands : PrtCommands;
  71.                        parm0       : SHORTCARD;
  72.                        parm1       : SHORTCARD;
  73.                        parm2       : SHORTCARD;
  74.                        parm3       : SHORTCARD;
  75.                      OF 2 THEN
  76.                        rastPort   : RastPortPtr;
  77.                        colorMap   : ColorMapPtr;
  78.                        modesHi    : CARDINAL;
  79.                        modes      : ViewModeSet;
  80.                        srcX       : CARDINAL;
  81.                        srcY       : CARDINAL;
  82.                        srcWidth   : CARDINAL;
  83.                        srcHeight  : CARDINAL;
  84.                        destCols   : LONGINT;
  85.                        destRows   : LONGINT;
  86.                        special    : SpecialSet
  87.                    END
  88.                  END;
  89.   IOPrinterPtr = POINTER TO IOPrinter
  90.  
  91.  
  92. PROCEDURE OpenPrinter(context : ContextPtr:=NIL):IOPrinterPtr;
  93.  
  94. PROCEDURE ClosePrinter(VAR request : IOPrinterPtr)
  95.  
  96.  
  97. GROUP
  98.   All  = rawWrite,query,prtCommand,dumpRPort,PrtCommands,Error,Special,
  99.          SpecialSet,density1,density2,density3,density4,density5,
  100.          density6,density7,IOPrinter,IOPrinterPtr,OpenPrinter,ClosePrinter,
  101.          T_Exec.ExecIOGrp;
  102.  
  103. END Printer.
  104.