home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / languages / obrn-a_1.5_lib.lha / oberon-a / source1.lha / source / amiga / ConUnit.mod < prev    next >
Encoding:
Text File  |  1995-01-26  |  3.6 KB  |  111 lines

  1. (***************************************************************************
  2.  
  3.      $RCSfile: ConUnit.mod $
  4.   Description: Interface to console.device
  5.  
  6.    Created by: fjc (Frank Copeland)
  7.     $Revision: 3.7 $
  8.       $Author: fjc $
  9.         $Date: 1995/01/26 02:39:55 $
  10.  
  11.   $VER: conunit.h 36.15 (20.11.90)
  12.   Includes Release 40.15
  13.  
  14.   (C) Copyright 1985-1993 Commodore-Amiga, Inc.
  15.       All Rights Reserved
  16.  
  17.   Oberon-A interface Copyright © 1994-1995, Frank Copeland.
  18.   This file is part of the Oberon-A Interface.
  19.   See Oberon-A.doc for conditions of use and distribution.
  20.  
  21. ***************************************************************************)
  22.  
  23. <* STANDARD- *> <* INITIALISE- *> <* MAIN- *>
  24. <*$ CaseChk-  IndexChk- LongVars+ NilChk-  *>
  25. <*$ RangeChk- StackChk- TypeChk-  OvflChk- *>
  26.  
  27. MODULE [2] ConUnit;
  28.  
  29. IMPORT
  30.   e := Exec, ie := InputEvent, km := KeyMap, gfx := Graphics,
  31.   i := Intuition, c := Console, s := Sets;
  32.  
  33.  
  34. (*
  35. **      Console device unit definitions
  36. *)
  37.  
  38. CONST
  39.  
  40. (* ---- console unit numbers for OpenDevice() *)
  41.   library    * = -1;      (* no unit, just fill in device field *)
  42.   standard   * = 0;       (* standard unmapped console *)
  43.  
  44. (* ---- New unit numbers for OpenDevice() - (V36) *)
  45.  
  46.   charMap    * = 1;       (* bind character map to console *)
  47.   snipMap    * = 3;       (* bind character map w/ snip to console *)
  48.  
  49. (* ---- New flag defines for OpenDevice() - (V37) *)
  50.  
  51.   flagDefault               * = {};
  52.   flagNodrawOnNewsize       * = {0};
  53.  
  54.  
  55.   pmbAsm         * = c.mLNM+1;       (* internal storage bit for AS flag *)
  56.   pmbAwm         * = pmbAsm+1;     (* internal storage bit for AW flag *)
  57.   maxTabs        * = 80;
  58.  
  59. TYPE
  60.  
  61.   ConUnitPtr * = POINTER TO ConUnit;
  62.   ConUnit * = RECORD (e.MsgPortBase)
  63.     mp *           : e.MsgPort;
  64.     (* ---- read only variables *)
  65.     window -       : i.WindowPtr; (* intuition window bound to this unit *)
  66.     xCP -          : INTEGER;     (* character position *)
  67.     yCP -          : INTEGER;
  68.     xMax -         : INTEGER;     (* max character position *)
  69.     yMax -         : INTEGER;
  70.     xRSize -       : INTEGER;     (* character raster size *)
  71.     yRSize -       : INTEGER;
  72.     xROrigin -     : INTEGER;     (* raster origin *)
  73.     yROrigin -     : INTEGER;
  74.     xRExtant -     : INTEGER;     (* raster maxima *)
  75.     yRExtant -     : INTEGER;
  76.     xMinShrink -   : INTEGER;     (* smallest area intact from resize process *)
  77.     yMinShrink -   : INTEGER;
  78.     xcCP -         : INTEGER;     (* cursor position *)
  79.     ycCP -         : INTEGER;
  80.  
  81.     (* ---- read/write variables (writes must must be protected) *)
  82.     (* ---- storage for AskKeyMap and SetKeyMap *)
  83.     keyMapStruct * : km.KeyMap;
  84.     (* ---- tab stops *)
  85.     tabStops *     : ARRAY maxTabs OF e.UWORD;
  86.                                     (* 0 at start, 0FFFFH at end of list *)
  87.  
  88.     (* ---- console rastport attributes *)
  89.     mask *         : s.SET8;
  90.     fgPen *        : SHORTINT;
  91.     bgPen *        : SHORTINT;
  92.     aolPen *       : SHORTINT;
  93.     drawMode *     : s.SET8;
  94.     obsolete1 *    : SHORTINT;    (* was cuAreaPtSz -- not used in V36 *)
  95.     obsolete2 *    : e.APTR;      (* was cuAreaPtrn -- not used in V36 *)
  96.     minterms *     : ARRAY 8 OF e.UBYTE; (* console minterms *)
  97.     font *         : gfx.TextFontPtr;
  98.     algoStyle *    : e.UBYTE;
  99.     txFlags *      : s.SET8;
  100.     txHeight *     : e.UWORD;
  101.     txWidth *      : e.UWORD;
  102.     txBaseline *   : e.UWORD;
  103.     txSpacing *    : INTEGER;
  104.  
  105.     (* ---- console MODES and RAW EVENTS switches *)
  106.     modes *        : ARRAY (pmbAwm+7) DIV 8 OF s.SET8;  (* one bit per mode *)
  107.     rawEvents *    : ARRAY (ie.classMax+8) DIV 8 OF s.SET8;
  108.   END; (* ConUnit *)
  109.  
  110. END ConUnit.
  111.