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 / Console.mod < prev    next >
Encoding:
Text File  |  1995-01-26  |  3.7 KB  |  161 lines

  1. (***************************************************************************
  2.  
  3.      $RCSfile: Console.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.   Includes Release 40.15
  12.  
  13.   (C) Copyright 1985-1993 Commodore-Amiga, Inc.
  14.       All Rights Reserved
  15.  
  16.   Oberon-A interface Copyright © 1994-1995, Frank Copeland.
  17.   This file is part of the Oberon-A Interface.
  18.   See Oberon-A.doc for conditions of use and distribution.
  19.  
  20. ***************************************************************************)
  21.  
  22. <* STANDARD- *> <* INITIALISE- *> <* MAIN- *>
  23. <*$ CaseChk-  IndexChk- LongVars+ NilChk-  *>
  24. <*$ RangeChk- StackChk- TypeChk-  OvflChk- *>
  25.  
  26. MODULE [2] Console;
  27.  
  28. IMPORT
  29.   SYS := SYSTEM, e := Exec, ie := InputEvent, km := KeyMap, u := Utility;
  30.  
  31.  
  32. (*
  33. **      $VER: console.h 36.11 (7.11.90)
  34. **
  35. **      Console device command definitions
  36. *)
  37.  
  38. CONST
  39.  
  40. (****** Console commands ******)
  41.   askKeyMap            * = e.nonstd+0;
  42.   setKeyMap            * = e.nonstd+1;
  43.   askDefaultKeyMap     * = e.nonstd+2;
  44.   setDefaultKeyMap     * = e.nonstd+3;
  45.  
  46. (****** SGR parameters ******)
  47.  
  48.   primary     * = 0;
  49.   bold        * = 1;
  50.   italic      * = 3;
  51.   underscore  * = 4;
  52.   negative    * = 7;
  53.  
  54.   normal      * = 22;      (* default foreground color, not bold *)
  55.   notItalic   * = 23;
  56.   notUnderscore * = 24;
  57.   positive    * = 27;
  58.  
  59. (* these names refer to the ANSI standard, not the implementation *)
  60.   black       * = 30;
  61.   red         * = 31;
  62.   green       * = 32;
  63.   yellow      * = 33;
  64.   blue        * = 34;
  65.   magenta     * = 35;
  66.   cyan        * = 36;
  67.   white       * = 37;
  68.   default     * = 39;
  69.  
  70.   blackBg     * = 40;
  71.   redBg       * = 41;
  72.   greenBg     * = 42;
  73.   yellowBg    * = 43;
  74.   blueBg      * = 44;
  75.   magentaBg   * = 45;
  76.   cyanBg      * = 46;
  77.   whiteBg     * = 47;
  78.   defaultBg   * = 49;
  79.  
  80. (* these names refer to the implementation, they are the preferred *)
  81. (* names for use with the Amiga console device. *)
  82.   clr0        * = 30;
  83.   clr1        * = 31;
  84.   clr2        * = 32;
  85.   clr3        * = 33;
  86.   clr4        * = 34;
  87.   clr5        * = 35;
  88.   clr6        * = 36;
  89.   clr7        * = 37;
  90.  
  91.   clr0Bg      * = 40;
  92.   clr1Bg      * = 41;
  93.   clr2Bg      * = 42;
  94.   clr3Bg      * = 43;
  95.   clr4Bg      * = 44;
  96.   clr5Bg      * = 45;
  97.   clr6Bg      * = 46;
  98.   clr7Bg      * = 47;
  99.  
  100.  
  101. (****** DSR parameters ******)
  102.  
  103.   dsrCpr         * = 6;
  104.  
  105. (****** CTC parameters ******)
  106.   ctcHSetTab     * = 0;
  107.   ctcHClrTab     * = 2;
  108.   ctcHClrTabsAll * = 5;
  109.  
  110. (****** TBC parameters ******)
  111.   tbcHClrTab     * = 0;
  112.   tbcHClrTabsAll * = 3;
  113.  
  114. (****** SM and RM parameters ******)
  115.   mLNM   * = 20;      (* linefeed newline mode *)
  116.   mASM   * = ">1";    (* auto scroll mode *)
  117.   mAWM   * = "?7";    (* auto wrap mode *)
  118.  
  119.  
  120. (**-- Device base variable----------------------------------------------*)
  121.  
  122.  
  123. CONST
  124.  
  125.   consoleName * = "console.device";
  126.  
  127. VAR
  128.  
  129.   base * : e.DevicePtr;
  130.  
  131. (**-- Device functions -------------------------------------------------*)
  132.  
  133. (*
  134. **      $VER: console_protos.h 36.6 (7.11.90)
  135. *)
  136.  
  137. PROCEDURE CDInputHandler* [base,-42]
  138.   ( events        [8] : ie.InputEventDummyPtr;
  139.     consoleDevice [9] : e.LibraryBasePtr )
  140.   : ie.InputEventDummyPtr;
  141. PROCEDURE RawKeyConvert* [base,-48]
  142.   ( events     [8] : ie.InputEventDummyPtr;
  143.     VAR buffer [9] : ARRAY OF SYS.BYTE;
  144.     length     [1] : LONGINT;
  145.     keyMap    [10] : km.KeyMapPtr )
  146.   : LONGINT;
  147.  
  148. (*--- functions in V36 or higher (Release 2.0) ---*)
  149.  
  150. PROCEDURE GetConSnip * [base,-54] ()
  151.   : LONGINT;
  152. PROCEDURE SetConSnip * [base,-60]
  153.   ( snip [8] : LONGINT);
  154. PROCEDURE AddConSnipHook * [base,-66]
  155.   ( hook [8] : u.HookBasePtr );
  156. PROCEDURE RemConSnipHook * [base,-72]
  157.   ( hook [8] : u.HookBasePtr );
  158.  
  159. BEGIN base := NIL
  160. END Console.
  161.