home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / OB3.2D3.DMS / in.adf / Interfaces / ConUnit.mod < prev    next >
Encoding:
Text File  |  1992-11-02  |  3.2 KB  |  92 lines

  1. (*-------------------------------------------------------------------------*)
  2. (*                                                                         *)
  3. (*  Amiga Oberon Interface Module:                    Date: 02-Nov-92      *)
  4. (*                                                                         *)
  5. (*   © 1992 by Fridtjof Siebert                                            *)
  6. (*                                                                         *)
  7. (*-------------------------------------------------------------------------*)
  8.  
  9. MODULE ConUnit;   (* $Implementation- *)
  10.  
  11. IMPORT e  * := Exec,
  12.        c  * := Console,
  13.        km * := KeyMap,
  14.        ie * := InputEvent,
  15.        I  * := Intuition,
  16.        g  * := Graphics;
  17.  
  18. CONST
  19.  
  20. (* ---- console unit numbers for OpenDevice() *)
  21.   library   * = -1;      (* no unit, just fill in IO_DEVICE field *)
  22.   standard  * = 0;       (* standard unmapped console *)
  23.  
  24. (* ---- New unit numbers for OpenDevice() - (V36) *)
  25.  
  26.   charMap   * = 1;       (* bind character map to console *)
  27.   snipMap   * = 3;       (* bind character map w/ snip to console *)
  28.  
  29. (* ---- New flag defines for OpenDevice() - (V37) *)
  30.  
  31.   flagDefault         * = LONGSET{};
  32.   flagNoDrawOnNewSize * = LONGSET{0};
  33.  
  34.  
  35.   pmbAsm    * = c.mLNM+1;       (* internal storage bit for AS flag *)
  36.   pmbAwm    * = pmbAsm+1;       (* internal storage bit for AW flag *)
  37.   maxTabs   * = 80;
  38.  
  39. TYPE
  40.  
  41.   ConUnitPtr * = UNTRACED POINTER TO   ConUnit;
  42.   ConUnit * = STRUCT (mp * : e.MsgPort)
  43.       (* ---- read only variables *)
  44.     window * : I.WindowPtr;  (* intuition window bound to this unit *)
  45.     xCP * : INTEGER;             (* character position *)
  46.     yCP * : INTEGER;
  47.     xMax * : INTEGER;            (* max character position *)
  48.     yMax * : INTEGER;
  49.     xRSize * : INTEGER;          (* character raster size *)
  50.     yRSize * : INTEGER;
  51.     xROrigin * : INTEGER;        (* raster origin *)
  52.     yROrigin * : INTEGER;
  53.     xRExtant * : INTEGER;        (* raster maxima *)
  54.     yRExtant * : INTEGER;
  55.     xMinShrink * : INTEGER;      (* smallest area intact from resize process *)
  56.     yMinShrink * : INTEGER;
  57.     xcCP * : INTEGER;            (* cursor position *)
  58.     ycCP * : INTEGER;
  59.     
  60.       (* ---- read/write variables (writes must must be protected) *)
  61.       (* ---- storage for AskKeyMap and SetKeyMap *)
  62.     keyMapStruct * : km.KeyMap;
  63.       (* ---- tab stops *)
  64.     tabStops * : ARRAY maxTabs OF INTEGER; (* 0 at start, 0xffff at end of list *)
  65.     
  66.       (* ---- console rastport attributes *)
  67.     mask * : SHORTSET;
  68.     fgPen * : SHORTINT;
  69.     bgPen * : SHORTINT;
  70.     aolPen * : SHORTINT;
  71.     drawMode * : SHORTSET;
  72.     obsolete1 * : e.BYTE;       (* was cu_AreaPtSz -- not used in V36 *)
  73.     obsolete2 * : e.APTR;       (* was cu_AreaPtrn -- not used in V36 *)
  74.     minterms * : ARRAY 8 OF e.BYTE;   (* console minterms *)
  75.     font * : g.TextFontPtr;
  76.     algoStyle * : e.BYTE;
  77.     txFlags * : SHORTSET;
  78.     txHeight * : INTEGER;
  79.     txWidth * : INTEGER;
  80.     txBaseline * : INTEGER;
  81.     txSpacing * : INTEGER;
  82.     
  83.     (* ---- console MODES and RAW EVENTS switches *)
  84.     modes * : ARRAY (pmbAwm + 7) DIV 8 OF SHORTSET;    (* one bit per mode *)
  85.     rawEvents * : ARRAY (ie.classMax + 7) DIV 8 OF SHORTSET;
  86.   END;
  87.  
  88. END ConUnit.
  89.  
  90.  
  91.  
  92.