home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / jËzyki_programowania / amigae / e_v3.2a / pdsrc / oomodules / printer_test.e < prev    next >
Text File  |  1977-12-31  |  976b  |  41 lines

  1. /*
  2.  * this tests the printer object. NOTE: those vars are only needed
  3.  * for the graphic dump :)
  4.  */
  5.  
  6. OPT OSVERSION=37
  7.  
  8. MODULE 'oomodules/device','exec/io','devices/printer',
  9.        'oomodules/printer','devices/printer',
  10.        'intuition/intuition', 'intuition/intuitionbase','graphics/gfxbase','graphics/view',
  11.         'graphics/rastport'
  12.  
  13. PROC main()
  14. DEF drucker:PTR TO printer,
  15.     ibase:PTR TO intuitionbase,
  16.     gbase:PTR TO gfxbase,
  17.     vp:PTR TO viewport,
  18.     rp:PTR TO rastport
  19.  
  20.   ibase:=intuitionbase
  21.   gbase:=gfxbase
  22.   rp := ibase.activewindow::window.rport
  23.   vp := gbase.actiview::view.viewport
  24.  
  25.   NEW drucker
  26.  
  27.     drucker.graphicdump(        rp,
  28.                                 vp.colormap,
  29.                                 vp.modes,
  30.                                 0,0,100,100,100,100,0)
  31.  
  32.     drucker.rawwrite('Hallo', 5)
  33.     drucker.xcommand(27) -> superscript on
  34.     drucker.write('Hallo', 5)
  35.  
  36.     WriteF('Fehler:\d\n',drucker.io.error)
  37.  
  38.  
  39.   END drucker
  40. ENDPROC
  41.