home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ober1096.zip / libsrc / xyplane.obe < prev   
Text File  |  1996-04-09  |  1KB  |  40 lines

  1. (*===============================================================*)
  2. (*            Library Module for Gardens Point Oberon            *) 
  3. (*===============================================================*)
  4.  
  5. FOREIGN MODULE XYplane;
  6.  
  7. (* This is the XWindows implementation for MIPS *)
  8.  
  9. PROCEDURE InitXYplane IS IN "xyplane.o & keypress.o & -lX11";
  10.  
  11. IMPORT StdError;
  12.  
  13. CONST
  14.   erase* = 0;
  15.   draw*  = 1;
  16.   (* mode parameters for Dot procedure *)
  17.  
  18. VAR
  19.   X*, Y*, W*, H* : INTEGER;
  20.   (* origin and size of drawing window   *)
  21.   (* Defaults are X=0, Y=0, W=400, H=640 *)
  22.  
  23. PROCEDURE Open*(str : ARRAY OF CHAR);
  24. (** Open a new drawing window *)
  25.  
  26. PROCEDURE Dot*(x,y,mode : INTEGER);
  27. (** Draw/erase a dot at co-ordinates (x,y) *)
  28.  
  29. PROCEDURE IsDot*(x,y : INTEGER):BOOLEAN;
  30. (** Tests whether a dot is drawn at co-ordinates (x,y) *)
  31.  
  32. PROCEDURE Key*():CHAR;
  33. (** Reads the keyboard.  If a key was pressed since the procedure 
  34.     was last called, it is returned, else 0X is returned *)
  35.  
  36. PROCEDURE Clear*;
  37. (** Clears the drawing window *)
  38.  
  39. END XYplane.
  40.